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.

1950 lines
70 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_info_lines_manage;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, bsSkinCtrls, DB, ADODB, Grids, Wwdbigrd, Wwdbgrid,
StdCtrls, wwdblook, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
dxDBTLCl, dxGrClms, Mask, DBCtrls, RxLookup, wwdbdatetimepicker, Wwkeycb,
ComCtrls, bsSkinTabs, wwdbedit, Wwdotdot, Wwdbcomb, Menus, kbmMemTable,
kbmMemBinaryStreamFormat, DBGrids;
type
Tfrm_info_lines_manage = class(TForm)
Panel1: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton2: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinButton8: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton11: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Notebook1: TNotebook;
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel2: TbsSkinPanel;
t_vessel_plan: TADOQuery;
ds_vessel_plan1: TDataSource;
bsSkinPanel3: TbsSkinPanel;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinPanel5: TbsSkinPanel;
bsSkinButton1: TbsSkinButton;
Label8: TLabel;
RxDBLookupCombo3: TRxDBLookupCombo;
Label10: TLabel;
RxDBLookupCombo4: TRxDBLookupCombo;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column55: TdxDBGridColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid120GP: TdxDBGridMaskColumn;
dxDBGrid140GP: TdxDBGridMaskColumn;
dxDBGrid140HQ: TdxDBGridMaskColumn;
dxDBGrid140RF: TdxDBGridMaskColumn;
dxDBGrid140RH: TdxDBGridMaskColumn;
dxDBGrid145HQ: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
dxDBGrid1Column18: TdxDBGridMaskColumn;
dxDBGrid1Column19: TdxDBGridMaskColumn;
dxDBGrid1Column20: TdxDBGridMaskColumn;
dxDBGrid1Column21: TdxDBGridMaskColumn;
dxDBGrid1Column22: TdxDBGridMaskColumn;
dxDBGrid1Column23: TdxDBGridMaskColumn;
dxDBGrid1Column24: TdxDBGridMaskColumn;
dxDBGrid1Column25: TdxDBGridMaskColumn;
dxDBGrid1Column26: TdxDBGridMaskColumn;
dxDBGrid1Column27: TdxDBGridMaskColumn;
dxDBGrid1Column28: TdxDBGridMaskColumn;
dxDBGrid1Column29: TdxDBGridMaskColumn;
dxDBGrid1Column30: TdxDBGridMaskColumn;
dxDBGrid1Column31: TdxDBGridMaskColumn;
dxDBGrid1Column32: TdxDBGridMaskColumn;
dxDBGrid1Column33: TdxDBGridMaskColumn;
dxDBGrid1Column34: TdxDBGridMaskColumn;
dxDBGrid1Column35: TdxDBGridMaskColumn;
dxDBGrid1Column56: TdxDBGridColumn;
dxDBGrid1Column58: TdxDBGridColumn;
Label12: TLabel;
wwDBLookupCombo5: TwwDBLookupCombo;
Label30: TLabel;
Edit7: TEdit;
Label1: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBComboBox20: TwwDBComboBox;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Label4: TLabel;
bsSkinButton12: TbsSkinButton;
t_vessel_planDSDesigner: TAutoIncField;
t_vessel_planDSDesigner2: TStringField;
t_vessel_planDSDesigner3: TDateTimeField;
t_vessel_planDSDesigner4: TIntegerField;
t_vessel_planDSDesigner5: TIntegerField;
t_vessel_planDSDesigner6: TStringField;
t_vessel_planDSDesigner7: TStringField;
t_vessel_planDSDesigner8: TStringField;
t_vessel_planDSDesigner9: TStringField;
t_vessel_planDSDesigner10: TStringField;
t_vessel_planD1: TIntegerField;
t_vessel_planD2: TIntegerField;
t_vessel_planD3: TIntegerField;
t_vessel_planD4: TIntegerField;
t_vessel_planD5: TIntegerField;
t_vessel_planD6: TIntegerField;
t_vessel_planB1: TIntegerField;
t_vessel_planB2: TIntegerField;
t_vessel_planB3: TIntegerField;
t_vessel_planB4: TIntegerField;
t_vessel_planB5: TIntegerField;
t_vessel_planB6: TIntegerField;
t_vessel_planDSDesigner11: TStringField;
t_vessel_planDSDesigner12: TStringField;
t_vessel_planDSDesigner13: TStringField;
t_vessel_planDSDesigner14: TDateTimeField;
t_vessel_planDSDesigner15: TStringField;
t_vessel_planS12: TDateTimeField;
t_vessel_planL12: TDateTimeField;
t_vessel_planY12: TDateTimeField;
t_vessel_planD12: TDateTimeField;
t_vessel_planB12: TDateTimeField;
t_vessel_planS22: TDateTimeField;
t_vessel_planS32: TDateTimeField;
t_vessel_planS42: TDateTimeField;
t_vessel_planS52: TDateTimeField;
t_vessel_planS62: TDateTimeField;
t_vessel_planL22: TDateTimeField;
t_vessel_planL32: TDateTimeField;
t_vessel_planL42: TDateTimeField;
t_vessel_planL52: TDateTimeField;
t_vessel_planL62: TDateTimeField;
t_vessel_planY22: TDateTimeField;
t_vessel_planY32: TDateTimeField;
t_vessel_planY42: TDateTimeField;
t_vessel_planY52: TDateTimeField;
t_vessel_planY62: TDateTimeField;
t_vessel_planD22: TDateTimeField;
t_vessel_planD32: TDateTimeField;
t_vessel_planD42: TDateTimeField;
t_vessel_planD52: TDateTimeField;
t_vessel_planD62: TDateTimeField;
t_vessel_planB22: TDateTimeField;
t_vessel_planB32: TDateTimeField;
t_vessel_planB42: TDateTimeField;
t_vessel_planB52: TDateTimeField;
t_vessel_planB62: TDateTimeField;
dxDBGrid1Column38: TdxDBGridColumn;
t_vessel_planS13: TSmallintField;
t_vessel_planS23: TSmallintField;
t_vessel_planS33: TSmallintField;
t_vessel_planS43: TSmallintField;
t_vessel_planS53: TSmallintField;
t_vessel_planS63: TSmallintField;
t_vessel_planL13: TSmallintField;
t_vessel_planL23: TSmallintField;
t_vessel_planL33: TSmallintField;
t_vessel_planL43: TSmallintField;
t_vessel_planL53: TSmallintField;
t_vessel_planL63: TSmallintField;
t_vessel_planY13: TSmallintField;
t_vessel_planY23: TSmallintField;
t_vessel_planY33: TSmallintField;
t_vessel_planY43: TSmallintField;
t_vessel_planY53: TSmallintField;
t_vessel_planY63: TSmallintField;
t_vessel_planDSDesigner16: TDateTimeField;
dxDBGrid1Column39: TdxDBGridColumn;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N16: TMenuItem;
t_vessel_planC1: TSmallintField;
t_vessel_planC2: TSmallintField;
t_vessel_planC3: TSmallintField;
t_vessel_planC4: TSmallintField;
t_vessel_planC5: TSmallintField;
t_vessel_planC6: TSmallintField;
t_vessel_planF1: TSmallintField;
t_vessel_planF2: TSmallintField;
t_vessel_planF3: TSmallintField;
t_vessel_planF4: TSmallintField;
t_vessel_planF5: TSmallintField;
t_vessel_planF6: TSmallintField;
t_vessel_planX1: TSmallintField;
t_vessel_planX2: TSmallintField;
t_vessel_planX3: TSmallintField;
t_vessel_planX4: TSmallintField;
t_vessel_planX5: TSmallintField;
t_vessel_planX6: TSmallintField;
dxDBGrid1Column40: TdxDBGridColumn;
dxDBGrid1Column41: TdxDBGridColumn;
dxDBGrid1Column42: TdxDBGridColumn;
dxDBGrid1Column43: TdxDBGridColumn;
dxDBGrid1Column44: TdxDBGridColumn;
dxDBGrid1Column45: TdxDBGridColumn;
dxDBGrid1Column46: TdxDBGridColumn;
dxDBGrid1Column47: TdxDBGridColumn;
dxDBGrid1Column48: TdxDBGridColumn;
dxDBGrid1Column49: TdxDBGridColumn;
dxDBGrid1Column50: TdxDBGridColumn;
dxDBGrid1Column51: TdxDBGridColumn;
dxDBGrid1Column52: TdxDBGridColumn;
dxDBGrid1Column53: TdxDBGridColumn;
dxDBGrid1Column54: TdxDBGridColumn;
dxDBGrid1Column57: TdxDBGridColumn;
dxDBGrid1Column59: TdxDBGridColumn;
dxDBGrid1Column60: TdxDBGridColumn;
t_vessel_lines: TADOQuery;
ds_vessel_lines1: TDataSource;
bsSkinButton10: TbsSkinButton;
N1: TMenuItem;
N2: TMenuItem;
t_vessel_planField: TStringField;
dxDBGrid1Column61: TdxDBGridColumn;
DataSource1: TDataSource;
dxDBGrid2: TdxDBGrid;
dxDBGridMaskColumn4: TdxDBGridMaskColumn;
dxDBGridMaskColumn5: TdxDBGridMaskColumn;
dxDBGridMaskColumn6: TdxDBGridMaskColumn;
dxDBGridMaskColumn7: TdxDBGridMaskColumn;
dxDBGridMaskColumn8: TdxDBGridMaskColumn;
dxDBGridMaskColumn9: TdxDBGridMaskColumn;
dxDBGridMaskColumn10: TdxDBGridMaskColumn;
dxDBGridMaskColumn11: TdxDBGridMaskColumn;
dxDBGridMaskColumn12: TdxDBGridMaskColumn;
dxDBGridMaskColumn13: TdxDBGridMaskColumn;
dxDBGridMaskColumn14: TdxDBGridMaskColumn;
dxDBGridMaskColumn15: TdxDBGridMaskColumn;
dxDBGridMaskColumn16: TdxDBGridMaskColumn;
dxDBGridMaskColumn17: TdxDBGridMaskColumn;
dxDBGridMaskColumn18: TdxDBGridMaskColumn;
dxDBGridMaskColumn19: TdxDBGridMaskColumn;
dxDBGridMaskColumn20: TdxDBGridMaskColumn;
dxDBGridMaskColumn21: TdxDBGridMaskColumn;
dxDBGridMaskColumn22: TdxDBGridMaskColumn;
dxDBGridMaskColumn23: TdxDBGridMaskColumn;
dxDBGridMaskColumn24: TdxDBGridMaskColumn;
dxDBGridMaskColumn25: TdxDBGridMaskColumn;
dxDBGridMaskColumn26: TdxDBGridMaskColumn;
dxDBGridMaskColumn27: TdxDBGridMaskColumn;
dxDBGridMaskColumn28: TdxDBGridMaskColumn;
dxDBGridMaskColumn29: TdxDBGridMaskColumn;
dxDBGridMaskColumn30: TdxDBGridMaskColumn;
dxDBGridMaskColumn31: TdxDBGridMaskColumn;
dxDBGridMaskColumn32: TdxDBGridMaskColumn;
dxDBGridMaskColumn33: TdxDBGridMaskColumn;
dxDBGridColumn7: TdxDBGridColumn;
dxDBGridColumn8: TdxDBGridColumn;
dxDBGridColumn9: TdxDBGridColumn;
dxDBGridColumn10: TdxDBGridColumn;
dxDBGridColumn11: TdxDBGridColumn;
dxDBGridColumn12: TdxDBGridColumn;
dxDBGridColumn13: TdxDBGridColumn;
dxDBGridColumn14: TdxDBGridColumn;
dxDBGridColumn15: TdxDBGridColumn;
dxDBGridColumn16: TdxDBGridColumn;
dxDBGridColumn17: TdxDBGridColumn;
dxDBGridColumn18: TdxDBGridColumn;
dxDBGridColumn19: TdxDBGridColumn;
dxDBGridColumn20: TdxDBGridColumn;
dxDBGridColumn21: TdxDBGridColumn;
dxDBGridColumn22: TdxDBGridColumn;
dxDBGridColumn23: TdxDBGridColumn;
dxDBGridColumn24: TdxDBGridColumn;
kbmBinaryStreamFormat1: TkbmBinaryStreamFormat;
kbmThreadDataSet1: TkbmThreadDataSet;
memtblrpt_total: TkbmMemTable;
t_vessel_planS1: TStringField;
t_vessel_planS2: TStringField;
t_vessel_planS3: TStringField;
t_vessel_planS4: TStringField;
t_vessel_planS5: TStringField;
t_vessel_planS6: TStringField;
t_vessel_planY1: TStringField;
t_vessel_planY2: TStringField;
t_vessel_planY3: TStringField;
t_vessel_planY4: TStringField;
t_vessel_planY5: TStringField;
t_vessel_planY6: TStringField;
t_vessel_planL1: TStringField;
t_vessel_planL2: TStringField;
t_vessel_planL3: TStringField;
t_vessel_planL4: TStringField;
t_vessel_planL5: TStringField;
t_vessel_planL6: TStringField;
memtblrpt_totalS1: TIntegerField;
memtblrpt_totalS2: TIntegerField;
memtblrpt_totalS3: TIntegerField;
memtblrpt_totalS4: TIntegerField;
memtblrpt_totalS5: TIntegerField;
memtblrpt_totalS6: TIntegerField;
dxDBGrid1Column62: TdxDBGridColumn;
dxDBGrid1Column63: TdxDBGridColumn;
dxDBGrid1Column64: TdxDBGridColumn;
dxDBGrid1Column65: TdxDBGridColumn;
dxDBGrid1Column66: TdxDBGridColumn;
dxDBGrid1Column67: TdxDBGridColumn;
dxDBGrid1Column68: TdxDBGridColumn;
dxDBGrid1Column69: TdxDBGridColumn;
bsSkinButton13: TbsSkinButton;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton7Click(Sender: TObject);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton11Click(Sender: TObject);
procedure bsSkinButton8Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure t_price_shipAfterInsert(DataSet: TDataSet);
procedure FormShow(Sender: TObject);
procedure Panel1Resize(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure t_price_shipBeforeEdit(DataSet: TDataSet);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
procedure bsSkinPanel3Resize(Sender: TObject);
procedure dxDBGrid2DblClick(Sender: TObject);
procedure t_vessel_planDSDesigner3Change(Sender: TField);
procedure t_vessel_planBeforePost(DataSet: TDataSet);
procedure bsSkinButton12Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure t_vessel_planBeforeEdit(DataSet: TDataSet);
procedure t_vessel_planAfterInsert(DataSet: TDataSet);
procedure dxDBGrid120GPCustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid140GPCustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid140HQCustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid140RFCustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid140RHCustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid145HQCustomDraw(Sender: TObject; ACanvas: TCanvas;
ARect: TRect; ANode: TdxTreeListNode; AColumn: TdxDBTreeListColumn;
const AText: String; AFont: TFont; var AColor: TColor; ASelected,
AFocused: Boolean; var ADone: Boolean);
procedure dxDBGrid1Column12CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column13CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column14CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column15CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column16CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column17CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column18CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column19CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column20CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column21CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column22CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column23CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column24CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column25CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column26CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column27CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column28CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column29CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column30CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column31CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column32CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column33CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column34CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure dxDBGrid1Column35CustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean;
var ADone: Boolean);
procedure N10Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure bsSkinButton13Click(Sender: TObject);
private
procedure CreatememTable;
procedure GetmemTable;
function GetGridColor(ai,FName:String):TColor;
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_lines_manage: Tfrm_info_lines_manage;
info_price_manage_do1,info_price_manage_do2:boolean;
implementation
uses u_main, u_data_share, my_sys_function, u_code_lines_modify,u_info_lines_copy,
u_info_lines_sadd, u_code_lines_add;
{$R *.dfm}
procedure Tfrm_info_lines_manage.GetmemTable;
var
i:Integer;
str:String;
begin
memtblrpt_total.Open;
memtblrpt_total.edit;
for i:=0 to memtblrpt_total.FieldCount-1 do begin
memtblrpt_total.Fields[i].AsInteger:=0;
end;
memtblrpt_total.Post;
t_vessel_plan.DisableControls;
t_vessel_plan.First;
memtblrpt_total.Edit;
while not t_vessel_plan.eof do begin
t_vessel_plan.edit;
for i:=1 to 6 do begin
Str:=t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).asstring;
memtblrpt_total.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+StrToIntDef(Str,0);
t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).asinteger:=StrToIntDef(Str,0)-t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).asinteger;
Str:=t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).asstring;
memtblrpt_total.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+StrToIntDef(Str,0);
Str:=t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).asstring;
memtblrpt_total.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+StrToIntDef(Str,0);
memtblrpt_total.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger;
memtblrpt_total.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger;
memtblrpt_total.FieldByName('C<><43><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('C<><43><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+t_vessel_plan.FieldByName('C<><43><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger;
memtblrpt_total.FieldByName('F<><46><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('F<><46><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+t_vessel_plan.FieldByName('F<><46><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger;
memtblrpt_total.FieldByName('X<><58><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger:=memtblrpt_total.FieldByName('X<><58><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger+t_vessel_plan.FieldByName('X<><58><EFBFBD><EFBFBD>'+inttostr(i)).AsInteger;
end;
t_vessel_plan.post;
t_vessel_plan.Next;
end;
memtblrpt_total.Post;
t_vessel_plan.EnableControls;
end;
procedure Tfrm_info_lines_manage.CreatememTable;
begin
memtblrpt_total.Close;
memtblrpt_total.Fields.Clear;
try
with memtblrpt_total.FieldDefs do begin
Clear;
Add('S<><53><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('S<><53><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('S<><53><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('S<><53><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('S<><53><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('S<><53><EFBFBD><EFBFBD>6', ftInteger, 0, false);
Add('Y<><59><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('Y<><59><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('Y<><59><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('Y<><59><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('Y<><59><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('Y<><59><EFBFBD><EFBFBD>6', ftInteger, 0, false);
Add('L<><4C><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('L<><4C><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('L<><4C><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('L<><4C><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('L<><4C><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('L<><4C><EFBFBD><EFBFBD>6', ftInteger, 0, false);
Add('D<><44><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('D<><44><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('D<><44><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('D<><44><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('D<><44><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('D<><44><EFBFBD><EFBFBD>6', ftInteger, 0, false);
Add('B<><42><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('B<><42><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('B<><42><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('B<><42><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('B<><42><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('B<><42><EFBFBD><EFBFBD>6', ftInteger, 0, false);
Add('C<><43><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('C<><43><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('C<><43><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('C<><43><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('C<><43><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('C<><43><EFBFBD><EFBFBD>6', ftInteger, 0, false);
Add('F<><46><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('F<><46><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('F<><46><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('F<><46><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('F<><46><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('F<><46><EFBFBD><EFBFBD>6', ftInteger, 0, false);
Add('X<><58><EFBFBD><EFBFBD>1', ftInteger, 0, false);
Add('X<><58><EFBFBD><EFBFBD>2', ftInteger, 0, false);
Add('X<><58><EFBFBD><EFBFBD>3', ftInteger, 0, false);
Add('X<><58><EFBFBD><EFBFBD>4', ftInteger, 0, false);
Add('X<><58><EFBFBD><EFBFBD>5', ftInteger, 0, false);
Add('X<><58><EFBFBD><EFBFBD>6', ftInteger, 0, false);
memtblrpt_total.CreateTable;
end;
finally
end;
end;
procedure Tfrm_info_lines_manage.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption+'1');
frm_info_lines_manage.Hide;
frm_info_lines_manage.ManualFloat(frm_info_lines_manage.BoundsRect );
frm_main.freeTabs('frm_info_lines_manage');
action:=cafree;
frm_info_lines_manage:=nil;
end;
procedure Tfrm_info_lines_manage.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_vessel_plan);
end;
procedure Tfrm_info_lines_manage.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_vessel_plan);
end;
procedure Tfrm_info_lines_manage.bsSkinButton11Click(Sender: TObject);
begin
table_post(t_vessel_plan);
end;
procedure Tfrm_info_lines_manage.bsSkinButton8Click(Sender: TObject);
begin
table_cancel(t_vessel_plan);
end;
procedure Tfrm_info_lines_manage.bsSkinButton4Click(Sender: TObject);
begin
table_delete(t_vessel_plan);
end;
procedure Tfrm_info_lines_manage.bsSkinButton9Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_lines_manage.bsSkinButton2Click(Sender: TObject);
begin
if not if_open('225') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
// t_vessel_plan.insert;
frm_code_lines_add:=Tfrm_code_lines_add.Create(Self);
try
if not t_vessel_plan.IsEmpty then begin
frm_code_lines_add.wwDBDateTimePicker2.Date:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
frm_code_lines_add.edt1.text:=t_vessel_plan['<27>ܴ<EFBFBD>'];
frm_code_lines_add.wwDBComboBox20.Text:=IntToStr(t_vessel_plan['<27><><EFBFBD><EFBFBD>']);
frm_code_lines_add.Edit1.Text:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
frm_code_lines_add.RxDBLookupCombo20.DisplayValue:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
frm_code_lines_add.wwDBLookupCombo49.Text:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
frm_code_lines_add.Edit2.Text:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
end;
frm_code_lines_add.showmodal;
finally
FreeAndNil(frm_code_lines_add);
end;
// bsSkinPageControl1.activePageIndex:=1;
// bsSkinButton10.Caption:='<27><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>';
end;
procedure Tfrm_info_lines_manage.bsSkinButton5Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ',2,ds_vessel_plan1,DataSource1,nil,nil,ds_vessel_plan1,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_info_lines_manage.t_price_shipAfterInsert(
DataSet: TDataSet);
begin
// t_price_ship['<27><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>']:=date;
end;
procedure Tfrm_info_lines_manage.FormShow(Sender: TObject);
begin
{
t_vessel_plan.sql.Clear;
t_vessel_plan.sql.add('SELECT * FROM t_vessel_plan where 1=1 ');
t_vessel_plan.sql.add(' and '+open_data('9001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no'));
t_vessel_plan.sql.add(' order by <20><><EFBFBD><EFBFBD>');
t_vessel_plan.open;
t_vessel_plan.SQL.SaveToFile('e:\1.txt');
}
// t_price_agreement.open;
CreatememTable;
if not frm_data_share.t_code_line_ctn.active then
frm_data_share.t_code_line_ctn.Open;
if not t_vessel_lines.Active then
t_vessel_lines.Open;
if frm_data_share.t_code_line_ctn.IsEmpty then
exit;
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>1').asstring)<>'' then
begin
dxDBGrid1.Bands[1].Visible:=true;
dxDBGrid1.Bands[1].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>1').asstring);
dxDBGrid2.Bands[0].Visible:=true;
dxDBGrid2.Bands[0].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>1').asstring);
end;
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>2').asstring)<>'' then
begin
dxDBGrid1.Bands[2].Visible:=true;
dxDBGrid1.Bands[2].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>2').asstring);
dxDBGrid2.Bands[1].Visible:=true;
dxDBGrid2.Bands[1].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>2').asstring);
end;
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>3').asstring)<>'' then
begin
dxDBGrid1.Bands[3].Visible:=true;
dxDBGrid1.Bands[3].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>3').asstring);
dxDBGrid2.Bands[2].Visible:=true;
dxDBGrid2.Bands[2].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>3').asstring);
end;
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>4').asstring)<>'' then
begin
dxDBGrid1.Bands[4].Visible:=true;
dxDBGrid1.Bands[4].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>4').asstring);
dxDBGrid2.Bands[3].Visible:=true;
dxDBGrid2.Bands[3].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>4').asstring);
end;
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>5').asstring)<>'' then
begin
dxDBGrid1.Bands[5].Visible:=true;
dxDBGrid1.Bands[5].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>5').asstring);
dxDBGrid2.Bands[4].Visible:=true;
dxDBGrid2.Bands[4].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>5').asstring);
end;
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>6').asstring)<>'' then
begin
dxDBGrid1.Bands[6].Visible:=true;
dxDBGrid1.Bands[6].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>6').asstring);
dxDBGrid2.Bands[5].Visible:=true;
dxDBGrid2.Bands[5].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>6').asstring);
end;
{
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>7').asstring)<>'' then
begin
dxDBGrid1.Bands[7].Visible:=true;
dxDBGrid1.Bands[7].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>7').asstring);
end;
if trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>8').asstring)<>'' then
begin
dxDBGrid1.Bands[8].Visible:=true;
dxDBGrid1.Bands[8].Caption:=trim(frm_data_share.t_code_line_ctn.fieldbyname('<27>˼<EFBFBD><CBBC><EFBFBD><EFBFBD><EFBFBD>8').asstring);
end;
}
loadreggrid(dxdbgrid1,true,caption+'1');
// loadreggrid(dxdbgrid2,true,caption+'2');
wwDBComboBox20.Items.IndexOf(FormatDateTime('YYYY',Now));
wwDBComboBox20.Text:=FormatDateTime('YYYY',Now);
Edit1.Text:=IntToStr(WeekofYear(Now));
bsSkinButton1.OnClick(nil);
end;
procedure Tfrm_info_lines_manage.Panel1Resize(Sender: TObject);
var
i:integer;
begin
// i:=round(Panel1.Width/11);
{
bsSkinButton5.Width:=i;
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton2.Width:=i;
bsSkinButton3.Width:=i;
// bsSkinButton10.Width:=i;
bsSkinButton11.Width:=i;
bsSkinButton4.Width:=i;
bsSkinButton8.Width:=i;
bsSkinButton1.Width:=i;
}
end;
procedure Tfrm_info_lines_manage.bsSkinButton1Click(Sender: TObject);
var
str:widestring;
begin
str:='SELECT * FROM t_vessel_plan where 1=1 ';
str:=Str+' and '+open_data('9001','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
if RxDBLookupCombo3.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo3.DisplayValues[1]+'''';
if RxDBLookupCombo4.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo4.DisplayValues[1]+'''';
if wwDBLookupCombo5.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo5.DisplayValue+'''';
if Edit7.Text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+'''%'+Edit7.Text+'%''';
if wwDBComboBox20.Text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>='+wwDBComboBox20.Text;
if Edit1.Text<>''then
str:=str+' and <20>ܴ<EFBFBD>='+Edit1.Text;
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>',wwDBDateTimePicker1.text);
str:=query_tiaojian(1,str,'<27><><EFBFBD><EFBFBD>','С<><D0A1>',wwDBDateTimePicker2.text);
t_vessel_plan.close;
t_vessel_plan.sql.Clear;
t_vessel_plan.sql.add(str);
t_vessel_plan.sql.add(' order by <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>');
t_vessel_plan.open;
GetmemTable;
end;
procedure Tfrm_info_lines_manage.t_price_shipBeforeEdit(DataSet: TDataSet);
begin
if do_data('3001',t_vessel_plan.fieldbyname('¼<><C2BC><EFBFBD><EFBFBD>').asstring,'','','','','')=false then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȩ<EFBFBD>޸Ĵ<DEB8><C4B4><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD>');
abort;
end;
end;
procedure Tfrm_info_lines_manage.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:=frm_close_query(t_vessel_plan);
end;
procedure Tfrm_info_lines_manage.dxDBGrid1ColumnSorting(Sender: TObject;
Column: TdxDBTreeListColumn; var Allow: Boolean);
begin
Column_sort(Column,t_vessel_plan,'<27><><EFBFBD><EFBFBD>');
end;
procedure Tfrm_info_lines_manage.bsSkinPanel3Resize(Sender: TObject);
begin
{
wwDBLookupCombo52.Width:=bsSkinPanel3.Width-bsSkinButton13.Width-10;
bsSkinButton13.left:=bsSkinPanel3.Width-bsSkinButton13.Width-2;
bsSkinButton14.left:=bsSkinPanel3.Width-bsSkinButton13.Width-2;
RxDBLookupCombo20.Width:=bsSkinPanel3.Width-RxDBLookupCombo20.left;
Label13.Left:=round((bsSkinPanel3.Width-Label13.Width)/2);
wwDBLookupCombo1.Width:=bsSkinPanel3.Width-bsSkinButton13.Width-10;
Label6.Left:=round((bsSkinPanel3.Width-Label13.Width)/2);
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid2DblClick(Sender: TObject);
begin
// bsSkinPageControl1.ActivePageIndex:=1;
end;
procedure Tfrm_info_lines_manage.t_vessel_planDSDesigner3Change(
Sender: TField);
var
y,m,d:Word;
begin
if Sender.IsNull then exit;
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=getZweek(DayOfWeek(Sender.AsDateTime));
Sender.DataSet.FieldByName('<27>ܴ<EFBFBD>').AsInteger:=WeekofYear(Sender.AsDateTime);
DecodeDate(Sender.AsDateTime,y,m,d);
Sender.DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').AsInteger:=y;
end;
procedure Tfrm_info_lines_manage.t_vessel_planBeforePost(
DataSet: TDataSet);
var
i:Integer;
bedit:Boolean;
aQuery:TADOQuery;
begin
table_before_post(t_vessel_plan,'<27><><EFBFBD><EFBFBD>˾');
table_before_post(t_vessel_plan,'<27><><EFBFBD><EFBFBD>');
table_before_post(t_vessel_plan,'<27><><EFBFBD><EFBFBD>');
for i:=1 to 6 do begin
if (DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then begin
DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
bedit:=true;
if Trim(DataSet.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>' then begin
if (DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).OldValue=Null) or (DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).OldValue='') then
DataSet.FieldByName('S״̬'+inttostr(i)).Value:=1
else
DataSet.FieldByName('S״̬'+inttostr(i)).Value:=2;
end;
end;
end;
for i:=1 to 6 do begin
if (DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then begin
DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
bedit:=true;
if Trim(DataSet.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>' then begin
if (DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).OldValue=Null) or (DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).OldValue='') then
DataSet.FieldByName('L״̬'+inttostr(i)).Value:=1
else
DataSet.FieldByName('L״̬'+inttostr(i)).Value:=2;
end;
end;
end;
for i:=1 to 6 do begin
if (DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then begin
DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
bedit:=true;
if Trim(DataSet.FieldByName('״̬').AsString)='<27><><EFBFBD><EFBFBD>' then begin
if (DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).OldValue=Null) or (DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).OldValue='') then
DataSet.FieldByName('Y״̬'+inttostr(i)).Value:=1
else
DataSet.FieldByName('Y״̬'+inttostr(i)).Value:=2;
end;
end;
end;
if bedit then
DataSet.FieldByName('״̬').AsString:='<27><><EFBFBD><EFBFBD>';
DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsDateTime:=Now;
{
if DataSet.State in [dsedit] then exit;
if (DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OldValue<>'') and (DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').Value<>DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OldValue) then begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('Update t_price_detail set <20><>'+DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').Value+'=1,<2C><>'+DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OldValue+'=0 where <20><>'+DataSet.FieldByName('<27><><EFBFBD><EFBFBD>').OldValue+'=1 and LD_ID in (select LD_ID from t_price_list_detail where <20><><EFBFBD><EFBFBD>='+t_vessel_plan.FieldByName('<27><><EFBFBD><EFBFBD>').AsString+' and <20>ܴ<EFBFBD>='+t_vessel_plan.FieldByName('<27>ܴ<EFBFBD>').AsString+' and <20><><EFBFBD><EFBFBD>˾='''+t_vessel_plan.FieldByName('<27><><EFBFBD><EFBFBD>˾').AsString+''')');
ExecSQL;
end;
finally
FreeAndNil(aQuery);
end;
end;
}
{
for i:=1 to 6 do begin
if (DataSet.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then begin
DataSet.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
end;
end;
for i:=1 to 6 do begin
if (DataSet.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then begin
DataSet.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
end;
end;
}
end;
procedure Tfrm_info_lines_manage.bsSkinButton12Click(Sender: TObject);
begin
if if_open('227') or if_open('228') or if_open('229') then
begin
frm_info_lines_sadd:=Tfrm_info_lines_sadd.Create(self);
try
frm_info_lines_sadd.showmodal;
finally
FreeAndNil(frm_info_lines_sadd);
end;
GetmemTable;
end else begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
end;
procedure Tfrm_info_lines_manage.bsSkinButton3Click(Sender: TObject);
begin
if t_vessel_plan.IsEmpty then Exit;
t_vessel_plan.First;
while not t_vessel_plan.Eof do begin
t_vessel_plan.Edit;
t_vessel_plan.FieldByName('״̬').AsString:='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
t_vessel_plan.post;
t_vessel_plan.Next
end;
end;
procedure Tfrm_info_lines_manage.t_vessel_planBeforeEdit(
DataSet: TDataSet);
begin
if DataSet.FieldByName('״̬').AsString='<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>' then begin
MessageDlg('<27>Ѿ<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ģ<DEB8>',mtWarning,[mbYes],0);
Abort;
end;
end;
procedure Tfrm_info_lines_manage.t_vessel_planAfterInsert(
DataSet: TDataSet);
begin
t_vessel_plan['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_vessel_plan['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
t_vessel_plan['״̬']:='<27>½<EFBFBD>';
t_vessel_plan['S״̬1']:=0;
t_vessel_plan['S״̬2']:=0;
t_vessel_plan['S״̬3']:=0;
t_vessel_plan['S״̬4']:=0;
t_vessel_plan['S״̬5']:=0;
t_vessel_plan['S״̬6']:=0;
t_vessel_plan['L״̬1']:=0;
t_vessel_plan['L״̬2']:=0;
t_vessel_plan['L״̬3']:=0;
t_vessel_plan['L״̬4']:=0;
t_vessel_plan['L״̬5']:=0;
t_vessel_plan['L״̬6']:=0;
t_vessel_plan['Y״̬1']:=0;
t_vessel_plan['Y״̬2']:=0;
t_vessel_plan['Y״̬3']:=0;
t_vessel_plan['Y״̬4']:=0;
t_vessel_plan['Y״̬5']:=0;
t_vessel_plan['Y״̬6']:=0;
t_vessel_plan['C<><43><EFBFBD><EFBFBD>1']:=0;
t_vessel_plan['C<><43><EFBFBD><EFBFBD>2']:=0;
t_vessel_plan['C<><43><EFBFBD><EFBFBD>3']:=0;
t_vessel_plan['C<><43><EFBFBD><EFBFBD>4']:=0;
t_vessel_plan['C<><43><EFBFBD><EFBFBD>5']:=0;
t_vessel_plan['C<><43><EFBFBD><EFBFBD>6']:=0;
t_vessel_plan['D<><44><EFBFBD><EFBFBD>1']:=0;
t_vessel_plan['D<><44><EFBFBD><EFBFBD>2']:=0;
t_vessel_plan['D<><44><EFBFBD><EFBFBD>3']:=0;
t_vessel_plan['D<><44><EFBFBD><EFBFBD>4']:=0;
t_vessel_plan['D<><44><EFBFBD><EFBFBD>5']:=0;
t_vessel_plan['D<><44><EFBFBD><EFBFBD>6']:=0;
t_vessel_plan['F<><46><EFBFBD><EFBFBD>1']:=0;
t_vessel_plan['F<><46><EFBFBD><EFBFBD>2']:=0;
t_vessel_plan['F<><46><EFBFBD><EFBFBD>3']:=0;
t_vessel_plan['F<><46><EFBFBD><EFBFBD>4']:=0;
t_vessel_plan['F<><46><EFBFBD><EFBFBD>5']:=0;
t_vessel_plan['F<><46><EFBFBD><EFBFBD>6']:=0;
t_vessel_plan['X<><58><EFBFBD><EFBFBD>1']:=0;
t_vessel_plan['X<><58><EFBFBD><EFBFBD>2']:=0;
t_vessel_plan['X<><58><EFBFBD><EFBFBD>3']:=0;
t_vessel_plan['X<><58><EFBFBD><EFBFBD>4']:=0;
t_vessel_plan['X<><58><EFBFBD><EFBFBD>5']:=0;
t_vessel_plan['X<><58><EFBFBD><EFBFBD>6']:=0;
end;
procedure Tfrm_info_lines_manage.dxDBGrid120GPCustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'S<><53><EFBFBD><EFBFBD>1');
AFont.Color:=clblack;
{
for i:=1 to 8 do begin
if (DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then
DataSet.FieldByName('S<><53><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
end;
for i:=1 to 8 do begin
if (DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then
DataSet.FieldByName('L<><4C><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
end;
for i:=1 to 8 do begin
if (DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then
DataSet.FieldByName('Y<><59><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
end;
for i:=1 to 8 do begin
if (DataSet.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then
DataSet.FieldByName('D<><44><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
end;
for i:=1 to 8 do begin
if (DataSet.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).Value<>DataSet.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).OldValue) then
DataSet.FieldByName('B<><42><EFBFBD><EFBFBD>'+inttostr(i)).Value:=Now;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid140GPCustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'S<><53><EFBFBD><EFBFBD>2');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>2').IsNull then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>2').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>2').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>2').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('S״̬2').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>2').IsNull then exit;
if (now-t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>2').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid140HQCustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'S<><53><EFBFBD><EFBFBD>3');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>3').IsNull then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>3').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>3').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>3').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('S״̬3').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>3').IsNull then exit;
if (now-t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>3').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid140RFCustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'S<><53><EFBFBD><EFBFBD>4');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>4').IsNull then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>4').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>4').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>4').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('S״̬4').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>4').IsNull then exit;
if (now-t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>4').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid140RHCustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'S<><53><EFBFBD><EFBFBD>5');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>5').IsNull then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>5').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>5').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>5').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('S״̬5').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid145HQCustomDraw(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'S<><53><EFBFBD><EFBFBD>6');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>6').IsNull then exit;
// if t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>6').AsDateTime<>Now then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>6').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>6').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('S<><53><EFBFBD><EFBFBD>6').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('S״̬6').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column12CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'Y<><59><EFBFBD><EFBFBD>1');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>1').IsNull then exit;
// if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>1').AsDateTime<>Now then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>1').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>1').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>1').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('Y״̬1').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column13CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'Y<><59><EFBFBD><EFBFBD>2');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>2').IsNull then exit;
// if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>2').AsDateTime<>Now then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>2').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>2').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>2').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('Y״̬2').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column14CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'Y<><59><EFBFBD><EFBFBD>3');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>3').IsNull then exit;
// if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>3').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>3').AsDateTime))<12) then exit;
// if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>3').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>3').AsSQLTimeStamp.Hour<12) then exit;
case t_vessel_plan.FieldByName('Y״̬3').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column15CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'Y<><59><EFBFBD><EFBFBD>4');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>4').IsNull then exit;
// if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>4').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>4').AsDateTime))<12) then exit;
// if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>4').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>4').AsSQLTimeStamp.Hour<12) then exit;
case t_vessel_plan.FieldByName('Y״̬4').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column16CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'Y<><59><EFBFBD><EFBFBD>5');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>5').IsNull then exit;
// if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>5').AsDateTime<>Now then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>5').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>5').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>5').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('Y״̬5').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column17CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'Y<><59><EFBFBD><EFBFBD>6');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>6').IsNull then exit;
// if t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>6').AsDateTime<>Now then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>6').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>6').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('Y<><59><EFBFBD><EFBFBD>6').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('Y״̬6').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column18CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'L<><4C><EFBFBD><EFBFBD>1');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>1').IsNull then exit;
// if t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>1').AsDateTime<>Now then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>1').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>1').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>1').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('L״̬1').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column19CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'L<><4C><EFBFBD><EFBFBD>2');
AFont.Color:=clblack;
{
if t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>2').IsNull then exit;
// if t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>2').AsDateTime<>Now then exit;
if FormatDateTime('YYYYMMDD',t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>2').AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
// if (ahour>=12) and (t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>2').AsSQLTimeStamp.Hour<12) then exit;
if (ahour>=12) and (StrToInt(Formatdatetime('hh',t_vessel_plan.FieldByName('L<><4C><EFBFBD><EFBFBD>2').AsDateTime))<12) then exit;
case t_vessel_plan.FieldByName('L״̬2').AsInteger of
0:AFont.Color:=clblack;
1:AFont.Color:=clred;
2:AFont.Color:=clBlue;
end;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column20CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'L<><4C><EFBFBD><EFBFBD>3');
AFont.Color:=clblack;
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column21CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'L<><4C><EFBFBD><EFBFBD>4');
AFont.Color:=clblack;
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column22CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'L<><4C><EFBFBD><EFBFBD>5');
AFont.Color:=clblack;
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column23CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
begin
AColor:=GetGridColor(ANode.Strings[dxDBGrid1Column62.Index],'L<><4C><EFBFBD><EFBFBD>6');
AFont.Color:=clblack;
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column24CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>1').IsNull then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>1').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>1').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>1').IsNull then exit;
if (now-t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>1').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column25CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>2').IsNull then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>2').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>2').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>2').IsNull then exit;
if (now-t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>2').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column26CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>3').IsNull then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>3').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>3').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>3').IsNull then exit;
if (now-t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>3').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column27CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>4').IsNull then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>4').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>4').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>4').IsNull then exit;
if (now-t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>4').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column28CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>5').IsNull then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>5').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>5').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>5').IsNull then exit;
if (now-t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>5').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column29CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>6').IsNull then exit;
if t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>6').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>6').AsSQLTimeStamp.Hour<12) then exit;
if (now-t_vessel_plan.FieldByName('D<><44><EFBFBD><EFBFBD>6').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column30CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>1').IsNull then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>1').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>1').AsSQLTimeStamp.Hour<12) then exit;
if (now-t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>1').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column31CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>2').IsNull then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>2').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>2').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>2').IsNull then exit;
if (now-t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>2').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column32CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>3').IsNull then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>3').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>3').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>3').IsNull then exit;
if (now-t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>3').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column33CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>4').IsNull then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>4').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>4').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>4').IsNull then exit;
if (now-t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>4').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column34CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>5').IsNull then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>5').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>5').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>5').IsNull then exit;
if (now-t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>5').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.dxDBGrid1Column35CustomDraw(
Sender: TObject; ACanvas: TCanvas; ARect: TRect; ANode: TdxTreeListNode;
AColumn: TdxDBTreeListColumn; const AText: String; AFont: TFont;
var AColor: TColor; ASelected, AFocused: Boolean; var ADone: Boolean);
var
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
{
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>6').IsNull then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>6').AsDateTime<>Now then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>6').AsSQLTimeStamp.Hour<12) then exit;
if t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>6').IsNull then exit;
if (now-t_vessel_plan.FieldByName('B<><42><EFBFBD><EFBFBD>6').Value)<1 then
AColor:=clred
else
AColor:=clWindow;
AFont.Color:=clblack;
}
end;
procedure Tfrm_info_lines_manage.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_info_lines_manage.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_info_lines_manage.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_info_lines_manage.bsSkinButton10Click(Sender: TObject);
begin
if not if_open('225') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
t_vessel_plan.Edit;
frm_code_lines_modify:=Tfrm_code_lines_modify.Create(Self);
try
frm_code_lines_modify.showmodal;
finally
FreeAndNil(frm_code_lines_modify);
end;
end;
procedure Tfrm_info_lines_manage.N2Click(Sender: TObject);
begin
update_grid(dxdbgrid1,107);
end;
function Tfrm_info_lines_manage.GetGridColor(ai,FName:String): TColor;
var
aQuery:TADOQuery;
s1,s2:string;
ayear,amonth,aDay,ahour,aMin,aSec,aMSec:Word;
begin
if ai='' then Exit;
Result:=clWhite;
s1:=Copy(FName,1,1);
s2:=Copy(FName,6,1);
aQuery:=CreateAdoQuery;
try
with aQuery do begin
// if Locate('<27><><EFBFBD><EFBFBD>',StrToInt(ai),[]) then begin
Close;SQL.Clear;
SQL.Add('Select S<><53><EFBFBD><EFBFBD>1,S<><53><EFBFBD><EFBFBD>2,S<><53><EFBFBD><EFBFBD>3,S<><53><EFBFBD><EFBFBD>4,S<><53><EFBFBD><EFBFBD>5,S<><53><EFBFBD><EFBFBD>6,');
SQL.Add('S״̬1,S״̬2,S״̬3,S״̬4,S״̬5,S״̬6,Y<><59><EFBFBD><EFBFBD>1,');
SQL.Add('Y<><59><EFBFBD><EFBFBD>2,Y<><59><EFBFBD><EFBFBD>3,Y<><59><EFBFBD><EFBFBD>4,Y<><59><EFBFBD><EFBFBD>5,Y<><59><EFBFBD><EFBFBD>6,Y״̬1,Y״̬2,');
SQL.Add('Y״̬3,Y״̬4,Y״̬5,Y״̬6,L<><4C><EFBFBD><EFBFBD>1,L<><4C><EFBFBD><EFBFBD>2,L<><4C><EFBFBD><EFBFBD>3,');
SQL.Add('L<><4C><EFBFBD><EFBFBD>4,L<><4C><EFBFBD><EFBFBD>5,L<><4C><EFBFBD><EFBFBD>6,L״̬1,L״̬2,L״̬3,L״̬4,');
SQL.Add('L״̬5,L״̬6 from t_vessel_plan where <20><><EFBFBD><EFBFBD>='+ai);
Open;
if FieldByName(S1+'<27><><EFBFBD><EFBFBD>'+S2).IsNull then exit;
// if FieldByName(S1+'״̬'+S2).AsInteger=0 then exit;
if FormatDateTime('YYYYMMDD',FieldByName(S1+'<27><><EFBFBD><EFBFBD>'+S2).AsDateTime)<>FormatDateTime('YYYYMMDD',Now) then exit;
DecodeTime(Now,ahour,aMin,aSec,aMSec);
if (ahour>=12) and (StrToInt(Formatdatetime('hh',FieldByName(S1+'<27><><EFBFBD><EFBFBD>'+S2).AsDateTime))<12) then exit;
case FieldByName(S1+'״̬'+S2).AsInteger of
0:Result:=clWindow;
1:Result:=clred;
2:Result:=clBlue;
end;
end;
// end;
finally
FreeAndNil(aQuery);
end;
end;
procedure Tfrm_info_lines_manage.bsSkinButton13Click(Sender: TObject);
var
i:integer;
begin
if not if_open('225') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if dxDBGrid1.SelectedCount<1 then
begin
showmessage('<27><>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD><D2AA>ӡ<EFBFBD><D3A1>ҵ<EFBFBD><D2B5><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>');
exit;
end;
frm_info_lines_copy:=Tfrm_info_lines_copy.Create(Self);
try
frm_info_lines_copy.memcopytbl.Open;
for i:=0 to dxDBGrid1.SelectedCount-1 do
begin
t_vessel_plan.GotoBookmark(pointer(dxDBGrid1.selectedrows[i]));
with frm_info_lines_copy.memcopytbl do begin
Insert;
FieldByName('<27><><EFBFBD><EFBFBD>').AsDateTime:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
FieldByName('<27><><EFBFBD><EFBFBD>').asinteger:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
FieldByName('<27>ܴ<EFBFBD>').asinteger:=t_vessel_plan['<27>ܴ<EFBFBD>'];
FieldByName('<27><><EFBFBD><EFBFBD>').asstring:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
FieldByName('<27><><EFBFBD><EFBFBD>').asstring:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
FieldByName('<27><><EFBFBD><EFBFBD>').asstring:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
FieldByName('<27><><EFBFBD><EFBFBD>').asstring:=t_vessel_plan['<27><><EFBFBD><EFBFBD>'];
FieldByName('<27><><EFBFBD><EFBFBD>˾').asstring:=t_vessel_plan['<27><><EFBFBD><EFBFBD>˾'];
post;
frm_info_lines_copy.edt1.text:=frm_info_lines_manage.Edit1.Text;
frm_info_lines_copy.edit1.text:=IntToStr(Strtoint(frm_info_lines_manage.Edit1.Text)+1);
end;
end;
frm_info_lines_copy.showmodal;
finally
FreeAndNil(frm_info_lines_copy);
end;
end;
end.