|
|
|
|
unit u_info_tell_query;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, BusinessSkinForm, wwdbdatetimepicker, wwdblook, StdCtrls,
|
|
|
|
|
bsSkinCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_info_tell_query = class(TForm)
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
d1: TwwDBDateTimePicker;
|
|
|
|
|
d2: TwwDBDateTimePicker;
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
|
|
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_tell_query: Tfrm_info_tell_query;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_info_tell_manage, my_sys_function, u_main;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_tell_query.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_tell_query.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str:widestring;
|
|
|
|
|
begin
|
|
|
|
|
str:=' where ¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+'''';
|
|
|
|
|
if Edit1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD> like '+''''+'%'+edit1.text+'%'+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD> like '+''''+'%'+edit1.text+'%'+'''';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if d1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>='+''''+d1.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>>='+''''+d1.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if d2.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><='+''''+d2.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><='+''''+d2.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if wwDBComboBox2.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBComboBox2.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBComboBox2.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
if wwDBComboBox1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20>Ƿ<EFBFBD>֪<EFBFBD><D6AA>='+inttostr(wwDBComboBox1.ItemIndex)
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20>Ƿ<EFBFBD>֪<EFBFBD><D6AA>='+inttostr(wwDBComboBox1.ItemIndex);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str:='select * from t_info_tell'+str+' order by <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>';
|
|
|
|
|
|
|
|
|
|
table_query(frm_info_tell_manage.t_info_tell,str);
|
|
|
|
|
if frm_info_tell_manage.t_info_tell.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_tell_query.Edit1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
key:=#0;
|
|
|
|
|
frm_info_tell_query.bsSkinButton10Click(Sender);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|