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.

204 lines
6.4 KiB
Plaintext

11 months ago
unit u_cw_duibi;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, wwdbdatetimepicker, bsSkinCtrls, BusinessSkinForm, DB,
ADODB;
type
Tfrm_cw_duibi = class(TForm)
Label8: TLabel;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label11: TLabel;
wwDBDateTimePicker4: TwwDBDateTimePicker;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsBusinessSkinForm1: TbsBusinessSkinForm;
t_bill: TADOQuery;
db_cw: TADOConnection;
T_Voucher: TADOQuery;
t_cw_design: TADOQuery;
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_cw_duibi: Tfrm_cw_duibi;
implementation
uses u_main, u_sys_progress;
{$R *.dfm}
procedure Tfrm_cw_duibi.bsSkinButton1Click(Sender: TObject);
var
str:widestring;
begin
t_cw_design.open;
str:='Provider=SQLOLEDB.1;';
str:=str+'Password='+t_cw_design.fieldbyname('<27><>½<EFBFBD><C2BD><EFBFBD><EFBFBD>').asstring+';';
str:=str+'Persist Security Info=False;';
str:=str+'User ID='+t_cw_design.fieldbyname('<27><>½<EFBFBD>û<EFBFBD>').asstring+';';
str:=str+'Initial Catalog='+t_cw_design.fieldbyname('<27><><EFBFBD>ݿ<EFBFBD>').asstring+';';
str:=str+'Data Source='+t_cw_design.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
db_cw.Connected:=false;
db_cw.ConnectionString:=str;
if (wwDBDateTimePicker3.text='')or(wwDBDateTimePicker4.text='')then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC>Ŀ<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>');
exit;
end;
case t_cw_design.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asinteger of
0:
begin
end;
1:
begin
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=35;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
T_Voucher.close;
T_Voucher.sql.clear;
T_Voucher.sql.add('select FVoucherID from T_Voucher');
T_Voucher.open;
t_bill.close;
t_bill.sql.clear;
t_bill.sql.add('select ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ƾ֤ from t_op_seae where <20><><EFBFBD><EFBFBD>=1 '
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''');
t_bill.open;
if not t_bill.IsEmpty then
begin
frm_sys_progress.bsSkinGauge1.MaxValue:=t_bill.RecordCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27>ȶԺ<C8B6><D4BA>˳<EFBFBD><CBB3><EFBFBD>ҵ<EFBFBD>񡣡<EFBFBD><F1A1A3A1><EFBFBD>';
t_bill.first;
while not t_bill.eof do
begin
if not T_Voucher.locate('FVoucherID',t_bill.fieldbyname('<27><><EFBFBD><EFBFBD>ƾ֤').asinteger,[]) then
begin
t_bill.edit;
t_bill['<27><><EFBFBD><EFBFBD>']:=0;
t_bill['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_bill.post;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_bill.next;
end;
end;
t_bill.close;
t_bill.sql.clear;
t_bill.sql.add('select ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ƾ֤ from t_op_seai where <20><><EFBFBD><EFBFBD>=1 '
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''');
t_bill.open;
if not t_bill.IsEmpty then
begin
frm_sys_progress.bsSkinGauge1.MaxValue:=t_bill.RecordCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27>ȶԺ<C8B6><D4BA>˽<EFBFBD><CBBD><EFBFBD>ҵ<EFBFBD>񡣡<EFBFBD><F1A1A3A1><EFBFBD>';
t_bill.first;
while not t_bill.eof do
begin
if not T_Voucher.locate('FVoucherID',t_bill.fieldbyname('<27><><EFBFBD><EFBFBD>ƾ֤').asinteger,[]) then
begin
t_bill.edit;
t_bill['<27><><EFBFBD><EFBFBD>']:=0;
t_bill['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_bill.post;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_bill.next;
end;
end;
t_bill.close;
t_bill.sql.clear;
t_bill.sql.add('select ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ƾ֤ from t_op_aire where <20><><EFBFBD><EFBFBD>=1 '
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''');
t_bill.open;
if not t_bill.IsEmpty then
begin
frm_sys_progress.bsSkinGauge1.MaxValue:=t_bill.RecordCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27>ȶԿ<C8B6><D4BF>˳<EFBFBD><CBB3><EFBFBD>ҵ<EFBFBD>񡣡<EFBFBD><F1A1A3A1><EFBFBD>';
t_bill.first;
while not t_bill.eof do
begin
if not T_Voucher.locate('FVoucherID',t_bill.fieldbyname('<27><><EFBFBD><EFBFBD>ƾ֤').asinteger,[]) then
begin
t_bill.edit;
t_bill['<27><><EFBFBD><EFBFBD>']:=0;
t_bill['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_bill.post;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_bill.next;
end;
end;
t_bill.close;
t_bill.sql.clear;
t_bill.sql.add('select ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ƾ֤ from t_op_airi where <20><><EFBFBD><EFBFBD>=1 '
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>>='+''''+wwDBDateTimePicker3.text+''''
+' and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD><='+''''+wwDBDateTimePicker4.text+'''');
t_bill.open;
if not t_bill.IsEmpty then
begin
frm_sys_progress.bsSkinGauge1.MaxValue:=t_bill.RecordCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27>ȶԿ<C8B6><D4BF>˽<EFBFBD><CBBD><EFBFBD>ҵ<EFBFBD>񡣡<EFBFBD><F1A1A3A1><EFBFBD>';
t_bill.first;
while not t_bill.eof do
begin
if not T_Voucher.locate('FVoucherID',t_bill.fieldbyname('<27><><EFBFBD><EFBFBD>ƾ֤').asinteger,[]) then
begin
t_bill.edit;
t_bill['<27><><EFBFBD><EFBFBD>']:=0;
t_bill['<27><><EFBFBD><EFBFBD>ƾ֤']:='';
t_bill.post;
end;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_bill.next;
end;
end;
frm_sys_progress.close;
frm_sys_progress:=nil;
showmessage('ƾ֤<C6BE>ȶ<EFBFBD><C8B6><EFBFBD><EFBFBD>ɣ<EFBFBD><C9A3><EFBFBD>');
end;
2:
begin
end;
3:
begin
end;
end;
end;
procedure Tfrm_cw_duibi.bsSkinButton2Click(Sender: TObject);
begin
close;
end;
end.