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.

2067 lines
75 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_SHIPINGBOX_SI;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, cxStyles, cxCustomData, cxGraphics, cxFilter,
cxData, cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxClasses,
cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxGrid, ExtCtrls, cxContainer, cxLabel, cxTextEdit,
cxMemo, cxDBEdit, ADODB, cxLookAndFeelPainters, StdCtrls, cxButtons,
dxExEdtr, dxTL, dxDBCtrl, dxDBGrid, dxCntner, cxMaskEdit, cxDropDownEdit,
Mask, wwdbedit, Wwdotdot, Wwdbcomb, DBTables, ComCtrls, DBCtrls,kbmMemTable,
cxCheckBox,u_op_seae_DsWebService,SoapHTTPClient,InvokeRegistry,
wwriched, wwrichedspell2000;
type
Tfrm_shipingbox_si = class(TForm)
bsSkinPanel1: TbsSkinPanel;
t_op_seae1: TDataSource;
t_op_seae: TADOQuery;
cxButton1: TcxButton;
cxButton2: TcxButton;
cxButton3: TcxButton;
cxButton5: TcxButton;
t_op_ctn1: TDataSource;
t_op_ctn: TADOQuery;
cxButton7: TcxButton;
memtblweb1: TDataSource;
memtblweb: TkbmMemTable;
cxButton12: TcxButton;
cxButton13: TcxButton;
bsSkinButton1: TbsSkinButton;
memtblwebCtn: TkbmMemTable;
memtblwebCtn1: TDataSource;
bsSkinExPanel1: TbsSkinExPanel;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid2Column7: TdxDBGridColumn;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column9: TdxDBGridColumn;
dxDBGrid2Column1: TdxDBGridColumn;
bsSkinPanel2: TbsSkinPanel;
cxDBMemo3: TcxDBMemo;
cxDBTextEdit1: TcxDBTextEdit;
cxDBTextEdit2: TcxDBTextEdit;
cxDBTextEdit3: TcxDBTextEdit;
cxDBTextEdit4: TcxDBTextEdit;
cxDBTextEdit5: TcxDBTextEdit;
cxDBTextEdit6: TcxDBTextEdit;
cxDBMemo4: TcxDBMemo;
cxDBMemo5: TcxDBMemo;
cxLabel16: TcxLabel;
cxDBTextEdit8: TcxDBTextEdit;
cxDBTextEdit9: TcxDBTextEdit;
cxDBTextEdit11: TcxDBTextEdit;
cxButton6: TcxButton;
cxDBTextEdit15: TcxDBTextEdit;
cxDBTextEdit16: TcxDBTextEdit;
cxDBTextEdit17: TcxDBTextEdit;
cxDBTextEdit18: TcxDBTextEdit;
cxDBTextEdit19: TcxDBTextEdit;
cxDBTextEdit20: TcxDBTextEdit;
cxDBTextEdit21: TcxDBTextEdit;
cxDBMemo2: TcxDBMemo;
cxDBMemo1: TcxDBMemo;
cxButton8: TcxButton;
cxButton9: TcxButton;
cxButton10: TcxButton;
DBEdit1: TDBEdit;
cxCheckBox1: TcxCheckBox;
cxButton11: TcxButton;
cxCheckBox2: TcxCheckBox;
cxCheckBox3: TcxCheckBox;
cxCheckBox4: TcxCheckBox;
cxCheckBox5: TcxCheckBox;
cxCheckBox6: TcxCheckBox;
cxCheckBox7: TcxCheckBox;
cxCheckBox9: TcxCheckBox;
cxCheckBox8: TcxCheckBox;
cxCheckBox11: TcxCheckBox;
cxCheckBox12: TcxCheckBox;
cxCheckBox13: TcxCheckBox;
cxCheckBox15: TcxCheckBox;
cxCheckBox16: TcxCheckBox;
cxCheckBox17: TcxCheckBox;
cxCheckBox22: TcxCheckBox;
cxCheckBox23: TcxCheckBox;
cxCheckBox24: TcxCheckBox;
cxCheckBox25: TcxCheckBox;
cxCheckBox26: TcxCheckBox;
cxCheckBox21: TcxCheckBox;
cxDBMemo6: TcxDBMemo;
cxCheckBox14: TcxCheckBox;
DBRichEdit1: TDBRichEdit;
cxLabel1: TcxLabel;
memtblwebShipingBoxNo: TStringField;
Memo1: TMemo;
Memo2: TMemo;
Memo3: TMemo;
Memo4: TMemo;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridColumn;
dxDBGrid1Column2: TdxDBGridColumn;
dxDBGrid1Column3: TdxDBGridColumn;
dxDBGrid1Column4: TdxDBGridColumn;
dxDBGrid1Column5: TdxDBGridColumn;
dxDBGrid1Column6: TdxDBGridColumn;
dxDBGrid1Column7: TdxDBGridColumn;
dxDBGrid1Column8: TdxDBGridColumn;
procedure FormShow(Sender: TObject);
procedure cxButton1Click(Sender: TObject);
procedure cxButton2Click(Sender: TObject);
procedure cxButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure memtblweb1DataChange(Sender: TObject; Field: TField);
procedure cxDBMemo1DblClick(Sender: TObject);
procedure cxDBTextEdit1DblClick(Sender: TObject);
procedure cxButton6Click(Sender: TObject);
procedure cxButton8Click(Sender: TObject);
procedure cxButton9Click(Sender: TObject);
procedure cxButton10Click(Sender: TObject);
procedure DBEdit1Change(Sender: TObject);
procedure cxButton11Click(Sender: TObject);
procedure cxButton12Click(Sender: TObject);
procedure cxButton13Click(Sender: TObject);
procedure cxButton7Click(Sender: TObject);
procedure cxButton3Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure dxDBGrid1CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid1Column5CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure dxDBGrid1Column7CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure dxDBGrid1Column8CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure dxDBGrid1Column6CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure dxDBGrid1Column4CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure dxDBGrid2CustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure cxLabel1Click(Sender: TObject);
procedure dxDBGrid1Column1CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure dxDBGrid1Column2CustomDrawCell(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused,
ANewItemRow: Boolean; var AText: String; var AColor: TColor;
AFont: TFont; var AAlignment: TAlignment; var ADone: Boolean);
procedure DBRichEdit2DblClick(Sender: TObject);
procedure dxDBGrid1DblClick(Sender: TObject);
private
{ Private declarations }
mServiceSoap_Ds:DsWebServiceSoap;
mHttpRIO_ds:THTTPRIO;
hdgsSPXNO:string;
XML,OPTYPE:String;
OpSeaeCount:Integer;
function REHH(str:string):string;
function formatAfrstr(str:string):string;
function UnformatAfrstr(str:string):string;
procedure getwebservice_ds;
procedure compareList(SourecList,DestList:TStringList);
public
{ Public declarations }
sysNOExistCtn:string;
procedure Creatememtbl;
procedure Creatememtblctn;
procedure CreatememtblctnDiff;
procedure setdiffcolor ;
procedure setdifcolorMemo(Sourestr,deststr:string;SourecDBRichEdit:TDBRichEdit);
Function Before(Src,S:string):string ;
Function After(Src,S:string ) : string ;
function GetXML(_OPTYPE:string):integer; overload;
function GetXML:integer; overload;
procedure GetCtnConfirm(ShipingBoxNo:string);
procedure GetWebData;
procedure update_ctn(table:Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure update_Seae(table:Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
end;
var
frm_shipingbox_si: Tfrm_shipingbox_si;
implementation
uses u_main,my_sys_function, u_data_share, u_op_seae_difftd, u_sys_progress,
u_op_seae_diffctn;
{$R *.dfm}
procedure Tfrm_shipingbox_si.update_seae(table:Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
var
if_first:boolean;
pkgs:integer;
kgs,cbm:double;
s,package:string;
begin
if table.IsEmpty then
exit;
table.First;
if_first:=true;
pkgs:=0;
kgs:=0.00;
cbm:=0.00;
try
table.DisableControls;
while not table.Eof do
begin
if strtobool(get_parameters_value(139,'true')) then begin
if if_first then
begin
if (Trim(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)<>'') then
memo1.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
memo2.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+table.fieldbyname('<27><>װ').asstring;
memo3.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS';
memo4.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM';
pkgs:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
kgs:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
cbm:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
package:=table.fieldbyname('<27><>װ').asstring;
if_first:=false;
end
else
begin
if (Trim(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)<>'') then
memo1.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
memo2.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+table.fieldbyname('<27><>װ').asstring);
memo3.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS');
memo4.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM');
pkgs:=pkgs+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
kgs:=kgs+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
cbm:=cbm+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
package:=table.fieldbyname('<27><>װ').asstring;
end;
end else begin
if if_first then
begin
memo1.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'/'
+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+table.fieldbyname('<27><>װ').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS'+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM';
memo2.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+table.fieldbyname('<27><>װ').asstring;
memo3.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS';
memo4.Lines.Text:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM';
pkgs:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
kgs:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
cbm:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
package:=table.fieldbyname('<27><>װ').asstring;
if_first:=false;
end
else
begin
memo1.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'/'
+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+table.fieldbyname('<27><>װ').asstring+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS'+'/'+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM'
);
memo2.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+table.fieldbyname('<27><>װ').asstring);
memo3.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'KGS');
memo4.Lines.Add(table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'CBM');
pkgs:=pkgs+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
kgs:=kgs+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
cbm:=cbm+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat;
package:=table.fieldbyname('<27><>װ').asstring;
end;
end;
table.next;
end;
if (FormatFloat('0.0000;-0.0000;0',pkgs)<>FormatFloat('0.0000;-0.0000;0',table.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger))
or (FormatFloat('0.0000;-0.0000;0',kgs)<>FormatFloat('0.0000;-0.0000;0',table.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat))
or (FormatFloat('0.0000;-0.0000;0',cbm)<>FormatFloat('0.0000;-0.0000;0',table.DataSource.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat))
or ((Trim(package)<>'') and (Trim(package)<>Trim(table.DataSource.DataSet.fieldbyname('<27><>װ').asstring)))
then
begin
table.DataSource.DataSet.edit;
table.DataSource.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:=memo1.Lines.Text;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ']:=memo2.Lines.Text;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=memo3.Lines.Text;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=memo4.Lines.Text;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=pkgs;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=kgs;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>']:=cbm;
table.DataSource.DataSet.post;
end;
if memo1.Lines.Count>=1 then
begin
table.DataSource.DataSet.edit;
table.DataSource.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:=memo1.Lines.Text;
table.DataSource.DataSet.post;
end;
finally
table.EnableControls;
end;
end;
procedure Tfrm_shipingbox_si.update_ctn(table:Tadoquery);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
var
num_ctn:integer;
ctn_string,str:widestring;
if_first:boolean;
str_list:Tstringlist;
bok:Tbookmark;
begin
// table.Open;
table.First;
if table.IsEmpty then
begin
{
try
table.DataSource.DataSet.Edit;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><>TEU']:=0;
table.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
table.DataSource.DataSet['<27>Ʒѱ<C6B7>׼']:='';
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
table.DataSource.DataSet['<27>ϼ<EFBFBD>20']:=0;
table.DataSource.DataSet['<27>ϼ<EFBFBD>40']:=0;
table.DataSource.DataSet['<27>ϼ<EFBFBD>40H']:=0;
table.DataSource.DataSet['<27>ϼ<EFBFBD>45']:=0;
table.DataSource.DataSet.post;
except
showmessage('<27><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
// abort;
end;
}
end
else
begin
str_list:=Tstringlist.Create();
frm_main.t_sum_ctn.close;
frm_main.t_sum_ctn.open;
// bok:=table.GetBookmark;
try
table.DataSource.DataSet.Edit;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']:=0;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
table.DataSource.DataSet['<27><>TEU']:=0;
table.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:='';
table.DataSource.DataSet['<27>Ʒѱ<C6B7>׼']:='';
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:='';
table.DataSource.DataSet['<27>ϼ<EFBFBD>20']:=0;
table.DataSource.DataSet['<27>ϼ<EFBFBD>40']:=0;
table.DataSource.DataSet['<27>ϼ<EFBFBD>40H']:=0;
table.DataSource.DataSet['<27>ϼ<EFBFBD>45']:=0;
// table.Open;
try
table.DisableControls;
frm_main.t_sum_ctn.DisableControls;
table.first;
while not table.eof do
begin
if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>1').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>1']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>2').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>2']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>3').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>3']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>4').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>4']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>5').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>5']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>6').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>6']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>7').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>7']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>8').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>8']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>9').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>9']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else if table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring=frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>10').asstring then
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD>10']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end
else
begin
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.DataSource.DataSet['<27><>TEU']:=table.DataSource.DataSet['<27><>TEU']+table.fieldbyname('TEU').asinteger;
end;
if not frm_main.t_sum_ctn.locate('<27><><EFBFBD><EFBFBD>',table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[]) then
begin
frm_main.t_sum_ctn.Append;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=table.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']:=table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
frm_main.t_sum_ctn.post;
end
else
begin
frm_main.t_sum_ctn.edit;
frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']:=frm_main.t_sum_ctn['<27><><EFBFBD><EFBFBD>']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
frm_main.t_sum_ctn.post;
end;
if table.fieldbyname('<27>ߴ<EFBFBD>').asstring='20' then
table.DataSource.DataSet['<27>ϼ<EFBFBD>20']:=table.DataSource.DataSet['<27>ϼ<EFBFBD>20']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger
else
if table.fieldbyname('<27>ߴ<EFBFBD>').asstring='40' then
begin
if (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='GP')
or (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='RF')
or (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='OT')
or (table.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring='GOH')
then
begin
table.DataSource.DataSet['<27>ϼ<EFBFBD>40']:=table.DataSource.DataSet['<27>ϼ<EFBFBD>40']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
end
else
begin
table.DataSource.DataSet['<27>ϼ<EFBFBD>40H']:=table.DataSource.DataSet['<27>ϼ<EFBFBD>40H']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
end;
end
else
if (table.fieldbyname('<27>ߴ<EFBFBD>').asstring)='45' then
table.DataSource.DataSet['<27>ϼ<EFBFBD>45']:=table.DataSource.DataSet['<27>ϼ<EFBFBD>45']+table.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
table.next;
end;
finally
table.EnableControls;
frm_main.t_sum_ctn.EnableControls;
//table.GotoBookmark(bok);
end;
ctn_string:='';
if_first:=true;
num_ctn:=0;
str:='';
try
frm_main.t_sum_ctn.DisableControls;
frm_main.t_sum_ctn.first;
while not frm_main.t_sum_ctn.eof do
begin
if ctn_string='' then
begin
ctn_string:=frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'*'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end
else
begin
ctn_string:=ctn_string+' '+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'*'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
end;
if if_first then
begin
str:=ntoc(frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat,true)+'('
+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring
+'*'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+')';
if_first:=false;
end
else
begin
str:=str+' AND '+ntoc(frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asfloat,true)+'('
+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring
+'*'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+')';
end;
num_ctn:=num_ctn+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asinteger;
str_list.Add(frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring+'*'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring
+'-'+frm_main.t_sum_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring);
frm_main.t_sum_ctn.next;
end;
table.DataSource.DataSet['<27><>װ<EFBFBD><D7B0>']:=ctn_string;
table.DataSource.DataSet['<27>Ʒѱ<C6B7>׼']:=str_list.Text;
if num_ctn>1 then
begin
str:='SAY: '+str+' CONTAINERS ONLY.'
end
else
begin
str:='SAY: '+str+' CONTAINER ONLY.'
end;
table.DataSource.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д']:=str;
table.DataSource.DataSet.post;
finally
frm_main.t_sum_ctn.EnableControls;
end;
except
{
showmessage('<27><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>');
str_list.free;
table.GotoBookmark(bok);
}
on e:exception do
begin
showmessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD>????');
showmessage(e.Message);
str_list.free;
/// table.GotoBookmark(bok);
end;
end;
str_list.free;
end;
end;
function Tfrm_shipingbox_si.formatAfrstr(str: string): string;
begin
Result:=Trim(str);
Result:=StringReplace(Result,'&','&amp;',[rfReplaceAll]);
Result:=StringReplace(Result,'<','&lt;',[rfReplaceAll]);
Result:=StringReplace(Result,'"','&quot;',[rfReplaceAll]);
Result:=StringReplace(Result,'>','&gt;',[rfReplaceAll]);
Result:=StringReplace(Result,'''','&apos;',[rfReplaceAll]);
end;
function Tfrm_shipingbox_si.UnformatAfrstr(str: string): string;
begin
Result:=Trim(str);
Result:=StringReplace(Result,'&amp;','&',[rfReplaceAll]);
Result:=StringReplace(Result,'&lt;','<',[rfReplaceAll]);
Result:=StringReplace(Result,'&quot;','"',[rfReplaceAll]);
Result:=StringReplace(Result,'&gt;','>',[rfReplaceAll]);
Result:=StringReplace(Result,'&apos;','''',[rfReplaceAll]);
//Result:=StringReplace(Result,'\n;','#13#10',[rfReplaceAll]);
end;
function Tfrm_shipingbox_si.REHH(str: string): string;
var _r:string;
begin
_r:=StringReplace (str, '\\\\', #13#10, [rfReplaceAll]);
result:=_r;
end;
procedure Tfrm_shipingbox_si.getwebservice_ds;
var URL:String;
begin
try
URL:=get_WebseviceURL;
mHttpRIO_ds:=THTTPRIO.Create(nil);
mHttpRIO_ds.WSDLLocation:=URL+'?WSDL';
mHttpRIO_ds.URL:=URL;
// mHttpRIO_ds.WSDLLocation:='http://192.168.1.5:8086/webservice/DsWebService.asmx?WSDL';
// mHttpRIO_ds.URL:='http://192.168.1.5:8086/webservice/DsWebService.asmx';
mHttpRIO_ds.Port:='DsWebServiceSoap';
mHttpRIO_ds.Service:='DsWebService';
mHttpRIO_ds.HTTPWebNode.UseUTF8InHeader:=true;
InvRegistry.RegisterInvokeOptions(TypeInfo(DsWebServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
mServiceSoap_Ds:=mHttpRIO_ds as DsWebServiceSoap;
except
on E:Exception do
begin
ShowMessage(e.Message);
exit;
end;
end;
end;
procedure Tfrm_shipingbox_si.Creatememtbl;
begin
memtblweb.Close;
memtblweb.EmptyTable;
memtblweb.Fields.Clear;
memtblweb.FieldDefs.Clear;
memtblweb.FieldDefs.Add('id', ftInteger, 0, false);
memtblweb.FieldDefs.Add('ShipingBoxNo', ftString, 40, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>', ftMemo, 0, false); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
memtblweb.FieldDefs.Add('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>', ftMemo, 0, false); //<2F>ջ<EFBFBD><D5BB><EFBFBD>
memtblweb.FieldDefs.Add('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>', ftMemo, 0, false); //֪ͨ<CDA8><D6AA>
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 60, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><E1B5A5>', ftString, 40, false);
memtblweb.FieldDefs.Add('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 20, false); //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ȷ<><C8B7>
memtblweb.FieldDefs.Add('״̬', ftString, 20, false); // <20><20><><EFBFBD><EFBFBD> <20>ܾ<EFBFBD>
memtblweb.FieldDefs.Add('װ<><D7B0><EFBFBD><EFBFBD>', ftString, 60, false);
memtblweb.FieldDefs.Add('ж<><D0B6><EFBFBD><EFBFBD>', ftString, 100, false);
memtblweb.FieldDefs.Add('Ŀ<>ĵ<EFBFBD>', ftString, 100, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 40, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD>ѷ<EFBFBD>ʽ', ftString, 20, false);
memtblweb.FieldDefs.Add('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>', ftString, 40, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD>ʽ', ftString, 40, false); // hscode
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftInteger, 0, false);
memtblweb.FieldDefs.Add('<27><>װ', ftString, 40, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
memtblweb.FieldDefs.Add('<27><>ͷ', ftMemo, 0, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftMemo, 0, false);
memtblweb.FieldDefs.Add('<27><>װ<EFBFBD><D7B0>', ftString, 500, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д', ftString, 500, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>', ftMemo, 0, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD>͹<EFBFBD>˾', ftString, 40, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 40, false);
memtblweb.FieldDefs.Add('bsstatus', ftString, 100, false);
memtblweb.FieldDefs.Add('Ctninfo', ftString, 8000, false);
memtblweb.FieldDefs.Add('TIMEMARK', ftString, 8000, false);
{
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 10, false);
memtblweb.FieldDefs.Add('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ', ftString, 40, false);
memtblweb.FieldDefs.Add('ǩ<><C7A9><EFBFBD>ص<EFBFBD>', ftString, 100, false);
memtblweb.FieldDefs.Add('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftDate, 0, false);
memtblweb.FieldDefs.Add('<27><EFBFBD><E1B5A5><EFBFBD><EFBFBD>', ftString, 20, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ', ftString, 20, false);
memtblweb.FieldDefs.Add('<27><><EFBFBD><EFBFBD>˾', ftString, 20, false);
}
memtblweb.CreateTable;
memtblweb.IndexFieldNames:='ID';
memtblweb.Open;
end;
procedure Tfrm_shipingbox_si.Creatememtblctn;
begin
memtblwebCtn.Close;
memtblwebCtn.EmptyTable;
memtblwebCtn.Fields.Clear;
memtblwebCtn.FieldDefs.Clear;
memtblwebCtn.FieldDefs.Add('id', ftInteger, 0, false);
memtblwebCtn.FieldDefs.Add('ShipingBoxNo', ftString, 40, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
memtblwebCtn.FieldDefs.Add('<27>ߴ<EFBFBD>', ftString, 10, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ', ftString, 20, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftInteger, 0, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftInteger, 0, false);
memtblwebCtn.FieldDefs.Add('<27><>װ', ftString, 40, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
memtblwebCtn.FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
memtblwebCtn.FieldDefs.Add('TEU', ftInteger, 0, false);
memtblwebCtn.CreateTable;
memtblwebCtn.IndexFieldNames:='ID';
memtblwebCtn.Open;
end;
procedure Tfrm_shipingbox_si.CreatememtblctnDiff;
var i:integer;
begin
with frm_op_seae_diffctn.memtblwebctn do
begin
Close;
EmptyTable;
Fields.Clear;
FieldDefs.Clear;
FieldDefs.Add('id', ftInteger, 0, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
FieldDefs.Add('<27>ߴ<EFBFBD>', ftString, 10, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 10, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftString, 20, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftInteger, 0, false);
FieldDefs.Add('<27><>װ', ftString, 40, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD>', ftFloat, 0, false);
FieldDefs.Add('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>', ftString, 10, false);
FieldDefs.Add('<27><><EFBFBD>سߴ<D8B3>', ftString, 10, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 10, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftString, 20, false);
FieldDefs.Add('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>', ftString, 20, false);
FieldDefs.Add('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>', ftInteger, 0, false);
FieldDefs.Add('<27><><EFBFBD>ذ<EFBFBD>װ', ftString, 40, false);
FieldDefs.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', ftFloat, 0, false);
FieldDefs.Add('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>', ftFloat, 0, false);
FieldDefs.Add('Exist', ftString, 1, false);
FieldDefs.Add('FindCtn', ftString, 1, false);
CreateTable;
IndexFieldNames:='FindCtn;<3B><><EFBFBD><EFBFBD>;id';
Open;
end;
i:=0;
with memtblwebCtn do
begin
First;
while not eof do
begin
i:=i+1;
frm_op_seae_diffctn.memtblwebctn.Append;
frm_op_seae_diffctn.memtblwebctn.FieldByName('id').AsInteger:=i;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27>ߴ<EFBFBD>').AsString:=FieldByName('<27>ߴ<EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><>װ').AsString:=FieldByName('<27><>װ').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString:='1';
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString:='0';
frm_op_seae_diffctn.memtblwebctn.post;
Next;
end;
end;
with t_op_ctn do
begin
First;
while not eof do
begin
i:=i+1;
if frm_op_seae_diffctn.memtblwebctn.Locate('<27><><EFBFBD><EFBFBD>',FieldByName('<27><><EFBFBD><EFBFBD>').AsString,[]) then
begin
frm_op_seae_diffctn.memtblwebctn.Edit;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString:=FieldByName('<27>ߴ<EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString:=FieldByName('<27><>װ').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString:='0';
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString:='1';
frm_op_seae_diffctn.memtblwebctn.post;
end
else
begin
frm_op_seae_diffctn.memtblwebctn.Append;
frm_op_seae_diffctn.memtblwebctn.FieldByName('id').AsInteger:=i;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>سߴ<D8B3>').AsString:=FieldByName('<27>ߴ<EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>ذ<EFBFBD>װ').AsString:=FieldByName('<27><>װ').AsString;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
frm_op_seae_diffctn.memtblwebctn.FieldByName('<27><><EFBFBD>س<EFBFBD><D8B3><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
frm_op_seae_diffctn.memtblwebctn.FieldByName('FindCtn').AsString:='1';
frm_op_seae_diffctn.memtblwebctn.FieldByName('Exist').AsString:='0';
frm_op_seae_diffctn.memtblwebctn.post;
end;
Next;
end;
end;
frm_op_seae_diffctn.memtblwebctn.SortOn('FindCtn;id',[]);
end;
procedure Tfrm_shipingbox_si.GetCtnConfirm(ShipingBoxNo:string);
var _s,_t,_id,_no,block,xml,onlinetimemark,onlinePosted,mttimemark
,url,kjqj,wtdw,ETD,CLOSINGDATE,CTN,stl,CtnNoOne:string; //<2F><><EFBFBD><EFBFBD>
aa:DsWebServiceSoap;
p1,p2,_c,_i,cntcount:Integer;
username,marks,WTBH,HBLNO,code_trade,code_source,bstype,BSNO:string;
_Time:Tdatetime;
aAdoQuery:TAdoQuery;
begin
sysNOExistCtn:='';
//1 <20><>ѯ<EFBFBD><D1AF><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD>˾ <20>Ƿ<EFBFBD><C7B7>ڱ<EFBFBD>ϵͳ<CFB5>ڴ<EFBFBD><DAB4>ڡ<EFBFBD><DAA1><EFBFBD><E7B2BB><EFBFBD><EFBFBD><EFBFBD>򱨾<EFBFBD><F2B1A8BE><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>¼<EFBFBD><C2BC><EFBFBD>
BSNO:=ShipingBoxNo;
url:= get_WebseviceURL;
aa:=GetDsWebServiceSoap(false,url);
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
_s:=_s+'<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
_s:=_s+' <Booking> ';
_s:=_s+' <BSNO>'+BSNO+'</BSNO> ';
_s:=_s+' </Booking> ';
_s:=_s+'</BookingInfo> ';
xml:=aa.GetBsnoInfo(_s);
p1:=frm_data_share.GettimePotion(1,'<Booking>',xml);
p2:=frm_data_share.GettimePotion(1,'</Booking>',xml);
block:=Copy(xml,p1,p2-p1);
onlinetimemark:=frm_data_share.GetXMLValue('TimeMark',block);
onlinePosted:=frm_data_share.GetXMLValue('ISPOSTED',block);
mttimemark:=memtblweb.fieldbyname('TIMEMARK').AsString;
{
if (onlinetimemark<>mttimemark) then
begin
ShowMessage('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><E4BBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>²<EFBFBD>ѯ<EFBFBD><D1AF>');
//exit;
end;
}
memtblwebCtn.EmptyTable;
memtblwebCtn.DisableControls;
_c:=frm_data_share.countString('CTNINFO',memtblweb.fieldbyname('Ctninfo').asstring);
for _i:=1 to _c do
begin
with memtblwebCtn do
begin
p1:=frm_data_share.GettimePotion(_i,'<CTNINFO>',memtblweb.fieldbyname('Ctninfo').asstring);
p2:=frm_data_share.GettimePotion(_i,'</CTNINFO>',memtblweb.fieldbyname('Ctninfo').asstring);
block:=Copy(memtblweb.fieldbyname('Ctninfo').asstring,p1,p2);
CTN:= trim(frm_data_share.GetXMLValue('CTN',block));
if CTN='' then
begin
showmessage('<27><>Ʊҵ<C6B1><D2B5><EFBFBD>ڵļ<DAB5>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣû<CFA2><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
Append;
fieldbyname('id').AsInteger:=_i;
fieldbyname('<27><><EFBFBD><EFBFBD>').Asinteger:=1;
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>EDI<44><49><EFBFBD><EFBFBD>',CTN,[]) then
begin
fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
fieldbyname('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
fieldbyname('<27>ߴ<EFBFBD>').Value:=frm_data_share.t_code_ctn.fieldbyname('<27>ߴ<EFBFBD>').AsString;
fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').Value:=frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
if FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
FieldByName('TEU').asInteger:=1;
if (FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
(FieldByName('<27>ߴ<EFBFBD>').asstring='45') then
FieldByName('TEU').asInteger:=2;
end;
fieldbyname('ShipingBoxNo').AsString:=ShipingBoxNo;
fieldbyname('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('CNTRNO',block);
fieldbyname('<27><><EFBFBD><EFBFBD>').Value:=frm_data_share.GetXMLValue('SEALNO',block);
if frm_data_share.GetXMLValue('PKGS',block)<>'' then
fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger:=StrToInt(frm_data_share.GetXMLValue('PKGS',block));
if frm_data_share.GetXMLValue('KGS',block)<>'' then
fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=strtofloatdef(frm_data_share.GetXMLValue('KGS',block),0);
if frm_data_share.GetXMLValue('CBM',block)<>'' then
fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat:=strtofloatdef(frm_data_share.GetXMLValue('CBM',block),0);
fieldbyname('<27><>װ').Value:=frm_data_share.GetXMLValue('KINDPKGS',block);
post;
end;
end;
memtblwebCtn.EnableControls;
if not t_op_ctn.Active then t_op_ctn.Active:=true;
with t_op_ctn do
try
DisableControls;
First;
while not eof do
begin
if not memtblwebCtn.Locate('<27><><EFBFBD><EFBFBD>',FieldByName('<27><><EFBFBD><EFBFBD>').AsString,[]) then
begin
if sysNOExistCtn='' then sysNOExistCtn:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString
else sysNOExistCtn:=sysNOExistCtn+#13#10+FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
cntcount:=cntcount+1;
CtnNoOne:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
end;
Next;
end;
finally
if cntcount=0 then
begin
cxLabel1.Caption:='';
cxLabel1.Style.Font.Color:=ClBlack;
end;
if sysNOExistCtn<>'' then
begin
if cntcount=1 then
begin
cxLabel1.Caption:='<27>ͻ<EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD>ݺͱ<DDBA><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9BFB4>ϸ):'+CtnNoOne;
cxLabel1.Style.Font.Color:=ClBlue;
end
else
begin
cxLabel1.Caption:='<27>ͻ<EFBFBD>ȷ<EFBFBD>ϼ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD>ݺͱ<DDBA><CDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E9BFB4>ϸ):'+CtnNoOne+'...';
cxLabel1.Style.Font.Color:=ClBlue;
end;
end;
EnableControls;
end;
end;
function Tfrm_shipingbox_si.GetXML(_OPTYPE:string): integer;
var _s,url,block:string;
aa:DsWebServiceSoap;
p1,p2:integer;
qryGetCompany:TAdoQuery;
begin
OPTYPE:= _OPTYPE;
try
qryGetCompany:=CreateAdoQuery;
qryGetCompany.Close;
qryGetCompany.sql.Clear;
qryGetCompany.sql.Add('select * from t_code_subcomp where <20>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>=:<3A>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>');
qryGetCompany.close;
qryGetCompany.Parameters.ParamByName('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>').Value:= frm_data_share.t_load_employee.fieldbyname('<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>').AsString;
qryGetCompany.open;
frm_data_share.t_load_employee.open;
url:= get_WebseviceURL;
aa:=GetDsWebServiceSoap(false,get_WebseviceURL);//'http://192.168.1.105:5427/webservice/DsWebService.asmx');
//<2F><><EFBFBD>Ȼ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
_s:=_s+'<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
_s:=_s+' <Head> ';
_s:=_s+' <OPID>'+frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</OPID> ';
_s:=_s+' <COMPANYID>'+qryGetCompany.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</COMPANYID> ';
_s:=_s+' <OPTYPE>'+OPTYPE+'</OPTYPE> ';
_s:=_s+' <OPTIME></OPTIME> ';
_s:=_s+' <Version>1.0</Version> ';
_s:=_s+' </Head> ';
_s:=_s+'</BookingCargoSpace> ';
XML:=aa.ReceiveBillOfLadingConfirm(_s);
XML:=StringReplace(XML,'#$A','',[rfReplaceAll]);
p1:=frm_data_share.GettimePotion(1,'<OpseaeList>',XML);
p2:=frm_data_share.GettimePotion(1,'</OpseaeList>',xml);
XML:=copy(XML,p1,p2-p1);
Opseaecount:=frm_data_share.countString('Opseae',xml);
result:= Opseaecount;
finally
if (XML='') then
begin
result:=0;
qryGetCompany.free;
end;
end;
//if assigned(MT1) then MT1.first;
end;
function Tfrm_shipingbox_si.GetXML: integer;
begin
result:=GetXML(OPTYPE);
end;
Function Tfrm_shipingbox_si.Before(Src,S:string):string ;
Var F:Word ;
begin
F := POS (s,Src) ;
if F=0 then result:=''
else
result := COPY(Src,1,F-1) ;
end ;
Function Tfrm_shipingbox_si.After(Src,S:string ) : string ;
Var F : Word ;
begin
F := POS (s,Src) ;
if F=0 then result:=''
else
result:= COPY(Src , F+1,length(Src)) ;
end ;
procedure Tfrm_shipingbox_si.setdifcolorMemo(Sourestr,deststr:string;SourecDBRichEdit:TDBRichEdit);
var i,j,count1,count2,min:integer ;
wordat:integer ;
paramstr1,paramstr2:Tstringlist ;
tmpstr1,tmpstr2:string ;
tmp:string ;
begin
tmpstr1:=Sourestr ;
tmpstr2:=deststr ;
if AnsiCompareStr(tmpstr1,tmpstr2)=0 then exit ;
try
paramstr1:=tstringlist.create ;
paramstr2:=tstringlist.Create ;
tmp:=Before(tmpstr1,#13#10) ;
while tmp<>'' do
begin
paramstr1.add(tmp);
tmpstr1:=after(tmpstr1,#13#10);
tmp:=Before(tmpstr1,#13#10) ;
end ;
if tmpstr1<>'' then paramstr1.add(tmpstr1);
tmp:=Before(tmpstr2,#13#10) ;
while tmp<>'' do
begin
paramstr2.add(tmp);
tmpstr2:=after(tmpstr2,#13#10);
tmp:=Before(tmpstr2,#13#10) ;
end ;
if tmpstr2<>'' then paramstr2.add(tmpstr2);
count1:=paramstr1.Count ;
count2:=paramstr2.Count ;
for i:=0 to count1-1 do
begin
tmp:=paramstr1[i] ;
wordat:=pos(tmp,deststr) ;
if wordat<=0 then
begin
wordat:=0 ;
for j:=0 to i-1 do wordat:=wordat+length(paramstr1[j]);
SourecDBRichEdit.SelStart:=wordat ;
SourecDBRichEdit.SelLength:=length(tmp)+1;
SourecDBRichEdit.SelAttributes.Color:=clred ;
end ;
end ;
{
for i:=0 to count2-1 do
begin
tmp:=paramstr2[i] ;
wordat:=pos(tmp,chgbefore.Text) ;
if wordat<=0 then
begin
wordat:=0 ;
for j:=0 to i-1 do wordat:=wordat+length(paramstr2[j]);
chgafter.SelStart:=wordat ;
chgafter.SelLength:=length(tmp)+1;
chgafter.SelAttributes.Color:=clblue ;
end ;
end ;
}
finally
paramstr1.Free ;
paramstr2.Free ;
end ;
end;
//setdifcolorMemo(Sourestr,deststr:string;SourecDBRichEdit:TDBRichEdit)
procedure Tfrm_shipingbox_si.setdiffcolor;
var i,j:integer ;
myfield,Source,Dest:string ;
SourceList,DestList:TStringList;
begin
SourceList:=TStringList.Create;
DestList:=TStringList.Create;
if not t_op_seae.Active then t_op_seae.Open ;
for i:=0 to bsSkinPanel2.ControlCount-1 do
with bsSkinPanel2 do
if (bsSkinPanel2.Controls[i] is TcxDBMemo) then
begin
myfield:=(Controls[i] as TcxDBMemo).databinding.DataField ;
if (memtblweb.FindField(myfield)<>nil) and (t_op_seae.FindField(myfield)<>nil) then
begin
SourceList.Text:=t_op_seae.fieldbyname(myfield).asstring;
DestList.Text:=memtblweb.fieldbyname(myfield).asstring;
Source:='';
for j:=0 to SourceList.Count-1 do
begin
if Source='' then
Source:=StringReplace(trim(SourceList.Strings[j]), ' ', ' ', [rfReplaceAll])
else Source:=Source+' '+StringReplace(trim(SourceList.Strings[j]), ' ', ' ', [rfReplaceAll]);
end;
Dest:='';
for j:=0 to DestList.Count-1 do
begin
if Dest='' then
Dest:=StringReplace(trim(DestList.Strings[j]), ' ', ' ', [rfReplaceAll])
else Dest:=Dest+' '+StringReplace(trim(DestList.Strings[j]), ' ', ' ', [rfReplaceAll]);
end;
if AnsiCompareStr(Source ,Dest)<>0 then
(bsSkinPanel2.Controls[i] as TcxDBMemo).Style.Font.Color:=clred
else (bsSkinPanel2.Controls[i] as TcxDBMemo).Style.Font.Color:=clblack ;
//showmessage(Source+#13#10+Dest);
end;
end
else
if (bsSkinPanel2.Controls[i] is TcxDBTextEdit) then
begin
myfield:=(Controls[i] as TcxDBTextEdit).databinding.DataField ;
if (memtblweb.FindField(myfield)<>nil) and (t_op_seae.FindField(myfield)<>nil) then
if AnsiCompareStr(memtblweb.Fieldbyname(myfield).asstring ,
t_op_seae.fieldbyname(myfield).asstring)<>0 then
(bsSkinPanel2.Controls[i] as TcxDBTextEdit).Style.Font.Color:=clred
else (bsSkinPanel2.Controls[i] as TcxDBTextEdit).Style.Font.Color:=clblack ;
end;
try
finally
SourceList.Free;
DestList.Free;
end;
end;
{procedure Tfrm_shipingbox_si.setdiffcolor;
var i,j:integer ;
myfield,Source,Dest:string ;
SourceList,DestList:TStringList;
begin
SourceList:=TStringList.Create;
DestList:=TStringList.Create;
if not t_op_seae.Active then t_op_seae.Open ;
for i:=0 to bsSkinPanel2.ControlCount-1 do
with bsSkinPanel2 do
if (bsSkinPanel2.Controls[i] is TcxDBMemo) then
begin
myfield:=(Controls[i] as TcxDBMemo).databinding.DataField ;
if (memtblweb.FindField(myfield)<>nil) and (t_op_seae.FindField(myfield)<>nil) then
begin
SourceList.Text:=t_op_seae.fieldbyname(myfield).asstring;
DestList.Text:=memtblweb.fieldbyname(myfield).asstring;
if SourceList.Count<>DestList.Count then
begin
(bsSkinPanel2.Controls[i] as TcxDBMemo).Style.Font.Color:=clred;
end
else
if SourceList.Count<=DestList.Count then
begin
for j:=0 to SourceList.Count-1 do
begin
if AnsiCompareStr(DestList.Strings[j] ,SourceList.Strings[j])<>0 then
(bsSkinPanel2.Controls[i] as TcxDBMemo).Style.Font.Color:=clred
//else (bsSkinPanel2.Controls[i] as TcxDBMemo).Style.Font.Color:=clblack ;
end;
end
else
begin
for j:=0 to DestList.Count-1 do
begin
if AnsiCompareStr(DestList.Strings[j] ,SourceList.Strings[j])<>0 then
(bsSkinPanel2.Controls[i] as TcxDBMemo).Style.Font.Color:=clred
// else (bsSkinPanel2.Controls[i] as TcxDBMemo).Style.Font.Color:=clblack ;
end;
end;
end;
end
else
if (bsSkinPanel2.Controls[i] is TcxDBTextEdit) then
begin
myfield:=(Controls[i] as TcxDBTextEdit).databinding.DataField ;
if (memtblweb.FindField(myfield)<>nil) and (t_op_seae.FindField(myfield)<>nil) then
if AnsiCompareStr(memtblweb.Fieldbyname(myfield).asstring ,
t_op_seae.fieldbyname(myfield).asstring)<>0 then
(bsSkinPanel2.Controls[i] as TcxDBTextEdit).Style.Font.Color:=clred
else (bsSkinPanel2.Controls[i] as TcxDBTextEdit).Style.Font.Color:=clblack ;
end;
try
finally
SourceList.Free;
DestList.Free;
end;
end;}
procedure Tfrm_shipingbox_si.FormShow(Sender: TObject);
begin
GetWebData;
end;
procedure Tfrm_shipingbox_si.GetWebData;
var id,_i:Integer;
p1,p2,p3,p4,ctncount:integer;
block,ctnblock:string;
begin
GetXML('0');
if (OpSeaeCount<=0) then
begin
ShowMessage('û<><C3BB><<3C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>><3E><>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<ͬ<><CDAC>shippingbox<6F><78>Ϣ>');
exit;
end;
id:=0;
Creatememtbl;
Creatememtblctn;
try
memtblweb.DisableControls;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD> <20><><EFBFBD><EFBFBD>'+IntToStr(OpSeaeCount)+'<27>С<EFBFBD><D0A1><EFBFBD><EFBFBD><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=OpSeaeCount;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
for _i:=1 to OpSeaeCount do
begin
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
p1:=frm_data_share.GettimePotion(_i,'<Opseae>',xml);
p2:=frm_data_share.GettimePotion(_i,'</Opseae>',xml);
block:=Copy(xml,p1,p2-p1);
ctncount:=frm_data_share.countString('CTNINFO',block);
if (ctncount>0) then
begin
p3:=frm_data_share.GettimePotion(1,'<CTNINFO>',block); //<2F><>һ<EFBFBD><D2BB>
p4:=frm_data_share.GettimePotion(ctncount,'</CTNINFO>',block)+10; //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
ctnblock:= Copy(block,p3,p4-p3);
//<2F>Ѽ<EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣȥ<CFA2><C8A5>
//p2:=frm_data_share.GettimePotion(_i,'<CTNINFO>',xml);
block:=Copy(xml,p1,(p2-p1)-(p4-p3));
end;
//showmessage(block);
id:=id+1;
memtblweb.Append;
memtblweb.FieldByName('id').AsInteger:=ID;
memtblweb.FieldByName('ShipingBoxNo').AsString:=frm_data_share.GetXMLValue('BSNO',block);
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString:=frm_data_share.GetXMLValue('MBLNO',block);
memtblweb.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:='<27>ᵥȷ<E1B5A5><C8B7>';
memtblweb.FieldByName('״̬').AsString:=frm_data_share.GetXMLValue('BOOKINGTYPE',block);
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=frm_data_share.GetXMLValue('SENDERNAME',block);
memtblweb.FieldByName('<27><><EFBFBD>͹<EFBFBD>˾').AsString:=frm_data_share.GetXMLValue('SENDERCOMPANY',block);
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').value:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('SHIPPER',block)));
// showmessage(memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').value);
memtblweb.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').value:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('CONSIGNEE',block)));
memtblweb.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').value:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('NOTIFYPARTY',block)));
memtblweb.FieldByName('<27><>ͷ').value:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('MARKS',block))); //
memtblweb.FieldByName('<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD>˵<EFBFBD><CBB5>').value:=REHH(UnformatAfrstr(frm_data_share.GetXMLValue('BOOKINGDESCRIPTION',block)));
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=REHH(frm_data_share.GetXMLValue('DESCRIPTION',block));
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value:=frm_data_share.GetXMLValue('VESSEL',block);
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value:=frm_data_share.GetXMLValue('VOYNO',block);
memtblweb.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').value:=frm_data_share.GetXMLValue('BLFRT',block);
memtblweb.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').value:=frm_data_share.GetXMLValue('PORTLOAD',block);
memtblweb.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').value:=frm_data_share.GetXMLValue('PORTDISCHARGE',block);
memtblweb.FieldByName('Ŀ<>ĵ<EFBFBD>').value:=frm_data_share.GetXMLValue('DESTINATION',block);
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=frm_data_share.GetXMLValue('SERVIC',block);//SERVIC
memtblweb.FieldByName('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>').value:=frm_data_share.GetXMLValue('CONTRACTNO',block); //CONTRACTNO
memtblweb.FieldByName('<27><><EFBFBD>ʽ').value:=frm_data_share.GetXMLValue('HSCODE',block); ///
// memtblweb.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').value:=FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD>ʽ').value;
// memtblweb.FieldByName('ǩ<><C7A9><EFBFBD>ص<EFBFBD>').value:=FieldByName('ǩ<><C7A9><EFBFBD>ص<EFBFBD>').value;
// memtblweb.FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value:=FieldByName('ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
if frm_data_share.GetXMLValue('PKGS',block)<>'' then
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value:=StrToInt(frm_data_share.GetXMLValue('PKGS',block));
memtblweb.FieldByName('<27><>װ').value:=frm_data_share.GetXMLValue('KINDPKGS',block);
if frm_data_share.GetXMLValue('KGS',block)<>'' then
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value:=StrToFloat(frm_data_share.GetXMLValue('KGS',block));
if frm_data_share.GetXMLValue('CBM',block)<>'' then
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value:=StrToFloat(frm_data_share.GetXMLValue('CBM',block));
memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').value:=frm_data_share.GetXMLValue('TOTALNO',block);
memtblweb.FieldByName('<27><>װ<EFBFBD><D7B0>').value:=frm_data_share.GetXMLValue('CNTR',block);
memtblweb.FieldByName('TIMEMARK').value:=frm_data_share.GetXMLValue('TIMEMARK',block);
// showmessage(memtblweb.FieldByName('TIMEMARK').value);
memtblweb.FieldByName('ctnInfo').value:=ctnblock;
memtblweb.Post;
end;
finally
memtblweb.EnableControls;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
t_op_seae.Close;
t_op_seae.Open;
t_op_ctn.Close;
t_op_ctn.Open;
end;
procedure Tfrm_shipingbox_si.cxButton1Click(Sender: TObject);
begin
table_Prior(TAdoQuery(memtblweb));
end;
procedure Tfrm_shipingbox_si.cxButton2Click(Sender: TObject);
begin
table_next(TAdoQuery(memtblweb));
end;
procedure Tfrm_shipingbox_si.cxButton5Click(Sender: TObject);
begin
Close;
end;
procedure Tfrm_shipingbox_si.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FRM_SHIPINGBOX_SI.Hide;
FRM_SHIPINGBOX_SI.ManualFloat(FRM_SHIPINGBOX_SI.BoundsRect );
//frm_main.freeTabs('FRM_SHIPINGBOX_SI');
action:=cafree;
FRM_SHIPINGBOX_SI:=nil;
end;
procedure Tfrm_shipingbox_si.memtblweb1DataChange(Sender: TObject;
Field: TField);
begin
// setdiffcolor;
end;
procedure Tfrm_shipingbox_si.cxDBMemo1DblClick(Sender: TObject);
begin
frm_op_seae_difftd:=Tfrm_op_seae_difftd.Create(self);
frm_op_seae_difftd.showchgtd(memtblweb1,t_op_seae1,TcxDBMemo(sender).databinding.DataField);
frm_op_seae_difftd.Free ;
end;
procedure Tfrm_shipingbox_si.cxDBTextEdit1DblClick(Sender: TObject);
begin
frm_op_seae_difftd:=Tfrm_op_seae_difftd.Create(self);
frm_op_seae_difftd.showchgtd(memtblweb1,t_op_seae1,TcxDBTextEdit(sender).databinding.DataField);
frm_op_seae_difftd.Free ;
end;
procedure Tfrm_shipingbox_si.cxButton6Click(Sender: TObject);
begin
frm_main.view_momo(memtblweb1,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',true);
end;
procedure Tfrm_shipingbox_si.cxButton8Click(Sender: TObject);
begin
frm_main.view_momo(memtblweb1,'<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>',true);
end;
procedure Tfrm_shipingbox_si.cxButton9Click(Sender: TObject);
begin
frm_main.view_momo(memtblweb1,'<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>',true);
end;
procedure Tfrm_shipingbox_si.cxButton10Click(Sender: TObject);
begin
frm_main.view_momo(memtblweb1,'֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>',true);
end;
procedure Tfrm_shipingbox_si.DBEdit1Change(Sender: TObject);
begin
setdiffcolor;
GetCtnConfirm(memtblweb.FieldByName('ShipingBoxNo').AsString);
end;
procedure Tfrm_shipingbox_si.cxButton11Click(Sender: TObject);
begin
frm_main.view_momo(memtblweb1,'<27><>ͷ',true);
end;
procedure Tfrm_shipingbox_si.cxButton12Click(Sender: TObject);
var i:integer;
begin
for i:=0 to bsSkinPanel2.ControlCount-1 do
with bsSkinPanel2 do
if (bsSkinPanel2.Controls[i] is TcxCheckBox) then
begin
(bsSkinPanel2.Controls[i] as TcxCheckBox).Checked:=true;
end
end;
procedure Tfrm_shipingbox_si.cxButton13Click(Sender: TObject);
var i:integer;
begin
for i:=0 to bsSkinPanel2.ControlCount-1 do
with bsSkinPanel2 do
if (bsSkinPanel2.Controls[i] is TcxCheckBox) then
begin
(bsSkinPanel2.Controls[i] as TcxCheckBox).Checked:=false;
end
end;
procedure Tfrm_shipingbox_si.cxButton7Click(Sender: TObject);
var aAdoQueryUpdate:TAdoQuery;
i,p1,p2:integer;
b_checked:boolean;
s,s_ctnItems:string;
_s,url,onlinetimemark,onlinePosted,block,mttimemark:string;
aa:DsWebServiceSoap;
begin
b_checked:=false;
url:= get_WebseviceURL;
aa:=GetDsWebServiceSoap(false,url);
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?> ';
_s:=_s+'<BookingInfo xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
_s:=_s+' <Booking> ';
_s:=_s+' <BSNO>'+memtblweb.FieldByName('ShipingBoxNo').value+'</BSNO> ';
_s:=_s+' </Booking> ';
_s:=_s+'</BookingInfo> ';
xml:=aa.GetBsnoInfo(_s);
p1:=frm_data_share.GettimePotion(1,'<Booking>',xml);
p2:=frm_data_share.GettimePotion(1,'</Booking>',xml);
block:=Copy(xml,p1,p2-p1);
onlinetimemark:=frm_data_share.GetXMLValue('TimeMark',block);
onlinePosted:=frm_data_share.GetXMLValue('ISPOSTED',block);
mttimemark:=memtblweb.fieldbyname('TIMEMARK').AsString;
if (onlinetimemark<>mttimemark) then begin
ShowMessage('<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD><DDB7><EFBFBD><EFBFBD><EFBFBD><E4BBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>');
exit;
end;
for i:=0 to bsSkinPanel2.ControlCount-1 do
with bsSkinPanel2 do
if (bsSkinPanel2.Controls[i] is TcxCheckBox) then
begin
if (bsSkinPanel2.Controls[i] as TcxCheckBox).Checked then
begin
b_checked:=true;
end;
end;
if not b_checked then
begin
showmessage('û<><C3BB>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><C3BB><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>µ<EFBFBD><C2B5><EFBFBD><EFBFBD><EFBFBD>');
end;
aAdoQueryUpdate:=CreateAdoQuery;
with aAdoQueryUpdate do
try
close;sql.Clear;
sql.Add('Update t_op_seae set ');
if cxCheckBox1.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> ')
else sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD> ');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>';
end;
if cxCheckBox2.Checked then
begin
if s='' then
sql.Add('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>=:<3A>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD> ')
else sql.Add(',<2C>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>=:<3A>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD> ');
Parameters.ParamByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').Value:=memtblweb.FieldByName('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').value;
if s='' then
s:='<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'
else s:=s+#13#10+'<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>';
end;
if cxCheckBox3.Checked then
begin
if s='' then
sql.Add('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>=:֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD> ')
else
sql.Add(',֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>=:֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD> ');
Parameters.ParamByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').Value:=memtblweb.FieldByName('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').value;
if s='' then
s:='֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'
else s:=s+#13#10+'֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>';
end;
if cxCheckBox4.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ')
else
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if cxCheckBox5.Checked then
begin
if s='' then
sql.Add('<27><>ͷ=:<3A><>ͷ ')
else sql.Add(',<2C><>ͷ=:<3A><>ͷ ');
Parameters.ParamByName('<27><>ͷ').Value:=memtblweb.FieldByName('<27><>ͷ').value;
if s='' then
s:='<27><>ͷ'
else s:=s+#13#10+'<27><>ͷ';
end;
if cxCheckBox7.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ')
else sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if cxCheckBox9.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ')
else sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD> ');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if cxCheckBox15.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ')
else sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
if cxCheckBox16.Checked then
begin
if s='' then
sql.Add('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>=:<3A>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD> ')
else sql.Add(',<2C>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>=:<3A>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD> ');
Parameters.ParamByName('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>';
end;
if cxCheckBox17.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD>ʽ=:<3A><><EFBFBD>ʽ ')
else sql.Add(',<2C><><EFBFBD>ʽ=:<3A><><EFBFBD>ʽ ');
Parameters.ParamByName('<27><><EFBFBD>ʽ').Value:=memtblweb.FieldByName('<27><><EFBFBD>ʽ').value;
if s='' then
s:='HS CODE'
else s:=s+#13#10+'HS CODE';
end;
if cxCheckBox8.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD>ѷ<EFBFBD>ʽ=:<3A><><EFBFBD>ѷ<EFBFBD>ʽ')
else sql.Add(',<2C><><EFBFBD>ѷ<EFBFBD>ʽ=:<3A><><EFBFBD>ѷ<EFBFBD>ʽ');
Parameters.ParamByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').Value:=memtblweb.FieldByName('<27><><EFBFBD>ѷ<EFBFBD>ʽ').value;
if s='' then
s:='<27><><EFBFBD>ѷ<EFBFBD>ʽ'
else s:=s+#13#10+'<27><><EFBFBD>ѷ<EFBFBD>ʽ';
end;
if cxCheckBox11.Checked then
begin
if s='' then
sql.Add('װ<><D7B0><EFBFBD><EFBFBD>=:װ<><D7B0><EFBFBD><EFBFBD>')
else sql.Add(',װ<><D7B0><EFBFBD><EFBFBD>=:װ<><D7B0><EFBFBD><EFBFBD>');
Parameters.ParamByName('װ<><D7B0><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('װ<><D7B0><EFBFBD><EFBFBD>').value;
if s='' then
s:='װ<><D7B0><EFBFBD><EFBFBD>'
else s:=s+#13#10+'װ<><D7B0><EFBFBD><EFBFBD>';
end;
if cxCheckBox12.Checked then
begin
if s='' then
sql.Add('ж<><D0B6><EFBFBD><EFBFBD>=:ж<><D0B6><EFBFBD><EFBFBD>')
else
sql.Add(',ж<><D0B6><EFBFBD><EFBFBD>=:ж<><D0B6><EFBFBD><EFBFBD>');
Parameters.ParamByName('ж<><D0B6><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('ж<><D0B6><EFBFBD><EFBFBD>').value;
if s='' then
s:='ж<><D0B6><EFBFBD><EFBFBD>'
else s:=s+#13#10+'ж<><D0B6><EFBFBD><EFBFBD>';
end;
if cxCheckBox13.Checked then
begin
if s='' then
sql.Add('Ŀ<>ĵ<EFBFBD>=:Ŀ<>ĵ<EFBFBD>')
else sql.Add(',Ŀ<>ĵ<EFBFBD>=:Ŀ<>ĵ<EFBFBD>');
Parameters.ParamByName('Ŀ<>ĵ<EFBFBD>').Value:=memtblweb.FieldByName('Ŀ<>ĵ<EFBFBD>').value;
if s='' then
s:='Ŀ<>ĵ<EFBFBD>'
else s:=s+#13#10+'Ŀ<>ĵ<EFBFBD>';
end;
if cxCheckBox22.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>')
else sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if cxCheckBox23.Checked then
begin
if s='' then
sql.Add('<27><>װ=:<3A><>װ')
else sql.Add(',<2C><>װ=:<3A><>װ');
Parameters.ParamByName('<27><>װ').Value:=memtblweb.FieldByName('<27><>װ').value;
if s='' then
s:='<27><>װ'
else s:=s+#13#10+'<27><>װ';
end;
if cxCheckBox24.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>')
else sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if cxCheckBox25.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>')
else sql.Add(',<2C><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD>').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD>'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD>';
end;
if cxCheckBox21.Checked then
begin
if s='' then
sql.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д')
else
sql.Add(',<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').Value:=memtblweb.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д').value;
if s='' then
s:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д'
else s:=s+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д';
end;
if cxCheckBox26.Checked then
begin
s_ctnItems:='װ<><D7B0><EFBFBD><EFBFBD>ϸ'
end;
if s<>'' then
begin
if MessageDlg('ȷʵҪ<<3C><><EFBFBD><EFBFBD>>'+s+','+s_ctnItems+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)<>mryes then
begin
Exit;
end;
sql.Add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>=:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>').Value:=memtblweb.FieldByName('ShipingBoxNo').value;
ExecSQL;
end
else
begin
if s_ctnItems<>'' then
if MessageDlg('ȷʵҪ<<3C><><EFBFBD><EFBFBD>>'+s_ctnItems+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)<>mryes then
begin
Exit;
end;
end;
if cxCheckBox26.Checked then
begin
while not t_op_ctn.Eof do
t_op_ctn.delete;
with memtblwebCtn do
try
DisableControls;
First;
while not eof do
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',FieldByName('<27><><EFBFBD><EFBFBD>').AsString,[]) then
begin
t_op_ctn.Edit;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27>ߴ<EFBFBD>').AsString:=FieldByName('<27>ߴ<EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=FieldByName('<27><>װ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('TEU').AsInteger:=FieldByName('TEU').AsInteger;
t_op_ctn.Post;
end
else
begin
t_op_ctn.Append;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27>ߴ<EFBFBD>').AsString:=FieldByName('<27>ߴ<EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger;
t_op_ctn.FieldByName('<27><>װ').AsString:=FieldByName('<27><>װ').AsString;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat:=FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat;
t_op_ctn.FieldByName('TEU').AsInteger:=FieldByName('TEU').AsInteger;
t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=1;
t_op_ctn.Post;
end;
Next;
end;
finally
update_ctn(t_op_ctn);
update_seae(t_op_ctn);
EnableControls;
end;
end;
{
if s_ctnItems+s<>'' then
showmessage('<27><><EFBFBD><EFBFBD>Ϊ<<3C><><EFBFBD><EFBFBD>><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+#13#10+s+#13#10+s_ctnItems);
}
url:= get_WebseviceURL;
aa:=GetDsWebServiceSoap(false,get_WebseviceURL);//'http://192.168.1.105:5427/webservice/DsWebService.asmx');
//<2F><><EFBFBD>Ȼ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
_s:=_s+'<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
_s:=_s+' <Head> ';
_s:=_s+' <OPID>'+frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</OPID> ';
_s:=_s+' <OPTYPE>4</OPTYPE> ';
_s:=_s+' <OPTIME></OPTIME> ';
_s:=_s+' <Version>1.0</Version> ';
_s:=_s+' </Head><OpseaeList> ';
_s:=_s+' <Opseae> ';
_s:=_s+' <BSNO>'+memtblweb.fieldbyname('ShipingBoxNo').asstring+'</BSNO> ';
_s:=_s+' </Opseae></OpseaeList> ';
_s:=_s+'</BookingCargoSpace> ';
XML:=aa.SetBookingCargoSpaceAudit(_s);
//XML:=aa.ReceiveBookingCargoSpace(_s);
//Opseaecount:= frm_data_share.countString('Opseae',xml);
//result:= Opseaecount;
if (pos('<27>ɹ<EFBFBD>',XML)>0) then begin
ShowMessage('<27><><EFBFBD>ճɹ<D5B3>');
end else begin
ShowMessage('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>');
end;
GetWebData;
finally
Free;
end;
end;
procedure Tfrm_shipingbox_si.cxButton3Click(Sender: TObject);
begin
GetWebData;
end;
procedure Tfrm_shipingbox_si.bsSkinButton1Click(Sender: TObject);
var _s,url:string; aa:DsWebServiceSoap;
begin
url:= get_WebseviceURL;
aa:=GetDsWebServiceSoap(false,get_WebseviceURL);//'http://192.168.1.105:5427/webservice/DsWebService.asmx');
//<2F><><EFBFBD>Ȼ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
_s:='<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
_s:=_s+'<BookingCargoSpace xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1"> ';
_s:=_s+' <Head> ';
_s:=_s+' <OPID>'+frm_data_share.t_load_employee.fieldbyname('<27><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD>к<EFBFBD>').asstring+'</OPID> ';
_s:=_s+' <OPTYPE>9</OPTYPE> ';
_s:=_s+' <OPTIME></OPTIME> ';
_s:=_s+' <Version>1.0</Version> ';
_s:=_s+' </Head><OpseaeList> ';
_s:=_s+' <Opseae> ';
_s:=_s+' <BSNO>'+memtblweb.fieldbyname('ShipingBoxNo').asstring+'</BSNO> ';
_s:=_s+' </Opseae></OpseaeList> ';
_s:=_s+'</BookingCargoSpace> ';
XML:=aa.SetBookingCargoSpaceAudit(_s);
//XML:=aa.ReceiveBookingCargoSpace(_s);
//Opseaecount:= frm_data_share.countString('Opseae',xml);
//result:= Opseaecount;
if (pos('<27>ɹ<EFBFBD>',XML)>0) then begin
ShowMessage('<27>ܾ<EFBFBD><DCBE>ɹ<EFBFBD>');
end else begin
ShowMessage('<27>ܾ<EFBFBD>ʧ<EFBFBD><CAA7>');
end;
GetWebData;
end;
procedure Tfrm_shipingbox_si.dxDBGrid1CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
if not t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
AFont.Color:=clRed;
exit;
end;
end;
procedure Tfrm_shipingbox_si.dxDBGrid1Column5CustomDrawCell(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger<>StrToInt(ANode.Strings[dxDBGrid1Column5.Index]) then
begin
AFont.Color:=clRed;
end;
end;
{
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger<>StrToInt(ANode.Strings[dxDBGrid1Column5.Index]) then
begin
AColor:=clRed;
exit;
end;
end
else
begin
AColor:=clRed;
exit;
end;
}
end;
procedure Tfrm_shipingbox_si.dxDBGrid1Column7CustomDrawCell(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if FormatFloat('0.000;0.000;0',t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat)<>FormatFloat('0.000;0.000;0',StrToFloatdef(ANode.Strings[dxDBGrid1Column7.Index],0)) then
begin
AFont.Color:=clRed;
end;
end;
end;
procedure Tfrm_shipingbox_si.dxDBGrid1Column8CustomDrawCell(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if FormatFloat('0.000;0.000;0',t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsFloat)<>FormatFloat('0.000;0.000;0',StrToFloatdef(ANode.Strings[dxDBGrid1Column8.Index],0)) then
begin
AFont.Color:=clRed;
end;
end;
end;
procedure Tfrm_shipingbox_si.dxDBGrid1Column6CustomDrawCell(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if t_op_ctn.FieldByName('<27><>װ').AsString<>ANode.Strings[dxDBGrid1Column6.Index] then
begin
AFont.Color:=clRed;
end;
end;
end;
procedure Tfrm_shipingbox_si.dxDBGrid1Column4CustomDrawCell(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString<>ANode.Strings[dxDBGrid1Column4.Index] then
begin
AFont.Color:=clRed;
end;
end;
end;
procedure Tfrm_shipingbox_si.dxDBGrid2CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
{
if uppercase(ANode.Strings[dxDBGrid2Column5.Index])='<27>ύ' then
begin
AColor:=$00E3C784;
exit;
end
else
if uppercase(ANode.Strings[dxDBGrid2Column5.Index])='<27>ύ' then
begin
//AColor:=clMoney;
exit;
end
else
if uppercase(ANode.Strings[dxDBGrid2Column5.Index])='<27>ܾ<EFBFBD>' then
begin
AColor:=clRed;
exit;
end;
}
end;
procedure Tfrm_shipingbox_si.cxLabel1Click(Sender: TObject);
begin
showmessage(sysNOExistCtn);
end;
procedure Tfrm_shipingbox_si.dxDBGrid1Column1CustomDrawCell(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if t_op_ctn.FieldByName('<27>ߴ<EFBFBD>').AsString<>ANode.Strings[dxDBGrid1Column1.Index] then
begin
AFont.Color:=clRed;
end;
end;
end;
procedure Tfrm_shipingbox_si.dxDBGrid1Column2CustomDrawCell(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxTreeListColumn; ASelected, AFocused, ANewItemRow: Boolean;
var AText: String; var AColor: TColor; AFont: TFont;
var AAlignment: TAlignment; var ADone: Boolean);
begin
if t_op_ctn.Locate('<27><><EFBFBD><EFBFBD>',uppercase(ANode.Strings[dxDBGrid1Column3.Index]),[]) then
begin
if t_op_ctn.FieldByName('<27><><EFBFBD><EFBFBD>').AsString<>ANode.Strings[dxDBGrid1Column2.Index] then
begin
AFont.Color:=clRed;
end;
end;
end;
procedure Tfrm_shipingbox_si.compareList(SourecList,DestList:TStringList);
var i,j:Integer;
SourecLines,DestLines:string;
SourecListLines,DestSourecLinesLines:TStringList;
begin
{
SourecListLines:=TStringList.Create;
DestSourecLinesLines:=TStringList.Create;
if SourceList.Count>=DestList.Count then
begin
for i:=0 to DestList.Count-1 do
begin
SourecListLines.Text:='';
SourecListLines.Text:=StringReplace(SourceList[i],' ',#13#10,[rfReplaceAll]);
DestSourecLinesLines.Text:='';
DestSourecLinesLines.Text:=StringReplace(DestList[i],' ',#13#10,[rfReplaceAll]);
if SourceList.Count>=DestList.Count then
for j:=0 do DestList.Count-1 do
begin
end;
end;
end
else
begin
end;
}
end;
procedure Tfrm_shipingbox_si.DBRichEdit2DblClick(Sender: TObject);
begin
frm_op_seae_difftd:=Tfrm_op_seae_difftd.Create(self);
frm_op_seae_difftd.showchgtd(memtblweb1,t_op_seae1,TDBRichEdit(sender).DataField);
frm_op_seae_difftd.Free ;
end;
procedure Tfrm_shipingbox_si.dxDBGrid1DblClick(Sender: TObject);
begin
frm_op_seae_diffctn:=Tfrm_op_seae_diffctn.Create(self);
CreatememtblctnDiff;
frm_op_seae_diffctn.dsrWebCtn:=memtblwebCtn1;
frm_op_seae_diffctn.dsrCtn:=t_op_ctn1;
frm_op_seae_diffctn.bsNo:='';
frm_op_seae_diffctn.showchgtd(memtblwebCtn1,t_op_ctn1);
frm_op_seae_diffctn.Free ;
end;
end.