D10clhege/B01基础合同管理/U_RZCK1.pas

112 lines
2.8 KiB
ObjectPascal
Raw Permalink Normal View History

2026-11-14 17:01:56 +08:00
unit U_RZCK1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
Vcl.ComCtrls, Vcl.ToolWin, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, cxStyles, dxSkinsCore, dxSkinsDefaultPainters,
cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator,
dxDateRanges, Data.DB, cxDBData, cxGridLevel, cxClasses, cxGridCustomView,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid,
Data.Win.ADODB;
type
TfrmRZCK1 = class(TForm)
ToolBar1: TToolBar;
TBClose: TToolButton;
TV1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
DataSource1: TDataSource;
ADOQueryMain: TADOQuery;
TV1Column1: TcxGridDBColumn;
TV1Column2: TcxGridDBColumn;
TV1Column3: TcxGridDBColumn;
TV1Column4: TcxGridDBColumn;
TV1Column5: TcxGridDBColumn;
TV1Column6: TcxGridDBColumn;
cxStyleRepository1: TcxStyleRepository;
cxStyle1: TcxStyle;
procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
private
procedure DoQuery();
{ Private declarations }
public
ForderNO1: string;
FLX: string;
{ Public declarations }
end;
var
frmRZCK1: TfrmRZCK1;
implementation
uses
U_DataLink, U_RTFun;
{$R *.dfm}
procedure TfrmRZCK1.DoQuery();
var
mbegdate, menddate: string;
begin
// mbegdate:=formatDatetime('yyyy-MM-dd',begDate.Date); //
// menddate:=formatDatetime('yyyy-MM-dd',endDate.Date+1);
try
with ADOQueryMain do
begin
close;
sql.clear;
filtered := false;
sql.add('select A.* ');
sql.add('from SY_sysLog A');
// if CheckBox1.Checked then
// begin
// sql.Add('where OperTime>='+quotedStr(mbegdate));
// sql.Add('and OperTime<'+quotedStr(menddate));
// end
// else
// begin
// sql.Add('where 1=1');
// end;
// sql.Add(' and isnull(Mainid,'''')='''+Trim(FMainid)+''' and isnull(Mainid,'''')<>'''' ');
// if trim(facction)<>'' then
// if FLX = '<27><><EFBFBD>ۺ<EFBFBD>ͬ' then
// begin
sql.add('where Model like ''<27><><EFBFBD>ۺ<EFBFBD>ͬ%'' ');
// end;
// if FLX = '<27>ƻ<EFBFBD><C6BB><EFBFBD>' then
// begin
// sql.add('where acction like ''<27>ƻ<EFBFBD><C6BB><EFBFBD>%'' ');
sql.add('and OPEvent like ''%' + Trim(FOrderNo1) + '%'' ');
// end;
// sql.add('where acction like ''<27>ƻ<EFBFBD><C6BB><EFBFBD>%'' ');
// sql.add('and OPmainid=''' + Trim(FOrderNo1) + '''');
// if trim(fOtherWhere)<>'' then
// begin
// sql.add(fOtherWhere);
// end;
sql.Add('order by operOr,Opertime');
showmessage(sql.text);
Open;
end;
finally
end;
end;
procedure TfrmRZCK1.FormShow(Sender: TObject);
begin
DoQuery();
end;
procedure TfrmRZCK1.TBCloseClick(Sender: TObject);
begin
close;
end;
end.