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.
106 lines
2.6 KiB
Plaintext
106 lines
2.6 KiB
Plaintext
unit U_BookingLog;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, dxExEdtr, StdCtrls, DBCtrls, bsSkinCtrls, dxDBGrid, dxTL,
|
|
dxDBCtrl, dxCntner, RxLookup, wwdbdatetimepicker, DB, ADODB;
|
|
|
|
type
|
|
Tfrm_BookingLog = class(TForm)
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
Label6: TLabel;
|
|
Label8: TLabel;
|
|
Label11: TLabel;
|
|
Label7: TLabel;
|
|
Edit1: TEdit;
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
bsSkinButton10: TbsSkinButton;
|
|
bsSkinButton5: TbsSkinButton;
|
|
dxDBGrid1: TdxDBGrid;
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
dxDBGrid1Column6: TdxDBGridMaskColumn;
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
bsSkinGroupBox2: TbsSkinGroupBox;
|
|
DBMemo2: TDBMemo;
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
qryBooking_log: TADOQuery;
|
|
DS_Booking_log: TDataSource;
|
|
lbl1: TLabel;
|
|
edt1: TEdit;
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
procedure FormShow(Sender: TObject);
|
|
private
|
|
BSNO:String;
|
|
public
|
|
procedure SetBSNO(_BSNO:string);
|
|
end;
|
|
|
|
var
|
|
frm_BookingLog: Tfrm_BookingLog;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_BookingLog.bsSkinButton10Click(Sender: TObject);
|
|
var
|
|
str:widestring;
|
|
begin
|
|
if Edit1.text<>''then
|
|
str:='where 业务信息 like '+''''+'%'+Edit1.text+'%'+'''';
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
begin
|
|
if str=''then
|
|
str:='where 操作人'+RxDBLookupCombo3.DisplayValue+''''
|
|
else
|
|
str:=str+' and 操作人='+''''+RxDBLookupCombo3.DisplayValue+'''';
|
|
end;
|
|
if wwDBDateTimePicker3.text<>''then
|
|
begin
|
|
if str=''then
|
|
str:='where 操作时间>='+''''+wwDBDateTimePicker3.text+''''
|
|
else
|
|
str:=str+' and 操作时间>='+''''+wwDBDateTimePicker3.text+'''';
|
|
end;
|
|
if wwDBDateTimePicker4.text<>''then
|
|
begin
|
|
if str=''then
|
|
str:='where 操作时间<='+''''+wwDBDateTimePicker4.text+''''
|
|
else
|
|
str:=str+' and 操作时间<='+''''+wwDBDateTimePicker4.text+'''';
|
|
end;
|
|
if edt1.text<>''then
|
|
str:='where SPXNO like '+''''+'%'+edt1.text+'%'+'''';
|
|
|
|
qrybooking_log.close;
|
|
qrybooking_log.sql.clear;
|
|
qrybooking_log.SQL.add('select * from t_booking_log '+str+' order by 编号,操作时间');
|
|
qrybooking_log.open;
|
|
end;
|
|
|
|
procedure Tfrm_BookingLog.bsSkinButton5Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
procedure Tfrm_BookingLog.SetBSNO(_BSNO: string);
|
|
begin
|
|
BSNO:=_BSNO;
|
|
end;
|
|
|
|
procedure Tfrm_BookingLog.FormShow(Sender: TObject);
|
|
begin
|
|
if BSNO<>'' then begin
|
|
Edt1.Text:=BSNO;
|
|
bsSkinButton10Click(self);
|
|
end;
|
|
end;
|
|
|
|
end.
|