ImageVerifierCode 换一换
格式:DOCX , 页数:14 ,大小:155.34KB ,
资源ID:12917075      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/12917075.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(数据库原理与设计大作业源代码.docx)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

数据库原理与设计大作业源代码.docx

1、数据库原理与设计大作业源代码数据库原理与设计大作业源代码(1) 用户登录界面运行超市管理信息系统后,首先进入用户登录界面,用户输入用户名和密码后,系统进行验证,验证通过进入程序的主界面。在进行系统登录过程中,登录模块将调用数据库里的用户信息表,并对用户名和密码进行验证,只有输入了正确的账号和密码后,系统登录才会成功。在登录模块中,对系统的尝试登录次数进行了限制,禁止用户无终止的进行系统登录尝试,在本系统中,当用户对系统的三次登录失败后,系统将自动机制登录,突出登录模块。并在输入了错误的或者是不存在的账户和密码时,系统会给出出错信息提示,指明登录过程中的错误输入或者错误操作,以便用户进行正确的登

2、录。登录界面如图5-2所示。 图5-2 登录界面主要实现代码如下:/登录 private void radBtnOk_Click(object sender, EventArgs e) try if (radTxtBoxUser.Text.Trim() = ) this.radLbInfo.Text = 请输入您的用户名!; else if (radTxtBoxPsw.Text.Trim() = ) this.radLbInfo.Text = 请输入您的密码!; else commandUnit com = new commandUnit(); string str = select * fr

3、om UserInfo where loginNo = + radTxtBoxUser.Text.ToString() + ; DataTable table = com.GetDataSet(str); if (table.Rows.Count 0) _currentUser = radTxtBoxUser.Text; _currentPsw = radTxtBoxPsw.Text; IsLogin = true; this.Close(); else this.radLbInfo.Text = 密码错误!; radTxtBoxPsw.Text = ; catch (System.Excep

4、tion ex) throw ex; (2) 主界面系统登录成功后,进入主界面菜单。主界面如图5-3所示。图5-3 主界面(3) 修改密码界面成功登录系统后,单击“用户信息管理”菜单的“修改密码”,可以进入“修改密码”界面,进行密码的修改。修改密码界面如图5-4所示。图5-4 修改密码界面主要实现代码如下:/修改密码protected virtual void radBtnOk_Click(object sender, EventArgs e) if (radTxtBoxOldPsw.Text = null | radTxtBoxOldPsw.Text.Trim() = ) MessageBo

5、x.Show(请输入旧密码!。, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); return; if (radTxtBoxNewPsw.Text = null | radTxtBoxNewPsw.Text.Trim() = | radTxtBoxEnterPsw.Text = null | radTxtBoxEnterPsw.Text.Trim() = ) MessageBox.Show(请输入新密码!。, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); return;

