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

📄 unit12.pas

📁 本系统规模较小,适合小型宿舍,公寓等人员的安排,管理.本系统采用delphi开发界面,使用文件型的数据库Access.,界面亲和力强,容易上手,使用方便.
💻 PAS
📖 第 1 页 / 共 2 页
字号:
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox10.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end; }
end;

procedure Tgjcx.FlatSpeedButton2Click(Sender: TObject);
var
mf,str:string;
begin
if flatcheckbox5.Checked then
  begin
  str:='xskxx.yx as 院系';
  end;
if flatcheckbox6.Checked then
  begin
  str:='xskxx.zy as 专业';
  end;
if flatcheckbox7.Checked then
  begin
  str:='xskxx.nj as 年级';
  end;
if flatcheckbox8.Checked then
  begin
  str:='xskxx.bj as 班级';
  end;
if flatcheckbox9.Checked then
  begin
  str:='zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox10.Checked then
  begin
  str:='zs.ssh as 所住宿舍号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业';
  end;
if flatcheckbox5.Checked and flatcheckbox7.checked then
  begin
  str:='xskxx.yx as 院系,xskxx.nj as 年级';
  end;
if flatcheckbox5.Checked and flatcheckbox8.checked then
  begin
  str:='xskxx.yx as 院系,xskxx.bj as 班级';
  end;
if flatcheckbox5.Checked and flatcheckbox9.checked then
  begin
  str:='xskxx.yx as 院系,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox5.Checked and flatcheckbox9.checked then
  begin
  str:='xskxx.yx as 院系,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox6.Checked and flatcheckbox7.checked then
  begin
  str:='xskxx.zy as 专业,xskxx.nj as 年级';
  end;
if flatcheckbox6.Checked and flatcheckbox8.checked then
  begin
  str:='xskxx.zy as 专业,xskxx.bj as 班级';
  end;
if flatcheckbox6.Checked and flatcheckbox9.checked then
  begin
  str:='xskxx.zy as 专业,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox6.Checked and flatcheckbox9.checked then
  begin
  str:='xskxx.zy as 专业,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox7.Checked and flatcheckbox8.checked then
  begin
  str:='xskxx.nj as 年级,xskxx.bj as 班级';
  end;
if flatcheckbox7.Checked and flatcheckbox9.checked then
  begin
  str:='xskxx.nj as 年级,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox7.Checked and flatcheckbox10.checked then
  begin
  str:='xskxx.nj as 年级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox8.Checked and flatcheckbox9.checked then
  begin
  str:='xskxx.nj as 班级,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox8.Checked and flatcheckbox9.checked then
  begin
  str:='xskxx.nj as 班级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox9.Checked and flatcheckbox10.checked then
  begin
  str:='zs.ssh as 所住宿舍号,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox8.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.bj as 班级';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox9.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.Checked and flatcheckbox8.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级,xskxx.bj as 班级';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.Checked and flatcheckbox9.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox6.Checked and flatcheckbox7.checked and flatcheckbox8.Checked and flatcheckbox9.Checked then
  begin
  str:='xskxx.zy as 专业,xskxx.nj as 年级,xskxx.bj as 班级,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox6.Checked and flatcheckbox7.checked and flatcheckbox8.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.zy as 专业,xskxx.nj as 年级,xskxx.bj as 班级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox7.Checked and flatcheckbox8.checked and flatcheckbox9.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.nj as 年级,xskxx.bj as 班级,zs.sslh as 所住宿舍楼号,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.Checked and flatcheckbox9.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox8.Checked and flatcheckbox9.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.bj as 班级,zs.sslh as 所住宿舍楼号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox8.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.bj as 班级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox8.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.bj as 班级,zs.ssh as 所住宿舍号';
  end;
if flatcheckbox5.Checked and flatcheckbox6.checked and flatcheckbox7.Checked and flatcheckbox8.Checked and flatcheckbox9.Checked and flatcheckbox10.Checked then
  begin
  str:='xskxx.yx as 院系,xskxx.zy as 专业,xskxx.nj as 年级,xskxx.bj as 班级,zs.sslh as 所住宿舍楼号,zs.ssh as 所住宿舍号';
  end;



{case flatradiobutton1.Tag of
0: mf:='xskxx.xh';
1: mf:='xskxx.xm';
2: mf:='xskxx.jg';
end;  }

