am_dz_xzs.pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit am_dz_xzs;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ExtCtrls, Grids, DBGridEh, Buttons, DB, DBClient;
- type
- Tam_dz_xz = class(TForm)
- Panel1: TPanel;
- Panel2: TPanel;
- SpeedButton1: TSpeedButton;
- SpeedButton2: TSpeedButton;
- DBGridEh1: TDBGridEh;
- DataSource1: TDataSource;
- SpeedButton3: TSpeedButton;
- procedure SpeedButton2Click(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure DBGridEh1DblClick(Sender: TObject);
- procedure SpeedButton3Click(Sender: TObject);
- procedure SpeedButton1Click(Sender: TObject);
- procedure FormShow(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- am_dz_xz: Tam_dz_xz;
- implementation
- uses dms,u_public,am_jygl_bjs, am_dzbjs, ljszs;
- {$R *.dfm}
- procedure Tam_dz_xz.SpeedButton2Click(Sender: TObject);
- begin
- if dm.V_DZ.RecordCount<>0 then
- begin
- am_jygl_bj.DBEditEh2.Text:=dbgrideh1.Columns[0].DisplayText;
- close;
- end;
- end;
- procedure Tam_dz_xz.FormCreate(Sender: TObject);
- begin
- {Dm.am_dz.Active:=true;
- dm.am_jygz.Active:=true;
- DM.sz_zjlb.Active:=true;}
- dm.V_DZ.Close;
- dm.V_DZ.CommandText:='select * from v_dz';
- dm.V_DZ.Open;
- end;
- procedure Tam_dz_xz.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- Dm.am_dz.Active:=false;
- dm.am_jygz.Active:=false;
- DM.sz_zjlb.Active:=false;
- dm.V_DZ.Active:=false;
- action:=cafree;
- am_dz_xz:=nil;
- end;
- procedure Tam_dz_xz.DBGridEh1DblClick(Sender: TObject);
- var
- k:string;
- begin
- if dm.V_DZ.RecordCount<>0 then
- begin
- k:=dbgrideh1.Columns[0].DisplayText;
- am_jygl_bj.DBEditEh2.clear;
- am_jygl_bj.DBEditEh2.text:=k;
- close;
- end;
- end;
- procedure Tam_dz_xz.SpeedButton3Click(Sender: TObject);
- begin
- close;
- end;
- procedure Tam_dz_xz.SpeedButton1Click(Sender: TObject);
- begin
- if am_dzbj=nil then
- begin
- am_dzbj:=Tam_dzbj.create(application);
- dm.am_dz.Close;
- dm.am_dz.CommandText:='select * from am_dz where dz_dm='+''''+''''+'';
- dm.am_dz.Open;
- am_dzbj.Label1.Caption:='增加读者';
- am_dzbj.showmodal;
- end;
- end;
- procedure Tam_dz_xz.FormShow(Sender: TObject);
- begin
- { clientdataset1.Close;
- clientdataset1.CommandText:='select * from v_dz';
- clientdataset1.Open; }
- end;
- end.