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; wwDBDateTimePicker1: TwwDBDateTimePicker; wwDBDateTimePicker2: TwwDBDateTimePicker; bsSkinButton1: TbsSkinButton; bsSkinButton10: TbsSkinButton; bsSkinButton5: TbsSkinButton; bsBusinessSkinForm1: TbsBusinessSkinForm; Edit1: TEdit; Label2: TLabel; RxDBLookupCombo3: TRxDBLookupCombo; procedure bsSkinButton10Click(Sender: TObject); procedure bsSkinButton5Click(Sender: TObject); procedure bsSkinButton1Click(Sender: TObject); procedure RxDBLookupCombo3KeyPress(Sender: TObject; var Key: Char); procedure RxDBLookupCombo3Exit(Sender: TObject); procedure RxDBLookupCombo3Enter(Sender: TObject); 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:=''; RxDBLookupCombo3.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 RxDBLookupCombo3.DisplayValue<>''then str:=str+' and 发布人='+''''+RxDBLookupCombo3.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.RxDBLookupCombo3KeyPress( Sender: TObject; var Key: Char); begin if key=#13 then begin key:=#0; frm_info_price_release_query.bsSkinButton1Click(Sender); end; end; procedure Tfrm_info_price_release_query.RxDBLookupCombo3Exit( Sender: TObject); begin TRxDBLookupCombo(Sender).LookupDisplay:='姓名'; end; procedure Tfrm_info_price_release_query.RxDBLookupCombo3Enter( Sender: TObject); begin TRxDBLookupCombo(Sender).LookupDisplay:='代码;姓名'; end; end.