|
|
|
|
unit u_info_render_query;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, BusinessSkinForm, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
|
|
|
|
|
wwdbdatetimepicker, wwdblook, StdCtrls, bsSkinCtrls;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_info_render_query = class(TForm)
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
|
|
d1: TwwDBDateTimePicker;
|
|
|
|
|
d2: TwwDBDateTimePicker;
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
|
|
Label6: TLabel;
|
|
|
|
|
wwDBLookupCombo2: TwwDBLookupCombo;
|
|
|
|
|
Label7: TLabel;
|
|
|
|
|
wwDBLookupCombo3: TwwDBLookupCombo;
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_info_render_query: Tfrm_info_render_query;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_info_render, my_sys_function;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_render_query.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_render_query.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str:=' where '+open_data('9002','<27>㱨<EFBFBD><E3B1A8>','no','no','no','no');
|
|
|
|
|
if Edit1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20>㱨<EFBFBD><E3B1A8>Ŀ like '+''''+'%'+edit1.text+'%'+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20>㱨<EFBFBD><E3B1A8>Ŀ like '+''''+'%'+edit1.text+'%'+'''';
|
|
|
|
|
end;
|
|
|
|
|
if wwDBLookupCombo1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20>㱨<EFBFBD><E3B1A8>='+''''+wwDBLookupCombo1.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20>㱨<EFBFBD><E3B1A8>='+''''+wwDBLookupCombo1.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if d1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20>㱨<EFBFBD><E3B1A8><EFBFBD><EFBFBD>>='+''''+d1.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20>㱨<EFBFBD><E3B1A8><EFBFBD><EFBFBD>>='+''''+d1.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if d2.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20>㱨<EFBFBD><E3B1A8><EFBFBD><EFBFBD><='+''''+d2.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20>㱨<EFBFBD><E3B1A8><EFBFBD><EFBFBD><='+''''+d2.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if wwDBComboBox3.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD>״̬='+''''+wwDBComboBox3.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>״̬='+''''+wwDBComboBox3.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if wwDBLookupCombo2.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo2.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo2.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if wwDBLookupCombo3.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo3.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo3.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str:='select * from t_info_render'+str+' order by <20>㱨<EFBFBD><E3B1A8><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
if frm_info_render_query.Hint='1' then
|
|
|
|
|
begin
|
|
|
|
|
table_query(frm_info_render.t_info_render,str);
|
|
|
|
|
if frm_info_render.t_info_render.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
;
|
|
|
|
|
end;
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_render_query.Edit1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
key:=#0;
|
|
|
|
|
frm_info_render_query.bsSkinButton10Click(Sender);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|