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.

119 lines
2.8 KiB
Plaintext

11 months ago
unit u_info_card_query;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb, bsSkinCtrls,
BusinessSkinForm, RxLookup;
type
Tfrm_info_card_query = class(TForm)
Label15: TLabel;
Edit9: TEdit;
Label16: TLabel;
Edit10: TEdit;
Edit12: TEdit;
Label18: TLabel;
Label17: TLabel;
Edit11: TEdit;
bsSkinButton1: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit4: TEdit;
Label3: TLabel;
Label4: TLabel;
bsBusinessSkinForm1: TbsBusinessSkinForm;
RxDBLookupCombo2: TRxDBLookupCombo;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure Edit9KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_card_query: Tfrm_info_card_query;
implementation
uses u_info_card, u_main;
{$R *.dfm}
procedure Tfrm_info_card_query.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_card_query.bsSkinButton10Click(Sender: TObject);
begin
Edit9.text:='';
Edit10.text:='';
Edit11.text:='';
Edit12.text:='';
Edit1.text:='';
Edit4.text:='';
Edit2.text:='';
RxDBLookupCombo2.ClearValue;
end;
procedure Tfrm_info_card_query.bsSkinButton1Click(Sender: TObject);
var
str:widestring;
begin
str:='';
str:='select * from t_info_card where ¼<><C2BC><EFBFBD><EFBFBD>='+''''+employee+'''';
if Edit9.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit9.text+'%'+'''';
if Edit10.text<>''then
str:=str+' and <20><EFBFBD>绰 like '+''''+'%'+Edit10.text+'%'+'''';
if Edit11.text<>''then
str:=str+' and <20><>ͥ<EFBFBD>绰 like '+''''+'%'+Edit11.text+'%'+'''';
if Edit12.text<>''then
str:=str+' and <20>ֻ<EFBFBD> like '+''''+'%'+Edit12.text+'%'+'''';
if RxDBLookupCombo2.DisplayValues[1]<>''then
str:=str+' and <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> like '+''''+'%'+RxDBLookupCombo2.DisplayValues[1]+'%'+'''';
if Edit1.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit1.text+'%'+'''';
if Edit4.text<>''then
str:=str+' and ְ<><D6B0> like '+''''+'%'+Edit4.text+'%'+'''';
if Edit2.text<>''then
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit2.text+'%'+'''';
str:=str+' order by <20><><EFBFBD><EFBFBD>';
with frm_info_card do
begin
t_info_card.close;
t_info_card.sql.Text:=str;
t_info_card.open;
if t_info_card.isempty then
begin
showmessage('û<>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD>');
exit;
end;
frm_info_card_query.close;
end;
end;
procedure Tfrm_info_card_query.Edit9KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_info_card_query.bsSkinButton1Click(Sender);
end;
end;
end.