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.

605 lines
21 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_seai_order;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ExtCtrls, DB, ADODB, dxExEdtr, dxCntner, dxTL,
dxDBCtrl, dxDBGrid, ComCtrls, bsSkinTabs, RxLookup, StdCtrls, Mask,
DBCtrls, wwdbdatetimepicker, wwdblook, Menus,
dxDBTLCl, dxGrClms, bsdbctrls, XPMenu;
type
Tfrm_op_seai_order = class(TForm)
Panel2: TPanel;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsSkinButton3: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton38: TbsSkinButton;
Notebook1: TNotebook;
t_op_seai: TADOQuery;
t_op_seai1: TDataSource;
dxDBGrid1: TdxDBGrid;
PopupMenu3: TPopupMenu;
N37: TMenuItem;
N38: TMenuItem;
N62: TMenuItem;
N25: TMenuItem;
N64: TMenuItem;
N63: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N34: TMenuItem;
N35: TMenuItem;
N36: TMenuItem;
dxDBGrid1Column4: TdxDBGridDateColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridDateColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridColumn;
XPMenu1: TXPMenu;
PopupMenu2: TPopupMenu;
N10: TMenuItem;
N11: TMenuItem;
N14: TMenuItem;
N13: TMenuItem;
N12: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
bsSkinPanel2: TbsSkinPanel;
Label49: TLabel;
wwDBDateTimePicker9: TwwDBDateTimePicker;
wwDBDateTimePicker12: TwwDBDateTimePicker;
Label52: TLabel;
Label54: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
bsSkinButton8: TbsSkinButton;
bsSkinButton12: TbsSkinButton;
d_onlineBooking: TADOQuery;
dsrd_onlineBooking: TDataSource;
dxDBGrid1Column23: TdxDBGridColumn;
t_op_ctn: TADOQuery;
t_op_ctn1: TDataSource;
dxDBGrid1Column29: TdxDBGridColumn;
dxDBGrid1Column21: TdxDBGridColumn;
dxDBGrid1Column22: TdxDBGridColumn;
dxDBGrid1Column24: TdxDBGridColumn;
d_onlineBookingDSDesigner: TIntegerField;
d_onlineBookingDSDesigner2: TStringField;
d_onlineBookingDSDesigner3: TStringField;
d_onlineBookingDSDesigner4: TStringField;
d_onlineBookingDSDesigner5: TStringField;
d_onlineBookingDSDesigner6: TDateTimeField;
d_onlineBookingDSDesigner7: TStringField;
d_onlineBookingDSDesigner8: TStringField;
d_onlineBookingDSDesigner9: TStringField;
d_onlineBookingDSDesigner10: TBooleanField;
d_onlineBookingDSDesigner11: TStringField;
d_onlineBookingDSDesigner12: TStringField;
d_onlineBookingDSDesigner13: TStringField;
d_onlineBookingDSDesigner14: TStringField;
d_onlineBookingDSDesigner15: TStringField;
d_onlineBookingDSDesigner16: TStringField;
d_onlineBookingDSDesigner17: TStringField;
d_onlineBookingDSDesigner18: TStringField;
d_onlineBookingDSDesigner19: TStringField;
d_onlineBookingDSDesigner20: TStringField;
d_onlineBookingDSDesigner21: TStringField;
d_onlineBookingDSDesigner22: TStringField;
d_onlineBookingDSDesigner23: TStringField;
d_onlineBookingDSDesigner24: TDateTimeField;
d_onlineBookingDSDesigner25: TStringField;
d_onlineBookingDSDesigner26: TStringField;
d_onlineBookingDSDesigner27: TStringField;
d_onlineBookingDSDesigner28: TStringField;
d_onlineBookingDSDesigner29: TStringField;
d_onlineBookingDSDesigner30: TStringField;
d_onlineBookingDSDesigner31: TStringField;
d_onlineBookingDSDesigner32: TDateTimeField;
d_onlineBookingDSDesigner33: TStringField;
d_onlineBookingDSDesigner34: TStringField;
d_onlineBookingDSDesigner35: TStringField;
d_onlineBookingDSDesigner36: TStringField;
d_onlineBookingDSDesigner37: TStringField;
d_onlineBookingDSDesigner38: TIntegerField;
d_onlineBookingDSDesigner39: TStringField;
d_onlineBookingDSDesigner40: TBCDField;
d_onlineBookingDSDesigner41: TBCDField;
d_onlineBookingDSDesigner1: TStringField;
d_onlineBookingDSDesigner210: TStringField;
d_onlineBookingDSDesigner310: TStringField;
d_onlineBookingDSDesigner110: TIntegerField;
d_onlineBookingDSDesigner211: TIntegerField;
d_onlineBookingDSDesigner311: TIntegerField;
d_onlineBookingDSDesigner42: TStringField;
d_onlineBookingid: TAutoIncField;
d_onlineBookingDSDesigner43: TIntegerField;
d_onlineBookingDSDesigner44: TStringField;
d_onlineBookingDSDesigner45: TStringField;
d_onlineBookingDSDesigner46: TStringField;
d_onlineBookingDSDesigner47: TStringField;
d_onlineBookingDSDesigner48: TDateTimeField;
d_onlineBookingDSDesigner49: TIntegerField;
d_onlineBookingDSDesigner50: TStringField;
d_onlineBookingDSDesigner51: TStringField;
d_onlineBookingDSDesigner52: TStringField;
d_onlineBookingDSDesigner53: TStringField;
d_onlineBookingDSDesigner54: TStringField;
d_onlineBookingDSDesigner55: TDateTimeField;
d_onlineBookingDSDesigner56: TDateTimeField;
d_onlineBookingDSDesigner57: TStringField;
d_onlineBookingDSDesigner58: TStringField;
d_onlineBookingDSDesigner59: TDateTimeField;
d_onlineBookingDSDesigner60: TStringField;
d_onlineBookingDSDesigner61: TStringField;
d_onlineBookingDSDesigner62: TStringField;
d_onlineBookingDSDesigner63: TStringField;
d_onlineBookingDSDesigner64: TStringField;
d_onlineBookingDSDesigner65: TStringField;
d_onlineBookingDSDesigner66: TStringField;
d_onlineBookingDSDesigner67: TStringField;
d_onlineBookingDSDesigner68: TStringField;
d_onlineBookingDSDesigner69: TStringField;
d_onlineBookingDSDesigner70: TStringField;
d_onlineBookingDSDesigner71: TStringField;
d_onlineBookingDSDesigner72: TStringField;
d_onlineBookingDSDesigner73: TStringField;
d_onlineBookingDSDesigner74: TStringField;
d_onlineBookingDSDesigner75: TDateTimeField;
d_onlineBookingDSDesigner76: TStringField;
d_onlineBookingDSDesigner77: TStringField;
d_onlineBookingDSDesigner78: TStringField;
d_onlineBookingDSDesigner79: TStringField;
d_onlineBookingDSDesigner80: TStringField;
d_onlineBookingDSDesigner81: TStringField;
d_onlineBookingDSDesigner82: TStringField;
d_onlineBookingDSDesigner83: TStringField;
d_onlineBookingDSDesigner84: TStringField;
d_onlineBookingDSDesigner85: TBooleanField;
d_onlineBookingDSDesigner86: TBooleanField;
d_onlineBookingDSDesigner87: TBooleanField;
d_onlineBookingDSDesigner88: TBooleanField;
d_onlineBookingDSDesigner89: TBooleanField;
d_onlineBookingDSDesigner90: TDateTimeField;
d_onlineBookingDSDesigner91: TStringField;
d_onlineBookingDSDesigner92: TStringField;
d_onlineBookingDSDesigner93: TStringField;
d_onlineBookingDSDesigner94: TStringField;
d_onlineBookingDSDesigner95: TStringField;
d_onlineBookingDSDesigner96: TStringField;
d_onlineBookingDSDesigner97: TStringField;
d_onlineBookingDSDesigner98: TBooleanField;
d_onlineBookingDSDesigner99: TDateTimeField;
d_onlineBookingDSDesigner100: TBooleanField;
d_onlineBookingDSDesigner101: TDateTimeField;
d_onlineBookingDSDesigner102: TStringField;
d_onlineBookingDSDesigner103: TStringField;
d_onlineBookingDSDesigner104: TStringField;
d_onlineBookingDSDesigner105: TStringField;
d_onlineBookingDSDesigner106: TStringField;
d_onlineBookingDSDesigner107: TStringField;
d_onlineBookingDSDesigner108: TStringField;
d_onlineBookingDSDesigner109: TStringField;
d_onlineBookingDSDesigner111: TStringField;
d_onlineBookingDSDesigner112: TStringField;
d_onlineBookingDSDesigner113: TStringField;
d_onlineBookingDSDesigner114: TIntegerField;
d_onlineBookingDSDesigner115: TStringField;
d_onlineBookingDSDesigner116: TBooleanField;
d_onlineBookingDSDesigner117: TBooleanField;
d_onlineBookingDSDesigner118: TBooleanField;
d_onlineBookingDSDesigner119: TBooleanField;
d_onlineBookingDSDesigner120: TStringField;
d_onlineBookingDSDesigner121: TBooleanField;
d_onlineBookingDSDesigner122: TDateTimeField;
d_onlineBookingDSDesigner123: TBooleanField;
d_onlineBookingDSDesigner124: TBooleanField;
d_onlineBookingDSDesigner125: TDateTimeField;
d_onlineBookingDSDesigner126: TDateTimeField;
d_onlineBookingDSDesigner127: TStringField;
d_onlineBookingDSDesigner128: TStringField;
d_onlineBookingDSDesigner129: TStringField;
d_onlineBookingDSDesigner130: TBooleanField;
d_onlineBookingDSDesigner131: TStringField;
d_onlineBookingDSDesigner132: TDateTimeField;
d_onlineBookingDSDesigner133: TBCDField;
d_onlineBookingDSDesigner134: TBCDField;
d_onlineBookingDSDesigner135: TBCDField;
d_onlineBookingDSDesigner136: TDateTimeField;
d_onlineBookingDSDesigner137: TDateTimeField;
d_onlineBookingDSDesigner138: TDateTimeField;
d_onlineBookingDSDesigner139: TDateTimeField;
d_onlineBookingDSDesigner140: TStringField;
d_onlineBookingDSDesigner141: TStringField;
d_onlineBookingDSDesigner142: TStringField;
d_onlineBookingDSDesigner143: TBooleanField;
d_onlineBookingDSDesigner144: TStringField;
d_onlineBookingDSDesigner145: TStringField;
d_onlineBookingDSDesigner146: TStringField;
d_onlineBookingDSDesigner147: TStringField;
d_onlineBookingDSDesigner148: TStringField;
d_onlineBookingDSDesigner149: TStringField;
d_onlineBookingDSDesigner150: TBCDField;
d_onlineBookingDSDesigner151: TStringField;
d_onlineBookingDSDesigner152: TStringField;
d_onlineBookingDSDesigner153: TDateTimeField;
d_onlineBookingDSDesigner154: TDateTimeField;
d_onlineBookingDSDesigner155: TStringField;
d_onlineBookingDSDesigner156: TDateTimeField;
d_onlineBookingDSDesigner157: TDateTimeField;
d_onlineBookingDSDesigner158: TDateTimeField;
d_onlineBookingDSDesigner159: TDateTimeField;
d_onlineBookingDSDesigner160: TStringField;
d_onlineBookingDSDesigner161: TStringField;
d_onlineBookingDSDesigner162: TStringField;
d_onlineBookingDSDesigner163: TStringField;
d_onlineBookingDSDesigner164: TStringField;
d_onlineBookingDSDesigner165: TStringField;
d_onlineBookingDSDesigner166: TStringField;
d_onlineBookingDSDesigner167: TStringField;
d_onlineBookingDSDesigner168: TBooleanField;
d_onlineBookingDSDesigner169: TDateTimeField;
d_onlineBookingDSDesigner170: TStringField;
d_onlineBookingDSDesigner171: TStringField;
d_onlineBookingDSDesigner172: TStringField;
d_onlineBookingDSDesigner173: TStringField;
d_onlineBookingDSDesigner174: TBooleanField;
d_onlineBookingDSDesigner175: TStringField;
bsSkinPanel1: TbsSkinPanel;
dxDBGrid1Column18: TdxDBGridColumn;
dxDBGrid1Column19: TdxDBGridColumn;
dxDBGrid1Column20: TdxDBGridColumn;
dxDBGrid1Column25: TdxDBGridColumn;
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 bsSkinButton9Click(Sender: TObject);
procedure bsSkinButton3Click(Sender: TObject);
procedure bsSkinButton38Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure t_op_seaiBeforePost(DataSet: TDataSet);
procedure t_op_seaiPostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
procedure bsSkinButton1Click(Sender: TObject);
procedure bsSkinButton10Click(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 RxDBLookupCombo20KeyPress(Sender: TObject; var Key: Char);
procedure t_op_ctnAfterPost(DataSet: TDataSet);
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 d_onlineBookingDSDesignerGetText(Sender: TField;
var Text: String; DisplayText: Boolean);
procedure d_onlineBookingDSDesigner1GetText(Sender: TField;
var Text: String; DisplayText: Boolean);
procedure d_onlineBookingDSDesigner210GetText(Sender: TField;
var Text: String; DisplayText: Boolean);
procedure d_onlineBookingDSDesigner310GetText(Sender: TField;
var Text: String; DisplayText: Boolean);
private
function GetCntr(Code:String):String;
{ Private declarations }
public
{ Public declarations }
end;
var
frm_op_seai_order: Tfrm_op_seai_order;
implementation
uses u_main,u_data_share, my_sys_function, u_sys_progress,
u_op_seai_oder_add, u_op_ctn;
{$R *.dfm}
function Tfrm_op_seai_order.GetCntr(Code:String):String;
var
aQuery:TAdoQuery;
begin
aQuery:=CreateAdoQuery;
try
with aQuery do begin
Close;SQL.Clear;
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ from t_code_ctn where <20><><EFBFBD><EFBFBD>='''+Code+'''');
Open;
Result:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
end;
finally
freeAndNil(aQuery);
end;
end;
procedure Tfrm_op_seai_order.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_seai_order.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
savereggrid(dxdbgrid1,caption);
frm_op_seai_order.Hide;
frm_op_seai_order.ManualFloat(frm_op_seai_order.BoundsRect );
frm_main.freeTabs('frm_op_seai_order');
action:=cafree;
frm_op_seai_order:=nil;
end;
procedure Tfrm_op_seai_order.Panel2Resize(Sender: TObject);
var
i:integer;
begin
i:=round(Panel2.Width/11);
bsSkinButton7.Width:=i;
bsSkinButton6.Width:=i;
bsSkinButton9.Width:=i;
bsSkinButton1.Width:=i;
bsSkinButton3.Width:=i;
bsSkinButton38.Width:=i;
end;
procedure Tfrm_op_seai_order.bsSkinButton7Click(Sender: TObject);
begin
table_Prior(t_op_seai);
end;
procedure Tfrm_op_seai_order.bsSkinButton6Click(Sender: TObject);
begin
table_next(t_op_seai);
end;
procedure Tfrm_op_seai_order.bsSkinButton2Click(Sender: TObject);
begin
table_post(t_op_seai);
end;
procedure Tfrm_op_seai_order.bsSkinButton9Click(Sender: TObject);
begin
sys_print('<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><CFB6><EFBFBD>',2,t_op_seai1,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil);
end;
procedure Tfrm_op_seai_order.bsSkinButton3Click(Sender: TObject);
begin
d_onlineBooking.Edit;
d_onlineBooking['<27><><EFBFBD><EFBFBD>״̬']:=3;
d_onlineBooking.Post;
end;
procedure Tfrm_op_seai_order.bsSkinButton38Click(Sender: TObject);
var
book1:Tbookmark;
begin
book1:=d_onlineBooking.GetBookmark;
d_onlineBooking.Refresh;
d_onlineBooking.GotoBookmark(book1);
end;
procedure Tfrm_op_seai_order.FormShow(Sender: TObject);
begin
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;
t_op_seai.Close;
t_op_seai.open;
d_onlineBooking.Close;
d_onlineBooking.open;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
loadreggrid(dxdbgrid1,false,caption);
{
if frm_data_share.t_code_ctn.locate('<27><><EFBFBD><EFBFBD>',trim(frm_data_share.t_code_ctn_de.fieldbyname('<27><><EFBFBD><EFBFBD>1').asstring),[]) then
dxdbgrid1.ColumnByFieldName('<27><><EFBFBD><EFBFBD>1').Caption:=
trim(frm_data_share.t_code_ctn.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').asstring);
}
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
frm_sys_progress.close;
frm_sys_progress:=nil;
end;
procedure Tfrm_op_seai_order.t_op_seaiBeforePost(DataSet: TDataSet);
var
BSNO:String;
begin
if t_op_seai.State=dsinsert then
begin
// t_op_seai['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seai['<27><><EFBFBD><EFBFBD>'];
t_op_seai['ҵ<><D2B5>״̬']:='<27><><EFBFBD><EFBFBD>ί<EFBFBD><CEAF>';
t_op_seai['<27><><EFBFBD><EFBFBD>״̬']:='¼<><C2BC>״̬';
end;
end;
procedure Tfrm_op_seai_order.t_op_seaiPostError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
var
str:widestring;
begin
if pos('SOME VALUES MAY HAVE BEEN CHANGED',UpperCase(E.Message))<>0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>޸ģ<DEB8><C4A3><EFBFBD>ǰ<EFBFBD>޸IJ<DEB8><C4B2>ܱ<EFBFBD><DCB1><EFBFBD>'+#13#10+'<27><>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>');
abort;
end;
end;
procedure Tfrm_op_seai_order.bsSkinButton1Click(Sender: TObject);
begin
if t_op_seai=nil then
exit;
if d_onlineBooking=nil then
exit;
if (d_onlineBooking['<27><><EFBFBD><EFBFBD>״̬']=1) or (d_onlineBooking['<27><><EFBFBD><EFBFBD>״̬']=3) then begin
MessageDlg('<27><>ǰ״̬<D7B4>²<EFBFBD><C2B2>ܽ<EFBFBD><DCBD>ܶ<EFBFBD><DCB6>գ<EFBFBD>', mtConfirmation, [mbYes],0);
exit;
end;
if (t_op_seai.State=dsinsert)or(t_op_seai.State=dsedit) then
t_op_seai.post;
try
frm_op_seai_order_add:=tfrm_op_seai_order_add.Create (self);
frm_op_seai_order_add.data1.Enabled:=false;
frm_op_seai_order_add.data1.DataSet:=t_op_seai;
frm_op_seai_order_add.data1.Enabled:=true;
frm_op_seai_order_add.data2.Enabled:=false;
frm_op_seai_order_add.data2.DataSet:=d_onlineBooking;
frm_op_seai_order_add.data2.Enabled:=true;
frm_op_seai_order_add.data3.Enabled:=false;
frm_op_seai_order_add.data3.DataSet:=t_op_ctn;
frm_op_seai_order_add.data3.Enabled:=true;
frm_op_seai_order_add.ShowModal;
finally
frm_op_seai_order_add.Free;
frm_op_seai_order_add:=nil;
end;
end;
procedure Tfrm_op_seai_order.bsSkinButton10Click(Sender: TObject);
begin
// query_seae(11,'0001');
end;
procedure Tfrm_op_seai_order.N10Click(Sender: TObject);
begin
update_grid_view_no(dxdbgrid1);
end;
procedure Tfrm_op_seai_order.N14Click(Sender: TObject);
begin
update_grid_view_all(dxdbgrid1);
end;
procedure Tfrm_op_seai_order.N12Click(Sender: TObject);
begin
update_grid(dxdbgrid1,203);
end;
procedure Tfrm_op_seai_order.N16Click(Sender: TObject);
begin
grid_save_xls(dxdbgrid1);
end;
procedure Tfrm_op_seai_order.bsSkinButton8Click(Sender: TObject);
VAR
str:widestring;
begin
str:='where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''import'' and <20><><EFBFBD>˿<EFBFBD><CBBF><EFBFBD>=''sea''';
if RxDBLookupCombo2.DisplayValue<>''then
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
if wwDBDateTimePicker9.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>='+''''+wwDBDateTimePicker9.text+'''';
if wwDBDateTimePicker12.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><='+''''+wwDBDateTimePicker12.text+'''';
d_onlineBooking.close;
d_onlineBooking.sql.clear;
d_onlineBooking.sql.add('select * from d_onlineBooking '+str+' order by ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
d_onlineBooking.open;
end;
procedure Tfrm_op_seai_order.bsSkinButton12Click(Sender: TObject);
begin
RxDBLookupCombo2.ClearValue;
wwDBDateTimePicker9.text:='';
wwDBDateTimePicker12.text:='';
end;
procedure Tfrm_op_seai_order.RxDBLookupCombo20KeyPress(Sender: TObject;
var Key: Char);
begin
// key_wwDBLookupCombo(Key,wwDBLookupCombo1);
end;
procedure Tfrm_op_seai_order.t_op_ctnAfterPost(DataSet: TDataSet);
begin
update_ctn(t_op_ctn);
end;
procedure Tfrm_op_seai_order.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);
begin
if ANode.Strings[dxDBGrid1Column29.Index]='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>' then
AColor:=clgreen
else if ANode.Strings[dxDBGrid1Column29.Index]='<27>ܾ<EFBFBD><DCBE><EFBFBD><EFBFBD><EFBFBD>' then
AColor:=clred
else AColor:=clWhite;
AFont.Color:=clblack;
end;
procedure Tfrm_op_seai_order.d_onlineBookingDSDesignerGetText(
Sender: TField; var Text: String; DisplayText: Boolean);
begin
if Sender.Value='0' then
Text:='<27>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD>'
else if Sender.Value='3' then
Text:='<27>ܾ<EFBFBD><DCBE><EFBFBD><EFBFBD><EFBFBD>'
else Text:='<27><><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>';
end;
procedure Tfrm_op_seai_order.d_onlineBookingDSDesigner1GetText(
Sender: TField; var Text: String; DisplayText: Boolean);
begin
if sender.DataSet['<27><><EFBFBD><EFBFBD>1']<>0 then
Text:=GetCntr(Sender.AsString)+'X'+sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>1').asstring;
end;
procedure Tfrm_op_seai_order.d_onlineBookingDSDesigner210GetText(
Sender: TField; var Text: String; DisplayText: Boolean);
begin
if sender.DataSet['<27><><EFBFBD><EFBFBD>2']<>0 then
Text:=GetCntr(Sender.AsString)+'X'+sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>2').asstring;
end;
procedure Tfrm_op_seai_order.d_onlineBookingDSDesigner310GetText(
Sender: TField; var Text: String; DisplayText: Boolean);
begin
if sender.DataSet['<27><><EFBFBD><EFBFBD>3']<>0 then
Text:=GetCntr(Sender.AsString)+'X'+sender.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>3').asstring;
end;
end.