You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.3 KiB
Plaintext

unit u_op_delnote;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, bsSkinCtrls, DB, ADODB, RxLookup;
type
Tfrm_op_delnote = class(TForm)
bsSkinGroupBox9: TbsSkinGroupBox;
lbl4: TLabel;
lbl5: TLabel;
lbl6: TLabel;
bsSkinButton56: TbsSkinButton;
dbedt4: TDBEdit;
dbedt5: TDBEdit;
ds_op_delnote1: TDataSource;
t_op_delnote: TADOQuery;
DBMemo1: TDBMemo;
DataSource1: TDataSource;
t_code_del: TADOQuery;
t_code_del1: TDataSource;
RxDBLookupCombo2: TRxDBLookupCombo;
bsSkinSpeedButton1: TbsSkinSpeedButton;
procedure t_op_delnoteAfterInsert(DataSet: TDataSet);
procedure t_op_delnoteBeforePost(DataSet: TDataSet);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure RxDBLookupCombo2Change(Sender: TObject);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_delnote: Tfrm_op_delnote;
implementation
uses u_main, u_op_seae, my_sys_function, u_code_delnote;
{$R *.dfm}
procedure Tfrm_op_delnote.t_op_delnoteAfterInsert(DataSet: TDataSet);
begin
t_op_delnote.FieldByName('编号').AsString:=DataSource1.DataSet.fieldbyname('编号').AsString;
t_op_delnote.FieldByName('申请人').AsString:=employee;
t_op_delnote.FieldByName('申请日期').Asdatetime:=date;
end;
procedure Tfrm_op_delnote.t_op_delnoteBeforePost(DataSet: TDataSet);
begin
table_before_post(t_op_delnote,'申请原因');
end;
procedure Tfrm_op_delnote.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
if t_op_delnote.State in [dsedit,dsinsert] then
t_op_delnote.Post;
CanClose:=frm_close_query(t_op_delnote)
end;
procedure Tfrm_op_delnote.RxDBLookupCombo2Change(Sender: TObject);
begin
t_op_delnote.Edit;
t_op_delnote['申请原因']:=t_code_del['删除原因'];
t_op_delnote.post;
end;
procedure Tfrm_op_delnote.bsSkinSpeedButton1Click(Sender: TObject);
begin
frm_code_delnote:=Tfrm_code_delnote.Create(self);
try
frm_code_delnote.ShowModal;
finally
FreeAndNil(frm_code_delnote);
end;
end;
procedure Tfrm_op_delnote.FormShow(Sender: TObject);
begin
t_code_del.Open;
end;
end.