⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 freesearch.pas

📁 一个不错的信息管理系统
💻 PAS
📖 第 1 页 / 共 2 页
字号:
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text='') and (combobox5.Text<>'') and (combobox4.text<>'') and (combobox6.Text<>'' ) and (combobox3.Text<>'')and(combobox7.Text<>'')and(edit2.Text='')then
begin                            //性别和年龄和学历
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01,a08 where 性别='''+combobox3.Text+''''+' and '+' 年龄 between '+combobox4.text+' and '+combobox5.text+' and '+' 学历代码 between '+inttostr(combobox6.itemindex)+' and '+inttostr(combobox7.itemindex)+'and a01.标识号 = a08.标识号';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text<>'') and (combobox5.Text='') and (combobox4.text='') and (combobox6.Text='' ) and (combobox3.Text<>'')and(combobox7.Text='')and(edit2.Text='')then
begin                            //性别和人事单位名称
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01 where 性别='''+combobox3.Text+''''+' and '+' 人事单位名称='''+combobox1.text+'''';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text='') and (combobox5.Text='') and (combobox4.text='') and (combobox6.Text<>'' ) and (combobox3.Text<>'')and(combobox7.Text<>'')and(edit2.Text='')then
begin                            //性别和学历
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01,a08 where 性别='''+combobox3.Text+''''+' and '+' 学历代码 between '+inttostr(combobox6.itemindex)+' and '+inttostr(combobox7.itemindex)+'and a01.标识号 = a08.标识号';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text<>'') and (combobox5.Text='') and (combobox4.text='') and (combobox6.Text<>'' ) and (combobox3.Text='')and(combobox7.Text<>'')and(edit2.Text='')then
begin                            //人事单位名称和学历
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01,a08 where 人事单位名称='''+combobox1.Text+''''+' and '+' 学历代码 between '+inttostr(combobox6.itemindex)+' and '+inttostr(combobox7.itemindex)+'and a01.标识号 = a08.标识号';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text<>'') and (combobox5.Text<>'') and (combobox4.text<>'') and (combobox6.Text='' ) and (combobox3.Text='')and(combobox7.Text='')and(edit2.Text='')then
begin                            //人事单位名称和年龄
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01,a08 where 人事单位名称='''+combobox1.Text+''''+' and '+' 年龄 between '+combobox4.text+' and '+combobox5.text+' and '+' 学历代码 between '+inttostr(combobox6.itemindex)+' and '+inttostr(combobox7.itemindex)+'and a01.标识号 = a08.标识号';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text<>'') and (combobox5.Text<>'') and (combobox4.text<>'') and (combobox6.Text<>'' ) and (combobox3.Text='')and(combobox7.Text<>'')and(edit2.Text='')then
begin                            //人事单位名称和年龄和学历
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01,a08 where 人事单位名称='''+combobox1.Text+''''+' and '+' 年龄 between '+combobox4.text+' and '+combobox5.text+' and '+' 学历代码 between '+inttostr(combobox6.itemindex)+' and '+inttostr(combobox7.itemindex)+'and a01.标识号 = a08.标识号';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text<>'') and (combobox5.Text='') and (combobox4.text='') and (combobox6.Text<>'' ) and (combobox3.Text<>'')and(combobox7.Text<>'')and(edit2.Text='')then
begin                            //人事单位名称和性别和学历
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01,a08 where 人事单位名称='''+combobox1.Text+''''+' and '+' 性别='''+combobox3.text+''''+' and '+' 学历代码 between '+inttostr(combobox6.itemindex)+' and '+inttostr(combobox7.itemindex)+'and a01.标识号 = a08.标识号';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text<>'') and (combobox5.Text<>'') and (combobox4.text<>'') and (combobox6.Text<>'' ) and (combobox3.Text<>'')and(combobox7.Text<>'')and(edit2.Text='')then
begin                            //人事单位名称和年龄和学历和性别
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01,a08 where 人事单位名称='''+combobox1.Text+''''+' and '+'性别='''+combobox3.text+''''+' and '+' 年龄 between '+combobox4.text+' and '+combobox5.text+' and '+' 学历代码 between '+inttostr(combobox6.itemindex)+' and '+inttostr(combobox7.itemindex)+'and a01.标识号 = a08.标识号';
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else if (edit1.Text ='')and(combobox1.Text<>'') and (combobox5.Text<>'') and (combobox4.text<>'') and (combobox6.Text='' ) and (combobox3.Text<>'')and(combobox7.Text='')and(edit2.Text='')then
begin                            //人事单位名称和年龄和性别
adoquery1.Active :=false;
adoquery1.sql.Clear;
s :='select * from a01 where 人事单位名称='''+combobox1.Text+''''+' and '+'性别='''+combobox3.text+''''+' and '+' 年龄 between '+combobox4.text+' and '+combobox5.text;
adoquery1.SQL.Add(s);
adoquery1.Active :=true;
if adoquery1.RecordCount<>0 then
begin
button2.Enabled:=true;
button3.Enabled:=true;
button4.Enabled:=true;
button5.Enabled:=true;
end
else
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
end;
end
else
application.MessageBox('没有找到符合条件的记录!','提示',32);
end;

procedure TForm14.FormShow(Sender: TObject);
begin
combobox1.Text :='';
combobox3.Text :='';
combobox4.Text :='';
combobox5.Text :='';
combobox6.Text :='';
combobox7.Text :='';
edit1.Text :='';
edit2.Text:='';
end;

procedure TForm14.Button2Click(Sender: TObject);
begin
adoquery1.First;
end;

procedure TForm14.Button3Click(Sender: TObject);
begin
adoquery1.Prior;
end;

procedure TForm14.Button4Click(Sender: TObject);
begin
adoquery1.Next;
end;

procedure TForm14.Button5Click(Sender: TObject);
begin
adoquery1.Last;
end;

procedure TForm14.FormClose(Sender: TObject; var Action: TCloseAction);
begin
button2.Enabled:=false;
button3.Enabled:=false;
button4.Enabled:=false;
button5.Enabled:=false;
edit1.Text:='';
edit2.Text:='';
combobox1.Text:='';
combobox3.Text:='';
combobox4.Text:='';
combobox5.Text:='';
combobox6.Text:='';
combobox7.Text:='';
adoquery1.SQL.Text:='';
adoquery1.Active:=false;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -