数据库课程设计报告-学生档案管理系统_第1页
数据库课程设计报告-学生档案管理系统_第2页
数据库课程设计报告-学生档案管理系统_第3页
数据库课程设计报告-学生档案管理系统_第4页
数据库课程设计报告-学生档案管理系统_第5页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、学生档案管理系统课程设计报告学院:信息科学与工程学院专业班级:智能科学与技术1001班姓名: 学号:指导老师:目录一、 需求分析 2二、 概念结构设计 3系统功能模块示意及e-r图 3三、 数据库实施 4四、 系统程序实施 61.流程 62.代码展示 73.系统运行效果展示 24五、 课程设计心得 27一、 需求分析系统功能描述:1. 院系信息管理功能(1) 院系信息的录入,包括院系编号、院系名称、院系职能描述和上级院系等信息;(2) 院系信息的修改;(3) 院系信息的删除;(4) 院系信息的查询;2. 学生基本信息管理功能(1) 学生基本信息的录入,包括学生编号、姓名、性别、生日等信息(2)

2、 学生基本信息的修改;(3) 学生基本信息的删除;(4) 学生基本信息的查询。3. 学生奖惩管理功能(1) 学生奖惩信息的录入,包括奖惩日期、奖惩内容等信息;(2) 学生奖惩信息的修改;(3) 学生奖惩信息的删除;(4) 学生奖惩信息的查询。4. 学生成绩管理功能(1) 学生成绩信息的录入,包括课程编号、学生编号、分数等信息;(2) 学生成绩信息的修改;(3) 学生成绩信息的删除;(4) 学生成绩信息的查询。5. 系统用户管理功能(1) 系统用户信息的录入,包括用户名、密码等信息;(2) 系统用户信息的修改;(3) 系统用户信息的删除;(4) 系统用户信息的查询。二、 概念结构设计学生档案管理

3、系统院系信息管理学生信息管理学生奖惩管理学生学籍管理考试成绩管理系统用户管理学生基本信息管理学生照片信息管理学生受教育经历管理退学/休学管理转学/调班管理课程设置管理考试成绩管理针对各个模块不同的表实现添加、修改、删除,以及查询显示记录 学生管理系统管理系统功能模块示意图学号姓名性别出生日期政治面貌电话号码院系学生组成班级班级班级号专业组成学院学号课程名课程号成绩课程三、 数据库实施用户表:学生表:课程表:成绩表:奖惩表:院系表:四、 系统程序实施流程:登录进入主界面选择模块执行相应功能代码展示:dim chkstr as string 通用区声明,用于记录随机码private sub com

4、mand1_click()dim sql as stringdim cnt as integerdim rs as new adodb.recordsetdim conn as new adodb.connectioncnt = 0set conn = new adodb.connectionconn.open provider=sqloledb.1;integrated security=sspi;persist security info=false;user id=sa;initial catalog=studentsystemif trim(text1.text) = thenmsgb

5、ox 用户名不能为空,请重新输入!text1.setfocuselse: sql = select * from users where username= & trim(text1.text) & rs.open sql, conn, adopenkeyset, adlockpessimisticif rs.eof = true thenmsgbox 没有这个用户,请重输入!, vbokonly + vbexclamation, text1.text = text1.setfocuselse: username = text1.textif rs(pwd) = trim(text2.text

6、) and text3.text = chkstr thenunload meform2.showelse: msgbox 验证码或密码错误,请重新输入!, vbokonly + vbexclamation, text2.setfocustext2.text = text3.text = end ifend ifend ifcnt = cnt + 1if cnt = 3 thenunload meend ifend subprivate sub command2_click()unload meend subprivate sub command3_click()picture1.clspic

7、ture1.autoredraw = truepicture1.appearance = 0call rndbackcall initstrend subprivate sub rndback() 在图片后面随机生成小线条dim x1 as integer, y1 as integer, i as integer, r as integer, g as integer, b as integerdim pw as integer, ph as integerpw = picture1.widthph = picture1.heightfor i = 0 to 100 自己根据控件大小调整下线条

8、的数量randomizex1 = int(pw * rnd)y1 = int(ph * rnd)r = int(255 * rnd)g = int(255 * rnd)b = int(255 * rnd)picture1.forecolor = rgb(r, g, b)picture1.line (x1, y1)-(x1 + 81 * rnd, y1 + 81 * rnd)nextend subprivate function rndstr(tempstr as string) as string 生成一个随机字符dim seas(2) as integer 随机数种子dim sea as i

