depts.pas
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit depts;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  5.   Grids, DBGrids, StdCtrls;
  6. type
  7.   TfrmDepartments = class(TForm)
  8.     btnAccept: TButton;
  9.     DBGrid1: TDBGrid;
  10.     Label1: TLabel;
  11.     btnCancel: TButton;
  12.     procedure FormCreate(Sender: TObject);
  13.     procedure FormDestroy(Sender: TObject);
  14.   private
  15.     { Private declarations }
  16.   public
  17.     { Public declarations }
  18.   end;
  19. var
  20.   frmDepartments: TfrmDepartments;
  21. implementation
  22. uses data;
  23. {$R *.DFM}
  24. procedure TfrmDepartments.FormCreate(Sender: TObject);
  25. begin
  26.   try
  27.     dmData.qryDepartment.Open;
  28.   except
  29.     Close;
  30.   end;
  31. end;
  32. procedure TfrmDepartments.FormDestroy(Sender: TObject);
  33. begin
  34.   dmData.qryDepartment.Close;
  35. end;
  36. end.