|
|
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;
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column12: 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;
|
|
|
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);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
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]:=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_delete.huifu_op;
|
|
|
var
|
|
|
str,str_sub,str_field,strtemp: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
|
|
|
strtemp:=copy(str_sub,pos(#6,str_sub)+1,pos(#7,str_sub)-pos(#6,str_sub)-1);
|
|
|
if strtemp=''then
|
|
|
t_double[str_field]:=null
|
|
|
else begin
|
|
|
if Length(strtemp)>10 then
|
|
|
t_double[str_field]:=StrToDateTime(formatdatetime('YYYY-MM-DD HH:MM:SS',strtodate(strtemp)))
|
|
|
else
|
|
|
t_double[str_field]:=strtodate(formatdatetime('YYYY-MM-DD',strtodate(strtemp)));
|
|
|
end;
|
|
|
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><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;
|
|
|
{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_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;
|
|
|
{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,'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,'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:='where ҵ<><D2B5><EFBFBD><EFBFBD>Ϣ like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where ɾ<><C9BE><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValue+''''
|
|
|
else
|
|
|
str:=str+' and ɾ<><C9BE><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValue+'''';
|
|
|
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;
|
|
|
t_op_delete.close;
|
|
|
t_op_delete.sql.clear;
|
|
|
t_op_delete.SQL.add('select * from t_op_delete '+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
|
|
|
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;
|
|
|
|
|
|
end.
|