Am_AJJDs.pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit Am_AJJDs;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ExtCtrls, DB, StdCtrls, Mask, DBCtrls, Buttons, DBCtrlsEh;
- type
- TAm_AJJD = class(TForm)
- Panel1: TPanel;
- Label1: TLabel;
- DataSource1: TDataSource;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- DBEdit4: TDBEdit;
- DBMemo1: TDBMemo;
- DBMemo2: TDBMemo;
- btn_save: TSpeedButton;
- btn_quit: TSpeedButton;
- DBEditEh1: TDBEditEh;
- procedure btn_quitClick(Sender: TObject);
- procedure btn_saveClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Am_AJJD: TAm_AJJD;
- implementation
- uses DMs, Am_Ajxhs, mainfrms;
- {$R *.dfm}
- procedure TAm_AJJD.btn_quitClick(Sender: TObject);
- begin
- close;
- end;
- procedure TAm_AJJD.btn_saveClick(Sender: TObject);
- var i:integer;
- begin
- dm.am_ajxh.Edit;
- dm.am_ajxh.FieldByName('ajxh_jdrq').AsString:=dbediteh1.Text;
- dm.am_ajxh.FieldByName('aj_xh').AsString:=dm.V_ajgl_dxh.fieldbyname('aj_xh').AsString;
- dm.am_ajxh.ApplyUpdates(0);
- i:=dm.am_ajxh.ApplyUpdates(0);
- if i=0 then
- begin
- application.MessageBox('数据保存成功','提示',mb_ok+mb_iconinformation);
- am_ajxh.toolbutton2.enabled:=true;
- close;
- end
- else
- begin
- application.MessageBox('数据保存失败','提示',mb_ok+mb_iconinformation);
- close;
- end
- end;
- procedure TAm_AJJD.FormCreate(Sender: TObject);
- begin
- dbediteh1.Text:=formatdatetime('yyyy-mm-dd',now);
- end;
- procedure TAm_AJJD.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- action:=cafree;
- am_ajjd:=nil;
- end;
- end.