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.

1340 lines
40 KiB
Plaintext

11 months ago
unit u_op_delete;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, dxExEdtr, StdCtrls, DBCtrls, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, RxLookup,
wwdbdatetimepicker, ExtCtrls;
type
Tfrm_op_delete = class(TForm)
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel2: TbsSkinPanel;
dxDBGrid1: TdxDBGrid;
t_op_delete: TADOQuery;
t_op_delete1: TDataSource;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
Label6: TLabel;
Edit1: TEdit;
Label8: TLabel;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label11: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
Label7: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinGroupBox1: TbsSkinGroupBox;
DBMemo1: TDBMemo;
bsSkinButton1: TbsSkinButton;
t_double: TADOQuery;
t_op_ctn: TADOQuery;
bsSkinGroupBox2: TbsSkinGroupBox;
DBMemo2: TDBMemo;
dxDBGrid1Column7: TdxDBGridColumn;
bsSkinButton9: TbsSkinButton;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure bsSkinPanel2Resize(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure huifu_op;
function huifu_ctn:boolean;
procedure huifu_1;
procedure huifu_2;
procedure huifu_3;
procedure huifu_4;
procedure t_doublePostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure t_doubleBeforeCancel(DataSet: TDataSet);
procedure bsSkinButton9Click(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
private
{ Private declarations }
procedure deleseae_bunk(bianhao:string);
public
{ Public declarations }
end;
var
frm_op_delete: Tfrm_op_delete;
implementation
uses u_main, my_sys_function, u_op_delete_insert;
{$R *.dfm}
function Tfrm_op_delete.huifu_ctn:boolean;
var
str,str_sub,str_field:widestring;
begin
try
t_op_ctn.close;
t_op_ctn.open;
str:=t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ').asstring;
while pos(#4,str)<>0 do
begin
str_sub:=copy(str,1,pos(#7,str));
if pos(#7,str)=length(str) then
str:=''
else
str:=copy(str,pos(#7,str)+1,length(str)-pos(#7,str));
str_field:=copy(str_sub,pos(#4,str_sub)+1,pos(#5,str_sub)-1-pos(#4,str_sub));
if str_field='ctn_id' then
t_op_ctn.insert
else
case strtoint(copy(str_sub,pos(#5,str_sub)+1,pos(#6,str_sub)-pos(#5,str_sub)-1)) of
1:
begin
if copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1)='True'then
t_op_ctn[str_field]:=1
else
t_op_ctn[str_field]:=0;
end;
2:
begin
if copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1)=''then
t_op_ctn[str_field]:=null
else
t_op_ctn[str_field]:=copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1);
end;
3:
begin
if copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1)=''then
t_op_ctn[str_field]:=0
else
t_op_ctn[str_field]:=strtofloat(copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1));
end;
4:
begin
t_op_ctn[str_field]:=copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1);
end;
end;
end;
if t_op_ctn.State=dsinsert then
t_op_ctn.post;
result:=true;
except
while not t_op_ctn.eof do
t_op_ctn.delete;
result:=false;
end;
end;
procedure Tfrm_op_delete.huifu_op;
var
str,str_sub,str_field:widestring;
begin
str:=t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD>Ϣ').asstring;
while pos(#4,str)<>0 do
begin
str_sub:=copy(str,1,pos(#7,str));
if pos(#7,str)=length(str) then
str:=''
else
str:=copy(str,pos(#7,str)+1,length(str)-pos(#7,str));
str_field:=copy(str_sub,pos(#4,str_sub)+1,pos(#5,str_sub)-1-pos(#4,str_sub));
case strtoint(copy(str_sub,pos(#5,str_sub)+1,pos(#6,str_sub)-pos(#5,str_sub)-1)) of
1:
begin
if copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1)='True'then
t_double[str_field]:=1
else
t_double[str_field]:=0;
end;
2:
begin
if copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1)=''then
t_double[str_field]:=null
else
t_double[str_field]:=(copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1));
// t_double[str_field]:=strtodate(copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1));
end;
3:
begin
if copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1)=''then
t_double[str_field]:=0
else
t_double[str_field]:=strtofloat(copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1));
end;
4:
begin
t_double[str_field]:=copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1);
end;
end;
end;
end;
procedure Tfrm_op_delete.huifu_1;
var
str:widestring;
str_main,str_fen,str_wei,str_kuaiji:string;
if_main,if_fen,if_wei,if_do:boolean;
begin
if strtobool(get_parameters_value(31,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
str:='where <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
if strtobool(get_parameters_value(32,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+''''
else
str:=str+' or <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
end;
if strtobool(get_parameters_value(33,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if str=''then
str:='where ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+''''
else
str:=str+' or ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+'''';
end;
end;
t_double.close;
t_double.sql.clear;
if str<>''then
t_double.sql.add('select * from t_op_seae '+str)
else
t_double.sql.add('select top 0 * from t_op_seae ');
t_double.open;
if not t_double.IsEmpty then
begin
if strtobool(get_parameters_value(31,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring then
begin
if_main:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_main:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(32,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring then
begin
if_fen:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_fen:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(33,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring=t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring then
begin
if_wei:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='ί<>б<EFBFBD><D0B1><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='ί<>б<EFBFBD><D0B1><EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_wei:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
end;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ䣡<DABC><E4A3A1>';
frm_op_delete_insert.wwDBDateTimePicker1.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_kuaiji:=frm_op_delete_insert.wwDBDateTimePicker1.text;
if str_kuaiji=''then
begin
if_do:=false;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ䲻<DABC><E4B2BB>Ϊ<EFBFBD>գ<EFBFBD>');
end
else
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
try
t_double.insert;
frm_op_delete.huifu_op;
t_double['<27><><EFBFBD><EFBFBD>']:=get_id;
t_double['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_double['<27><><EFBFBD><EFBFBD>'];
t_double['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=strtodate(str_kuaiji);
t_double['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.SeaExpBsNo,'SE'));
if if_main then
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>']:=str_main;
if if_fen then
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>']:=str_fen;
if if_wei then
t_double['ί<>б<EFBFBD><D0B1><EFBFBD>']:=str_wei;
if strtobool(get_parameters_value(31,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(32,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(33,'false')) then
begin
if trim(t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='' then
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
t_double['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
t_double['<27><><EFBFBD>ر<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
t_double['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
t_double['<27>Ƿ<EFBFBD><C7B7>˲<EFBFBD>']:=0;
t_double.post;
updatesaleorder(t_double['<27><><EFBFBD><EFBFBD>'],'<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>');
{if not huifu_ctn then
begin
t_double.delete;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end; }
t_op_delete.Delete;
except
if t_double.State=dsinsert then
t_double.cancel;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD><D6B8>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>'+'<27>µ<EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>'+t_double['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']);
end;
procedure Tfrm_op_delete.huifu_2;
var
str:widestring;
str_main,str_fen,str_wei,str_kuaiji:string;
if_main,if_fen,if_wei,if_do:boolean;
begin
if strtobool(get_parameters_value(34,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
str:='where <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
if strtobool(get_parameters_value(35,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+''''
else
str:=str+' or <20><><EFBFBD><EFBFBD><E1B5A5>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
end;
if strtobool(get_parameters_value(36,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if str=''then
str:='where ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+''''
else
str:=str+' or ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+'''';
end;
end;
t_double.close;
t_double.sql.clear;
if str<>''then
t_double.sql.add('select * from t_op_seai '+str)
else
t_double.sql.add('select top 0 * from t_op_seai ');
t_double.open;
if not t_double.IsEmpty then
begin
if strtobool(get_parameters_value(34,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring then
begin
if_main:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_main:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(35,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring then
begin
if_fen:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_fen:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(36,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring=t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring then
begin
if_wei:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='ί<>б<EFBFBD><D0B1><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='ί<>б<EFBFBD><D0B1><EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_wei:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
end;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ䣡<DABC><E4A3A1>';
frm_op_delete_insert.wwDBDateTimePicker1.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_kuaiji:=frm_op_delete_insert.wwDBDateTimePicker1.text;
if str_kuaiji=''then
begin
if_do:=false;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ䲻<DABC><E4B2BB>Ϊ<EFBFBD>գ<EFBFBD>');
end
else
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
try
t_double.insert;
frm_op_delete.huifu_op;
t_double['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=strtodate(str_kuaiji);
t_double['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.SeaImpBsNo,'SI'));
if if_main then
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>']:=str_main;
if if_fen then
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>']:=str_fen;
if if_wei then
t_double['ί<>б<EFBFBD><D0B1><EFBFBD>']:=str_wei;
if strtobool(get_parameters_value(34,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(35,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD><E1B5A5>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(36,'false')) then
begin
if trim(t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='' then
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
t_double.post;
{if not huifu_ctn then
begin
t_double.delete;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end; }
t_op_delete.Delete;
except
if t_double.State=dsinsert then
t_double.cancel;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD><D6B8>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_delete.huifu_3;
var
str:widestring;
str_main,str_fen,str_wei,str_kuaiji:string;
if_main,if_fen,if_wei,if_do:boolean;
begin
if strtobool(get_parameters_value(40,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
str:='where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
if strtobool(get_parameters_value(41,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if str=''then
str:='where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+''''
else
str:=str+' or <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
end;
if strtobool(get_parameters_value(42,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if str=''then
str:='where ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+''''
else
str:=str+' or ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+'''';
end;
end;
t_double.close;
t_double.sql.clear;
if str<>''then
t_double.sql.add('select * from t_op_aire '+str)
else
t_double.sql.add('select top 0 * from t_op_aire ');
t_double.open;
if not t_double.IsEmpty then
begin
if strtobool(get_parameters_value(40,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring then
begin
if_main:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_main:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(41,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring then
begin
if_fen:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_fen:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(42,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring=t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring then
begin
if_wei:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='ί<>б<EFBFBD><D0B1><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='ί<>б<EFBFBD><D0B1><EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_wei:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
end;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ䣡<DABC><E4A3A1>';
frm_op_delete_insert.wwDBDateTimePicker1.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_kuaiji:=frm_op_delete_insert.wwDBDateTimePicker1.text;
if str_kuaiji=''then
begin
if_do:=false;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ䲻<DABC><E4B2BB>Ϊ<EFBFBD>գ<EFBFBD>');
end
else
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
try
t_double.insert;
frm_op_delete.huifu_op;
t_double['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=strtodate(str_kuaiji);
t_double['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.AirExpBsNo,'AE'));
if if_main then
t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>']:=str_main;
if if_fen then
t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>']:=str_fen;
if if_wei then
t_double['ί<>б<EFBFBD><D0B1><EFBFBD>']:=str_wei;
if strtobool(get_parameters_value(40,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(41,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(42,'false')) then
begin
if trim(t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='' then
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
t_double.post;
t_op_delete.Delete;
except
if t_double.State=dsinsert then
t_double.cancel;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD><D6B8>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_delete.huifu_4;
var
str:widestring;
str_main,str_fen,str_wei,str_kuaiji:string;
if_main,if_fen,if_wei,if_do:boolean;
begin
if strtobool(get_parameters_value(43,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
str:='where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
if strtobool(get_parameters_value(44,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if str=''then
str:='where <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+''''
else
str:=str+' or <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>='+''''+t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring+'''';
end;
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if str=''then
str:='where ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+''''
else
str:=str+' or ί<>б<EFBFBD><D0B1><EFBFBD>='+''''+t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring+'''';
end;
end;
t_double.close;
t_double.sql.clear;
if str<>''then
t_double.sql.add('select * from t_op_airi '+str)
else
t_double.sql.add('select top 0 * from t_op_airi ');
t_double.open;
if not t_double.IsEmpty then
begin
if strtobool(get_parameters_value(43,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring then
begin
if_main:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_main:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(44,'false')) then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring<>''then
begin
if t_op_delete.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring=t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring then
begin
if_fen:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><E1B5A5><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><E1B5A5>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_fen:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring<>''then
begin
if t_op_delete.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring=t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring then
begin
if_wei:=true;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='ί<>б<EFBFBD><D0B1><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>';
frm_op_delete_insert.Edit2.Visible:=true;
frm_op_delete_insert.Label1.Caption:='ί<>б<EFBFBD><D0B1><EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_wei:=frm_op_delete_insert.Edit2.text;
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
end;
end;
end;
end;
try
frm_op_delete_insert:=Tfrm_op_delete_insert.Create(application);
frm_op_delete_insert.caption:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ䣡<DABC><E4A3A1>';
frm_op_delete_insert.wwDBDateTimePicker1.Visible:=true;
frm_op_delete_insert.Label1.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>';
frm_op_delete_insert.ShowModal;
if_do:=false;
if frm_op_delete_insert.ModalResult = mrOk then
begin
str_kuaiji:=frm_op_delete_insert.wwDBDateTimePicker1.text;
if str_kuaiji=''then
begin
if_do:=false;
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ䲻<DABC><E4B2BB>Ϊ<EFBFBD>գ<EFBFBD>');
end
else
if_do:=true;
end
else
begin
if_do:=false;
end;
finally
frm_op_delete_insert.Free;
frm_op_delete_insert:=nil;
end;
if not if_do then
exit;
try
t_double.insert;
frm_op_delete.huifu_op;
t_double['<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>']:=strtodate(str_kuaiji);
t_double['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=get_no(t_double.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>').AsDateTime,getbsno(Logininfo.AirImpBsNo,'AI'));
if if_main then
t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>']:=str_main;
if if_fen then
t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>']:=str_fen;
if if_wei then
t_double['ί<>б<EFBFBD><D0B1><EFBFBD>']:=str_wei;
if strtobool(get_parameters_value(43,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(44,'false')) then
begin
if trim(t_double.fieldbyname('<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>').asstring)='' then
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>'];
end;
end
else
begin
t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
if strtobool(get_parameters_value(45,'false')) then
begin
if trim(t_double.fieldbyname('ί<>б<EFBFBD><D0B1><EFBFBD>').asstring)='' then
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['ί<>б<EFBFBD><D0B1><EFBFBD>'];
end;
end
else
begin
t_double['ί<>б<EFBFBD>׼']:=t_double['<27><><EFBFBD><EFBFBD>'];
end;
t_double.post;
t_op_delete.Delete;
except
if t_double.State=dsinsert then
t_double.cancel;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
exit;
end;
showmessage('ҵ<><D2B5><EFBFBD>ָ<EFBFBD><D6B8>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_delete.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_delete.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_delete.Hide;
frm_op_delete.ManualFloat(frm_op_delete.BoundsRect );
frm_main.freeTabs('frm_op_delete');
action:=cafree;
frm_op_delete:=nil;
end;
procedure Tfrm_op_delete.FormShow(Sender: TObject);
begin
loadreggrid(dxdbgrid1,false,caption);
end;
procedure Tfrm_op_delete.bsSkinPanel2Resize(Sender: TObject);
begin
bsSkinButton1.Left:=bsSkinPanel2.Width-bsSkinGroupBox1.Width-bsSkinButton1.Width-26;
end;
procedure Tfrm_op_delete.bsSkinButton10Click(Sender: TObject);
var
str:widestring;
begin
if Edit1.text<>''then
str:=' and ҵ<><D2B5><EFBFBD><EFBFBD>Ϣ like '+''''+'%'+Edit1.text+'%'+'''';
if RxDBLookupCombo3.DisplayValue<>''then
begin
str:=str+' and ɾ<><C9BE><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValue+'''';
end;
if wwDBDateTimePicker3.text<>''then
begin
str:=str+' and ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
end;
if wwDBDateTimePicker4.text<>''then
begin
str:=str+' and ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker4.text+' 23:59:59''';
end;
t_op_delete.close;
t_op_delete.sql.clear;
t_op_delete.SQL.add('select * from t_op_delete where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''Ӧ<>ս<EFBFBD><D5BD><EFBFBD>'' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><>''<27><><EFBFBD>ĵ<EFBFBD>'' '+str+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_op_delete.open;
end;
procedure Tfrm_op_delete.bsSkinButton1Click(Sender: TObject);
begin
if t_op_delete.isempty then
exit;
if t_op_delete.FieldByName('ɾ<><C9BE><EFBFBD><EFBFBD>').asstring<>employee then
begin
showmessage('<27>Բ<EFBFBD><D4B2>𣬵<EFBFBD>ǰɾ<C7B0><C9BE>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'then
begin
//ɾ<><C9BE><EFBFBD>˲ձ<CBB2>
deleseae_bunk(t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
huifu_1;
end;
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'then
begin
huifu_2;
end;
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'then
begin
huifu_3;
end;
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'then
begin
huifu_4;
end;
end;
procedure Tfrm_op_delete.t_doublePostError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
var
str:widestring;
begin
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'then
begin
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_seae(str,1);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_seae(str,2);
abort;
end;
if pos('ί<>б<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where ί<>б<EFBFBD>׼='+''''+t_double['ί<>б<EFBFBD>׼']+'''';
double_seae(str,3);
abort;
end;
end;
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'then
begin
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seai where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_seai(str,1);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seai where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_seai(str,2);
abort;
end;
if pos('ί<>б<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seai where ί<>б<EFBFBD>׼='+''''+t_double['ί<>б<EFBFBD>׼']+'''';
double_seai(str,3);
abort;
end;
end;
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'then
begin
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_aire(str,1);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_aire(str,2);
abort;
end;
if pos('ί<>б<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seae where ί<>б<EFBFBD>׼='+''''+t_double['ί<>б<EFBFBD>׼']+'''';
double_aire(str,3);
abort;
end;
end;
if t_op_delete.fieldbyname('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring='<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'then
begin
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seai where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_airi(str,1);
abort;
end;
if pos('<27><><EFBFBD><EFBFBD><E1B5A5>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seai where <20><><EFBFBD><EFBFBD><E1B5A5>׼='+''''+t_double['<27><><EFBFBD><EFBFBD><E1B5A5>׼']+'''';
double_airi(str,2);
abort;
end;
if pos('ί<>б<EFBFBD>׼',UpperCase(E.Message))<>0 then
begin
str:='select * from t_op_seai where ί<>б<EFBFBD>׼='+''''+t_double['ί<>б<EFBFBD>׼']+'''';
double_airi(str,3);
abort;
end;
end;
end;
procedure Tfrm_op_delete.t_doubleBeforeCancel(DataSet: TDataSet);
begin
delete_no(t_double);
end;
procedure Tfrm_op_delete.deleseae_bunk(bianhao: string);
var aQuery1:TAdoQuery;
begin
aQuery1:=CreateAdoQuery;
try
with aQuery1,sql do
begin
close ; clear ;
add('delete from t_op_seae_delbunk where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+bianhao+'''');
execsql ;
end ;
finally
FreeAndNil(aQuery1);
end ;
end;
procedure Tfrm_op_delete.bsSkinButton9Click(Sender: TObject);
begin
sys_print('ɾ<><C9BE><EFBFBD><EFBFBD>Ϣ',2,t_op_delete1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_delete.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_op_delete,'OD_ID');
end;
end.