|
|
unit u_code_vessel;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, BusinessSkinForm, dxTL, dxDBCtrl, dxDBGrid, dxCntner,
|
|
|
bsSkinCtrls, Grids, Wwdbigrd, Wwdbgrid, ExtCtrls, StdCtrls, wwdblook,ADODB,Db,
|
|
|
DBGridEh, Mask, bsSkinBoxCtrls;
|
|
|
|
|
|
type
|
|
|
Tfrm_code_vessel = class(TForm)
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
wwDBGrid1: TwwDBGrid;
|
|
|
wwDBGrid2: TwwDBGrid;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
wwDBLookupCombo4: TwwDBLookupCombo;
|
|
|
Panel2: TPanel;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinButton9: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinEdit1: TbsSkinEdit;
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
procedure bsSkinButton9Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_code_vessel: Tfrm_code_vessel;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses my_sys_function, u_data_share;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_code_vessel.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
CanClose:=frm_close_query(frm_data_share.t_code_vessel);
|
|
|
CanClose:=frm_close_query(frm_data_share.t_code_voyage);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
frm_data_share.t_code_voyage.BeforeScroll:=nil;
|
|
|
frm_data_share.t_code_vessel.requery;
|
|
|
frm_data_share.t_code_voyage.requery;
|
|
|
frm_data_share.t_crm_client_ship.requery;
|
|
|
frm_data_share.t_code_trade.requery;
|
|
|
frm_data_share.t_code_loaport.requery;
|
|
|
frm_data_share.t_code_disport.requery;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_data_share.t_code_vessel.Insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(frm_data_share.t_code_vessel);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(frm_data_share.t_code_vessel);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(frm_data_share.t_code_vessel);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_data_share.t_code_voyage.Insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton7Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(frm_data_share.t_code_voyage);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton8Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(frm_data_share.t_code_voyage);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton9Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(frm_data_share.t_code_voyage);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_vessel.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
if not frm_data_share.t_code_vessel.IsEmpty then begin
|
|
|
frm_data_share.t_code_vessel.Locate('Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>',trim(bsSkinEdit1.text),[loPartialKey])
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|