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.
70 lines
1.6 KiB
Plaintext
70 lines
1.6 KiB
Plaintext
unit u_sys_dep_emp_delete;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, BusinessSkinForm, bsSkinCtrls, StdCtrls, RxLookup;
|
|
|
|
type
|
|
Tfrm_sys_dep_emp_delete = class(TForm)
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
bsSkinButton1: TbsSkinButton;
|
|
bsSkinButton2: TbsSkinButton;
|
|
Label1: TLabel;
|
|
Label15: TLabel;
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
end;
|
|
|
|
var
|
|
frm_sys_dep_emp_delete: Tfrm_sys_dep_emp_delete;
|
|
|
|
implementation
|
|
|
|
uses u_sys_dep_emp, u_data_share;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_sys_dep_emp_delete.bsSkinButton2Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_sys_dep_emp_delete.FormShow(Sender: TObject);
|
|
begin
|
|
frm_data_share.t_sys_employee.requery;
|
|
end;
|
|
|
|
procedure Tfrm_sys_dep_emp_delete.bsSkinButton1Click(Sender: TObject);
|
|
var
|
|
old_str,str:string;
|
|
begin
|
|
if RxDBLookupCombo4.DisplayValue='' then
|
|
begin
|
|
showmessage('请输入接手职员姓名!');
|
|
exit;
|
|
end;
|
|
str:=RxDBLookupCombo4.DisplayValue;
|
|
|
|
try
|
|
old_str:=frm_sys_dep_emp.t_sys_employee['姓名'];
|
|
frm_sys_dep_emp.t_sys_employee.delete;
|
|
frm_sys_dep_emp.p_employee_delete.Parameters.ParamByName('old_name').Value:=old_str;
|
|
frm_sys_dep_emp.p_employee_delete.Parameters.ParamByName('new_name').Value:=str;
|
|
frm_sys_dep_emp.p_employee_delete.ExecProc;
|
|
except
|
|
showmessage('删除职员失败');
|
|
exit;
|
|
end;
|
|
close;
|
|
end;
|
|
|
|
end.
|