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_paper_print_submi...

574 lines
16 KiB
Plaintext

11 months ago
unit u_op_seae_paper_print_submitinfo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, bsSkinCtrls, DB,
ADODB, ExtCtrls, RxLookup, StdCtrls, wwdbdatetimepicker, wwdblook, Menus,
Mask, bsSkinBoxCtrls, bsdbctrls,DateUtils, kbmMemTable, DBCtrlsEh,
ComCtrls, bsSkinTabs, dxDBTLCl, dxGrClms, cxDBLabel, cxControls,
cxContainer, cxEdit, cxLabel;
type
Tfrm_op_seae_paper_print_submitinfo = class(TForm)
kbmMemTable1: TkbmMemTable;
kbmMemTable1Field: TStringField;
kbmMemTable1Field3: TStringField;
kbmMemTable1Field4: TStringField;
kbmMemTable1Field5: TStringField;
kbmMemTable1Field6: TStringField;
kbmMemTable1Field7: TStringField;
kbmMemTable1Field2: TStringField;
kbmMemTable1Field9: TStringField;
kbmMemTable1Field10: TStringField;
kbmMemTable1Field8: TStringField;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
kbmMemTable1Field11: TStringField;
kbmMemTable1Field12: TStringField;
kbmMemTable1Field13: TStringField;
kbmMemTable1Field14: TStringField;
kbmMemTable1Field15: TStringField;
kbmMemTable1Field16: TStringField;
bsSkinPanel3: TbsSkinPanel;
btn6_notify_exit: TbsSkinButton;
btn1_notify_search: TbsSkinButton;
btn2_notify_clear: TbsSkinButton;
bsSkinPanel4: TbsSkinPanel;
Label13: TLabel;
Label14: TLabel;
wdbdtmpckr1_kc: TwwDBDateTimePicker;
wdbdtmpckr2_kc: TwwDBDateTimePicker;
kbmMemTable1Field17: TStringField;
kbmMemTable1Field18: TStringField;
kbmMemTable1Field19: TStringField;
kbmMemTable1Field20: TStringField;
kbmMemTable1Field21: TStringField;
kbmMemTable1Field22: TBooleanField;
kbmMemTable1Field23: TStringField;
kbmMemTable1Field24_xuanxiang: TBooleanField;
edt1_tdh: TEdit;
lbl14: TLabel;
lbl15_searchqdthm: TLabel;
bsknpnl1_m: TbsSkinPanel;
dxdbgrd3_notify: TdxDBGrid;
dxdbgrdclmns: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column2: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column4: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column5: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1_SColumn9: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column3: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column6: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1_SColumn11: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column13: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1xdbgrdclmndxdbgrd1Column19: TdxDBGridColumn;
dxdbgrdclmndxdbgrd1_SColumn10: TdxDBGridColumn;
dxdbgrdchckclmndxdbgrd1_SColumn12: TdxDBGridCheckColumn;
dxdbgrdmclmndxdbgrdclmndxdbgrd1_SColumn13: TdxDBGridMemoColumn;
dxdbgrdclmndxdbgrd1_SColumn14: TdxDBGridColumn;
ds1: TDataSource;
qry1_paper_printlist: TADOQuery;
btn5_submit: TbsSkinButton;
btn6_cancelSubmit: TbsSkinButton;
dxdbgrdclmndxdbgrd3_notifyColumn15: TdxDBGridColumn;
procedure btn4_exitClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure N1Click(Sender: TObject);
procedure btn1_notify_searchClick(Sender: TObject);
procedure MenuItem1Click(Sender: TObject);
procedure btn6_notify_exitClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure searchqdt(bh:string);
procedure edt1_tdhKeyPress(Sender: TObject; var Key: Char);
procedure dxdbgrd3_notifyDblClick(Sender: TObject);
procedure btn3_notifyClick(Sender: TObject);
procedure btn2_notify_clearClick(Sender: TObject);
procedure Edit6_searchkhmchKeyPress(Sender: TObject; var Key: Char);
procedure btn5_submitClick(Sender: TObject);
procedure btn6_cancelSubmitClick(Sender: TObject);
private
{ Private declarations }
employeePhone:string;
procedure UpateSeaeState(bsno,billstate:string);
public
{ Public declarations }
op:integer;
function GetmblState(bsno:string):Boolean;
function GetmblStateOut(bsno:string):Boolean;
function GetSeaeStateDate(bsno,billstate:string):string;
function _GetmblStateout(bsno,bsstatus:string):string;
procedure Initsql_ts(AdoQuery:TAdoQuery);
procedure initialEmployeePhone();
procedure seachPrintList();
procedure show_qdtxx(qdtbh:string;iway:Integer);
end;
var
frm_op_seae_paper_print_submitinfo: Tfrm_op_seae_paper_print_submitinfo;
implementation
uses u_main,my_sys_function, u_op_seae_teshufandan,u_sys_progress,u_op_seae_sign_info,
u_op_seae_sign;
{$R *.dfm}
const stateNewQD = '<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>';
//
function Tfrm_op_seae_paper_print_submitinfo._GetmblStateout(bsno,bsstatus:string):string;
var aAdoQuery:TAdoQuery;
begin
result:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬,¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
SQL.Add('from t_op_state where <20><><EFBFBD><EFBFBD>=:bsNo1 and ҵ<><D2B5>״̬=:bsstatus ');
Parameters.ParamByName('bsNo1').value:=bsno;
Parameters.ParamByName('bsstatus').value:=bsstatus;
Open;
if not IsEmpty then
result:=FieldByName('ҵ<><D2B5>״̬').AsString;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_paper_print_submitinfo.GetSeaeStateDate(bsno,billstate:string):string;
var aAdoQuery:TAdoQuery;
begin
Result:='';
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_op_state');
SQL.Add('where <20><><EFBFBD><EFBFBD>=:bsNo and ҵ<><D2B5>״̬=:billstate');
Parameters.ParamByName('bsNo').value:=bsno;
Parameters.ParamByName('billstate').value:=billstate;
open;
if not IsEmpty then
Result:=FormatDateTime('YYYY-MM-DD',FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime);
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_paper_print_submitinfo.GetmblState(bsno:string):Boolean;
var aAdoQuery:TAdoQuery;
b1,b2,b3:Boolean;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''֪ͨ<CDA8>ŵ<EFBFBD>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b1:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b2:=RecordCount>=1;
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
b3:= isempty or (RecordCount=0);
result:=(b1 or b2) and b3;
finally
aAdoQuery.Free;
end;
end;
function Tfrm_op_seae_paper_print_submitinfo.GetmblStateOut(bsno:string):Boolean;
var aAdoQuery:TAdoQuery;
begin
result:=false;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><><D2B5>״̬');
SQL.Add('from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'' and <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Open;
result:=RecordCount=1;
finally
aAdoQuery.Free;
end;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.btn4_exitClick(Sender: TObject);
begin
Close;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.FormShow(Sender: TObject);
var str,mblstatus:string;
begin
wdbdtmpckr1_kc.Date:=Date-1 ;
wdbdtmpckr2_kc.Date:=Date ;
Width :=width-1;
dxdbgrd3_notify.Width :=dxdbgrd3_notify.width-1;
bsSkinPanel3.Height :=34;
loadreggrid(dxdbgrd3_notify,false,caption);
seachPrintList();
end;
procedure Tfrm_op_seae_paper_print_submitinfo.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrd3_notify,caption);
frm_op_seae_paper_print_submitinfo.Hide;
frm_op_seae_paper_print_submitinfo.ManualFloat(frm_op_seae_paper_print_submitinfo.BoundsRect );
frm_main.freeTabs('frm_op_seae_paper_print_submitinfo');
action:=cafree;
frm_op_seae_paper_print_submitinfo:=nil;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.Initsql_ts(AdoQuery:TAdoQuery);
begin
with AdoQuery do
begin
Close;Sql.Clear;
SQL.Add('Select <20><><EFBFBD><EFBFBD>,<2C>ŵ<EFBFBD>״̬ from t_op_fangdan');
sql.add('order by <20><><EFBFBD><EFBFBD>');
Open;First;
end;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.N1Click(Sender: TObject);
begin
//grid_save_xls(dxdbgrd2);
end;
procedure Tfrm_op_seae_paper_print_submitinfo.btn1_notify_searchClick(Sender: TObject);
begin
seachPrintList();
end;
/// <summary>
///
/// </summary>
procedure Tfrm_op_seae_paper_print_submitinfo.seachPrintList();
var
str:string;
begin
//
str:='';
if(edt1_tdh.Text<>'') then
str:= str + ' AND <20><><EFBFBD><EFBFBD><E1B5A5> like ''%' + Trim(edt1_tdh.Text) + '%'' ';
{ if(cbb1_cgsh.DisplayValues[1]<>'') then
str:= str + ' AND <20><><EFBFBD><EFBFBD>˾ =''' + Trim(cbb1_cgsh.DisplayValues[1]) + ''' ';
if(cbb3_qdfsh.DisplayValues[1]<>'') then
str:= str + ' AND ǩ<><C7A9><EFBFBD><EFBFBD>ʽ =''' + Trim(cbb3_qdfsh.DisplayValues[1]) + ''' ';
if(cbb4_dyzht.Text<>'<<3C><>>') then
str:= str + ' AND <20><>ӡ״̬ =''' + Trim(cbb4_dyzht.Text) + ''' ';
if(cxchckbx1_shfhq.State=cbsChecked) then
str:= str + ' AND isnull([<5B>Ƿ<EFBFBD><C7B7><EFBFBD>ǩ],''false'')=1 '
else if(cxchckbx1_shfhq.State=cbsUnchecked) then
str:= str + ' AND isnull([<5B>Ƿ<EFBFBD><C7B7><EFBFBD>ǩ],''false'')=0 ' ;
}
if(wdbdtmpckr1_kc.Text<>'') then
str:= str + ' AND <20><EFBFBD><E1BDBB><EFBFBD><EFBFBD>>=''' + Trim(wdbdtmpckr1_kc.Text) + ''' ';
//
if(wdbdtmpckr2_kc.Text<>'') then
str:= str + ' AND <20><EFBFBD><E1BDBB><EFBFBD><EFBFBD><=''' + Trim(wdbdtmpckr2_kc.Text) + ' 23:59:59'' ';
str:='select *, cast(<28><EFBFBD><E1B5A5><EFBFBD><EFBFBD> as varchar)+''<27><>''+ CAST( <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B5A5><EFBFBD><EFBFBD> as varchar) +''<27><>'' as ǩ<><C7A9>Ҫ<EFBFBD><D2AA> '
+ ' from ('
+ ' SELECT p.*,s.ҵ<><D2B5>״̬ as ǩ<><C7A9>״̬ '
+ ' FROM [t_op_seae_paper_print_list] p left join (select <20><><EFBFBD><EFBFBD><><D2B5>״̬,¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+ ' from t_op_state where ҵ<><D2B5>״̬=''<27>ᵥǩ<E1B5A5><C7A9>'') s '
+ ' on p.<2E><><EFBFBD><EFBFBD>=s.<2E><><EFBFBD><EFBFBD> '
+') plst where 1=1 and <20>ύ״̬=''<27><><EFBFBD>ύ'''
+ str+' order by <20><EFBFBD><E1BDBB><EFBFBD><EFBFBD> ';
with qry1_paper_printlist do begin
//
Close;
SQL.Clear;
SQL.Add(str) ;
Open;
end;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.MenuItem1Click(Sender: TObject);
begin
grid_save_xls(dxdbgrd3_notify);
end;
procedure Tfrm_op_seae_paper_print_submitinfo.btn6_notify_exitClick(Sender: TObject);
begin
Close();
end;
procedure Tfrm_op_seae_paper_print_submitinfo.show_qdtxx (qdtbh:string;iway:Integer);
var
str:string;
begin
end;
procedure Tfrm_op_seae_paper_print_submitinfo.initialEmployeePhone();
var
empQuery:TADOQuery;
begin
//
empQuery:=CreateAdoQuery();
with empQuery do
begin
SQL.Add('select [<5B>̶<EFBFBD><CCB6>绰],[<5B>ƶ<EFBFBD><C6B6>绰] from [t_sys_employee] where [<5B><><EFBFBD><EFBFBD>]='''+ employee +''' ');
Open;First;
employeePhone :=FieldByName('<27>̶<EFBFBD><CCB6>绰').AsString;
close();
end;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.searchqdt(bh:string);
begin
//
if bh<>'' then
begin
//
show_qdtxx(bh,1);
end;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.edt1_tdhKeyPress(Sender: TObject;
var Key: Char);
var
str:string;
begin
//
if key=#13 then
begin
end;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.dxdbgrd3_notifyDblClick(Sender: TObject);
var
str:string;
begin
//
// str:=qry1_qdtm.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.btn3_notifyClick(Sender: TObject);
var
qdtzht,str:string;
i,noticecount:integer;
aQuery:TADOQuery;
DatabaseDateTime:TDatetime;
begin
//
{ if (dxdbgrd3_notify.SelectedCount<1) and (qry1_qdtm.Recordset.RecordCount<1) then
Exit;
str:=qry1_qdtm.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
show_qdtxx(str,2);
qry1_qdtm.Requery();
Exit;
}
end;
procedure Tfrm_op_seae_paper_print_submitinfo.btn2_notify_clearClick(Sender: TObject);
begin
wdbdtmpckr1_kc.Date:=Date-1 ;
wdbdtmpckr2_kc.Date:=Date ;
edt1_tdh.Text:='';
end;
procedure Tfrm_op_seae_paper_print_submitinfo.Edit6_searchkhmchKeyPress(
Sender: TObject; var Key: Char);
begin
//<2F>س<EFBFBD><D8B3><EFBFBD>ѯִ<D1AF><D6B4>
if key=#13 then
begin
btn1_notify_searchClick(Self.btn1_notify_search);
end;
end;
/// <summary>
/// <20><><EFBFBD>ĺ<EFBFBD><C4BA>˳<EFBFBD><CBB3><EFBFBD>״̬
/// </summary>
procedure Tfrm_op_seae_paper_print_submitinfo.UpateSeaeState(bsno,billstate:string);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
SQL.Add('Update t_op_Seae');
SQL.Add('set <20>ᵥǩ<E1B5A5><C7A9>״̬=:billstate ,ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> where <20><><EFBFBD><EFBFBD>=:bsNo');
Parameters.ParamByName('bsNo').value:=bsno;
Parameters.ParamByName('billstate').value:=billstate;
Parameters.ParamByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=Date;
execsql;
finally
aAdoQuery.Free;
end;
end;
procedure Tfrm_op_seae_paper_print_submitinfo.btn5_submitClick(
Sender: TObject);
var
str,bid,strinfo:string;
i,icount:Integer;
aQuery:TADOQuery;
begin
// <20><>ȡ<EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD>ID
if(qry1_paper_printlist.Recordset.RecordCount<1) then
begin
Application.messagebox(pchar('<27><>ѡ<EFBFBD><D1A1>Ҫǩ<D2AA><C7A9><EFBFBD><EFBFBD><EFBFBD>ᵥ'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>',MB_ICONINFORMATION );
Exit;
end;
//
aQuery:=CreateAdoQuery;
icount:=0;
//
bid:= qry1_paper_printlist.fieldbyname('<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>').AsString;
str:='SELECT TOP 1000 [<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><E1B5A5>] FROM [t_op_seae_paper_print_list] '
+' where <20><EFBFBD><E1BDBB><EFBFBD><EFBFBD>=' + bid +' ;';
with aQuery do begin
Close;
SQL.Clear;
SQL.Add(str);
open;
icount:=Recordset.RecordCount;
end;
strinfo:='<27>Ƿ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD>Ϊ'+ bid+ '<27><>'+inttostr(icount)+'Ʊ<>ᵥ';
if(Application.MessageBox(pchar(strinfo),'<27><>Ϣ<EFBFBD><CFA2>ʾ', MB_ICONQUESTION+MB_YESNO) <> ID_YES) then
Exit;
try
frm_main.db.BeginTrans;
//<2F><EFBFBD><E1BDBB><EFBFBD><EFBFBD>='';
with aQuery do
begin
First;
while not Eof do begin
InsertSeaeStatus(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>',employee
,FormatDateTime('YYYY-MM-DD hh:mm:ss',now));
UpateSeaeState(FieldByName('<27><><EFBFBD><EFBFBD>').AsString,'<27>ᵥǩ<E1B5A5><C7A9>');
Next;
end;
end;
//
aQuery.close;
aQuery.sql.Clear;
str:='UPDATE [t_op_seae_paper_print_list] '
+ 'SET [<5B>Ƿ<EFBFBD>ǩ<EFBFBD><C7A9>] = 1,[<5B>ύ״̬]=''<27>ᵥǩ<E1B5A5><C7A9>'',[ǩ<><C7A9><EFBFBD><EFBFBD>] = '''
+ employee
+''' ,[ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] = '''+ FormatDateTime('YYYY-MM-DD hh:mm:ss',now)
+''' WHERE [<5B><EFBFBD><E1BDBB><EFBFBD><EFBFBD>] = ' + bid ;
aQuery.SQL.Add(str);
aQuery.ExecSQL;
frm_main.db.CommitTrans;
seachPrintList();
except
on ex: Exception do
begin
frm_main.db.RollbackTrans;
Application.messagebox(pchar('<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD><EFBFBD>쳣:'+ex.Message),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>',MB_ICONWARNING );
end;
end;
//
end;
procedure Tfrm_op_seae_paper_print_submitinfo.btn6_cancelSubmitClick(
Sender: TObject);
var
str,bid,strinfo:string;
i,icount:Integer;
aQuery:TADOQuery;
begin
// <20><>ȡ<EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD>ID
if(qry1_paper_printlist.Recordset.RecordCount<1) then
begin
Application.messagebox(pchar('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD><D2AA><EFBFBD>ص<EFBFBD><D8B5>ᵥ'),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>',MB_ICONINFORMATION );
Exit;
end;
//
aQuery:=CreateAdoQuery;
icount:=0;
//
bid:= qry1_paper_printlist.fieldbyname('<27><EFBFBD><E1BDBB><EFBFBD><EFBFBD>').AsString;
str:='SELECT [<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD>],[<5B><><EFBFBD><EFBFBD><E1B5A5>] FROM [t_op_seae_paper_print_list] '
+' where <20><EFBFBD><E1BDBB><EFBFBD><EFBFBD>=' + bid +' ;';
with aQuery do begin
Close;
SQL.Clear;
SQL.Add(str);
open;
icount:=Recordset.RecordCount;
end;
strinfo:='<27>Ƿ<EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD>Ϊ'+ bid+ '<27><>'+inttostr(icount)+'Ʊ<>ᵥ';
if(Application.MessageBox(pchar(strinfo),'<27><>Ϣ<EFBFBD><CFA2>ʾ', MB_ICONQUESTION+MB_YESNO) <> ID_YES) then
Exit;
try
//* frm_main.db.BeginTrans;
//
aQuery.close;
aQuery.sql.Clear;
str:='UPDATE [t_op_seae_paper_print_list] '
+ 'SET <20><EFBFBD><E1BDBB>=null,<2C><EFBFBD><E1BDBB><EFBFBD><EFBFBD>=null,[<5B>ύ״̬]=''<27>Ѳ<EFBFBD><D1B2><EFBFBD>'',[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] = '''
+ employee
+''' ,[<5B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] = '''+ FormatDateTime('YYYY-MM-DD hh:mm:ss',DatabaseDateTime)
+''' WHERE [<5B><EFBFBD><E1BDBB><EFBFBD><EFBFBD>] = ' + bid ;
aQuery.SQL.Add(str);
aQuery.ExecSQL;
//* frm_main.db.CommitTrans;
seachPrintList();
except
on ex: Exception do
begin
//*frm_main.db.RollbackTrans;
Application.messagebox(pchar('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD>쳣:'+ex.Message),'<27><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>',MB_ICONWARNING );
end;
end;
end;
end.