9、ntegerdim i as integer, ts as integerdim result as integer, tr as integerseas(0) = 48 0的ascii码seas(1) = 65 aseas(2) = 97 arndstr = randomizesea = seas(int(3 * rnd)result = 1tr = 1do while result and trts = sea + int(27 * rnd)result = (ts = 48 and ts = 65 and ts = 97 and ts = 122)tr = instr(tempstr,

10、chr(ts) 确定本次的随机数不会与已经生成的一样looprndstr = chr(ts)end functionprivate sub initstr() 生成验证码dim temp as stringchkstr = for i = 1 to 4 随机生成4位的验证码randomizepicture1.currentx = picture1.width / 3.5 + 300 * (i - 1) 在picturebox上显示的位置picture1.currenty = picture1.height / 10 + 50 * (i * rnd)picture1.forecolor = &h

11、ff00ffpicture1.font.size = 20 + int(11 * rnd) 字体的大小,初时大小请根据控件大小来设置temp = rndstr(chkstr)chkstr = chkstr + temppicture1.print tempnextend subprivate sub form_load()call rndbackcall initstrend subprivate sub command1_click()form5.showunload meend subprivate sub command2_click()form3.showunload meend su

12、bprivate sub command3_click()form4.showunload meend subprivate sub command4_click()form7.showunload meend subprivate sub command5_click()form6.showunload meend subprivate sub command6_click()endend subprivate sub command1_click()调用addnew方法增加记录adodc1.recordset.addnew在调用addnew以后,文本框控件处于添加模式end subpriv

13、ate sub command2_click() dim ans as integer 调用delete方法删除记录 在记录删除之前最好对用户有一个警告 ans = msgbox(确定删除吗?, vbyesno, 警告) if ans = vbyes then adodc1.recordset.delete end ifend subprivate sub command3_click()修改记录adodc1.recordset.updateend subprivate sub command4_click()if text1.text = thenmsgbox 请完善资料!, vbinfor

14、mation, 提示end ifif text2.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text3.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text4.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text5.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text6.text = thenmsgbox 请完善资料!, vbinformation, 提示

15、end ifif text7.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text8.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text9.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text10.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text11.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif

16、 text12.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text13.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text14.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text15.text = thenmsgbox 请完善资料!, vbinformation, 提示end if通过update方法保存数据adodc1.recordset.updateend subprivate sub command5_c

17、lick()通过cancelupdate方法取消数据操作adodc1.recordset.cancelupdateend subprivate sub command6_click()form2.showunload meend subprivate sub command7_click()dim sql as stringdim rs as new adodb.recordsetdim conn as new adodb.connectionset conn = new adodb.connectionconn.open provider=sqloledb.1;integrated secu

18、rity=sspi;persist security info=false;user id=sa;initial catalog=studentsystemsql = select * from students where student_id= & trim(text16.text) & rs.open sql, conn, 1, 1if rs.eof true thentext16.text = text1.text = rs(student_name)text2.text = rs(sex)text3.text = rs(nationality)text4.text = rs(birt

19、h)text5.text = rs(political_party)text6.text = rs(family_place)text7.text = rs(id_card)text8.text = rs(student_id)text9.text = rs(residence)text10.text = rs(home_photo)text11.text = rs(postcode)text12.text = rs(indate)text13.text = rs(title)text14.text = rs(memo)text15.text = rs(fillin_time)elsemsgb

20、ox 没有找到该学号,请确认, vbcritical, 错误end ifend subprivate sub text16_mousemove(button as integer, shift as integer, x as single, y as single)text16.text = end subprivate sub command1_click()dim sql as stringdim rs as new adodb.recordsetdim conn as new adodb.connectionset conn = new adodb.connectionconn.ope

21、n provider=sqloledb.1;integrated security=sspi;persist security info=false;user id=sa;initial catalog=studentsystemif trim(text1.text) = thenmsgbox 用户名不能为空,请重新输入!text1.setfocuselse: sql = select * from scores where lessonid= & trim(text1.text) & and student_id= & trim(text2.text) & rs.open sql, conn

22、, adopenkeyset, adlockpessimistictext3.text = rs(score)end ifend subprivate sub command2_click()form2.showunload meend subprivate sub form_load()text1.text = text2.text = text3.text = end subprivate sub command1_click()form2.showunload meend subprivate sub command1_click()调用addnew方法增加记录adodc1.record

23、set.addnew在调用addnew以后,文本框控件处于添加模式end subprivate sub command2_click() dim ans as integer 调用delete方法删除记录 在记录删除之前最好对用户有一个警告 ans = msgbox(确定删除吗?, vbyesno, 警告) if ans = vbyes then adodc1.recordset.delete end ifend subprivate sub command3_click()修改记录adodc1.recordset.updateend subprivate sub command4_click

24、()通过update方法保存数据adodc1.recordset.updateend subprivate sub command5_click()通过cancelupdate方法取消数据操作adodc1.recordset.cancelupdateend subprivate sub command6_click()form2.showunload meend subprivate sub form_load()text1.text = text2.text = end subprivate sub command2_click()adodc1.recordset.addnewend sub

25、private sub command3_click()dim ans as integer 调用delete方法删除记录 在记录删除之前最好对用户有一个警告 ans = msgbox(确定删除吗?, vbyesno, 警告) if ans = vbyes then adodc1.recordset.delete end ifend subprivate sub command4_click()if text1.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text2.text = thenmsgbox 请完善资料!, vbinform

26、ation, 提示end ifif text3.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text4.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifif text5.text = thenmsgbox 请完善资料!, vbinformation, 提示end ifadodc1.recordset.updateend subprivate sub command1_click()dim sql as stringdim rs as new adodb.recordsetdim conn as new adodb.connectionset conn = new adodb.connectionconn.open provider=sqloledb.1;integrated security=sspi;persist security info=false;user id=sa;initial c

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论