📄 tfindmess.~pas
字号:
unit TFindmess;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TFindMess1 = class(TForm)
ComboBox1: TComboBox;
Label1: TLabel;
Edit1: TEdit;
Button1: TButton;
ComboBox2: TComboBox;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FindMess1: TFindMess1;
implementation
uses TModule, ADODB, DB;
{$R *.dfm}
procedure TFindMess1.Button1Click(Sender: TObject);
var
n:Real;
str,str1,str2,str3,str4:string;
begin
with DataModule1.ADOQuery2 do
begin
str3:='''';
str1:=ComboBox1.Text;
if str1='姓名' then
str1:='Name'
else
if str1='性别' then
str1:='Sex'
else
if str1='工作单位' then
str1:='UnitWork'
else
if str1='职务' then
str1:='Duty'
else
if str1='工作地址' then
str1:='Address'
else
if str1='区号' then
str1:='DisNum'
else
if str1='手机号码' then
str1:='HandNum'
else
if str1='电话号码' then
str1:='TelNum'
else
if str1='传真号码' then
str1:='Facsimile'
else
if str1='QQ号码' then
str1:='QQNum'
else
if str1='MSN号码' then
str1:='MSNNum'
else
if str1='E-mail' then
str1:='E-mail'
else
if str1='网址' then
str1:='WebAddress'
else
if str1='备注' then
str1:='Note';
str2:=ComboBox2.Text;
if str2='模糊' then
str2:=' like'+str3+'%'+Edit1.Text+'%'+str3
else
str2:='='+str3+Edit1.Text+str3;
str:='select * from SimInfor Where '+str1+str2;
SQL.Clear;
SQL.Add(str);
Open;
edit1.SetFocus;
Edit1.SelectAll;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -