am_yhz_xzs.pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit am_yhz_xzs;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, DB, Buttons, Grids, DBGridEh, ExtCtrls;
- type
- Tam_yhz_xz = class(TForm)
- Panel1: TPanel;
- DBGridEh1: TDBGridEh;
- Panel2: TPanel;
- SpeedButton1: TSpeedButton;
- SpeedButton2: TSpeedButton;
- SpeedButton3: TSpeedButton;
- DataSource1: TDataSource;
- procedure FormCreate(Sender: TObject);
- procedure SpeedButton2Click(Sender: TObject);
- procedure SpeedButton3Click(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure DBGridEh1DblClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- am_yhz_xz: Tam_yhz_xz;
- implementation
- uses dms,u_public, Xt_Qxszs;
- {$R *.dfm}
- procedure Tam_yhz_xz.FormCreate(Sender: TObject);
- begin
- dm.V_UandG.Close;
- dm.v_uandg.CommandText:='P_yhz_xz';
- dm.V_UandG.Open;
- end;
- procedure Tam_yhz_xz.SpeedButton2Click(Sender: TObject);
- begin
- if dm.V_UandG.RecordCount<>0 then
- begin
- Xt_Cdqx.FlatEdit1.text:=dm.v_uandG.fieldbyname('yhz_mc').AsString;
- Xt_Cdqx.FlatEdit2.text:=dm.v_uandG.fieldbyname('yhz_dm').AsString;
- xt_cdqx.AllSelect.Enabled:=true;
- xt_cdqx.AllClear.Enabled:=true;
- xt_cdqx.Quit.Enabled:=true;
- xt_cdqx.Save.Enabled:=true;
- close;
- end;
- end;
- procedure Tam_yhz_xz.SpeedButton3Click(Sender: TObject);
- begin
- close;
- end;
- procedure Tam_yhz_xz.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- dm.V_UandG.Active:=false;
- action:=cafree;
- am_yhz_xz:=nil;
- end;
- procedure Tam_yhz_xz.DBGridEh1DblClick(Sender: TObject);
- begin
- if dm.V_UandG.RecordCount<>0 then
- begin
- Xt_Cdqx.FlatEdit1.text:=dm.v_uandG.fieldbyname('yhz_mc').AsString;
- Xt_Cdqx.FlatEdit2.text:=dm.v_uandG.fieldbyname('yhz_dm').AsString;
- xt_cdqx.AllSelect.Enabled:=true;
- xt_cdqx.AllClear.Enabled:=true;
- xt_cdqx.Quit.Enabled:=true;
- xt_cdqx.Save.Enabled:=true;
- close;
- end;
- end;
- end.