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.

135 lines
3.4 KiB
Plaintext

11 months ago
unit u_op_vesselvoy_cdchange;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, wwdbdatetimepicker, bsSkinCtrls, BusinessSkinForm, DB,ADODB,
Mask, DBCtrls, wwdblook, wwdbedit, Wwdotdot, Wwdbcomb;
type
Tfrm_op_vesselvoy_cdchange = class(TForm)
Label1: TLabel;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
DataSource1: TDataSource;
wwDBLookupCombo49: TwwDBLookupCombo;
Label125: TLabel;
Label126: TLabel;
Button1: TButton;
Label2: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
DBEdit63: TEdit;
wwDBComboBox20: TwwDBComboBox;
Label79: TLabel;
Label3: TLabel;
Edit1: TEdit;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
BSTYPE:string;
end;
var
frm_op_vesselvoy_cdchange: Tfrm_op_vesselvoy_cdchange;
implementation
uses my_sys_function, u_op_seae_vessel, u_op_seae, u_data_share,
u_op_seae_edi_data;
{$R *.dfm}
procedure Tfrm_op_vesselvoy_cdchange.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_vesselvoy_cdchange.bsSkinButton1Click(Sender: TObject);
var
aQuery:TAdoQuery;
i:Integer;
book1:Tbookmark;
dsstr,PostUrl:string;
begin
{
if wwDBLookupCombo49.text='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĴ<C2B5><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
if DBEdit63.text='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µĺ<C2B5><C4BA>Σ<EFBFBD><CEA3><EFBFBD>');
exit;
end;
}
try
frm_op_seae_edi_data.t_op_seae.DisableControls;
aQuery:=createAdoQuery;
try
with aQuery do begin
for i:=0 to frm_op_seae_edi_data.dxDBGrid1.SelectedCount-1 do
begin
frm_op_seae_edi_data.t_op_seae.GotoBookmark(pointer(frm_op_seae_edi_data.dxDBGrid1.selectedrows[i]));
isexcel:=true;
frm_op_seae_edi_data.t_op_seae.Edit;
if (wwDBDateTimePicker2.Text<>'') then
frm_op_seae_edi_data.t_op_seae['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=FormatDateTime('YYYY-MM-DD',wwDBDateTimePicker2.Date);
if (wwDBLookupCombo49.Text<>'') then
frm_op_seae_edi_data.t_op_seae['<27><><EFBFBD><EFBFBD>']:=wwDBLookupCombo49.Text;
if (DBEdit63.text<>'') then
frm_op_seae_edi_data.t_op_seae['<27><><EFBFBD><EFBFBD>']:=DBEdit63.text;
if (wwDBComboBox20.text<>'') then
frm_op_seae_edi_data.t_op_seae['<27><><EFBFBD><EFBFBD>']:=wwDBComboBox20.text;
if (Edit1.text<>'') then
frm_op_seae_edi_data.t_op_seae['<27><><EFBFBD><EFBFBD>IMO']:=Edit1.text;
frm_op_seae_edi_data.t_op_seae.Post;
end;
end;
finally
FreeAndNil(aQuery);
end;
finally
frm_op_seae_edi_data.isexcel:=false;
frm_op_seae_edi_data.t_op_seae.EnableControls;
end;
book1:=frm_op_seae_edi_data.t_op_seae.GetBookmark;
frm_op_seae_edi_data.t_op_seae.Refresh;
frm_op_seae_edi_data.t_op_seae.GotoBookmark(book1);
showmessage('<27><><EFBFBD>ijɹ<C4B3><C9B9><EFBFBD><EFBFBD><EFBFBD>');
close;
end;
procedure Tfrm_op_vesselvoy_cdchange.Button1Click(Sender: TObject);
begin
try
frm_op_seae_vessel:=tfrm_op_seae_vessel.Create (self);
frm_op_seae_vessel.v_vessel_voyage.open;
frm_op_seae_vessel.wwIncrementalSearch1.Text:=wwDBLookupCombo49.text;
op_seae_vessel_num:=5;
frm_op_seae_vessel.ShowModal;
finally
frm_op_seae_vessel.Free;
frm_op_seae_vessel:=nil;
end;
end;
end.