am_jygzs.~pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit am_jygzs;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, DB, StdCtrls, Buttons, ExtCtrls, DBCtrlsEh, Mask, DBCtrls;
- type
- Tam_jygz = class(TForm)
- Panel1: TPanel;
- SpeedButton1: TSpeedButton;
- SpeedButton2: TSpeedButton;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- Label5: TLabel;
- Label6: TLabel;
- DataSource1: TDataSource;
- DBComboBoxEh1: TDBComboBoxEh;
- DBEditEh3: TDBEditEh;
- SpeedButton3: TSpeedButton;
- SpeedButton4: TSpeedButton;
- DBNavigator1: TDBNavigator;
- Label7: TLabel;
- DBNumberEditEh1: TDBNumberEditEh;
- DBNumberEditEh2: TDBNumberEditEh;
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure FormCreate(Sender: TObject);
- procedure SpeedButton1Click(Sender: TObject);
- procedure SpeedButton3Click(Sender: TObject);
- procedure SpeedButton4Click(Sender: TObject);
- procedure SpeedButton2Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- am_jygz: Tam_jygz;
- implementation
- uses dms, xt_yhz_ms;
- {$R *.dfm}
- procedure Tam_jygz.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- action:=cafree;
- am_jygz:=nil;
- end;
- procedure Tam_jygz.FormCreate(Sender: TObject);
- begin
- dm.am_jygl.Active:=false;
- dm.am_jygz.Active:=true;
- end;
- procedure Tam_jygz.SpeedButton1Click(Sender: TObject);
- var i:integer;
- begin
- if dbediteh3.Text='' then
- begin
- application.MessageBox('借阅级别不能为空','提示',mb_ok+mb_iconinformation);
- end;
- Dm.am_jygz.ApplyUpdates(0);
- i:=Dm.am_jygz.ApplyUpdates(0);
- if i=0 then
- begin
- application.MessageBox('数据保存成功','提示',mb_ok+mb_iconinformation);
- dm.am_jygz.Close;
- dm.am_jygz.CommandText:='select * from am_jygz';
- dm.am_jygz.Open;
- end
- else
- begin
- application.MessageBox('数据保存失败','提示',mb_ok+mb_iconinformation);
- exit;
- end;
- end;
- procedure Tam_jygz.SpeedButton3Click(Sender: TObject);
- begin
- dm.am_jygz.Append;
- end;
- procedure Tam_jygz.SpeedButton4Click(Sender: TObject);
- begin
- dm.am_jygz.edit;
- end;
- procedure Tam_jygz.SpeedButton2Click(Sender: TObject);
- begin
- close;
- end;
- end.