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.
DS6JIEFENG/信息资源/u_info_price_agreement_quer...

124 lines
3.7 KiB
Plaintext

unit u_info_price_agreement_query;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, BusinessSkinForm, bsSkinCtrls, wwdbdatetimepicker, StdCtrls,
RxLookup, wwdblook;
type
Tfrm_info_price_agreement_query = class(TForm)
Label13: TLabel;
Label6: TLabel;
Label10: TLabel;
Label11: TLabel;
Label5: TLabel;
Label8: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
Edit1: TEdit;
wwDBDateTimePicker1: TwwDBDateTimePicker;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
wwDBDateTimePicker3: TwwDBDateTimePicker;
bsSkinButton1: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsBusinessSkinForm1: TbsBusinessSkinForm;
RxDBLookupCombo2: TRxDBLookupCombo;
Label9: TLabel;
Label21: TLabel;
RxDBLookupCombo20: TRxDBLookupCombo;
Label1: TLabel;
Edit2: TEdit;
Label2: TLabel;
RxDBLookupCombo1: TRxDBLookupCombo;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_price_agreement_query: Tfrm_info_price_agreement_query;
implementation
uses u_info_price_agreement, my_sys_function, u_data_share;
{$R *.dfm}
procedure Tfrm_info_price_agreement_query.bsSkinButton5Click(
Sender: TObject);
begin
close;
end;
procedure Tfrm_info_price_agreement_query.bsSkinButton10Click(
Sender: TObject);
begin
Edit1.text:='';
RxDBLookupCombo5.ClearValue;
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker2.text:='';
wwDBDateTimePicker3.text:='';
wwDBDateTimePicker4.text:='';
Edit2.text:='';
RxDBLookupCombo1.ClearValue;
RxDBLookupCombo2.ClearValue;
RxDBLookupCombo20.ClearValue;
end;
procedure Tfrm_info_price_agreement_query.bsSkinButton1Click(
Sender: TObject);
var
str:widestring;
begin
str:='SELECT * FROM t_price_agreement where (1=1) ' ;// +open_data('3002','¼<><C2BC><EFBFBD><EFBFBD>','no','no','no','no');
if Edit1.text<>''then
str:=str+' and <20><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if RxDBLookupCombo5.DisplayValue<>''then
str:=str+' and ǩԼ<C7A9><D4BC>='+''''+RxDBLookupCombo5.DisplayValue+'''';
if wwDBDateTimePicker1.text<>''then
str:=str+' and <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
if wwDBDateTimePicker2.text<>''then
str:=str+' and <20><>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
if wwDBDateTimePicker3.text<>''then
str:=str+' and ǩԼʱ<D4BC><CAB1>>='+''''+wwDBDateTimePicker3.text+'''';
if wwDBDateTimePicker4.text<>''then
str:=str+' and ǩԼʱ<D4BC><CAB1><='+''''+wwDBDateTimePicker4.text+'''';
if Edit2.text<>''then
str:=str+' and <20><>Լ<EFBFBD><D4BC> like '+''''+'%'+Edit2.text+'%'+'''';
if RxDBLookupCombo1.DisplayValue<>''then
str:=str+' and ¼<><C2BC><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo1.DisplayValue+'''';
if RxDBLookupCombo2.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>˾='+''''+RxDBLookupCombo2.DisplayValue+'''';
if RxDBLookupCombo20.DisplayValue<>''then
str:=str+' and <20><><EFBFBD><EFBFBD>='+''''+RxDBLookupCombo20.DisplayValue+'''';
frm_info_price_agreement.t_price_agreement.sql.Clear;
frm_info_price_agreement.t_price_agreement.sql.add(str);
frm_info_price_agreement.t_price_agreement.sql.add(' order by <20><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>');
frm_info_price_agreement.t_price_agreement.open;
if frm_info_price_agreement.t_price_agreement.isempty then
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>')
else
close;
end;
procedure Tfrm_info_price_agreement_query.Edit1KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_info_price_agreement_query.bsSkinButton1Click(Sender);
end;
end;
end.