新版学生信息标准管理系统.doc
《新版学生信息标准管理系统.doc》由会员分享,可在线阅读,更多相关《新版学生信息标准管理系统.doc(16页珍藏版)》请在咨信网上搜索。
~Delphi学习记念 所有资源文献(可直接用Delphi打开编辑)下载地址: 效果图: 源码: 登录界面(从Access数据库读取对比顾客名与密码):UnitLogin.pas unit UnitLogin; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,StdCtrls,ExtCtrls,jpeg; type TFormLogin = class(TForm) Image1:TImage; Button1:TButton; Button2:TButton; ComboBox1:TComboBox; Edit1:TEdit; Label1:TLabel; Timer1:TTimer; lblMsg:TLabel; Label2:TLabel; shpBall2:TShape; shpBall1:TShape; procedure FormShow(Sender:TObject); procedure Button1Click(Sender:TObject); procedure Button2Click(Sender:TObject); procedure Timer1Timer(Sender:TObject); private { Private declarations } public { Public declarations } end; var FormLogin:TFormLogin; nowUser:String; nowPower:integer; implementation {$R *.dfm} uses UnitDataModule,UnitConsole; var isStop:boolean; procedure TFormLogin.FormShow(Sender:TObject); begin dataModule1.adoTable1.Open; while dataModule1.adoTable1.EOF <> true do begin comboBox1.Items.Append(dataModule1.adoTable1.FieldValues['user']); dataModule1.adotable1.Next; end; dataModule1.adoTable1.Close; isStop := false; lblMsg.Visible := false; end; procedure TFormLogin.Button1Click(Sender:TObject); var user1,pwd1 :string; begin user1 := comboBox1.Text; pwd1 := edit1.Text; dataModule1.adoTable1.Open; dataModule1.adoTable1.First; while not dataModule1.adoTable1.EOF do begin if (user1 = DataModule1.adoTable1.FieldValues['user']) and ( pwd1 = DataModule1.adoTable1.FieldValues['pwd']) then begin nowUser := user1; dataModule1.ADOQuery1.Close; dataModule1.ADOQuery1.SQL.Clear; dataModule1.ADOQuery1.SQL.Add('select power from Account where user='''+nowUser+''''); dataModule1.ADOQuery1.Open; nowPower := dataModule1.ADOQuery1.Fields[0].AsInteger; formConsole.Show; Exit; end; DataModule1.adoTable1.Next; end; ShowMessage('登录失败,请重试!'); edit1.Text := ''; comboBox1.SetFocus; DataModule1.adoTable1.Close; end; procedure TFormLogin.Button2Click(Sender:TObject); begin Application.Terminate; end; procedure TFormLogin.Timer1Timer(Sender:TObject); begin if (not isStop) then begin shpBall1.Left := shpBall1.Left-10; shpBall2.Left := shpBall2.Left+10; if (shpBall1.Left <= 100) then isStop := true; end else lblMsg.Visible := true; end; end. 预览界面:UnitConsole.pas unit UnitConsole; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,Menus,Grids,DBGrids,StdCtrls,ExtCtrls,jpeg; type TFormConsole = class(TForm) MainMenu1:TMainMenu; view1:TMenuItem; User:TMenuItem; quit1:TMenuItem; DBGrid1:TDBGrid; DBGrid2:TDBGrid; Add:TMenuItem; help:TMenuItem; userMang:TMenuItem; time1:TTimer; Image1:TImage; lblSec:TLabel; lblNote:TLabel; lblMin:TLabel; lblHour:TLabel; Label2:TLabel; Label1:TLabel; editSec:TEdit; editMin:TEdit; editHour:TEdit; procedure view1Click(Sender:TObject); procedure quit1Click(Sender:TObject); procedure AddUserClick(Sender:TObject); procedure userMangClick(Sender:TObject); procedure AddClick(Sender:TObject); procedure helpClick(Sender:TObject); procedure FormShow(Sender:TObject); procedure FormCreate(Sender:TObject); procedure time1Timer(Sender:TObject); private { Private declarations } public { Public declarations } end; var FormConsole:TFormConsole; implementation {$R *.dfm} uses UnitView,UnitAdd,UnitDataModule,UnitUserMang,UnitLogin; var hour,min,sec,msec :word; procedure TFormConsole.view1Click(Sender:TObject); begin formView.ShowModal; end; procedure TFormConsole.quit1Click(Sender:TObject); begin Application.Terminate; end; procedure TFormConsole.AddUserClick(Sender:TObject); begin formAdd.ShowModal; end; procedure TFormConsole.userMangClick(Sender:TObject); begin formUserMang.ShowModal; end; procedure TFormConsole.AddClick(Sender:TObject); begin if (nowPower = 1) then formAdd.ShowModal else ShowMessage('您没有权限添加新顾客,请联系管理员!'); end; procedure TFormConsole.helpClick(Sender:TObject); begin ShowMessage('Delphi学生信息管理系统1.0,纪念于.5.20.'); end; procedure TFormConsole.FormShow(Sender:TObject); begin with dataModule1.ADOQuery1 do begin Close; SQL.Text := 'select * from Student'; Open; end; end; procedure TFormConsole.FormCreate(Sender:TObject); begin DecodeTime(Now,hour,min,sec,msec); editHour.Text := IntToStr(hour); editMin.Text := IntToStr(min); editSec.Text := IntToStr(sec); end; procedure TFormConsole.time1Timer(Sender:TObject); begin sec := sec+1; if (sec = 60) then begin min := min+1; sec := 0; end; if (min = 60) then begin hour := hour+1; min := 0; end; if (hour = 24) then begin hour := 0; end; editHour.Text := IntToStr(hour); editMin.Text := IntToStr(min); editSec.Text := IntToStr(sec); end; end. 添加顾客界面:UnitAdd.pas unit UnitAdd; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,StdCtrls,jpeg,ExtCtrls; type TFormAdd = class(TForm) Image1:TImage; lblUser:TLabel; lblPwd2:TLabel; lblPower:TLabel; jlblPwd1:TLabel; editUser:TEdit; editPwd2:TEdit; editPwd1:TEdit; ComboBox1:TComboBox; btnQuit:TButton; btnOk:TButton; procedure btnQuitClick(Sender:TObject); procedure btnOkClick(Sender:TObject); private { Private declarations } public { Public declarations } end; var FormAdd:TFormAdd; implementation {$R *.dfm} uses UnitDataModule; procedure TFormAdd.btnQuitClick(Sender:TObject); begin Close; end; procedure TFormAdd.btnOkClick(Sender:TObject); var user1,pwd1,pwd2,power :String; begin user1 := editUser.Text; pwd1 := editPwd1.Text;pwd2 := editPwd2.Text; power := IntToStr(comboBox1.ItemIndex+1); if dataModule1.ADOTable1.FieldValues['user'] = user1 then begin ShowMessage('顾客已存在!'); editUser.Clear; editUser.SetFocus; end else begin if (user1 <> '') and (pwd1 <> '') and (pwd1 = pwd2) then begin with DataModule1.ADOTable1 do begin Open; Append; FieldByName('user').AsString := user1; FieldByName('pwd').AsString := pwd2; FieldByName('power').AsString := power; Post; end; ShowMessage('添加成功!'); DataModule1.ADOTable1.Close; end else begin ShowMessage('顾客名或密码为空或密码不一致,请重新输入!'); editUser.Clear;editPwd1.Clear;editPwd2.Clear; editUser.SetFocus; end; end; end; end. 数据链接模块:UnitDataModule.pas unit UnitDataModule; interface uses SysUtils,Classes,DB,ADODB; type TDataModule1 = class(TDataModule) ADOConnection1:TADOConnection; ADOTable1:TADOTable; DataSource1:TDataSource; ADOQuery1:TADOQuery; ADOQuery2:TADOQuery; DataSource2:TDataSource; ADOQuery2user:TWideStringField; ADOQuery2pwd:TWideStringField; ADOQuery2power:TIntegerField; procedure ADOQuery2pwdGetText(Sender:TField;var Text:String; DisplayText:Boolean); private { Private declarations } public { Public declarations } end; var DataModule1:TDataModule1; implementation {$R *.dfm} uses UnitUserMang; procedure TDataModule1.ADOQuery2pwdGetText(Sender:TField; var Text:String;DisplayText:Boolean); begin Text := '******'; end; end. 顾客管理界面(可修改、添加星号密码,顾客管理有登录顾客权限区别):UnitUserMang.pas unit UnitUserMang; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,ExtCtrls,DBCtrls,Grids,DBGrids,StdCtrls,jpeg; type TformUserMang = class(TForm) Image1:TImage; DBNavigator1:TDBNavigator; editPower:TEdit; editUser:TEdit; lblPower:TLabel; lblUser:TLabel; btnUserQuery1:TButton; DBGrid1:TDBGrid; procedure btnUserQuery1Click(Sender:TObject); procedure FormShow(Sender:TObject); private { Private declarations } public { Public declarations } end; var formUserMang:TformUserMang; user1,power1,strSql2 :String; implementation {$R *.dfm} uses UnitDataModule,UnitLogin,UnitView; procedure TformUserMang.btnUserQuery1Click(Sender:TObject); begin user1 := '%'+Trim(editUser.Text)+'%'; power1 := '%'+Trim(editPower.Text)+'%'; with dataModule1.ADOQuery2 do begin Close; SQL.Clear; strSql2 := 'select * from Account where '; strSql2 :=strSql2+'user like '''+user1+''' and power like '''+power1+''''; SQL.Add(strSql2); Open; end; end; procedure TformUserMang.FormShow(Sender:TObject); begin if (nowPower <> 1) then begin formUserMang.DBGrid1.ReadOnly := true; formUserMang.DBNavigator1.VisibleButtons := formView.DBNavigator1.VisibleButtons-[nbInsert,nbDelete]; end; end; end. 学生信息查询界面(涉及普通模糊查询、范畴查询、实时动态查询以及自定义语句查询):UnitView.pas unit UnitView; interface uses Windows,Messages,SysUtils,Variants,Classes,Graphics,Controls,Forms, Dialogs,DB,ADODB,ExtCtrls,DBCtrls,Grids,DBGrids,StdCtrls,Buttons, jpeg; type TFormView = class(TForm) DBGrid1:TDBGrid; DBNavigator1:TDBNavigator; btnQuery:TBitBtn; Image1:TImage; RadioGroup1:TRadioGroup; RadioButton1:TRadioButton; Label9:TLabel; Label8:TLabel; Label7:TLabel; Label6:TLabel; Label5:TLabel; Label4:TLabel; Label2:TLabel; Label11:TLabel; Label10:TLabel; Label1:TLabel; editSid3:TEdit; editSid2:TEdit; editSid:TEdit; editRange:TEdit; editName:TEdit; editHome:TEdit; editDIY2:TEdit; editDIY1:TEdit; editAge3:TEdit; editAge2:TEdit; editAge:TEdit; Label3:TLabel; editSex:TEdit; procedure btnQueryClick(Sender:TObject); procedure FormShow(Sender:TObject); procedure RadioButton1Click(Sender:TObject); procedure RadioGroup1Click(Sender:TObject); procedure editSidChange(Sender:TObject); procedure editSexChange(Sender:TObject); private { Private declarations } public { Public declarations } end; var FormView:TFormView; sid1,name1,sex1,age1,home1,range1,strSql :String; sid2,sid3,age2,age3,diy1,diy2 :String; implementation {$R *.dfm} uses UnitDataModule,UnitUserMang,UnitLogin; procedure TFormView.btnQueryClick(Sender:TObject); begin DataModule1.ADOQuery1.Close; DataModule1.ADOQuery1.SQL.Clear; case radioGroup1.ItemIndex of 0:begin sid1 := '%'+Trim(editSid.Text)+'%';name1 := '%'+Trim(editName.Text)+'%'; age1 := '%'+Trim(editAge.Text)+'%'; home1 := '%'+Trim(editHome.Text)+'%';range1 := '%'+Trim(editRange.Text)+'%'; sex1 := '%'+Trim(editSex.Text)+'%'; with DataModule1.ADOQuery1 do begin strSql := 'select * from Student where '; strSql := strSql+'sid like '''+sid1+''' and name like '''+name1+''' and sex like '''+sex1+''''; strSql := strSql+' and age like '''+age1+''' and home like '''+home1+''' and range like '''+range1+''''; SQL.Add(strSql); Open; end; end; 1:begin sid2 := Trim(editSid2.Text);sid3 := Trim(editSid3.Text); age2 := Trim(editAge2.Text);age3 := Trim(editAge3.Text); if (sid2 = '') then sid2 := ' sid like ''%''' else sid2 := ' sid>='+sid2; if (sid3 = '') then sid3 := '' else sid3 := ' and sid<='+sid3; if (age2 = '') then age2 := '' else age2 := ' and age>='+age2; if (age3 = '') then age3 := '' else age3 := ' and age<='+age3; strSql := 'select * from Student where'+sid2+sid3+age2+age3; with DataModule1.ADOQuery1 do begin SQL.Add(strSql); Open; end; end; else begin diy1 := Trim(editDIY1.Text);diy2 := Trim(editDIY2.Text); if (diy1 = '') and (diy2 = '') then begin diy1 := 'select * ';diy2 := '';end; with DataModule1.ADOQuery1 do begin SQL.Add(diy1+' from Student '+diy2); Open; end; end; end; end; procedure TFormView.FormShow(Sender:TObject); begin radioGroup1.ItemIndex := 0; if (nowPower = 3) then begin formView.DBGrid1.ReadOnly := true; editDIY1.Text := 'select * '; editDIY1.Enabled := false;editDIY2.Enabled := false; formView.DBNavigator1.VisibleButtons := formView.DBNavigator1.VisibleButtons-[nbInsert,nbDelete]; end; end; procedure TFormView.RadioButton1Click(Sender:TObject); begin btnQuery.Enabled := false; end; procedure TFormView.RadioGroup1Click(Sender:TObject); begin if radioGroup1.ItemIndex = 2 then begin radioButton1.Checked := false; btnQuery.Enabled := true; end; end; procedure TFormView.editSidChange(Sender:TObject); begin if (radioButton1.Checked = true) then btnQueryClick(Sender); end; procedure TFormView.editSexChange(Sender:TObject); begin if (radioButton1.Checked = true) then btnQueryClick(Sender); end; end.- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 新版 学生 信息 标准 管理 系统
咨信网温馨提示:
1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【a199****6536】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时私信或留言给本站上传会员【a199****6536】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。
1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【a199****6536】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时私信或留言给本站上传会员【a199****6536】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。
关于本文