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.

2295 lines
82 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_op_seae_edi;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,IdFTP,IdFTPCommon,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,inifiles,
DBCtrls, wwdbdatetimepicker, wwdblook, u_op_sate, u_fee, u_op_card, Menus,
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu, wwdbedit, Wwdotdot, Wwdbcomb,
Grids, Wwdbigrd, Wwdbgrid, FtpCli, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdIntercept, IdLogBase, IdLogEvent,
IdAntiFreezeBase, IdAntiFreeze;
type
Tfrm_op_seae_edi = class(TForm)
Panel2: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
Notebook1: TNotebook;
t_op_seae: TADOQuery;
t_op_seae1: TDataSource;
dxDBGrid1: TdxDBGrid;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label5: TLabel;
Label38: TLabel;
DBEdit1: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
DBEdit9: TDBEdit;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N62: TMenuItem;
N25: TMenuItem;
N64: TMenuItem;
N63: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridDateColumn;
dxDBGrid1Column17: TdxDBGridColumn;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinPanel2: TbsSkinPanel;
Label47: TLabel;
Label49: TLabel;
Label51: TLabel;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBDateTimePicker11: TwwDBDateTimePicker;
Edit3: TEdit;
wwDBDateTimePicker12: TwwDBDateTimePicker;
Label52: TLabel;
wwDBDateTimePicker13: TwwDBDateTimePicker;
Label53: TLabel;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
Label60: TLabel;
DBEdit10: TDBEdit;
bsSkinButton14: TbsSkinButton;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
dxDBGrid1Column65: TdxDBGridColumn;
dxDBGrid1Column67: TdxDBGridColumn;
wwDBComboBoxType: TwwDBComboBox;
Label45: TLabel;
Label48: TLabel;
wwDBComboBox2: TwwDBComboBox;
bsSkinGroupBox4: TbsSkinGroupBox;
bsSkinPanel3: TbsSkinPanel;
Label36: TLabel;
DBEdit38: TDBEdit;
Label37: TLabel;
DBEdit39: TDBEdit;
Label39: TLabel;
DBEdit40: TDBEdit;
Label40: TLabel;
DBEdit41: TDBEdit;
Label41: TLabel;
bsSkinDBRadioGroup1: TbsSkinDBRadioGroup;
Label42: TLabel;
wwDBComboBox8: TwwDBComboBox;
Label44: TLabel;
DBEdit42: TDBEdit;
DBEdit43: TDBEdit;
Label46: TLabel;
Label50: TLabel;
DBEdit44: TDBEdit;
Label54: TLabel;
DBEdit45: TDBEdit;
DBEdit46: TDBEdit;
Label55: TLabel;
DBEdit47: TDBEdit;
DBEdit48: TDBEdit;
Label56: TLabel;
DBEdit49: TDBEdit;
DBEdit50: TDBEdit;
Label57: TLabel;
DBEdit51: TDBEdit;
DBEdit52: TDBEdit;
Label58: TLabel;
DBEdit53: TDBEdit;
Label59: TLabel;
wwDBComboBox4: TwwDBComboBox;
bsSkinGroupBox6: TbsSkinGroupBox;
bsSkinPanel4: TbsSkinPanel;
t_op_ctn1: TDataSource;
t_op_ctn: TADOQuery;
strngfld_op_ctnDSDesigner2: TStringField;
strngfld_op_ctnDSDesigner6: TStringField;
intgrfld_op_ctnDSDesigner5: TIntegerField;
strngfld_op_ctnDSDesigner7: TStringField;
strngfld_op_ctnDSDesigner8: TStringField;
intgrfld_op_ctnDSDesigner9: TIntegerField;
strngfld_op_ctnDSDesigner10: TStringField;
bcdfld_op_ctnDSDesigner11: TBCDField;
bcdfld_op_ctnDSDesigner12: TBCDField;
strngfld_op_ctnDSDesigner14: TStringField;
intgrfld_op_ctnTEU: TIntegerField;
strngfld_op_ctnDSDesigner4: TStringField;
strngfld_op_ctnDSDesigner3: TStringField;
atncfld_op_ctnctn_id: TAutoIncField;
strngfld_op_ctnDSDesigner: TStringField;
bsSkinPanel9: TbsSkinPanel;
bsSkinButton56: TbsSkinButton;
bsSkinButton57: TbsSkinButton;
bsSkinButton58: TbsSkinButton;
bsSkinButton59: TbsSkinButton;
wwDBLookupCombo16: TwwDBLookupCombo;
wwDBLookupComboctn: TwwDBLookupCombo;
wwDBGrid1: TwwDBGrid;
Label4: TLabel;
wwDBComboBox3: TwwDBComboBox;
Label43: TLabel;
DBEdit18: TDBEdit;
t_op_ctnDSDesigner: TStringField;
t_op_ctnPO: TStringField;
t_op_ctnSKU: TStringField;
t_op_ctnSKU2: TStringField;
t_op_ctnUN: TStringField;
t_op_ctnHTS: TStringField;
t_op_ctnDSDesigner2: TStringField;
t_op_ctnDSDesigner3: TBCDField;
bsSkinGroupBox9: TbsSkinGroupBox;
Label68: TLabel;
wwDBComboBox15: TwwDBComboBox;
DBEdit81: TDBEdit;
wwDBLookupCombo61: TwwDBLookupCombo;
DBEdit82: TDBEdit;
Label169: TLabel;
DBEdit83: TDBEdit;
Label170: TLabel;
Label63: TLabel;
DBMemo38: TDBMemo;
DBMemo39: TDBMemo;
btnMarks: TbsSkinButton;
btnDesc: TbsSkinButton;
Label64: TLabel;
Label65: TLabel;
Label66: TLabel;
Label67: TLabel;
Label104: TLabel;
DBEdit54: TDBEdit;
Label106: TLabel;
DBEdit55: TDBEdit;
Label105: TLabel;
wwDBComboBox6: TwwDBComboBox;
Label109: TLabel;
DBEdit56: TDBEdit;
Label108: TLabel;
DBEdit57: TDBEdit;
Label69: TLabel;
bsSkinPanel5: TbsSkinPanel;
bsSkinGroupBox1: TbsSkinGroupBox;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
bsSkinSpeedButton1: TbsSkinSpeedButton;
DBEdit5: TDBEdit;
DBEdit6: TDBEdit;
DBEdit7: TDBEdit;
DBEdit8: TDBEdit;
DBEdit11: TDBEdit;
DBEdit12: TDBEdit;
DBEdit13: TDBEdit;
DBEdit14: TDBEdit;
DBEdit15: TDBEdit;
DBEdit16: TDBEdit;
bsSkinGroupBox2: TbsSkinGroupBox;
Label16: TLabel;
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
Label23: TLabel;
Label24: TLabel;
Label25: TLabel;
bsSkinSpeedButton2: TbsSkinSpeedButton;
DBEdit17: TDBEdit;
DBEdit19: TDBEdit;
DBEdit20: TDBEdit;
DBEdit21: TDBEdit;
DBEdit22: TDBEdit;
DBEdit23: TDBEdit;
DBEdit24: TDBEdit;
DBEdit25: TDBEdit;
DBEdit26: TDBEdit;
DBEdit27: TDBEdit;
bsSkinGroupBox3: TbsSkinGroupBox;
Label26: TLabel;
Label27: TLabel;
Label28: TLabel;
Label29: TLabel;
Label30: TLabel;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
bsSkinSpeedButton3: TbsSkinSpeedButton;
DBEdit28: TDBEdit;
DBEdit29: TDBEdit;
DBEdit30: TDBEdit;
DBEdit31: TDBEdit;
DBEdit32: TDBEdit;
DBEdit33: TDBEdit;
DBEdit34: TDBEdit;
DBEdit35: TDBEdit;
DBEdit36: TDBEdit;
DBEdit37: TDBEdit;
bsSkinGroupBox5: TbsSkinGroupBox;
DBMemo3: TDBMemo;
bsSkinGroupBox7: TbsSkinGroupBox;
DBMemo1: TDBMemo;
bsSkinGroupBox8: TbsSkinGroupBox;
DBMemo2: TDBMemo;
bsSkinDBCheckRadioBox1: TbsSkinDBCheckRadioBox;
bsSkinButton48: TbsSkinButton;
t_op_ctnDSDesigner4: TStringField;
wwDBComboBoxOwner: TwwDBComboBox;
SaveDialog1: TSaveDialog;
t_op_ctn_detail: TADOQuery;
IntegerField1: TIntegerField;
StringField8: TStringField;
BCDField1: TBCDField;
BCDField2: TBCDField;
StringField12: TStringField;
StringField13: TStringField;
BCDField3: TBCDField;
t_op_ctn_detail1: TDataSource;
bsSkinGroupBox10: TbsSkinGroupBox;
wwDBGrid2: TwwDBGrid;
bsSkinPanel6: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton13: TbsSkinButton;
t_op_ctn_detailctn_id: TIntegerField;
bsSkinButton15: TbsSkinButton;
bsSkinDBCheckRadioBox2: TbsSkinDBCheckRadioBox;
bsSkinButton19: TbsSkinButton;
Label73: TLabel;
bsSkinButton20: TbsSkinButton;
Label74: TLabel;
bsSkinButton21: TbsSkinButton;
Label75: TLabel;
RxDBLookupCombo16: TRxDBLookupCombo;
RxDBLookupCombo1: TRxDBLookupCombo;
RxDBLookupCombo2: TRxDBLookupCombo;
t_code_shiper: TADOQuery;
t_code_shiper1: TDataSource;
t_code_consignee: TADOQuery;
t_code_consignee1: TDataSource;
t_code_notifyparty: TADOQuery;
t_code_notifyparty1: TDataSource;
bsSkinGroupBox11: TbsSkinGroupBox;
Label61: TLabel;
Label62: TLabel;
Label70: TLabel;
Label71: TLabel;
Label72: TLabel;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
EditType: TEdit;
bsSkinButton16: TbsSkinButton;
bsSkinButton17: TbsSkinButton;
bsSkinButton18: TbsSkinButton;
FtpClient1: TFtpClient;
lblstatus: TLabel;
IdFTP1: TIdFTP;
IdAntiFreeze1: TIdAntiFreeze;
IdLogEvent1: TIdLogEvent;
DebugListBox: TListBox;
StatusBar1: TStatusBar;
ProgressBar1: TProgressBar;
Label76: TLabel;
bsSkinButton22: TbsSkinButton;
PopupMenu4: TPopupMenu;
N2: TMenuItem;
N3: TMenuItem;
wwDBDateTimePicker3: TwwDBDateTimePicker;
Label77: TLabel;
DBEdit2: TDBEdit;
Label78: TLabel;
DBEdit58: TDBEdit;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Panel2Resize(Sender: TObject);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton14Click(Sender: TObject);
procedure bsSkinSpeedButton1Click(Sender: TObject);
procedure bsSkinSpeedButton2Click(Sender: TObject);
procedure bsSkinSpeedButton3Click(Sender: TObject);
procedure DBEdit3Change(Sender: TObject);
procedure bsSkinButton56Click(Sender: TObject);
procedure bsSkinButton57Click(Sender: TObject);
procedure bsSkinButton58Click(Sender: TObject);
procedure bsSkinButton59Click(Sender: TObject);
procedure wwDBLookupComboctnChange(Sender: TObject);
procedure btnMarksClick(Sender: TObject);
procedure btnDescClick(Sender: TObject);
procedure t_op_ctnAfterInsert(DataSet: TDataSet);
procedure wwDBGrid1ColEnter(Sender: TObject);
procedure bsSkinButton48Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
procedure t_op_ctn_detailAfterInsert(DataSet: TDataSet);
procedure t_op_ctn_detailBeforePost(DataSet: TDataSet);
procedure t_op_ctn_detailBeforeInsert(DataSet: TDataSet);
procedure bsSkinButton15Click(Sender: TObject);
procedure bsSkinButton17Click(Sender: TObject);
procedure bsSkinButton16Click(Sender: TObject);
procedure bsSkinButton18Click(Sender: TObject);
procedure bsSkinButton19Click(Sender: TObject);
procedure bsSkinButton20Click(Sender: TObject);
procedure bsSkinButton21Click(Sender: TObject);
procedure RxDBLookupCombo16Enter(Sender: TObject);
procedure RxDBLookupCombo16Exit(Sender: TObject);
procedure RxDBLookupCombo1Enter(Sender: TObject);
procedure RxDBLookupCombo1Exit(Sender: TObject);
procedure RxDBLookupCombo2Enter(Sender: TObject);
procedure RxDBLookupCombo2Exit(Sender: TObject);
procedure RxDBLookupCombo16Change(Sender: TObject);
procedure RxDBLookupCombo1Change(Sender: TObject);
procedure RxDBLookupCombo2Change(Sender: TObject);
procedure IdFTP1Status(ASender: TObject; const AStatus: TIdStatus;
const AStatusText: String);
procedure IdFTP1Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
procedure IdFTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
procedure IdFTP1WorkEnd(Sender: TObject; AWorkMode: TWorkMode);
procedure bsSkinButton22Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure bsSkinDBCheckRadioBox2Click(Sender: TObject);
private
{ Private declarations }
AbortTransfer: Boolean;
TransferrignData: Boolean;
BytesToTransfer: LongWord;
STime: TDateTime;
procedure setconcolor; //<2F><><EFBFBD>ÿؼ<C3BF><D8BC><EFBFBD><EFBFBD><EFBFBD>ɫ
function istrueAFR(Dataset:TDataSet):Boolean;
procedure createAFR(bltype:string;filepath:string);
function getCtnAfr(code:string):string;
function getPkgAfr(code:string):string;
function formatAfrstr(str:string):string;
procedure PutToDebugLog(Operation, S1: String);
public
{ Public declarations }
end;
var
frm_op_seae_edi: Tfrm_op_seae_edi;
AverageSpeed: Double = 0;
implementation
uses u_main,u_data_share, my_sys_function, u_sys_progress, u_code_edicode,
u_op_seae_edi_custom_cosco;
{$R *.dfm}
procedure Tfrm_op_seae_edi.setconcolor;
begin
end;
procedure Tfrm_op_seae_edi.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_edi.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_seae_edi.Hide;
frm_op_seae_edi.ManualFloat(frm_op_seae_edi.BoundsRect );
frm_main.freeTabs('frm_op_seae_edi');
action:=cafree;
frm_op_seae_edi:=nil;
end;
procedure Tfrm_op_seae_edi.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/14);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton14.Width:=i;
bsSkinButton15.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
bsSkinButton48.Width:=i;
bsSkinButton22.Width:=i;
end;
procedure Tfrm_op_seae_edi.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_seae);
end;
procedure Tfrm_op_seae_edi.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_seae);
end;
procedure Tfrm_op_seae_edi.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_seae);
end;
procedure Tfrm_op_seae_edi.bsSkinButton11Click(Sender: TObject);
var
answer:TModalResult;
begin
if bsSkinButton11.Caption='<27><EFBFBD>޸<EFBFBD>' then
begin
Notebook1.PageIndex:=1;
bsSkinButton11.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
DBEdit3.OnChange(Sender);
end
else
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
BEGIN
answer:=messagedlg( '<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE>޸ģ<DEB8><C4A3>Ƿ񱣴棿',mtWarning,mbYesNoCancel,0);
if answer=mrYes then
begin
t_op_seae.post;
end;
if answer=mrNo then
begin
t_op_seae.cancel;
end;
if answer=mrCancel then
begin
exit;
end;
END;
Notebook1.PageIndex:=0;
bsSkinButton11.Caption:='<27><EFBFBD>޸<EFBFBD>';
end;
end;
procedure Tfrm_op_seae_edi.bsSkinButton4Click(Sender: TObject);
begin
if MessageDlg('ȷ<><C8B7>Ҫɾ<D2AA><C9BE><EFBFBD><EFBFBD>EDI<44><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbyes,mbno],0)=mryes then
table_delete(t_op_seae);
end;
procedure Tfrm_op_seae_edi.bsSkinButton3Click(Sender: TObject);
begin
table_cancel(t_op_seae);
end;
procedure Tfrm_op_seae_edi.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=t_op_seae.GetBookmark;
t_op_seae.Refresh;
t_op_seae.GotoBookmark(book1);
end;
procedure Tfrm_op_seae_edi.FormShow(Sender: TObject);
begin
Notebook1.PageIndex:=0;
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(self);
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ򡣡<C8BA><F2A1A3A1><EFBFBD>';
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=28;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
//ί<>б<EFBFBD><D0B1>Ŵ<EFBFBD><C5B4><EFBFBD>
t_op_seae.Close;
t_op_seae.SQL.clear;
t_op_seae.SQL.Add('select top 100 * from t_op_seae_edi where '
+'(¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+''''+')');
t_op_seae.open;
t_op_ctn.Open;
t_op_ctn_detail.Open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadreggrid(dxdbgrid1,false,caption);
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_code_shiper.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_code_consignee.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
t_code_notifyparty.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_seae_edi.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_seae_edi.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_seae_edi.N12Click(Sender: TObject);
begin
// update_grid(dxdbgrid1,101);
end;
procedure Tfrm_op_seae_edi.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_seae_edi.bsSkinButton8Click(Sender: TObject);
VAR
str:widestring;
begin
str:='where '+open_data('0001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
if Edit3.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><E1B5A5> like '+''''+'%'+Edit3.text+'%'+'''';
if wwDBComboBoxType.text<>''then
str:=str+' and EDI<44><49><EFBFBD><EFBFBD> like '+''''+wwDBComboBoxType.text+'''';
if wwDBComboBox2.text<>''then
str:=str+' and EDI״̬ like '+''''+wwDBComboBox2.text+'''';
if wwDBDateTimePicker9.text<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker9.text+'''';
if wwDBDateTimePicker12.text<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker12.text+'''';
if wwDBDateTimePicker11.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker11.text+'''';
if wwDBDateTimePicker13.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker13.text+'''';
t_op_seae.close;
t_op_seae.sql.clear;
t_op_seae.sql.add('select * from t_op_seae_edi '+str+' order by <20><><EFBFBD><EFBFBD><E1B5A5>');
t_op_seae.open;
end;
procedure Tfrm_op_seae_edi.bsSkinButton12Click(Sender: TObject);
begin
Edit3.text:='';
wwDBDateTimePicker9.text:='';
wwDBDateTimePicker12.text:='';
wwDBDateTimePicker11.text:='';
wwDBDateTimePicker13.text:='';
end;
procedure Tfrm_op_seae_edi.bsSkinButton14Click(Sender: TObject);
var
Pnt:Tpoint;
begin
Pnt:=bsSkinButton14.ClientToScreen(Point(0,bsSkinButton14.Height));
PopupMenu1.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_edi.bsSkinSpeedButton1Click(Sender: TObject);
begin
if bsSkinGroupBox5.Visible then begin
bsSkinGroupBox5.Visible:=false;
bsSkinGroupBox2.Visible:=true;
end else begin
bsSkinGroupBox5.left:=bsSkinGroupBox2.Left;
bsSkinGroupBox5.Top:=bsSkinGroupBox2.Top;
bsSkinGroupBox5.Height:=bsSkinGroupBox2.Height;
bsSkinGroupBox5.Width:=bsSkinGroupBox2.Width;
bsSkinGroupBox2.Visible:=False;
bsSkinGroupBox5.Visible:=True;
end;
end;
procedure Tfrm_op_seae_edi.bsSkinSpeedButton2Click(Sender: TObject);
begin
if bsSkinGroupBox7.Visible then begin
bsSkinGroupBox7.Visible:=false;
bsSkinGroupBox3.Visible:=true;
end else begin
bsSkinGroupBox7.left:=bsSkinGroupBox3.Left;
bsSkinGroupBox7.Top:=bsSkinGroupBox3.Top;
bsSkinGroupBox7.Height:=bsSkinGroupBox3.Height;
bsSkinGroupBox7.Width:=bsSkinGroupBox3.Width;
bsSkinGroupBox3.Visible:=False;
bsSkinGroupBox7.Visible:=True;
end;
end;
procedure Tfrm_op_seae_edi.bsSkinSpeedButton3Click(Sender: TObject);
begin
if bsSkinGroupBox8.Visible then begin
bsSkinGroupBox8.Visible:=false;
bsSkinGroupBox2.Visible:=true;
end else begin
bsSkinGroupBox8.left:=bsSkinGroupBox2.Left;
bsSkinGroupBox8.Top:=bsSkinGroupBox2.Top;
bsSkinGroupBox8.Height:=bsSkinGroupBox2.Height;
bsSkinGroupBox8.Width:=bsSkinGroupBox2.Width;
bsSkinGroupBox2.Visible:=False;
bsSkinGroupBox8.Visible:=True;
end;
end;
procedure Tfrm_op_seae_edi.DBEdit3Change(Sender: TObject);
begin
if Trim(DBEdit3.Text)='AFR' then begin
Label4.Color:=clRed;
Label42.Color:=clRed;
Label60.Color:=clRed;
Label41.Color:=clRed;
Label42.Color:=clRed;
Label38.Color:=clRed;
Label36.Color:=clRed;
Label54.Color:=clRed;
Label55.Color:=clRed;
Label56.Color:=clRed;
Label6.Color:=clRed;
Label7.Color:=clRed;
Label9.Color:=clRed;
Label14.Color:=clRed;
Label13.Color:=clRed;
Label26.Color:=clRed;
Label27.Color:=clRed;
Label29.Color:=clRed;
Label34.Color:=clRed;
Label33.Color:=clRed;
Label59.Color:=clRed;
// Label61.Color:=clRed;
// Label62.Color:=clRed;
bsSkinDBCheckRadioBox1.Color:=clRed;
bsSkinGroupBox6.Caption:='<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ϸ<EFBFBD><CFB8>Ϣ(AFR <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>/<2F>ߴ<EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>/<2F><>ͷ/HTS/<2F><><EFBFBD><EFBFBD>/<2F><>װ/<2F><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>)'
end;
end;
procedure Tfrm_op_seae_edi.bsSkinButton56Click(Sender: TObject);
begin
t_op_ctn.insert;
end;
procedure Tfrm_op_seae_edi.bsSkinButton57Click(Sender: TObject);
begin
table_post(t_op_ctn);
end;
procedure Tfrm_op_seae_edi.bsSkinButton58Click(Sender: TObject);
begin
table_delete(t_op_ctn);
end;
procedure Tfrm_op_seae_edi.bsSkinButton59Click(Sender: TObject);
begin
table_cancel(t_op_ctn);
end;
procedure Tfrm_op_seae_edi.wwDBLookupComboctnChange(Sender: TObject);
begin
if (t_op_ctn.State=dsedit)or(t_op_ctn.State=dsinsert) then
begin
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',wwDBLookupComboctn.text,[]) then
begin
t_op_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=frm_data_share.t_code_ctn['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27>ߴ<EFBFBD>']:=frm_data_share.t_code_ctn['<27>ߴ<EFBFBD>'];
end
else
begin
t_op_ctn['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:='';
t_op_ctn['<27><><EFBFBD><EFBFBD>']:='';
t_op_ctn['<27>ߴ<EFBFBD>']:='';
end;
end;
end;
procedure Tfrm_op_seae_edi.btnMarksClick(Sender: TObject);
begin
frm_main.view_momo(t_op_ctn1,'<27><>ͷ');
end;
procedure Tfrm_op_seae_edi.btnDescClick(Sender: TObject);
begin
frm_main.view_momo(t_op_ctn1,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_op_seae_edi.t_op_ctnAfterInsert(DataSet: TDataSet);
begin
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=DBEdit35.DataSource.DataSet['<27><><EFBFBD><EFBFBD>'];
t_op_ctn['<27><><EFBFBD><EFBFBD>']:=1;
t_op_ctn['TEU']:=0;
end;
procedure Tfrm_op_seae_edi.wwDBGrid1ColEnter(Sender: TObject);
begin
if (wwDBGrid1.GetActiveField.FieldName='<27><>ͷ') then begin
// bsSkinPanel4.Visible:=true;
// Label62.Visible:=True;
// Label61.Visible:=false;
// DBMemo5.Visible:=true;
// DBMemo4.Visible:=false;
end else if (wwDBGrid1.GetActiveField.FieldName='<27><><EFBFBD><EFBFBD>') then begin
// bsSkinPanel4.Visible:=true;
// Label62.Visible:=false;
// Label61.Visible:=True;
// DBMemo5.Visible:=false;
// DBMemo4.Visible:=true;
end else begin
// bsSkinPanel4.Visible:=False;
end;
end;
procedure Tfrm_op_seae_edi.bsSkinButton48Click(Sender: TObject);
begin
if t_op_seae.IsEmpty then
exit;
if dxDBGrid1.SelectedCount<1 then
begin
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>EDI<44><49><EFBFBD>ݵ<EFBFBD>ҵ<EFBFBD>񣡣<EFBFBD>');
exit;
end;
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
if (t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString='AFR') or (t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString='AMR') then
createAFR(t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString,'');
end;
procedure Tfrm_op_seae_edi.createAFR(bltype:string;filepath:string);
var
Str:TStrings;
i:integer;
istrue:Boolean;
aQuery,aQuery2:TADOQuery;
begin
str:=Tstringlist.Create;
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
istrue:=istrueAFR(t_op_seae);
if not istrue then Abort;
end;
Str.Add('<?xml version="1.0" encoding="ISO-8859-1"?>');
Str.Add('<CargoSecurity>');
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
Str.Add('<BillOfLading>');
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
Str.Add('<DocumentType>'+t_op_seae.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString+'</DocumentType>');
if bltype='AMR' then begin
Str.Add('<HouseBillNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'</HouseBillNumber>');
Str.Add('<CarrierBillNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'</CarrierBillNumber>');
end else begin
Str.Add('<HouseBillNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'</HouseBillNumber>');
Str.Add('<CarrierBillNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'</CarrierBillNumber>');
end;
Str.Add('<BookingNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>').AsString+'</BookingNumber>');
if t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>').AsString='D' then
Str.Add('<PurposeCode>Delete</PurposeCode>')
else
Str.Add('<PurposeCode>AddReplace</PurposeCode>');
Str.Add('<Transshipment></Transshipment>');
Str.Add('<ShipmentType>'+t_op_seae.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</ShipmentType>');
Str.Add('<CYStatus></CYStatus>');
Str.Add('<VesselRouting>');
Str.Add('<VesselName>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</VesselName>');
Str.Add('<IMO></IMO>');
Str.Add('<VesselFlag></VesselFlag>');
Str.Add('<VoyageNumber>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</VoyageNumber>');
Str.Add('<VesselCallSign>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').AsString+'</VesselCallSign>');
Str.Add('<Ports>');
Str.Add('<PortType>PortOfOrigin</PortType>');
Str.Add('<PortCode>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</PortCode>');
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
// Str.Add('<ScheduledDate></ScheduledDate>');
// Str.Add('<ScheduledTime></ScheduledTime>');
// Str.Add('<ActualDate></ActualDate>');
// Str.Add('<ActualTime></ActualTime>');
Str.Add('</Ports>');
Str.Add('<Ports>');
Str.Add('<PortType>PortOfLoading</PortType>');
Str.Add('<PortCode>'+t_op_seae.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString+'</PortCode>');
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
// Str.Add('<ScheduledDate>'+formatdatetime('YYYYMMDD',t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asdatetime)+'</ScheduledDate>');
// Str.Add('<ScheduledTime></ScheduledTime>');
// Str.Add('<ActualDate></ActualDate>');
// Str.Add('<ActualTime></ActualTime>');
Str.Add('</Ports>');
Str.Add('<Ports>');
Str.Add('<PortType>PortOfDischarge</PortType>');
Str.Add('<PortCode>'+t_op_seae.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</PortCode>');
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
if t_op_seae.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then
Str.Add('<ScheduledDate>'+formatdatetime('YYYYMMDD',t_op_seae.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Asdatetime)+'</ScheduledDate>');
// Str.Add('<ScheduledTime></ScheduledTime>');
// Str.Add('<ActualDate></ActualDate>');
// Str.Add('<ActualTime></ActualTime>');
Str.Add('</Ports>');
Str.Add('<Ports>');
Str.Add('<PortType>PlaceOfDelivery</PortType>');
Str.Add('<PortCode>'+t_op_seae.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').AsString+'</PortCode>');
Str.Add('<PortCodeQualifier>UN</PortCodeQualifier>');
// Str.Add('<ScheduledDate></ScheduledDate>');
// Str.Add('<ScheduledTime></ScheduledTime>');
// Str.Add('<ActualDate></ActualDate>');
// Str.Add('<ActualTime></ActualTime>');
Str.Add('</Ports>');
Str.Add('</VesselRouting>');
Str.Add('<ConsignmentParty>');
Str.Add('<ConsignmentPartyType>Shipper</ConsignmentPartyType>');
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
Str.Add('<City>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
Str.Add('<Country>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString)+'</Phone>');
Str.Add('</ConsignmentParty>');
Str.Add('<ConsignmentParty>');
Str.Add('<ConsignmentPartyType>Consignee</ConsignmentPartyType>');
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
Str.Add('<City>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
Str.Add('<Country>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString)+'</Phone>');
Str.Add('</ConsignmentParty>');
if t_op_seae.FieldByName('ͬ<>ջ<EFBFBD><D5BB><EFBFBD>').AsBoolean then begin
Str.Add('<ConsignmentParty>');
Str.Add('<ConsignmentPartyType>Notify</ConsignmentPartyType>');
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
Str.Add('<City>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
Str.Add('<Country>'+t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString)+'</Phone>');
Str.Add('</ConsignmentParty>');
end else begin
Str.Add('<ConsignmentParty>');
Str.Add('<ConsignmentPartyType>Notify</ConsignmentPartyType>');
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString)+'</Name>');
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString)+'</StreetAddress1>');
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString)+'</StreetAddress2>');
Str.Add('<City>'+t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString+'</City>');
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString+'</StateProvince>');
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
Str.Add('<Country>'+t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString)+'</Phone>');
Str.Add('</ConsignmentParty>');
end;
if trim(t_op_seae.FieldByName('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD><EFBFBD>').AsString)<>'' then
begin
Str.Add('<ConsignmentParty>');
Str.Add('<ConsignmentPartyType>Notify2</ConsignmentPartyType>');
Str.Add('<Name>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD><EFBFBD>').AsString)+'</Name>');
Str.Add('<StreetAddress1>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>ַ1').AsString)+'</StreetAddress1>');
Str.Add('<StreetAddress2>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>ַ2').AsString)+'</StreetAddress2>');
Str.Add('<City>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD><EFBFBD>').AsString+'</City>');
Str.Add('<StateProvince>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>').AsString+'</StateProvince>');
Str.Add('<PostalZipCode>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD>ʱ<EFBFBD>').AsString+'</PostalZipCode>');
Str.Add('<Country>'+t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString+'</Country>');
Str.Add('<Contact>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD><32>ϵ<EFBFBD><CFB5>').AsString)+'</Contact>');
Str.Add('<Phone>'+formatAfrstr(t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>2<EFBFBD>绰').AsString)+'</Phone>');
Str.Add('</ConsignmentParty>');
end;
Str.Add('<CargoSecurityFiling>');
Str.Add('<FilingType>AFR</FilingType>');
Str.Add('<SSLineCode>'+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString+'</SSLineCode>');
Str.Add('<TypeOfEntry>'+t_op_seae.fieldbyname('<27><><EFBFBD>ʽ').AsString+'</TypeOfEntry>');
if t_op_seae.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then
begin
if t_op_seae.fieldbyname('<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ').AsBoolean then
Str.Add('<ConsolidationClosed>Yes</ConsolidationClosed>')
else
Str.Add('<ConsolidationClosed>No</ConsolidationClosed>');
end;
Str.Add('</CargoSecurityFiling>');
aQuery.Close;
aQuery.SQL.text:='select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>='''+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
aQuery.Open;
aQuery.First;
while not aQuery.Eof do
begin
Str.Add('<Container>');
Str.Add('<ContainerNumber>'+aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</ContainerNumber>');
Str.Add('<SealNumber>'+aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</SealNumber>');
Str.Add('<ContainerSize>'+getCtnAfr(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)+'</ContainerSize>');
Str.Add('<ContainerOwnership>'+aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString+'</ContainerOwnership>');
Str.Add('<ContainerType></ContainerType>');
Str.Add('<CommodityDescription>'+formatAfrstr(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)+'</CommodityDescription>');
Str.Add('<MarksAndNumbers>'+formatAfrstr(aQuery.fieldbyname('<27><>ͷ').AsString)+'</MarksAndNumbers>');
aQuery2.Close;
aQuery2.SQL.text:='select * from t_op_ctn_detail_edi where ctn_id='+aQuery.fieldbyname('ctn_id').AsString;
aQuery2.Open;
aQuery2.First;
while not aQuery2.eof do
begin
Str.Add('<ContainerDetails>');
// Str.Add('<PONumber>'+aQuery.fieldbyname('PO').AsString+'</PONumber>');
// Str.Add('<SKUNumber>'+aQuery.fieldbyname('SKU').AsString+'</SKUNumber>');
// Str.Add('<SKUDescription>'+formatAfrstr(aQuery.fieldbyname('SKU<4B><55><EFBFBD><EFBFBD>').AsString)+'</SKUDescription>');
Str.Add('<HazMatCode>'+aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UN<55><4E>').AsString+'</HazMatCode>');
Str.Add('<HarmonizedTariffCode>'+aQuery2.fieldbyname('HTS<54><53>').AsString+'</HarmonizedTariffCode>');
Str.Add('<CountryOfOrigin></CountryOfOrigin>');
Str.Add('<InnerQuantity>'+aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'</InnerQuantity>');
Str.Add('<InnerUnitType>'+getPkgAfr(aQuery2.fieldbyname('<27><>װ').AsString)+'</InnerUnitType>');
Str.Add('<Kilograms>'+formatfloat('0.00',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat)+'</Kilograms>');
Str.Add('<CubicMeters>'+formatfloat('0.000',aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat)+'</CubicMeters>');
Str.Add('</ContainerDetails>');
aQuery2.Next;
end;
Str.Add('</Container>');
aQuery.Next;
end;
t_op_seae.Edit;
t_op_seae.FieldByName('EDI״̬').AsString:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>';
t_op_seae.Post;
Str.Add('</BillOfLading>');
end;
Str.Add('</CargoSecurity>');
if filepath='' then begin
SaveDialog1.FileName:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring;
if SaveDialog1.Execute then
begin
str.SaveToFile(SaveDialog1.FileName+'.XML');
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ɳɹ<C9B3><C9B9><EFBFBD>');
end
else
begin
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>');
exit;
end;
end else begin
Str.SaveToFile(filepath);
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
FreeAndNil(Str)
end;
end;
function Tfrm_op_seae_edi.istrueAFR(Dataset: TDataSet): Boolean;
var
cntrs:String;
aQuery,aQuery2:TADOQuery;
begin
result:=true;
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then
begin
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString='' then begin
result:=false;
MessageDlg('House<73><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString))>16 then begin
result:=false;
MessageDlg('House<73><EFBFBD>ų<EFBFBD><C5B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>16<31><36><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString='' then begin
result:=false;
MessageDlg('<27><><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString))>16 then begin
result:=false;
MessageDlg('<27><><EFBFBD><EFBFBD>ų<EFBFBD><C5B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>16<31><36><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'װ<><D7B0><EFBFBD><EFBFBD><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
{*
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString<>'House' then begin
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'CY״̬<D7B4><CCAC><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
end;
*}
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString))>35 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString))>5 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>γ<EFBFBD><CEB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>5<EFBFBD><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>۴<EFBFBD><DBB4><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if Dataset.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'װ<>۴<EFBFBD><DBB4><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if Dataset.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if Dataset.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'Ŀ<>ĵش<C4B5><D8B4><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString))>4 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>4<EFBFBD><34><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>40 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>40<34><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1<D6B7><31><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString))>35 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString))>50 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>в<EFBFBD><D0B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString))>30 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>г<EFBFBD><D0B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>30<33><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString))>2 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>2<EFBFBD><32><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵绰<CBB5><E7BBB0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString))>14 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵绰<CBB5><E7BBB0><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>14<31><34><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ಻<CAB1><E0B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString))>10 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ೤<CAB1>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>10<31><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString))>35 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end else begin
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString))>50 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if length(Trim(Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>3 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>3<EFBFBD><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>40 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>40<34><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1<D6B7><31><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString))>35 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end else begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString))>50then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
end;
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3>в<EFBFBD><D0B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString))>30 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3>г<EFBFBD><D0B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>30<33><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString))>2 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>2<EFBFBD><32><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵绰<CBB5><E7BBB0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString))>14 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵绰<CBB5><E7BBB0><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>23<32><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ಻<CAB1><E0B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString))>10 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ೤<CAB1>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>10<31><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString))>35 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end else begin
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString))>50 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if length(Trim(Dataset.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString))>3 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>3<EFBFBD><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
if not Dataset.FieldByName('ͬ<>ջ<EFBFBD><D5BB><EFBFBD>').AsBoolean then begin
if Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))>40 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>40<34><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ1<D6B7><31><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if Dataset.fieldbyname('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>').AsString='House' then begin
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString))>35 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end else begin
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString))>50 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ1<D6B7><31><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>50<35><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
end;
if Dataset.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˳<EFBFBD><CBB3>в<EFBFBD><D0B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString))>30 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˳<EFBFBD><CBB3>г<EFBFBD><D0B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>30<33><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString))>2 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>2<EFBFBD><32><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('֪ͨ<CDA8>˵绰').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵绰<CBB5><E7BBB0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵绰').AsString))>14 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵绰<CBB5><E7BBB0><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>14<31><34><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString='' then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD>ʱ಻<CAB1><E0B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString))>10 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD>ʱ೤<CAB1>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>10<31><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString))>35 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8>˵<EFBFBD>ַ2<D6B7><32><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>35<33><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
if length(Trim(Dataset.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString))>3 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'֪ͨ<CDA8><D6AA><EFBFBD>ݳ<EFBFBD><DDB3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>3<EFBFBD><33><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if Dataset.fieldbyname('<27><><EFBFBD>ʽ').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>ʽ<E4B7BD><CABD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
aQuery:=CreateAdoQuery;
aQuery2:=CreateAdoQuery;
try
with aQuery do begin
Close;
SQL.Text:='select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>='''+dataset.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString+'''';
Open;
if IsEmpty then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
aQuery.First;
while not aQuery.Eof do begin
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)<>11 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EBB2BB>ȷ',mtWarning,[mbOk],0);
exit;
end;
end;
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)>15 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD>ų<EFBFBD><C5B3>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>15<31><35><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if getCtnAfr(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0>AFR<46><52><EFBFBD><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߲<EFBFBD><DFB2><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E8B2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(aQuery.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)>180 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȳ<EFBFBD><C8B2>ܳ<EFBFBD><DCB3><EFBFBD>180<38><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if aQuery.fieldbyname('<27><>ͷ').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(aQuery.fieldbyname('<27><>ͷ').AsString)>180 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>180<38><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
aQuery2.Close;
aQuery2.SQL.Text:='select * from t_op_ctn_detail_edi where ctn_id='''+aQuery.fieldbyname('ctn_id').AsString+'''';
aQuery2.Open;
if aQuery2.IsEmpty then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
aQuery2.First;
while not aQuery2.Eof do begin
if aQuery2.fieldbyname('HTS<54><53>').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HTS<54><53><EFBFBD><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if length(aQuery2.fieldbyname('HTS<54><53>').AsString)>10 then begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>HTS<54><53><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>180<38><30><EFBFBD>ַ<EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
end;
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger=0 then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if aQuery2.fieldbyname('<27><>װ').AsString='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end else begin
if getPkgAfr(aQuery2.fieldbyname('<27><>װ').AsString)='' then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>AFR<46><52><EFBFBD><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
end;
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
if aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat=0 then
begin
result:=false;
MessageDlg('<27><EFBFBD><E1B5A5>:'+Dataset.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').AsString+'<27><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB2BB>Ϊ<EFBFBD><CEAA>',mtWarning,[mbOk],0);
exit;
end;
aQuery2.Next;
end;
end;
aQuery.Next;
end;
end;
end;
finally
FreeAndNil(aQuery);
FreeAndNil(aQuery2);
end;
end;
function Tfrm_op_seae_edi.getCtnAfr(code: string): string;
var
aQuery:TADOQuery;
begin
result:='';
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;
SQL.Text:='select AFR<46><52><EFBFBD><EFBFBD> from t_code_ctn where <20><><EFBFBD><EFBFBD>='''+code+'''';
Open;
Result:=aQuery.fieldbyname('AFR<46><52><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_edi.getPkgAfr(code: string): string;
var
aQuery:TADOQuery;
begin
result:='';
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;
SQL.Text:='select AFR<46><52><EFBFBD><EFBFBD> from t_code_package where <20><><EFBFBD><EFBFBD>='''+code+'''';
Open;
if not IsEmpty then
Result:=aQuery.fieldbyname('AFR<46><52><EFBFBD><EFBFBD>').AsString;
end;
finally
FreeAndNil(aQuery);
end;
end;
function Tfrm_op_seae_edi.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;
procedure Tfrm_op_seae_edi.bsSkinButton1Click(Sender: TObject);
begin
t_op_ctn_detail.insert;
end;
procedure Tfrm_op_seae_edi.bsSkinButton9Click(Sender: TObject);
begin
table_post(t_op_ctn_detail);
end;
procedure Tfrm_op_seae_edi.bsSkinButton10Click(Sender: TObject);
begin
table_delete(t_op_ctn_detail);
end;
procedure Tfrm_op_seae_edi.bsSkinButton13Click(Sender: TObject);
begin
table_cancel(t_op_ctn_detail);
end;
procedure Tfrm_op_seae_edi.t_op_ctn_detailAfterInsert(DataSet: TDataSet);
begin
t_op_ctn_detail['ctn_id']:=t_op_ctn['ctn_id'];
end;
procedure Tfrm_op_seae_edi.t_op_ctn_detailBeforePost(DataSet: TDataSet);
begin
t_op_ctn_detail['ctn_id']:=t_op_ctn['ctn_id'];
end;
procedure Tfrm_op_seae_edi.t_op_ctn_detailBeforeInsert(DataSet: TDataSet);
begin
if t_op_ctn.State in [dsedit,dsinsert] then t_op_ctn.Post;
end;
procedure Tfrm_op_seae_edi.bsSkinButton15Click(Sender: TObject);
var
inifile1:Tinifile;
begin
EditType.Text:=t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString;
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
// edit1.text:=inifile1.ReadString('customEDI','SEND','');
// edit2.text:=inifile1.ReadString('customEDI','RECIEVE','');
// edit3.text:=inifile1.ReadString('customEDI','SENDNAME','');
edit4.text:=inifile1.ReadString('custom'+EditType.Text,'FTPSERVER','');
edit5.text:=inifile1.ReadString('custom'+EditType.Text,'FTPPATH','/');
edit6.text:=inifile1.ReadString('custom'+EditType.Text,'FTPNAME','');
edit7.text:=inifile1.ReadString('custom'+EditType.Text,'FTPPASS','');
inifile1.free;
bsSkinGroupBox11.Height:=220;
DebugListBox.Visible:=false;
StatusBar1.Visible:=false;
bsSkinGroupBox11.Visible:=true;
end;
procedure Tfrm_op_seae_edi.bsSkinButton17Click(Sender: TObject);
begin
try
if IdFTP1.Connected then begin
IdFTP1.Abort;
IdFTP1.Quit;
end;
finally
bsSkinGroupBox11.Visible:=false;
bsSkinButton16.Enabled:=True;
end;
end;
procedure Tfrm_op_seae_edi.bsSkinButton16Click(Sender: TObject);
var
strpath:widestring;
str_file:widestring;
ftpar,ftpname,ftppass,ftppath,ScriptPath:String;
StrL:TStrings;
i:integer;
SenderCode,ReciverCode,strType:String;
begin
ScriptPath:=ExtractFilePath(ParamStr(0))+'CUSTOMEDIFILE\';
if not DirectoryExists(ScriptPath) then
CreateDir(ScriptPath);
ftpar:=Trim(edit4.Text);
if ftpar='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FTP<54><50>ַ<EFBFBD><D6B7>',mtWarning,[mbOk],0);
exit;
end;
ftpname:=Trim(edit6.Text);
if ftpar='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FTP<54>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbOk],0);
exit;
end;
ftppass:=Trim(edit7.Text);
if ftpar='' then begin
MessageDlg('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>FTP<54><50><EFBFBD>룡',mtWarning,[mbOk],0);
exit;
end;
ftppath:=Trim(edit5.Text);
strpath:=ScriptPath
+t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring
+FormatDateTime('yyyy',now)
+FormatDateTime('mm',now)
+FormatDateTime('dd',now)
+FormatDateTime('hh',now)
+FormatDateTime('nn',now)+'.XML';
str_file:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><E1B5A5>').asstring
+FormatDateTime('yyyy',now)
+FormatDateTime('mm',now)
+FormatDateTime('dd',now)
+FormatDateTime('hh',now)
+FormatDateTime('nn',now)+'.XML';
if t_op_seae.IsEmpty then
exit;
if dxDBGrid1.SelectedCount<1 then
begin
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>EDI<44><49><EFBFBD>ݵ<EFBFBD>ҵ<EFBFBD>񣡣<EFBFBD>');
exit;
end;
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit) then
t_op_seae.post;
if (t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString='AFR') or (t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString='AMR') then
createAFR(t_op_seae.FieldByName('EDI<44><49><EFBFBD><EFBFBD>').AsString,strpath);
{
FtpClient1.UserName:=ftpname;
FtpClient1.PassWord:=ftppass;
FtpClient1.HostName:=ftpar;
FtpClient1.Passive:=False;
FtpClient1.MultiThreaded:=True;
FtpClient1.Port:='21';
FtpClient1.DisplayFileFlag:=True;
FtpClient1.Timeout:=5;
try
if (FtpClient1.Open) and (FtpClient1.User) and (FtpClient1.Pass) then
begin
lblstatus.Caption:='<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ӳɹ<D3B3><C9B9><EFBFBD>';
FtpClient1.HostDirName:=ftppath;
if FtpClient1.Cwd then
end else begin
showmessage('<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>!');
end;
if FtpClient1.Connected then
begin
try
FtpClient1.TransferMode := ftpTransModeStream;
FtpClient1.LocalFileName:=strpath;
FtpClient1.HostFileName:= str_file;
try
if FtpClient1.Put then
begin
ShowMessage('<27>ϴ<EFBFBD><CFB4>ɹ<EFBFBD>');
lblstatus.Caption:='<27>ϴ<EFBFBD><CFB4>ɹ<EFBFBD><C9B9><EFBFBD>';
bsSkinGroupBox11.Visible:=false;
end;
except
FtpClient1.Abort;
ShowMessage('<27>ϴ<EFBFBD>ʧ<EFBFBD><CAA7>!');
lblstatus.Caption:='<27>ϴ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>';
end;
finally
FtpClient1.Abort;
end;
end;
except
on e:exception do
begin
FtpClient1.Abort;
lblstatus.Caption:='<27>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>';
end;
end;
}
try
try
bsSkinButton16.Enabled:=false;
bsSkinGroupBox11.Height:=385;
DebugListBox.Visible:=True;
DebugListBox.Clear;
StatusBar1.Visible:=true;
ProgressBar1.Parent := StatusBar1;
ProgressBar1.Top := 2;
ProgressBar1.Left := 1;
ProgressBar1.Align := alClient;
with idftp1 do
begin
Username:=ftpname;
Password:=ftppass;
Host:=ftpar;
Connect;
end;
idftp1.ChangeDir(ftppath);
idftp1.TransferType:=ftBinary;
idftp1.Put(strpath,str_file);
idftp1.Disconnect;
showmessage('<27>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4>ɹ<EFBFBD><C9B9><EFBFBD>');
bsSkinGroupBox11.Visible:=false;
bsSkinButton16.Enabled:=true;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_op_seae.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
t_op_seae.Edit;
t_op_seae.FieldByName('EDI״̬').AsString:='<27>ѷ<EFBFBD><D1B7><EFBFBD>';
t_op_seae.Post;
end;
except
bsSkinButton16.Enabled:=true;
deletefile(strpath);
showmessage('<27>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
finally
bsSkinButton16.Enabled:=true;
end;
end;
procedure Tfrm_op_seae_edi.bsSkinButton18Click(Sender: TObject);
var
inifile1:Tinifile;
begin
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
// inifile1.WriteString('customEDI','SEND',edit1.text);
// inifile1.WriteString('customEDI','RECIEVE',edit2.text);
// inifile1.WriteString('customEDI','SENDNAME',edit3.text);
inifile1.WriteString('custom'+EditType.text,'FTPSERVER',edit4.text);
inifile1.WriteString('custom'+EditType.text,'FTPPATH',edit5.text);
inifile1.WriteString('custom'+EditType.text,'FTPNAME',edit6.text);
inifile1.WriteString('custom'+EditType.text,'FTPPASS',edit7.text);
inifile1.free;
end;
procedure Tfrm_op_seae_edi.bsSkinButton19Click(Sender: TObject);
begin
frm_code_edicode:=Tfrm_code_edicode.Create(self);
try
frm_code_edicode.t_code_edicode.Open;
if not frm_code_edicode.t_code_edicode.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo16.DisplayValue,[]) then begin
frm_code_edicode.t_code_edicode.Insert;
frm_code_edicode.t_code_edicode.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsBoolean:=true;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
end else begin
frm_code_edicode.t_code_edicode.Edit;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
frm_code_edicode.ShowModal;
finally
t_code_shiper.Requery();
FreeAndNil(frm_code_edicode);
end;
end;
procedure Tfrm_op_seae_edi.bsSkinButton20Click(Sender: TObject);
begin
frm_code_edicode:=Tfrm_code_edicode.Create(self);
try
frm_code_edicode.t_code_edicode.Open;
if not frm_code_edicode.t_code_edicode.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo1.DisplayValue,[]) then begin
frm_code_edicode.t_code_edicode.Insert;
frm_code_edicode.t_code_edicode.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsBoolean:=true;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString;
end else begin
frm_code_edicode.t_code_edicode.Edit;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
frm_code_edicode.ShowModal;
finally
t_code_consignee.Requery();
FreeAndNil(frm_code_edicode);
end;
end;
procedure Tfrm_op_seae_edi.bsSkinButton21Click(Sender: TObject);
begin
frm_code_edicode:=Tfrm_code_edicode.Create(self);
try
frm_code_edicode.t_code_edicode.Open;
if not frm_code_edicode.t_code_edicode.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo2.DisplayValue,[]) then begin
frm_code_edicode.t_code_edicode.Insert;
frm_code_edicode.t_code_edicode.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('֪ͨ<CDA8><D6AA>').AsBoolean:=true;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString;
end else begin
frm_code_edicode.t_code_edicode.Edit;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ1').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ2').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ַ3').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27>绰').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString;
frm_code_edicode.t_code_edicode.FieldByName('<27><>').AsString:=t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString;
end;
frm_code_edicode.ShowModal;
finally
t_code_notifyparty.Requery();
FreeAndNil(frm_code_edicode);
end;
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo16Enter(Sender: TObject);
begin
RxDBLookupCombo16.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo16Exit(Sender: TObject);
begin
RxDBLookupCombo16.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo1Enter(Sender: TObject);
begin
RxDBLookupCombo1.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo1Exit(Sender: TObject);
begin
RxDBLookupCombo1.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo2Enter(Sender: TObject);
begin
RxDBLookupCombo2.LookupDisplay:='<27><><EFBFBD><EFBFBD>;<3B>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo2Exit(Sender: TObject);
begin
RxDBLookupCombo2.LookupDisplay:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo16Change(Sender: TObject);
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit)then
begin
if RxDBLookupCombo16.DisplayValue<>'' then begin
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString:=t_code_shiper.FieldByName('<27><>ַ1').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString:=t_code_shiper.FieldByName('<27><>ַ2').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString:=t_code_shiper.FieldByName('<27><>ַ3').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=t_code_shiper.FieldByName('<27>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_code_shiper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString:=t_code_shiper.FieldByName('<27>绰').AsString;
t_op_seae.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_shiper.FieldByName('<27><>').AsString;
end;
end;
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo1Change(Sender: TObject);
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit)then
begin
if RxDBLookupCombo1.DisplayValue<>'' then begin
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString:=t_code_consignee.FieldByName('<27><>ַ1').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString:=t_code_consignee.FieldByName('<27><>ַ2').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString:=t_code_consignee.FieldByName('<27><>ַ3').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=t_code_consignee.FieldByName('<27>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_code_consignee.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString:=t_code_consignee.FieldByName('<27>绰').AsString;
t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_consignee.FieldByName('<27><>').AsString;
end;
end;
end;
procedure Tfrm_op_seae_edi.RxDBLookupCombo2Change(Sender: TObject);
begin
if (t_op_seae.State=dsinsert)or(t_op_seae.State=dsedit)then
begin
if RxDBLookupCombo2.DisplayValue<>'' then begin
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString:=t_code_notifyparty.FieldByName('<27><>ַ1').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString:=t_code_notifyparty.FieldByName('<27><>ַ2').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString:=t_code_notifyparty.FieldByName('<27><>ַ3').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_code_notifyparty.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString:=t_code_notifyparty.FieldByName('<27>绰').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString:=t_code_notifyparty.FieldByName('<27><>').AsString;
end;
end;
end;
procedure Tfrm_op_seae_edi.PutToDebugLog(Operation, S1: String);
Var
S: String;
begin
while Length(S1) > 0 do begin
if Pos(#13, S1) > 0 then begin
S := Copy(S1, 1, Pos(#13, S1) - 1);
Delete(S1, 1, Pos(#13, S1));
if S1[1] = #10 then Delete(S1, 1, 1);
end
else
S := S1;
DebugListBox.ItemIndex := DebugListBox.Items.Add(Operation + S);
end;
end;
procedure Tfrm_op_seae_edi.IdFTP1Status(ASender: TObject;
const AStatus: TIdStatus; const AStatusText: String);
begin
DebugListBox.ItemIndex := DebugListBox.Items.Add(AStatusText);
end;
procedure Tfrm_op_seae_edi.IdFTP1Work(Sender: TObject;
AWorkMode: TWorkMode; const AWorkCount: Integer);
Var
S: String;
TotalTime: TDateTime;
H, M, Sec, MS: Word;
DLTime: Double;
begin
TotalTime := Now - STime;
DecodeTime(TotalTime, H, M, Sec, MS);
Sec := Sec + M * 60 + H * 3600;
DLTime := Sec + MS / 1000;
if DLTime > 0 then
AverageSpeed := {(AverageSpeed + }(AWorkCount / 1024) / DLTime{) / 2};
if AverageSpeed > 0 then begin
Sec := Trunc(((ProgressBar1.Max - AWorkCount) / 1024) / AverageSpeed);
S := Format('%2d:%2d:%2d', [Sec div 3600, (Sec div 60) mod 60, Sec mod 60]);
S := 'ʣ<><CAA3>ʱ<EFBFBD><CAB1> ' + S;
end
else S := '';
S := FormatFloat('0.00 KB/s', AverageSpeed) + '; ' + S;
case AWorkMode of
wmRead: StatusBar1.Panels[1].Text := '<27><><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD> ' + S;
wmWrite: StatusBar1.Panels[1].Text := '<27>ϴ<EFBFBD><CFB4>ٶ<EFBFBD> ' + S;
end;
if AbortTransfer then IdFTP1.Abort;
ProgressBar1.Position := AWorkCount;
AbortTransfer := false;
end;
procedure Tfrm_op_seae_edi.IdFTP1WorkBegin(Sender: TObject;
AWorkMode: TWorkMode; const AWorkCountMax: Integer);
begin
TransferrignData := true;
AbortTransfer := false;
STime := Now;
if AWorkCountMax > 0 then ProgressBar1.Max := AWorkCountMax
else ProgressBar1.Max := BytesToTransfer;
AverageSpeed := 0;
end;
procedure Tfrm_op_seae_edi.IdFTP1WorkEnd(Sender: TObject;
AWorkMode: TWorkMode);
begin
StatusBar1.Panels[1].Text := '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.';
BytesToTransfer := 0;
TransferrignData := false;
ProgressBar1.Position := 0;
AverageSpeed := 0;
end;
procedure Tfrm_op_seae_edi.bsSkinButton22Click(Sender: TObject);
var
Pnt:Tpoint;
begin
if t_op_seae1.DataSet=nil then
exit;
if (t_op_seae1.DataSet.State=dsinsert)or(t_op_seae1.DataSet.State=dsedit) then
t_op_seae1.DataSet.post;
Pnt:=bsSkinButton22.ClientToScreen(Point(0,bsSkinButton22.Height));
PopupMenu4.Popup(Pnt.x,Pnt.y);
end;
procedure Tfrm_op_seae_edi.N3Click(Sender: TObject);
begin
if t_op_seae.isempty then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EDI<44>ļ<EFBFBD><C4BC><EFBFBD>');
exit;
end;
try
if not assigned(frm_op_seae_edi_custom_cosco) then
frm_op_seae_edi_custom_cosco:=tfrm_op_seae_edi_custom_cosco.Create(application);
frm_op_seae_edi_custom_cosco.ShowModal;
finally
frm_op_seae_edi_custom_cosco.free;
frm_op_seae_edi_custom_cosco:=nil;
end;
end;
procedure Tfrm_op_seae_edi.bsSkinDBCheckRadioBox2Click(Sender: TObject);
begin
if bsSkinDBCheckRadioBox2.Checked then begin
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8>˵绰').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString;
t_op_seae.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString:=t_op_seae.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString;
end;
end;
end.