📄 unit_resume_search.~pas
字号:
unit Unit_Resume_Search;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, XPMenu, StdCtrls, CheckLst, ExtCtrls;
type
TForm_Resume_Search = class(TForm)
Bevel1: TBevel;
Label1: TLabel;
Label2: TLabel;
OKBtn: TButton;
CancelBtn: TButton;
Edit1: TEdit;
CheckListBox1: TCheckListBox;
XPMenu1: TXPMenu;
procedure OKBtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_Resume_Search: TForm_Resume_Search;
implementation
uses Unit_DM;
{$R *.dfm}
procedure TForm_Resume_Search.OKBtnClick(Sender: TObject);
var
sql,whereStr,fieldstr:String;
i:integer;
begin
if length(edit1.Text)<1 then
begin
application.MessageBox('请输入搜索内容.','提示',MB_OK);
edit1.SetFocus;
exit;
end;
sql:='select * from resume';
whereStr:='';
fieldstr:='';
for i:=0 to checklistbox1.Items.Count-1 do
begin
if checklistbox1.Checked[i] then
begin
if checklistbox1.Items.Strings[i]='姓名' then fieldstr:='vName';
if checklistbox1.Items.Strings[i]='性别' then fieldstr:='vSex';
if checklistbox1.Items.Strings[i]='出生年月' then fieldstr:='dBirthday';
if checklistbox1.Items.Strings[i]='用户名' then fieldstr:='vUserName';
if checklistbox1.Items.Strings[i]='血型' then fieldstr:='vBloodType ';
if checklistbox1.Items.Strings[i]='学历' then fieldstr:='vKnowledge';
if checklistbox1.Items.Strings[i]='电话' then fieldstr:='vPhone';
if checklistbox1.Items.Strings[i]='手机' then fieldstr:='vEmail';
if checklistbox1.Items.Strings[i]='Email' then fieldstr:='vKnowledge';
if checklistbox1.Items.Strings[i]='地址' then fieldstr:='vAddress';
if checklistbox1.Items.Strings[i]='邮编' then fieldstr:='vPostalcode';
if checklistbox1.Items.Strings[i]='教育经历' then fieldstr:='tSchoolWent';
if checklistbox1.Items.Strings[i]='工作经历' then fieldstr:='tJobWent';
if checklistbox1.Items.Strings[i]='行业特长' then fieldstr:='tCraftsmanship';
if checklistbox1.Items.Strings[i]='其它信息' then fieldstr:='tOther';
if checklistbox1.Items.Strings[i]='应聘职位' then fieldstr:='vPosition';
if length(whereStr)<1 then
whereStr:=fieldstr+' like ''%'+edit1.text+'%'''
else
whereStr:=whereStr+' or '+fieldstr+' like ''%'+edit1.text+'%''';
end;
end;
if length(whereStr)<1 then
begin
application.MessageBox('请输入搜索范围.','提示',MB_OK);
checklistbox1.SetFocus;
exit;
end;
with dm.adsResume do
begin
close;
commandtext:=sql+' where '+wherestr;
open;
end;
close;
end;
procedure TForm_Resume_Search.FormCreate(Sender: TObject);
begin
Self.Left:= Round(Screen.Width/2-Width/2);
Self.Top :=Round(Screen.Height/2-Height/2);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -