am_ajlb_xzs.pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit am_ajlb_xzs;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, DB, DBClient, Buttons, Grids, DBGridEh, ExtCtrls;
- type
- TAm_Ajlb_xz = class(TForm)
- Panel1: TPanel;
- DBGridEh2: TDBGridEh;
- Panel2: TPanel;
- SpeedButton1: TSpeedButton;
- SpeedButton2: TSpeedButton;
- SpeedButton3: TSpeedButton;
- DataSource2: TDataSource;
- ClientDataSet1: TClientDataSet;
- procedure FormCreate(Sender: TObject);
- procedure DBGridEh2DblClick(Sender: TObject);
- procedure SpeedButton2Click(Sender: TObject);
- procedure SpeedButton3Click(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure SpeedButton1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Am_Ajlb_xz: TAm_Ajlb_xz;
- implementation
- uses Am_Ajtzs, AM_ajlb_cxs;
- {$R *.dfm}
- procedure TAm_Ajlb_xz.FormCreate(Sender: TObject);
- begin
- Clientdataset1.Close;
- Clientdataset1.CommandText:='select * from sz_ajlb';
- Clientdataset1.Open;
- end;
- procedure TAm_Ajlb_xz.DBGridEh2DblClick(Sender: TObject);
- begin
- if Clientdataset1.recordcount<>0 then
- begin
- am_ajtz.DBEditeh2.Text:=Clientdataset1.fieldbyname('ajlb_dm').AsString;
- close;
- end;
- end;
- procedure TAm_Ajlb_xz.SpeedButton2Click(Sender: TObject);
- begin
- if Clientdataset1.recordcount<>0 then
- begin
- Am_Ajtz.DBEditeh2.Text:=Clientdataset1.fieldbyname('ajlb_dm').AsString;
- close;
- end;
- end;
- procedure TAm_Ajlb_xz.SpeedButton3Click(Sender: TObject);
- begin
- Close;
- end;
- procedure TAm_Ajlb_xz.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- Clientdataset1.active:=false;
- action:=cafree;
- am_ajlb_xz:=nil;
- end;
- procedure TAm_Ajlb_xz.SpeedButton1Click(Sender: TObject);
- begin
- if am_ajlb_cx=Nil then
- begin
- am_ajlb_cx:=Tam_ajlb_cx.create(application);
- am_ajlb_cx.showmodal;
- end;
- end;
- end.