You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DONGSHENG6/信息资源/u_info_price_release_query.pas

95 lines
2.6 KiB
Plaintext

unit u_info_price_release_query;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Mask, wwdbedit, Wwdotdot, Wwdbcomb, StdCtrls, BusinessSkinForm,
bsSkinCtrls, wwdbdatetimepicker, RxLookup, wwdblook;
type
Tfrm_info_price_release_query = class(TForm)
Label13: TLabel;
Label10: TLabel;
Label5: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
bsSkinButton1: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsBusinessSkinForm1: TbsBusinessSkinForm;
Edit1: TEdit;
Label2: TLabel;
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_price_release_query: Tfrm_info_price_release_query;
implementation
uses u_info_price_release, my_sys_function;
{$R *.dfm}
procedure Tfrm_info_price_release_query.bsSkinButton10Click(
Sender: TObject);
begin
Edit1.text:='';
RxDBLookupCombo5.ClearValue;
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker2.text:='';
end;
procedure Tfrm_info_price_release_query.bsSkinButton5Click(
Sender: TObject);
begin
close;
end;
procedure Tfrm_info_price_release_query.bsSkinButton1Click(
Sender: TObject);
var
str:widestring;
begin
str:='SELECT * FROM t_price_release where '+open_data('3007','发布人','no','no','no','no');
if RxDBLookupCombo5.DisplayValue<>''then
str:=str+' and 发布人='+''''+RxDBLookupCombo5.DisplayValue+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and 发布日期>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str:=str+' and 发布日期<='+''''+wwDBDateTimePicker2.text+'''';
if Edit1.text<>''then
str:=str+' and 发布标题 like '+''''+'%'+Edit1.text+'%'+'''';
frm_info_price_release.t_price_release.close;
frm_info_price_release.t_price_release.sql.Clear;
frm_info_price_release.t_price_release.sql.add(str);
frm_info_price_release.t_price_release.sql.add(' order by 发布日期');
frm_info_price_release.t_price_release.open;
if frm_info_price_release.t_price_release.isempty then
showmessage('没有检索出信息!!')
else
close;
end;
procedure Tfrm_info_price_release_query.Edit1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_info_price_release_query.bsSkinButton1Click(Sender);
end;
end;
end.