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.
DONGSHENG6/代码字典/u_code_UsdExRate_Invoice.pas

229 lines
6.7 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

unit u_code_UsdExRate_Invoice;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
BusinessSkinForm, bsSkinCtrls, ExtCtrls, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, dxDBTLCl, dxGrClms, DB, ADODB,Dialogs;
type
Tfrm_code_UsdExRate_Invoice = class(TForm)
Panel1: TPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsBusinessSkinForm1: TbsBusinessSkinForm;
dsrUsdExRate: TDataSource;
t_code_usdexrate: TADOQuery;
bsSkinGroupBox1: TbsSkinGroupBox;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridDateColumn;
dxDBGrid1Column2: TdxDBGridDateColumn;
bsSkinGroupBox2: TbsSkinGroupBox;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn1: TdxDBGridMaskColumn;
dxDBGridDateColumn1: TdxDBGridDateColumn;
dxDBGridDateColumn2: TdxDBGridDateColumn;
ds_code_jpexrate1: TDataSource;
t_code_jpexrate: TADOQuery;
Panel2: TPanel;
bsSkinButton6: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
dxDBGrid1Column4: TdxDBGridColumn;
dxDBGrid1Column5: TdxDBGridColumn;
bsSkinButton10: TbsSkinButton;
p_op_gain: TADOStoredProc;
procedure FormShow(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure Upbsrate(bsno:string);
end;
var
frm_code_UsdExRate_Invoice: Tfrm_code_UsdExRate_Invoice;
implementation
uses u_data_share, my_sys_function, u_main, u_sys_progress;
{$R *.dfm}
procedure Tfrm_code_UsdExRate_Invoice.FormShow(Sender: TObject);
begin
if not t_code_usdexrate.Active then
t_code_usdexrate.Open;
{
if not t_code_jpexrate.Active then
t_code_jpexrate.Open;
}
end;
procedure Tfrm_code_UsdExRate_Invoice.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(t_code_usdexrate);
// CanClose:=frm_close_query(t_code_jpexrate);
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_code_usdexrate);
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_code_usdexrate);
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_code_usdexrate);
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton1Click(Sender: TObject);
begin
t_code_usdexrate.Insert;
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton6Click(Sender: TObject);
begin
// t_code_jpexrate.Insert;
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton7Click(Sender: TObject);
begin
// table_post(t_code_jpexrate);
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton8Click(Sender: TObject);
begin
// table_delete(t_code_jpexrate);
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton9Click(Sender: TObject);
begin
// table_cancel(t_code_jpexrate);
end;
procedure Tfrm_code_UsdExRate_Invoice.Upbsrate(bsno:string);
var aAdoQuery:TAdoQuery;
begin
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
sql.Add('Select * from t_ch_fee');
sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> and <20>ұ<EFBFBD>=''USD''');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=bsno;
Open;First;
while not Eof do
begin
Edit;
FieldByName('<27><><EFBFBD><EFBFBD>').Value:=t_code_usdexrate.FieldByName('<27><><EFBFBD><EFBFBD>').Value;
Post;
Next;
end;
finally
Free;
end;
end;
procedure Tfrm_code_UsdExRate_Invoice.bsSkinButton10Click(Sender: TObject);
var aAdoQuery:TAdoQuery;
s:string;
begin
if t_code_usdexrate.FieldByName('<27><><EFBFBD><EFBFBD>').IsNull then Exit;
s:='<27><>:'+t_code_usdexrate.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsString+' <20><>:'+ t_code_usdexrate.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+' <20>Ļ<EFBFBD><C4BB><EFBFBD> '+'<27><><EFBFBD><EFBFBD>Ϊ'+t_code_usdexrate.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
if MessageDlg('ȷʵҪ<CAB5><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)'+s+'Ҫ<><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)<>mryes then
Exit;
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;
aAdoQuery:=CreateAdoQuery;
with aAdoQuery do
try
Close;SQL.Clear;
sql.Add('Select * from V_op_bscard_All where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>ͨ<EFBFBD><CDA8>''');
sql.Add('and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> between :beginEtd and :endETD');
Parameters.ParamByName('beginEtd').Value:=t_code_usdexrate.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime;
Parameters.ParamByName('endETD').Value:=t_code_usdexrate.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime;
Open;First;
if not IsEmpty then
begin
frm_sys_progress.bsSkinGauge1.MaxValue:=recordcount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
while not Eof do
begin
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><E1B5A5>:'+FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Asstring;
Upbsrate(FieldByName('<27><><EFBFBD><EFBFBD>').Asstring);
Next;
end;
end;
Close;SQL.Clear;
sql.Add('Select * from V_op_bscard_All where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD>ĵ<EFBFBD>''');
sql.Add('and <20><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD> between :beginEtd and :endETD');
Parameters.ParamByName('beginEtd').Value:=t_code_usdexrate.FieldByName('<27><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>').AsDateTime;
Parameters.ParamByName('endETD').Value:=t_code_usdexrate.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime;
Open;First;
if not IsEmpty then
begin
Open;First;
frm_sys_progress.bsSkinGauge1.MaxValue:=recordcount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
while not Eof do
begin
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><E1B5A5>:'+FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Asstring;
Upbsrate(FieldByName('<27><><EFBFBD><EFBFBD>').Asstring);
Next;
end;
end;
finally
frm_sys_progress.close;
frm_sys_progress:=nil;
Free;
end;
end;
end.