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.

1473 lines
45 KiB
Plaintext

11 months ago
unit u_op_delhistry;
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, wwdblook, Menus;
type
Tfrm_op_delhistry = class(TForm)
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel2: TbsSkinPanel;
dxDBGrid1: TdxDBGrid;
t_op_delete: TADOQuery;
t_op_delete1: TDataSource;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridDateColumn;
Label8: TLabel;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label11: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
dxDBGrid1Column15: TdxDBGridColumn;
dxDBGrid1Column16: TdxDBGridColumn;
dxDBGrid1Column17: TdxDBGridColumn;
dxDBGrid1Column18: TdxDBGridColumn;
dxDBGrid1Column19: TdxDBGridColumn;
lbl1: TLabel;
wwDBLookupCombo49: TwwDBLookupCombo;
lbl2: TLabel;
edt1: TEdit;
lbl3: TLabel;
RxDBLookupCombo6: TRxDBLookupCombo;
lbl4: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
lbl5: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
lbl6: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
lbl7: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
lbl8: TLabel;
RxDBLookupCombo4: TRxDBLookupCombo;
RxDBLookupCombo8: TRxDBLookupCombo;
lbl9: TLabel;
lbl10: TLabel;
RxDBLookupCombo20: TRxDBLookupCombo;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
dxDBGrid1Column22: TdxDBGridColumn;
dxDBGrid1Column23: TdxDBGridColumn;
dxDBGrid1Column24: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
dxDBGrid1Column26: TdxDBGridColumn;
dxDBGrid1Column27: TdxDBGridColumn;
dxDBGrid1Column28: TdxDBGridColumn;
dxDBGrid1Column29: TdxDBGridColumn;
dxDBGrid1Column30: TdxDBGridColumn;
dxDBGrid1Column31: TdxDBGridColumn;
dxDBGrid1Column32: TdxDBGridColumn;
bsSkinButton9: TbsSkinButton;
dxDBGrid1Column33: TdxDBGridColumn;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
dxDBGrid1Column34: TdxDBGridColumn;
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 N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_delhistry: Tfrm_op_delhistry;
implementation
uses u_main, my_sys_function, u_op_delete_insert, u_op_delete;
{$R *.dfm}
function Tfrm_op_delhistry.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]:=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_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_delhistry.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]:=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_delhistry.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><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,'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.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_delhistry.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,'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;
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_delhistry.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,'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_delhistry.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,'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_delhistry.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_delhistry.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_delhistry.Hide;
frm_op_delhistry.ManualFloat(frm_op_delhistry.BoundsRect );
frm_main.freeTabs('frm_op_delhistry');
action:=cafree;
frm_op_delhistry:=nil;
end;
procedure Tfrm_op_delhistry.FormShow(Sender: TObject);
begin
loadreggrid(dxdbgrid1,false,caption);
end;
procedure Tfrm_op_delhistry.bsSkinPanel2Resize(Sender: TObject);
begin
// bsSkinButton1.Left:=bsSkinPanel2.Width-bsSkinGroupBox1.Width-bsSkinButton1.Width-26;
end;
procedure Tfrm_op_delhistry.bsSkinButton10Click(Sender: TObject);
var
str:widestring;
begin
if RxDBLookupCombo6.DisplayValue<>''then
begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo6.DisplayValue+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD>Ա='+''''+RxDBLookupCombo6.DisplayValue+'''';
end;
if RxDBLookupCombo1.DisplayValue<>''then
begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValue+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValue+'''';
end;
if wwDBLookupCombo49.Text<>'' then begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo49.Text+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo49.Text+'''';
end;
if edt1.Text<>'' then begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD>='+''''+edt1.Text+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+edt1.Text+'''';
end;
if RxDBLookupCombo2.DisplayValue<>''then
begin
if str=''then
str:='where ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+''''
else
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
end;
if RxDBLookupCombo4.DisplayValue<>''then
begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo4.DisplayValues[1]+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo4.DisplayValues[1]+'''';
end;
if RxDBLookupCombo8.DisplayValue<>''then
begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo8.DisplayValues[1]+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo8.DisplayValues[1]+'''';
end;
if RxDBLookupCombo20.DisplayValue<>''then
begin
if str=''then
str:='where <20><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo20.DisplayValues[1]+''''
else
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo20.DisplayValues[1]+'''';
end;
if wwDBDateTimePicker3.text<>''then
begin
if str=''then
str:='where ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker3.text+''''
else
str:=str+' and ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker3.text+'''';
end;
if wwDBDateTimePicker4.text<>''then
begin
if str=''then
str:='where ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker4.text+''''
else
str:=str+' and ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker4.text+'''';
end;
if wwDBDateTimePicker1.text<>''then
begin
if str=''then
str:='where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+''''
else
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
end;
if wwDBDateTimePicker2.text<>''then
begin
if str=''then
str:='where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+''''
else
str:=str+' and ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
end;
if trim(str)='' then
begin
str:='where '+open_data('0041','t_op_delete.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_delete.<2E><><EFBFBD><EFBFBD>Ա','no','no','no');
end
else
begin
str:=str+' and '+open_data('0041','t_op_delete.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_delete.<2E><><EFBFBD><EFBFBD>Ա','no','no','no');
end;
t_op_delete.close;
t_op_delete.sql.clear;
t_op_delete.SQL.add('select t_op_delete.OD_ID,t_op_delete.<2E><><EFBFBD><EFBFBD>,t_op_delete.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_delete.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_delete.ί<>б<EFBFBD><D0B1><EFBFBD>,t_op_delete.<2E><><EFBFBD><EFBFBD><E1B5A5>,');
t_op_delete.SQL.add('t_op_delete.<2E><><EFBFBD><EFBFBD><E1B5A5>,t_op_delete.ί<>е<EFBFBD>λ,t_op_delete.<2E>ۿ<EFBFBD><DBBF><EFBFBD>Ϣ,t_op_delete.<2E><>װ<EFBFBD><D7B0>,t_op_delete.¼<><C2BC><EFBFBD><EFBFBD>,t_op_delete.<2E><><EFBFBD><EFBFBD>Ա,');
t_op_delete.SQL.add('t_op_delete.<2E>ͷ<EFBFBD>Ա,t_op_delete.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_delete.ɾ<><C9BE><EFBFBD><EFBFBD>,t_op_delete.ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_delete.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_delete.<2E><><EFBFBD><EFBFBD>,t_op_delete.<2E><><EFBFBD><EFBFBD>,');
t_op_delete.SQL.add('t_op_delete.<2E><><EFBFBD><EFBFBD>1,t_op_delete.<2E><><EFBFBD><EFBFBD>2,t_op_delete.<2E><><EFBFBD><EFBFBD>3,t_op_delete.<2E><><EFBFBD><EFBFBD>4,t_op_delete.<2E><><EFBFBD><EFBFBD>5,t_op_delete.<2E><><EFBFBD><EFBFBD>6,t_op_delete.<2E><><EFBFBD><EFBFBD>7,t_op_delete.<2E><><EFBFBD><EFBFBD>8,');
t_op_delete.SQL.add('t_op_delete.<2E><><EFBFBD><EFBFBD>9,t_op_delete.<2E><><EFBFBD><EFBFBD>10,t_op_delete.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_delete.<2E><>TEU,t_op_delete.<2E><><EFBFBD><EFBFBD>,t_op_delete.<2E><><EFBFBD><EFBFBD>˾,t_op_delete.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾,t_op_delnote.<2E><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>');
t_op_delete.SQL.add(' from t_op_delete left join t_op_delnote on (t_op_delnote.<2E><><EFBFBD><EFBFBD>=t_op_delete.<2E><><EFBFBD><EFBFBD>) ');
t_op_delete.SQL.add(' left join t_crm_client_class on t_op_delete.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_delete.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_delete.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
t_op_delete.SQL.add(str+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_op_delete.open;
end;
procedure Tfrm_op_delhistry.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
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_delhistry.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_delhistry.t_doubleBeforeCancel(DataSet: TDataSet);
begin
// delete_no(t_double);
end;
procedure Tfrm_op_delhistry.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>˲<EFBFBD>ͳ<EFBFBD><CDB3>',2,nil,nil,nil,nil,t_op_delete1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_delhistry.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_delhistry.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_delhistry.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,113);
end;
procedure Tfrm_op_delhistry.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
end.