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

12 months ago
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('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְԱ<D6B0><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
str:=RxDBLookupCombo4.DisplayValue;
try
old_str:=frm_sys_dep_emp.t_sys_employee['<27><><EFBFBD><EFBFBD>'];
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('ɾ<><C9BE>ְԱʧ<D4B1><CAA7>');
exit;
end;
close;
end;
end.