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.

200 lines
6.8 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_vessel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, DB, ADODB, dxExEdtr, dxCntner, dxTL, dxDBCtrl,
dxDBGrid, dxDBTLCl, dxGrClms, StdCtrls, Mask, DBCtrls, bsSkinCtrls,
Wwkeycb;
type
Tfrm_op_seae_vessel = class(TForm)
bsBusinessSkinForm1: TbsBusinessSkinForm;
v_vessel_voyage: TADOQuery;
v_vessel_voyage1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridDateColumn;
dxDBGrid1Column9: TdxDBGridDateColumn;
dxDBGrid1Column10: TdxDBGridDateColumn;
v_vessel_voyageDSDesigner: TStringField;
v_vessel_voyageDSDesigner2: TStringField;
v_vessel_voyageDSDesigner3: TStringField;
v_vessel_voyageDSDesigner4: TStringField;
v_vessel_voyageDSDesigner5: TStringField;
v_vessel_voyageDSDesigner6: TStringField;
v_vessel_voyageDSDesigner7: TStringField;
v_vessel_voyageDSDesigner8: TDateTimeField;
v_vessel_voyageDSDesigner9: TDateTimeField;
v_vessel_voyageDSDesigner10: TDateTimeField;
bsSkinPanel1: TbsSkinPanel;
Label1: TLabel;
DBEdit1: TDBEdit;
Label2: TLabel;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
Label3: TLabel;
Label4: TLabel;
DBEdit4: TDBEdit;
DBEdit5: TDBEdit;
Label5: TLabel;
DBEdit6: TDBEdit;
Label6: TLabel;
DBEdit7: TDBEdit;
Label7: TLabel;
Label8: TLabel;
DBEdit8: TDBEdit;
Label9: TLabel;
DBEdit9: TDBEdit;
Label10: TLabel;
DBEdit10: TDBEdit;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton2: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Label11: TLabel;
wwIncrementalSearch1: TwwIncrementalSearch;
dxDBGrid1Column11: TdxDBGridColumn;
v_vessel_voyageDSDesigner11: TDateTimeField;
procedure bsSkinButton5Click(Sender: TObject);
procedure wwIncrementalSearch1KeyPress(Sender: TObject; var Key: Char);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton2KeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seae_vessel: Tfrm_op_seae_vessel;
op_seae_vessel_num:integer;
implementation
uses u_main, u_op_seae, u_op_seae_vessel_change, my_sys_function,
u_op_vesselvoy_change;
{$R *.dfm}
procedure Tfrm_op_seae_vessel.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seae_vessel.wwIncrementalSearch1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_op_seae_vessel.bsSkinButton2Click(Sender);
end;
if key=#27 then
close;
end;
procedure Tfrm_op_seae_vessel.bsSkinButton2Click(Sender: TObject);
begin
if v_vessel_voyage.IsEmpty then
exit;
case op_seae_vessel_num of
1:
begin
if (frm_op_seae.t_op_seae2.DataSet.State<>dsinsert) or (frm_op_seae.t_op_seae2.DataSet.State<>dsedit) then
frm_op_seae.t_op_seae2.DataSet.edit;
frm_op_seae.t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>']:=v_vessel_voyage['Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>'];
if v_vessel_voyage.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring<>''then
frm_op_seae.t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>˾']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD>˾'];
frm_op_seae.t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD>').asstring<>''then
begin
frm_op_seae.t_op_seae2.DataSet['<27><><EFBFBD>˸<EFBFBD>']:=v_vessel_voyage['װ<><D7B0><EFBFBD><EFBFBD>'];
frm_op_seae.t_op_seae2.DataSet['װ<><D7B0><EFBFBD><EFBFBD>']:=v_vessel_voyage['װ<><D7B0><EFBFBD><EFBFBD>'];
end;
if v_vessel_voyage.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae.t_op_seae2.DataSet['ж<><D0B6><EFBFBD><EFBFBD>']:=v_vessel_voyage['ж<><D0B6><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae.t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae.t_op_seae2.DataSet['<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae.t_op_seae2.DataSet['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
{
if v_vessel_voyage.fieldbyname('<27>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae.t_op_seae2.DataSet['<27>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>'];
}
if v_vessel_voyage.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae.t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD>'];
// frm_op_seae.t_op_seae2.DataSet.post;
end;
2:
begin
frm_op_seae_vessel_change.t_op_seae_vessel.edit;
frm_op_seae_vessel_change.t_op_seae_vessel['<27>ɴ<EFBFBD><C9B4><EFBFBD>']:=v_vessel_voyage['Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>'];
frm_op_seae_vessel_change.t_op_seae_vessel['<27>ɺ<EFBFBD><C9BA><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae_vessel_change.t_op_seae_vessel['<27>ɿ<EFBFBD><C9BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae_vessel_change.t_op_seae_vessel['<27>ɽظ<C9BD><D8B8><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>'];
end;
3:
begin
frm_op_seae_vessel_change.t_op_seae_vessel.edit;
frm_op_seae_vessel_change.t_op_seae_vessel['<27>´<EFBFBD><C2B4><EFBFBD>']:=v_vessel_voyage['Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>'];
frm_op_seae_vessel_change.t_op_seae_vessel['<27>º<EFBFBD><C2BA><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae_vessel_change.t_op_seae_vessel['<27>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
if v_vessel_voyage.fieldbyname('<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>').asstring<>''then
frm_op_seae_vessel_change.t_op_seae_vessel['<27>½ظ<C2BD><D8B8><EFBFBD><EFBFBD><EFBFBD>']:=v_vessel_voyage['<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>'];
end;
4:
begin
frm_op_vesselvoy_change.wwDBLookupCombo49.text:=v_vessel_voyage['Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>'];
frm_op_vesselvoy_change.DBEdit63.text:=v_vessel_voyage['<27><><EFBFBD><EFBFBD>'];
frm_op_vesselvoy_change.wwDBDateTimePicker2.Date:=v_vessel_voyage['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
5:
begin
frm_op_vesselvoy_cdchange.wwDBLookupCombo49.text:=v_vessel_voyage['Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>'];
frm_op_vesselvoy_cdchange.DBEdit63.text:=v_vessel_voyage['<27><><EFBFBD><EFBFBD>'];
frm_op_vesselvoy_cdchange.wwDBDateTimePicker2.Date:=v_vessel_voyage['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
end;
end;
close;
end;
procedure Tfrm_op_seae_vessel.bsSkinButton2KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#27 then
close;
end;
procedure Tfrm_op_seae_vessel.FormShow(Sender: TObject);
begin
v_vessel_voyage.Locate('Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>',wwIncrementalSearch1.text,[]);
end;
procedure Tfrm_op_seae_vessel.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,v_vessel_voyage,'Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>');
end;
end.