![数据库原理课程设计-学分管理系统.doc_第1页](http://file.renrendoc.com/FileRoot1/2019-7/18/db6775b1-a698-4963-94e7-ffbcaa51ccd8/db6775b1-a698-4963-94e7-ffbcaa51ccd81.gif)
![数据库原理课程设计-学分管理系统.doc_第2页](http://file.renrendoc.com/FileRoot1/2019-7/18/db6775b1-a698-4963-94e7-ffbcaa51ccd8/db6775b1-a698-4963-94e7-ffbcaa51ccd82.gif)
![数据库原理课程设计-学分管理系统.doc_第3页](http://file.renrendoc.com/FileRoot1/2019-7/18/db6775b1-a698-4963-94e7-ffbcaa51ccd8/db6775b1-a698-4963-94e7-ffbcaa51ccd83.gif)
![数据库原理课程设计-学分管理系统.doc_第4页](http://file.renrendoc.com/FileRoot1/2019-7/18/db6775b1-a698-4963-94e7-ffbcaa51ccd8/db6775b1-a698-4963-94e7-ffbcaa51ccd84.gif)
![数据库原理课程设计-学分管理系统.doc_第5页](http://file.renrendoc.com/FileRoot1/2019-7/18/db6775b1-a698-4963-94e7-ffbcaa51ccd8/db6775b1-a698-4963-94e7-ffbcaa51ccd85.gif)
已阅读5页,还剩19页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
目录1题目要求32程序截图43程序代码104课程设计心得26题目要求:设计一个学分管理系统。假设每位学生必须完成基础课50学分,专业课50学分,选修课24学分,人文类课程8学分和实验性课程20学分才能毕业。实现下列功能:1 录入某位学生的学分信息2 给定学号,显示某位学生的学分完成情况;3 给定班号,显示该班所有学生的学分完成情况;4 给定学号,修改该学生的学分信息;5 按照某类课程的学分高低进行排序;给定学号,对该学生能否毕业进行确定。登陆界面如下:主界面如下:进行插入操作:按班号显示操作:查询结果界面如下:进行按学号进行查询的界面:查询结果如下:排序界面:查询学生是否能够毕业:删除操作:代码如下:module1:public cn as new adodb.connectionpublic rs as new adodb.recordsetform1:public rs as adodb.recordsetsub disp() set datagrid1.datasource = rsfor i = 0 to rs.fields.count - 1 text1(i).text = rs.fields(i).valuenextend subsub renew() rs.close cn.close set rs = new adodb.recordset set datagrid1.datasource = rs cn.open dsn=123;uid=sa;pwd= rs.open select * from credit, cn, adopenstatic, adlockoptimistic dispend subprivate sub frame1_dragdrop(source as control, x as single, y as single)end subprivate sub command1_click()for i = 0 to 7 text1(i).text = next text1(0).setfocustext1(1).enabled = truetext1(2).enabled = truecommand11.enabled = trueend subprivate sub command10_click()rs.movepreviousif rs.bof then msg = msgbox(已达到第一条, 48 + 0, 提示)rs.movefirst end ifdisp end subprivate sub command11_click()text1(1).enabled = truetext1(2).enabled = trueinsert_str = insert into credit values( & text1(0).text & , & text1(1).text & , & text1(2).text & , & text1(3).text & , & text1(4).text & , & text1(5).text & , & text1(6).text & , & text1(7).text & )if text1(0).text rs.fields(0) thencn.execute (insert_str) msgbox 插入成功elsemsgbox 重复输入数据end ifdisprenewend subprivate sub command12_click()renewend subprivate sub command13_click()update_str = update credit set basic= & text1(3).text & ,major= & text1(4).text & ,soption= & text1(5).text & ,speople= & text1(6).text & ,sexperiment= & text1(7).text & where sno= & text1(0).text & if text1(0).text rs.fields(0) thencn.execute (update_str)elsemsgbox 无此内容end ifrenewend subprivate sub command14_click()sno1 = inputbox(请输入要删除学生的学号:, 查询, 200, 100)delete_str = delete from credit where sno= & sno1if sno1 thenif rs.recordcount = 0 thenmsgbox 输入学号不正确elsecn.execute (delete_str)disprenewend ifelsemsgbox errorend ifend subprivate sub command15_click()frmlogin.showend subprivate sub command2_click()form2.showend subprivate sub command3_click()form3.showend subprivate sub command4_click()text1(0).setfocusfor i = 0 to 7 text1(i).text = nexttext1(1).enabled = falsetext1(2).enabled = falsedispend subprivate sub command5_click()form4.showend subprivate sub command6_click()dim a(4) as integersno1 = inputbox(请输入学生的学号:, 查询, 200, 100)set rs = new adodb.recordsetrs.open select * from credit where sno= & sno1 & , cn, adopenstatic, adlockoptimisticif rs.recordcount = 0 thenmsgbox 输入学号不正确elsei = 0for j = 3 to rs.fields.count - 1 a(i) = val(rs.fields(j).value) i = i + 1nextif a(0) = 50 and a(1) = 50 and a(2) = 24 and a(3) = 8 and a(4) = 20 then msgbox 该学生已修满学分,可以毕业else msgbox 该学生由于未修满学分,不能毕业end ifend ifend subprivate sub command7_click()rs.movefirstdispend subprivate sub command8_click()rs.movelastdispend subprivate sub command9_click()rs.movenextif rs.eof then msg = msgbox(已达到最后一条, 48 + 0, 提示) rs.movelastend ifdispend subprivate sub form_load()set rs = new adodb.recordsetset cn = new adodb.connectioncn.open dsn=123;uid=sa;pwd=rs.open select * from credit, cn, adopenstatic, adlockoptimisticdispcommand11.enabled = falseform1.visible = falseend subform2:private sub command1_click()form1.showform2.hideend subprivate sub form_load()classno = inputbox(请输入学生的班号, 查询, 200, 100) rs.close cn.closeset rs1 = new adodb.recordsetset cn = new adodb.connectionset rs = new adodb.recordsetcn.open dsn=123;uid=sa;pwd=rs.open select * from credit where sclass= & classno & , cn, adopenstatic, adlockoptimisticif rs.recordcount 0 thenset datagrid2.datasource = rselsemsgbox 无此记录!end ifend subform3:private sub command1_click()form1.showform3.hideend subprivate sub form_load()sno = inputbox(请输入学生的学号, 查询, 200, 100)set cn = new adodb.connectionset rs = new adodb.recordsetcn.open dsn=123;uid=sa;pwd=rs.open select * from credit where sno= & sno & , cn, adopenstatic, adlockoptimisticif rs.recordcount 0 thenset datagrid3.datasource = rselsemsgbox 无此记录!end ifend subform4:private sub command1_click()form1.showform4.hideend subprivate sub option1_click()subject = inputbox(请输入课程名:, 查询, 200, 100)set cn = new adodb.connectionset rs = new adodb.recordsetcn.open dsn=123;uid=sa;pwd=if subject = basic or subject = major or subject = soption or subject = speople or subject = sexperiment thenrs.open select * from credit order by & subject, cn, adopenstatic, adlockoptimisticset datagrid4.datasource = rselsemsg = msgbox(error, 48 + 0, 提示)end ifend subprivate sub option2_click()subject = inputbox(请输入课程名:, 查询, 200, 100)set cn = new adodb.connectionset rs = new adodb.recordsetcn.open dsn=123;uid=sa;pwd=if subject = basic or subject = major or subject = soption or subject = speople or subject = sexperiment thenrs.open select * from credit order by & subject & desc, cn, adopenstatic, adlockoptimisticset datagrid4.datasource = rselsemsg = msgbox(error, 48 + 0, 提示)end ifend subfrmlogin:dim rsuser as adodb.recordsetpublic cn1 as adodb.connectionpublic loginsucceeded as booleanprivate sub cmdcancel_click() 设置全局变量为 false 不提示失败的登录 loginsucceeded = false endend subprivate sub cmdok_click() dim query_str as stringset rsuser = new adodb.recordsetuser_str = select * from userinfo where userid= & txtusername & and password= & txtpassword & rsuser.open user_str, cn1, adopenstatic, adlockoptimistic if rsuser.recordcount 0 then if rsuser.fields(power) = admin then form1.enabled = true else form1.enabled = false end if loginsucceeded = true unload frmlogin
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 执业药师年终总结范文(10篇)
- 海南房地产买卖合同
- 店面终止协议书
- 教师本学期教学工作总结7篇
- 独家合作协议3
- 2022年江苏省徐州市贾汪英才中学高三物理上学期期末试卷含解析
- 工作计划销售主管7篇
- 四川省广安市华龙中学高三物理联考试题含解析
- 2022年湖南省邵阳市邓家铺镇中学高三物理联考试题含解析
- 小企业财务工作总结5篇
- GB/T 41624-2022中药材种子(种苗)三七
- YY/T 1805.3-2022组织工程医疗器械产品胶原蛋白第3部分:基于特征多肽测定的胶原蛋白含量检测液相色谱-质谱法
- YC/T 415-2011烟草在制品感官评价方法
- 《公司电子商务的应用问题研究6000字(论文)》
- GB/T 9877.1-1988旋转轴唇形密封圈结构尺寸系列第一部分:内包骨架旋转轴唇形密封圈
- GB/T 15029-1994剑麻白棕绳
- 市卫建系统医疗器械(耗材)部门集中采购管理办法
- 《大堰河》《再别康桥》对比阅读课件 统编版高中语文选择性必修下册
- 系统解剖学思考题答案
- DB37-T 5026-2022《居住建筑节能设计标准》
- 软件开发协议书合同范本(完整版)
评论
0/150
提交评论