6、 string currPwd = RFrmLogin.CurrentPsw; if (currPwd = radTxtBoxOldPsw.Text.Trim() if (isSame() commandUnit com = new commandUnit(); string str = update UserInfo set passWord = + radTxtBoxEnterPsw.Text.ToString() + where loginNo = + RFrmLogin.CurrentUser + ; if (com.ExecuteCommand(str) 0) MessageBox.

7、Show(密码修改成功!。, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show(密码修改失败,请联系管理员!。, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show(两次密码输入不一致!, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show(输入密码错误!, 提醒, MessageBoxButto

8、ns.OK, MessageBoxIcon.Information); (4) 修改密码界面管理员成功登录系统后,单击“用户信息管理”菜单的“修改权限”,可以进入“修改权限”界面,进行员工权限的修改。修改权限界面如图5-5所示。 图5-5 修改权限界面主要实现代码如下:/修改权限protected override void radBtnOk_Click(object sender, EventArgs e) if (radTxtBoxOldPsw.Text = null | radTxtBoxOldPsw.Text.Trim() = ) MessageBox.Show(请输入用户名!。, 提

9、醒, MessageBoxButtons.OK, MessageBoxIcon.Information); return; if (radComBoxPower.Text = null | radComBoxPower.Text.Trim() = ) MessageBox.Show(请为用户设置权限!。, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); return; commandUnit com = new commandUnit(); string str = update UserInfo set power = + rad

10、ComBoxPower.SelectedValue.ToString() + where loginNo = + radTxtBoxOldPsw.Text.ToString() + ; if (com.ExecuteCommand(str) 0) MessageBox.Show(权限修改成功!。, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show(权限修改失败,请联系管理员!。, 提醒, MessageBoxButtons.OK, MessageBoxIcon.Information); (5

11、) 编辑员工信息界面管理员成功登录系统后,单击“基本信息管理”菜单的“员工信息”,可以进入“查看员工信息”界面和“编辑员工信息”界面,“查看员工信息”界面只能查看员工信息,“编辑员工信息”界面进行员工信息的修改、添加、删除等功能。编辑员工信息界面如图5-6所示。图5-6 编辑员工信息界面主要实现代码如下:/保存 protected virtual void tSBtnSave_Click(object sender, EventArgs e) try if (IsVilude() bool isSuccess = false; commandUnit com = new commandUnit

12、(); EmployeeModel emp; for (int j = 0; j radWithGV.RowCount; j+) emp = new EmployeeModel(); #region 同步数据 if (radWithGV.Rowsj.Tag != null) emp = radWithGV.Rowsj.Tag as EmployeeModel; else emp.EmployeeNo = radWithGV.Rowsj.CellsemployeeNo.Value.ToString(); emp.Name = radWithGV.Rowsj.Cellsname.Value.ToS

13、tring(); emp.Sex = radWithGV.Rowsj.Cellssex.Value.ToString(); emp.IdCard = radWithGV.Rowsj.CellsidCard.Value.ToString(); emp.Duty = radWithGV.Rowsj.Cellsduty.Value.ToString(); emp.Note = radWithGV.Rowsj.Cellsnote.Value.ToString(); emp.IsNew = true; #endregion if (emp.IsNew) string str = select * fro

14、m EmployeeInfo where employeeNo = + emp.EmployeeNo + ; DataTable dtable = com.GetDataSet(str); if (dtable.Rows.Count 0) _isSaved = true; isSuccess = true; emp.IsNew = false; radWithGV.Rowsj.Tag = emp; else MessageBox.Show(该员工已存在,请审核信息!); else if (emp.IsModified) string strSql = update EmployeeInfo s

15、et name = + emp.Name + ,sex = + emp.Sex + ,idCard = + emp.IdCard + ,duty = + emp.Duty + ,note = + emp.Note + where employeeNo = + emp.EmployeeNo + ; if (com.ExecuteCommand(strSql) 0) _isSaved = true; isSuccess = true; emp.IsModified = false; radWithGV.Rowsj.Tag = emp; else continue; if (isSuccess) M

16、essageBox.Show(保存成功!); else MessageBox.Show(数据非法!); catch (System.Exception ex) throw ex; (6) 职务信息界面管理员成功登录系统后,单击“基本信息管理”菜单的“职务信息”,可以进入“职务信息”界面 ,“职务信息”界面进行职务信息的修改、添加、删除等功能。职务信息界面如图5-7所示。图5-7 职务信息界面主要实现代码如下: protected override void tSBtnDelete_Click(object sender, EventArgs e) DutyModel employee = th

17、is.radWithGV.CurrentRow.Tag as DutyModel; if (employee != null) if (!employee.IsNew) commandUnit com = new commandUnit(); string numRow = radWithGV.CurrentRow.CellsdutyId.Value.ToString(); string str = delete from dutyInfo where dutyId = + numRow + ; if (com.ExecuteCommand(str) 0) this.radWithGV.Rows.Remove(radWithGV.CurrentRow as GridViewDataRowInfo); IsSaved = true; else this.radWithGV.Rows.Remove(radWithGV.CurrentRow as GridViewDataRowInfo);

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1