|
|
|
|
unit u_info_bulletin_query;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, StdCtrls, BusinessSkinForm, bsSkinCtrls, wwdbdatetimepicker,
|
|
|
|
|
wwdblook;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_info_bulletin_query = class(TForm)
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
Edit1: TEdit;
|
|
|
|
|
wwDBLookupCombo1: TwwDBLookupCombo;
|
|
|
|
|
Edit2: TEdit;
|
|
|
|
|
d1: TwwDBDateTimePicker;
|
|
|
|
|
d2: TwwDBDateTimePicker;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_info_bulletin_query: Tfrm_info_bulletin_query;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_data_share, u_info_bulletin_manage, my_sys_function;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_bulletin_query.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_bulletin_query.bsSkinButton10Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
str:widestring;
|
|
|
|
|
begin
|
|
|
|
|
if_num(Edit2.text,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
str:='';
|
|
|
|
|
if Edit1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+edit1.text+'%'+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+edit1.text+'%'+'''';
|
|
|
|
|
end;
|
|
|
|
|
if wwDBLookupCombo1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo1.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+wwDBLookupCombo1.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if Edit2.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+trim(Edit2.text)
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+trim(Edit2.text);
|
|
|
|
|
end;
|
|
|
|
|
if d1.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+d1.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+d1.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
if d2.text<>''then
|
|
|
|
|
begin
|
|
|
|
|
if str='' then
|
|
|
|
|
str:=' where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+d2.text+''''
|
|
|
|
|
else
|
|
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+d2.text+'''';
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
str:='select * from t_info_bulletin'+str+' order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
table_query(frm_info_bulletin_manage.t_info_bulletin,str);
|
|
|
|
|
if frm_info_bulletin_manage.t_info_bulletin.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>');
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_bulletin_query.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
frm_data_share.t_sys_employee.Requery();
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_info_bulletin_query.Edit1KeyPress(Sender: TObject;
|
|
|
|
|
var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then
|
|
|
|
|
begin
|
|
|
|
|
key:=#0;
|
|
|
|
|
frm_info_bulletin_query.bsSkinButton10Click(Sender);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|