|
|
unit u_op_log;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, bsSkinCtrls, dxExEdtr, StdCtrls, DBCtrls, dxCntner, dxTL,
|
|
|
dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, RxLookup,
|
|
|
wwdbdatetimepicker, ExtCtrls, Menus;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_log = class(TForm)
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
bsSkinPanel2: TbsSkinPanel;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
t_op_delete: TADOQuery;
|
|
|
t_op_delete1: TDataSource;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column13: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column14: TdxDBGridDateColumn;
|
|
|
Label6: TLabel;
|
|
|
Edit1: TEdit;
|
|
|
Label8: TLabel;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
Label11: TLabel;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
Label7: TLabel;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
DBMemo1: TDBMemo;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
PopupMenu2: TPopupMenu;
|
|
|
N16: TMenuItem;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure N16Click(Sender: TObject);
|
|
|
procedure dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_log: Tfrm_op_log;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_main, my_sys_function;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_op_log.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_log.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
savereggrid(dxdbgrid1,caption);
|
|
|
frm_op_log.Hide;
|
|
|
frm_op_log.ManualFloat(frm_op_log.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_log');
|
|
|
action:=cafree;
|
|
|
frm_op_log:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_log.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
loadreggrid(dxdbgrid1,false,caption);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_log.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
if Edit1.text<>''then
|
|
|
str:='where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
|
|
|
if RxDBLookupCombo3.DisplayValue<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValue+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo3.DisplayValue+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker3.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>='+''''+wwDBDateTimePicker3.text+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>='+''''+wwDBDateTimePicker3.text+'''';
|
|
|
end;
|
|
|
if wwDBDateTimePicker4.text<>''then
|
|
|
begin
|
|
|
if str=''then
|
|
|
str:='where <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><='+''''+wwDBDateTimePicker4.text+''''
|
|
|
else
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><='+''''+wwDBDateTimePicker4.text+'''';
|
|
|
end;
|
|
|
t_op_delete.close;
|
|
|
t_op_delete.sql.clear;
|
|
|
t_op_delete.SQL.add('select * from t_op_log '+str+' order by id desc');
|
|
|
t_op_delete.open;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_log.N16Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxdbgrid1);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_log.dxDBGrid1ColumnSorting(Sender: TObject;
|
|
|
Column: TdxDBTreeListColumn; var Allow: Boolean);
|
|
|
begin
|
|
|
Column_sort(Column,t_op_delete,'ID');
|
|
|
end;
|
|
|
|
|
|
end.
|