unit Unit9;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, DBCtrls, Buttons,DB;

type
  Tinfo = class(TForm)
    DBMemo1: TDBMemo;
    BitBtn1: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  info: Tinfo;

implementation

uses Unit3, Unit1;

{$R *.DFM}

procedure Tinfo.BitBtn1Click(Sender: TObject);
begin
if (dm.info.state=dsEdit)or(dm.info.State=dsInsert) then dm.info.Post;
dm.info.close;
info.close;
end;

procedure Tinfo.FormClose(Sender: TObject; var Action: TCloseAction);
begin
mainform.enabled:=true;
end;

procedure Tinfo.FormShow(Sender: TObject);
begin
mainform.enabled:=false;
end;

end.