if flatradiobutton1.Checked then
mf:='xskxx.xh'
else if
flatradiobutton2.Checked then
mf:='xskxx.xm'
else
mf:='xskxx.jg';
with adoquery1 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct xskxx.xh as 学号,xskxx.xm as 姓名,xskxx.xb as 性别,xskxx.jg as 籍贯,'+str+' from xskxx,zs');
  sql.Add('where xskxx.xh=zs.xh and '+mf+' like ''%' +flatedit1.Text+ '%'' ');
  open;
  //showmessage(adoquery1.SQL.Text);
  end;
  dbgrid1.Columns[0].Width:=80;
  dbgrid1.Columns[1].Width:=100;
  dbgrid1.Columns[2].Width:=60;
  dbgrid1.Columns[3].Width:=120;
  


end;


procedure Tgjcx.FormClose(Sender: TObject; var Action: TCloseAction);
begin
form2.show;
end;

procedure Tgjcx.FormShow(Sender: TObject);
begin
with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select xh as 学号,xm as 姓名 from xskxx');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox1.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    flatcombobox2.Items.Add(dm.ADOQuery7.Fields[1].asstring);
    dm.ADOQuery7.Next;
    end;
    //dm.ADOQuery7.Close;


with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct jg as 籍贯 from xskxx');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox4.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end;

with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct yx as 院系 from xskxx');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox5.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end;

with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct zy as 专业 from xskxx');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox6.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end;

with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct nj as 年级 from xskxx');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox7.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end;

with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct bj as 班级 from xskxx');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox8.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end;

with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct sslh as 宿舍楼号 from zs');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox9.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end;

with dm.ADOQuery7 do
  begin
  close;
  sql.Clear;
  sql.Add('select distinct ssh from zs');
  open;
  end;
  while not dm.ADOQuery7.Eof do
    begin
    flatcombobox10.Items.Add(dm.ADOQuery7.Fields[0].asstring);
    dm.ADOQuery7.Next;
    end;
flatcombobox1.ItemIndex:=0;
flatcombobox2.ItemIndex:=0;
flatcombobox3.ItemIndex:=0;
flatcombobox4.ItemIndex:=0;
flatcombobox5.ItemIndex:=0;
flatcombobox6.ItemIndex:=0;
flatcombobox7.ItemIndex:=0;
flatcombobox8.ItemIndex:=0;
flatcombobox9.ItemIndex:=0;
flatcombobox10.ItemIndex:=0;
dbgrid1.Columns.Clear;


end;



procedure Tgjcx.FlatCheckBox11Click(Sender: TObject);
begin
if flatcheckbox11.Checked=true then
  begin
  flatcheckbox5.Checked:=true;
  flatcheckbox6.Checked:=true;
  flatcheckbox7.Checked:=true;
  flatcheckbox8.Checked:=true;
  flatcheckbox9.Checked:=true;
  flatcheckbox10.Checked:=true;
  flatcheckbox12.Checked:=false;
  end;

end;

procedure Tgjcx.FlatCheckBox12Click(Sender: TObject);
begin

if flatcheckbox12.Checked=true then
  begin
  flatcheckbox5.Checked:=false;
  flatcheckbox6.Checked:=false;
  flatcheckbox7.Checked:=false;
  flatcheckbox8.Checked:=false;
  flatcheckbox9.Checked:=false;
  flatcheckbox10.Checked:=false;
  flatcheckbox11.Checked:=false;
  end;
end;




procedure Tgjcx.FlatComboBox1KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
  begin
  key:=#0;
  flatspeedbutton1.Click;
  end;
end;




procedure Tgjcx.FlatSpeedButton3Click(Sender: TObject);
begin
close;
end;

procedure Tgjcx.FlatSpeedButton5Click(Sender: TObject);
begin
flatedit1.Text:='';
flatspeedbutton2.Click;
end;




procedure Tgjcx.FlatEdit1KeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
  begin
  key:=#0;
  flatspeedbutton1.Click;
  end;
end;

end.


//此源码由程序太平洋收集整理发布,任何人都可自由转载,但需保留本站信息
//╭⌒╮┅~ ¤ 欢迎光临程序太平洋╭⌒╮
//╭⌒╭⌒╮╭⌒╮~╭⌒╮  ︶  ,︶︶
//,︶︶︶︶,''︶~~ ,''~︶︶  ,''
//╔ ╱◥███◣═╬╬╬╬╬╬╬╬╬╗
//╬ ︱田︱田 田 ︱          ╬
//╬       http://www.5ivb.net ╬
//╬  ╭○╮●                     ╬
//╬  /■\/■\                    ╬
//╬   <| ||    有希望,就有成功! ╬
//╬                 ╬
//╚╬╬╬╬╬╬╬╬╬╬╗  ╔╬╬╬╬╝
//
//说明:
//专业提供VB、.NET、Delphi、ASP、PB源码下载
//包括:程序源码,控件,商业源码,系统方案,开发工具,书籍教程,技术文档

⌨️ 快捷键说明

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