|
|
|
|
unit u_code_port_load;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, dxExEdtr, BusinessSkinForm, dxTL, dxDBCtrl, dxDBGrid, dxCntner,
|
|
|
|
|
bsSkinCtrls, ExtCtrls,ADODB;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_code_port_load = class(TForm)
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column3: TdxDBGridMaskColumn;
|
|
|
|
|
dxDBGrid1Column4: TdxDBGridMaskColumn;
|
|
|
|
|
btnWEB: TbsSkinButton;
|
|
|
|
|
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 btnWEBClick(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_code_port_load: Tfrm_code_port_load;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_data_share, my_sys_function, u_sys_progress, u_main;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
frm_data_share.t_code_loaport.requery;
|
|
|
|
|
btnWeb.Visible:=strtobool(get_parameters_value(154,'false'));
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.FormCloseQuery(Sender: TObject;
|
|
|
|
|
var CanClose: Boolean);
|
|
|
|
|
begin
|
|
|
|
|
CanClose:=frm_close_query(frm_data_share.t_code_loaport);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_cancel(frm_data_share.t_code_loaport);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_post(frm_data_share.t_code_loaport);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
table_delete(frm_data_share.t_code_loaport);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
frm_data_share.t_code_loaport.Insert;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_code_port_load.btnWEBClick(Sender: TObject);
|
|
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
|
|
i:Integer;
|
|
|
|
|
begin
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
|
|
with frm_data_share.t_code_loaport do
|
|
|
|
|
try
|
|
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(application);
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD><DDA1><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
frm_sys_progress.Show;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=RecordCount;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
|
|
|
|
|
|
|
DisableControls;
|
|
|
|
|
frm_main.qryweb.close;
|
|
|
|
|
frm_main.qryweb.sql.clear;
|
|
|
|
|
frm_main.qryweb.sql.add('select * from t_code_loaport where <20>ۿڴ<DBBF><DAB4><EFBFBD>=:ENNo');
|
|
|
|
|
First;
|
|
|
|
|
while not Eof do
|
|
|
|
|
begin
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
frm_main.qryweb.close;
|
|
|
|
|
frm_main.qryweb.Parameters.ParamByName('ENNo').Value:=FieldByName('<27>ۿڴ<DBBF><DAB4><EFBFBD>').AsString;
|
|
|
|
|
frm_main.qryweb.open;
|
|
|
|
|
if frm_main.qryweb.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
frm_main.qryweb.Insert;
|
|
|
|
|
for i:=0 to frm_main.qryweb.FieldCount-1 do
|
|
|
|
|
begin
|
|
|
|
|
if FindField(frm_main.qryweb.Fields[i].fieldname)<>nil then
|
|
|
|
|
frm_main.qryweb.Fields[i].Value:=fieldbyname(frm_main.qryweb.Fields[i].FieldName).Value;
|
|
|
|
|
end;
|
|
|
|
|
frm_main.qryweb.post;
|
|
|
|
|
end;
|
|
|
|
|
Next;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
frm_sys_progress.close;
|
|
|
|
|
frm_sys_progress:=nil;
|
|
|
|
|
EnableControls;
|
|
|
|
|
FreeAndNil(aAdoQuery);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|