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.
DS6JIEFENG/海运业务/u_op_seae_TaskContrast_TD.pas

404 lines
17 KiB
Plaintext

12 months ago
unit u_op_seae_TaskContrast_TD;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxLookAndFeelPainters, dxExEdtr, DB, ADODB, bsSkinCtrls, dxTL,
dxDBCtrl, dxDBGrid, dxCntner, StdCtrls, cxCheckBox, Mask, DBCtrls,
cxButtons, cxLabel, cxDBEdit, cxControls, cxContainer, cxEdit,
cxTextEdit, cxMemo;
type
TfrmOp_seae_Taskcontrast_TD = class(TForm)
bsknpnl1: TbsSkinPanel;
cxdbm19_tzhrdm: TcxDBMemo;
cxdbtxtdt4: TcxDBTextEdit;
cxdbtxtdt2_cm: TcxDBTextEdit;
cxdbtxtdt3_hc: TcxDBTextEdit;
cxdbtxtdt6_zhg: TcxDBTextEdit;
cxdbtxtdt7_xhg: TcxDBTextEdit;
cxdbtxtdt8_mdd: TcxDBTextEdit;
cxdbm27_mt: TcxDBMemo;
cxdbm31_hwmsh: TcxDBMemo;
cxdbtxtdt11_ystk: TcxDBTextEdit;
cxdbtxtdt16_fffsh: TcxDBTextEdit;
cxdbtxtdt20_jsh: TcxDBTextEdit;
cxdbtxtdt21_bzh: TcxDBTextEdit;
cxdbtxtdt22_zhl: TcxDBTextEdit;
cxdbtxtdt23_chm: TcxDBTextEdit;
cxdbm10_shr: TcxDBMemo;
cxdbm1_fhr: TcxDBMemo;
cxchckbx1_fhr: TcxCheckBox;
cxchckbx10_shr: TcxCheckBox;
cxchckbx19_tzhrdm: TcxCheckBox;
cxchckbx31_hwmsh: TcxCheckBox;
cxchckbx27_mt: TcxCheckBox;
cxchckbx2_cm: TcxCheckBox;
cxchckbx3_hc: TcxCheckBox;
cxchckbx16_fffsh: TcxCheckBox;
cxchckbx6_zhg: TcxCheckBox;
cxchckbx7_xhg: TcxCheckBox;
cxchckbx8_mdd: TcxCheckBox;
cxchckbx11_ystk: TcxCheckBox;
cxchckbx20_jsh: TcxCheckBox;
cxchckbx21_bzh: TcxCheckBox;
cxchckbx22_zhl: TcxCheckBox;
cxchckbx23_chm: TcxCheckBox;
cxchckbx32_jzxmx: TcxCheckBox;
dxdbgrd32_jzxmx: TdxDBGrid;
dxdbgrdclmndxdbgrd1Column1: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1Column2: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1Column3: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1Column4: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1Column5: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1Column6: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1Column7: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1Column8: TdxDBGridColumn;
bsknpnl2: TbsSkinPanel;
btn2Cancel: TbsSkinButton;
btn1Import: TbsSkinButton;
btn12: TbsSkinButton;
ds_op_seae1_td: TDataSource;
ds_op_ctn1_td: TDataSource;
qry_op_seae_td: TADOQuery;
qry_op_ctn_td: TADOQuery;
cxchckbx14_zhyfsh: TcxCheckBox;
cxdbtxtdt14_zhyfsh: TcxDBTextEdit;
btn7: TbsSkinButton;
btn8: TbsSkinButton;
cxdbtxtdt12_tdfsh: TcxDBTextEdit;
cxchckbx12_tdfsh: TcxCheckBox;
cxchckbx13_fbtdfsh: TcxCheckBox;
cxdbtxtdt13_fbtdfsh: TcxDBTextEdit;
cxchckbx17_yfdd: TcxCheckBox;
cxdbtxtdt17_yfdd: TcxDBTextEdit;
cxchckbx18_dfdd: TcxCheckBox;
cxdbtxtdt18_dfdd: TcxDBTextEdit;
cxchckbx15_qdfsh: TcxCheckBox;
cxdbtxtdt15_qdfsh: TcxDBTextEdit;
cxchckbx5_cgs: TcxCheckBox;
cxdbtxtdt5_cgs: TcxDBTextEdit;
cxdbtxtdt9_jhd: TcxDBTextEdit;
cxchckbx9_jhd: TcxCheckBox;
grp1: TGroupBox;
cxlbl1: TcxLabel;
cxdbtxtdt15: TcxDBTextEdit;
cxdbtxtdt16: TcxDBTextEdit;
cxchckbx14: TcxCheckBox;
cxchckbx21: TcxCheckBox;
cxdbtxtdt23: TcxDBTextEdit;
cxchckbx28: TcxCheckBox;
Edit1: TEdit;
lbl5: TLabel;
cxchckbx24_wxpfl: TcxCheckBox;
cxdbtxtdt24_wxpfl: TcxDBTextEdit;
cxchckbx25_wxpbm: TcxCheckBox;
cxdbtxtdt25_wxpbm: TcxDBTextEdit;
cxchckbx26_lctfl: TcxCheckBox;
cxdbtxtdt26_lctfl: TcxDBTextEdit;
cxchckbx28_szwd: TcxCheckBox;
cxdbtxtdt28_szwd: TcxDBTextEdit;
cxchckbx29_zdwd: TcxCheckBox;
cxdbtxtdt29_zdwd: TcxDBTextEdit;
cxchckbx30_zgwd: TcxCheckBox;
cxdbtxtdt30_zgwd: TcxDBTextEdit;
cxchckbx6_zhgdm: TcxCheckBox;
cxchckbx7_xhgdm: TcxCheckBox;
cxdbtxtdt7_xhgdm: TcxDBTextEdit;
cxchckbx8_mdddm: TcxCheckBox;
cxdbtxtdt8_mdddm: TcxDBTextEdit;
cxdbtxtdt6_zhgdm: TcxDBTextEdit;
cxdbtxtdt8: TcxDBTextEdit;
cxdbm1: TcxDBMemo;
cxdbtxtdt9_jhddm: TcxDBTextEdit;
cxchckbx9_jhddm: TcxCheckBox;
procedure btn7Click(Sender: TObject);
procedure btn8Click(Sender: TObject);
procedure btn1ImportClick(Sender: TObject);
procedure btn2CancelClick(Sender: TObject);
private
{ Private declarations }
m_qrytask:TADOQuery;
m_qrysea:TADOQuery;
m_qryctn:TADOQuery;
procedure ContrastTDNR ();
procedure ContrastFieldNr(fldname:string; chkctrol:TcxCheckBox; dbEDcontrol:TObject );
procedure SetContrastFieldBkcolor(dbEDcontrol:TObject;isSet:Boolean);
public
{ Public declarations }
procedure BindData(qrytask:TADOQuery;qrysea:TADOQuery;qryctn:TADOQuery);
function DoImportData():Boolean ;
function CancelImportData():Boolean;
end;
var
frmOp_seae_Taskcontrast_TD: TfrmOp_seae_Taskcontrast_TD;
implementation
{$R *.dfm}
uses u_main,u_op_seae_TaskContrast;
procedure TfrmOp_seae_Taskcontrast_TD.BindData(qrytask:TADOQuery;qrysea:TADOQuery;qryctn:TADOQuery);
var
taskid:string;
begin
taskid:=qrytask.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
qry_op_seae_td.Active:=False;
qry_op_seae_td.Parameters[0].Value:=taskid;
qry_op_seae_td.Active:=True;
qry_op_ctn_td.Active:=False;
qry_op_ctn_td.Parameters[0].Value:=taskid;
qry_op_ctn_td.Active:=True;
m_qrytask:=qrytask;
m_qrysea:=qrysea;
m_qryctn:=qryctn;
ContrastTDNR();
end;
procedure TfrmOp_seae_Taskcontrast_TD.ContrastTDNR ();
begin
if(m_qrysea=nil )or(m_qrysea.Recordset=nil) or (m_qrysea.Recordset.RecordCount<1) then
begin
btn1Import.Enabled:=False;
Exit;
end
else
btn1Import.Enabled:=True;
if(m_qrytask<>nil) and (m_qrytask.recordset<>nil) and (m_qrytask.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsInteger =1) then
btn2Cancel.Enabled:=False;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--><3E><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>',cxchckbx1_fhr,cxdbm1_fhr);
ContrastFieldNr('<27><><EFBFBD><EFBFBD>',cxchckbx2_cm,cxdbtxtdt2_cm);
ContrastFieldNr('<27><><EFBFBD><EFBFBD>',cxchckbx3_hc,cxdbtxtdt3_hc);
ContrastFieldNr('<27><><EFBFBD><EFBFBD>˾',cxchckbx5_cgs,cxdbtxtdt5_cgs);
ContrastFieldNr('װ<><D7B0><EFBFBD><EFBFBD>',cxchckbx6_zhg,cxdbtxtdt6_zhg);
ContrastFieldNr('ж<><D0B6><EFBFBD><EFBFBD>',cxchckbx7_xhg,cxdbtxtdt7_xhg);
ContrastFieldNr('Ŀ<>ĵ<EFBFBD>',cxchckbx8_mdd,cxdbtxtdt8_mdd);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>',cxchckbx9_jhd,cxdbtxtdt9_jhd);
ContrastFieldNr('װ<>۴<EFBFBD><DBB4><EFBFBD>',cxchckbx6_zhgdm,cxdbtxtdt6_zhgdm);
ContrastFieldNr('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',cxchckbx7_xhgdm,cxdbtxtdt7_xhgdm);
ContrastFieldNr('Ŀ<>ĵش<C4B5><D8B4><EFBFBD>',cxchckbx8_mdddm,cxdbtxtdt8_mdddm);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',cxchckbx9_jhddm,cxdbtxtdt9_jhddm);
ContrastFieldNr('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>',cxchckbx10_shr,cxdbm10_shr);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',cxchckbx11_ystk,cxdbtxtdt11_ystk);
ContrastFieldNr('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>',cxchckbx12_tdfsh,cxdbtxtdt12_tdfsh);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B5A5><EFBFBD><EFBFBD>',cxchckbx13_fbtdfsh,cxdbtxtdt13_fbtdfsh);
ContrastFieldNr('װ<>˷<EFBFBD>ʽ',cxchckbx14_zhyfsh,cxdbtxtdt14_zhyfsh);
ContrastFieldNr('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ',cxchckbx15_qdfsh,cxdbtxtdt15_qdfsh);
ContrastFieldNr('<27><><EFBFBD>ѷ<EFBFBD>ʽ',cxchckbx16_fffsh,cxdbtxtdt16_fffsh);
ContrastFieldNr('Ԥ<><D4A4><EFBFBD>ص<EFBFBD>',cxchckbx17_yfdd,cxdbtxtdt17_yfdd);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>',cxchckbx18_dfdd,cxdbtxtdt18_dfdd);
ContrastFieldNr('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>',cxchckbx19_tzhrdm,cxdbm19_tzhrdm);
ContrastFieldNr('<27><><EFBFBD><EFBFBD>',cxchckbx20_jsh,cxdbtxtdt20_jsh);
ContrastFieldNr('<27><>װ',cxchckbx21_bzh,cxdbtxtdt21_bzh);
ContrastFieldNr('<27><><EFBFBD><EFBFBD>',cxchckbx22_zhl,cxdbtxtdt22_zhl);
ContrastFieldNr('<27><><EFBFBD><EFBFBD>',cxchckbx23_chm,cxdbtxtdt23_chm);
ContrastFieldNr('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>',cxchckbx24_wxpfl,cxdbtxtdt24_wxpfl);
ContrastFieldNr('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>',cxchckbx25_wxpbm,cxdbtxtdt25_wxpbm);
ContrastFieldNr('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>',cxchckbx26_lctfl,cxdbtxtdt26_lctfl);
ContrastFieldNr('<27><>ͷ',cxchckbx27_mt,cxdbm27_mt);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',cxchckbx28_szwd,cxdbtxtdt28_szwd);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',cxchckbx29_zdwd,cxdbtxtdt29_zdwd);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',cxchckbx30_zgwd,cxdbtxtdt30_zgwd);
ContrastFieldNr('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',cxchckbx31_hwmsh,cxdbm31_hwmsh);
cxchckbx32_jzxmx.Checked:=true;
// ContrastFieldNr('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ϸ',cxchckbx32_jzxmx,dxdbgrd32_jzxmx);
end;
procedure TfrmOp_seae_Taskcontrast_TD.ContrastFieldNr(fldname:string; chkctrol:TcxCheckBox; dbEDcontrol:TObject );
begin
SetContrastFieldBkcolor( dbEDcontrol,False);
chkctrol.Checked:=False;
if(qry_op_seae_td.FieldByName(fldname).AsString='') then
begin
if(m_qrysea.FieldByName(fldname).AsString<>'') then
SetContrastFieldBkcolor( dbEDcontrol,True);
end
else if(m_qrysea.FieldByName(fldname).AsString<> qry_op_seae_td.FieldByName(fldname).AsString) then
begin
SetContrastFieldBkcolor( dbEDcontrol,True);
chkctrol.Checked:=True;
end;
end;
procedure TfrmOp_seae_Taskcontrast_TD.SetContrastFieldBkcolor(dbEDcontrol:TObject;isSet:Boolean);
var
bcolor:TColor;
begin
bcolor:=clWindow;
if(isSet) then
bcolor:=$00FCD6F7;//clFuchsia;
if(dbEDcontrol is TcxDBTextEdit) then
(dbEDcontrol as TcxDBTextEdit).Style.Color:=bcolor
else if(dbEDcontrol is TcxDBMemo) then
(dbEDcontrol as TcxDBMemo).Style.Color:=bcolor
end;
procedure TfrmOp_seae_Taskcontrast_TD.btn7Click(Sender: TObject);
var
i:Integer;
begin
for i :=0 to Self.Componentcount-1 do
if( Self.Components[i] is TcxCheckBox ) then
(Self.Components[i] as TcxCheckBox ).Checked :=True;
end;
procedure TfrmOp_seae_Taskcontrast_TD.btn8Click(Sender: TObject);
var
i:Integer;
begin
for i :=0 to Self.Componentcount -1 do
if( Self.Components[i] is TcxCheckBox ) then
(Self.Components[i] as TcxCheckBox ).Checked :=False;
end;
procedure TfrmOp_seae_Taskcontrast_TD.btn1ImportClick(Sender: TObject);
begin
//
DoImportData();
end;
procedure TfrmOp_seae_Taskcontrast_TD.btn2CancelClick(Sender: TObject);
begin
//
CancelImportData();
end;
function TfrmOp_seae_Taskcontrast_TD.DoImportData():Boolean;
var
sql,bsno,reportid,cnfields:string;
begin
Result:=True;
if(m_qrysea<>nil) and (m_qrysea.Recordset<>nil) and (m_qrysea.Recordset.RecordCount>0) then
begin
try
cnfields:='[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[<5B>ߴ<EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[TEU],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ]'
+',[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[<5B><>װ],[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[Ʒ<><C6B7>],[<5B><>ͷ]'
+',[<5B><>ע],[<5B><>],[<5B><>],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><EFBFBD><E1B5A5>] ';
bsno:=qry_op_seae_td.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
reportid:=qry_op_seae_td.fieldbyname('base_reportid').AsString;
m_qrysea.Connection.BeginTrans;
m_qrysea.Edit;
if cxchckbx1_fhr.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString;
if cxchckbx2_cm.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
if cxchckbx3_hc.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
if cxchckbx5_cgs.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString;
if cxchckbx6_zhg.checked then m_qrysea.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').AsString;
if cxchckbx7_xhg.checked then m_qrysea.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').AsString;
if cxchckbx8_mdd.checked then m_qrysea.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString :=qry_op_seae_td.FieldByName('Ŀ<>ĵ<EFBFBD>').AsString;
if cxchckbx9_jhd.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString;
if cxchckbx10_shr.checked then m_qrysea.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString;
if cxchckbx11_ystk.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if cxchckbx12_tdfsh.checked then m_qrysea.FieldByName('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString;
if cxchckbx13_fbtdfsh.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B5A5><EFBFBD><EFBFBD>').AsString;
if cxchckbx14_zhyfsh.checked then m_qrysea.FieldByName('װ<>˷<EFBFBD>ʽ').AsString :=qry_op_seae_td.FieldByName('װ<>˷<EFBFBD>ʽ').AsString;
if cxchckbx15_qdfsh.checked then m_qrysea.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString :=qry_op_seae_td.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').AsString;
if cxchckbx16_fffsh.checked then m_qrysea.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').AsString;
if cxchckbx17_yfdd.checked then m_qrysea.FieldByName('Ԥ<><D4A4><EFBFBD>ص<EFBFBD>').AsString :=qry_op_seae_td.FieldByName('Ԥ<><D4A4><EFBFBD>ص<EFBFBD>').AsString;
if cxchckbx18_dfdd.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').AsString;
if cxchckbx19_tzhrdm.checked then m_qrysea.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString;
if cxchckbx20_jsh.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
if cxchckbx21_bzh.checked then m_qrysea.FieldByName('<27><>װ').AsString :=qry_op_seae_td.FieldByName('<27><>װ').AsString;
if cxchckbx22_zhl.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
if cxchckbx23_chm.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
if cxchckbx24_wxpfl.checked then m_qrysea.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString;
if cxchckbx25_wxpbm.checked then m_qrysea.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').AsString;
if cxchckbx26_lctfl.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>').AsString;
if cxchckbx27_mt.checked then m_qrysea.FieldByName('<27><>ͷ').AsString :=qry_op_seae_td.FieldByName('<27><>ͷ').AsString;
if cxchckbx28_szwd.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if cxchckbx29_zdwd.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if cxchckbx30_zgwd.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if cxchckbx31_hwmsh.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
//if cxchckbx32_jzxmx.checked then m_qrysea.FieldByName('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ϸ').AsString :=qry_op_seae_td.FieldByName('<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ϸ').AsString;
if cxchckbx6_zhgdm.checked then m_qrysea.FieldByName('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString;
if cxchckbx7_xhgdm.checked then m_qrysea.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
if cxchckbx8_mdddm.checked then m_qrysea.FieldByName('Ŀ<>ĵش<C4B5><D8B4><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('Ŀ<>ĵش<C4B5><D8B4><EFBFBD>').AsString;
if cxchckbx9_jhddm.checked then m_qrysea.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString :=qry_op_seae_td.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
m_qrysea.Post;
sql:=Format(' delete from t_op_ctn where <20><><EFBFBD><EFBFBD>=''%s'';',[bsno])+#13+#10
+' INSERT INTO [t_op_ctn] (' +cnfields +' ) ' +#13+#10
+' SELECT '+ cnfields + 'FROM [t_op_td_ctn] '
+ Format(' where [base_reportid]=''%s'';',[reportid]);
m_qrysea.Connection.Execute(sql);
m_qryTask.Edit;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsDateTime:=Now;
m_qryTask.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=1;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD>';
m_qryTask.post;
sql:='INSERT INTO t_op_task_state ( [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>״̬],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>])VALUES (''%s'' ,''%s'' ,''%s'')';
sql:=Format(sql,[m_qryTask.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'<27><><EFBFBD><EFBFBD>',employee] );
m_qryTask.Connection.Execute(sql);
m_qrysea.Connection.CommitTrans;
m_qryTask.Requery();
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
frmOpSeae_TaskContrast.close;
except on e:Exception do
begin
// on except
m_qrysea.Connection.RollbackTrans;
m_qrysea.Cancel();
Result:=False;
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '+E.Message),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
end;
end;
end;
end;
function TfrmOp_seae_Taskcontrast_TD.CancelImportData():Boolean;
var
sql,bsno,reportid,cnfields:string;
begin
if( Application.MessageBox(PChar('<27><>ȷʵҪֱ<D2AA>ӽ<EFBFBD><D3BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?'+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>ӹر<D3B9><D8B1><EFBFBD><EFBFBD><EFBFBD>!,<2C>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?'),'<27><>Ϣ<EFBFBD><CFA2>ʾ',MB_YESNO+ MB_ICONQUESTION)<>IDYES) then
Exit;
//
try
//** m_qryTask.Connection.BeginTrans;
m_qryTask.Edit;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsDateTime:=Now;
m_qryTask.FieldByName('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>').AsInteger:=1;
m_qryTask.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:='<27><><EFBFBD><EFBFBD>';
m_qryTask.Post;
//
sql:='INSERT INTO t_op_task_state ( [<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>״̬],[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>])VALUES (''%s'' ,''%s'' ,''%s'')';
sql:=Format(sql,[m_qryTask.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,'<27><><EFBFBD><EFBFBD>',employee] );
m_qryTask.Connection.Execute(sql);
//** m_qryTask.Connection.CommitTrans;
m_qryTask.Requery();
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
frmOpSeae_TaskContrast.close;
except on e:Exception do
begin
// on except
//** m_qryTask.Connection.RollbackTrans;
Result:=False;
Application.MessageBox(PChar('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: '+E.Message),'<27><>Ϣ<EFBFBD><CFA2>ʾ');
end;
end;
end;
end.