am_ajxh_xhs.pas
资源名称:挡案管理系统.rar [点击查看]
上传用户:szruida
上传日期:2007-06-01
资源大小:6518k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit am_ajxh_xhs;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, DB, DBCtrlsEh, StdCtrls, DBCtrls, Mask, ExtCtrls, Buttons;
- type
- Tam_ajxh_xh = class(TForm)
- btn_save: TSpeedButton;
- btn_quit: TSpeedButton;
- Panel1: TPanel;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- DBEdit4: TDBEdit;
- DBMemo1: TDBMemo;
- DBMemo2: TDBMemo;
- DBEditEh1: TDBEditEh;
- DataSource1: TDataSource;
- procedure btn_quitClick(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure FormCreate(Sender: TObject);
- procedure btn_saveClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- am_ajxh_xh: Tam_ajxh_xh;
- implementation
- uses dms,u_public, mainfrms;
- {$R *.dfm}
- procedure Tam_ajxh_xh.btn_quitClick(Sender: TObject);
- begin
- close;
- end;
- procedure Tam_ajxh_xh.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- action:=cafree;
- am_ajxh_xh:=nil;
- end;
- procedure Tam_ajxh_xh.FormCreate(Sender: TObject);
- //var s:string;
- begin
- //s:=dm.V_ajgl_dxh.fieldbyname('aj_xh').AsString;
- //dm.am_ajxh.Close;
- //dm.am_ajxh.CommandText:='select * from am_ajxh where aj_xh='+''''+s+''''+'';
- //dm.am_ajxh.Open;
- //dbedit4.Text:=dm.am_ajxh.fieldbyname('ajxh_jdr').AsString;
- //鉴定人是否和销毁人一样
- dbediteh1.Text:=formatdatetime('yyyy-mm-dd',now);
- end;
- procedure Tam_ajxh_xh.btn_saveClick(Sender: TObject);
- var i:integer;
- s:string;
- begin
- s:=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);
- dm.V_ajgl_gd.Close;
- dm.V_ajgl_gd.CommandText:='update v_ajgl_gd set ajzt_mc=''已销毁案卷'' where aj_xh='+''''+s+''''+'';
- dm.V_ajgl_gd.Execute;
- //dm.V_ajgl_gd.Close;
- //dm.V_ajgl_gd.CommandText:='P_ajgl_dxh';//查找待销毁案卷
- //dm.V_ajgl_gd.Open;
- dm.V_ajgl_Dxh.Close;
- dm.V_ajgl_Dxh.CommandText:='P_ajgl_dxh';
- dm.v_ajgl_dxh.Open;
- dm.V_ajgl_yxh.Close;
- dm.V_ajgl_yxh.CommandText:='P_ajgl_yxh';//查找待销毁案卷
- dm.V_ajgl_yxh.Open;
- close;
- end
- else
- begin
- application.MessageBox('数据保存失败','提示',mb_ok+mb_iconinformation);
- exit;
- end;
- end;
- end.