收藏 分销(赏)

vb课程设计题目--设备管理系统.doc

上传人:精*** 文档编号:2522913 上传时间:2024-05-31 格式:DOC 页数:13 大小:230.50KB
下载 相关 举报
vb课程设计题目--设备管理系统.doc_第1页
第1页 / 共13页
vb课程设计题目--设备管理系统.doc_第2页
第2页 / 共13页
vb课程设计题目--设备管理系统.doc_第3页
第3页 / 共13页
vb课程设计题目--设备管理系统.doc_第4页
第4页 / 共13页
vb课程设计题目--设备管理系统.doc_第5页
第5页 / 共13页
点击查看更多>>
资源描述

1、VB程序设计课程设计课程设计题目设备管理系统 目 录一、课程设计的目的与要求二、任务描述对系统要实现的功能进行确切的描述。 三、设计 详细说明程序的设计思想,所用到的算法、数据结构技巧等四、效果及存在问题说明系统的运行效果(附上界面图形)、存在哪些不足以及预期的解决办法五、总结 课程设计的目的与要求1、教学目的使学生在理论课程结束后,通过课程设计能进一步巩固对VB编程机制的理解,真正掌握运用VB进行软件开发的方法和原理,从而锻炼学生开发能力、程序调试的能力,及程序错误处理的能力。 2、教学要求从课程设计的目的出发,通过课程设计的各个环节,达到以下教学要求(1)进一步掌握VB语言程序设计的基本思

2、想和方法;(2)掌握面向对象的可视化程序设计的基本原理及应用; 任务描述建立设备数据库表,存储设备的信息,包括设备的名称、数量、型号、规格等信息;能够实现对设备的查询、修改、添加等操作。设计1、设备管理系统的功能 1、查看设备:用来实现对设备的浏览、删除2、查询设备:用来实现对设备的查询3、添加设备:用来实现对设备的添加2、连接数据源 利用ADO控件将Access数据源连接到程序中建立Access数据库打开Access,建立名为“设备”的数据库。在数据库中选择“使用设计器创建表”输入名称、型号、单价、数量、规格、购买日期。保存命名为“设备管理”。3、窗体名称标题From1登陆界面From2查看

3、设备From3添加设备From4查找设备(1)登陆界面From1 代码如下:Private Sub Command1_Click()Form2.ShowEnd Sub(2)查看设备 Form2 代码如下:Private Sub Command1_Click()Adodc1.Recordset.MovePrevious 数据移到上一条If Adodc1.Recordset.BOF ThenAdodc1.Recordset.MoveFirstMsgBox 已经是第一条End IfEnd SubPrivate Sub Command2_Click()Adodc1.Recordset.MoveNext

4、 数据移到下一条If Adodc1.Recordset.EOF ThenAdodc1.Recordset.MoveLastMsgBox 已经是最后一条End IfEnd SubPrivate Sub Command3_Click()Form3.ShowEnd SubPrivate Sub Command4_Click()Form4.ShowEnd SubPrivate Sub Command5_Click()On Error Resume Next If MsgBox(确定删除该记录?, vbOKCancel, 提示) = vbOK Then Adodc1.Recordset.Delete 删

5、除正显示的记录 Adodc1.Recordset.MoveNext 显示下一条数据 If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast End If End IfEnd SubPrivate Sub Command6_Click()EndEnd SubPrivate Sub Command7_Click()Adodc1.Recordset.MoveFirst 显示第一条数据End SubPrivate Sub Command8_Click()Adodc1.Recordset.MoveLast 显示最后一条数据End Sub (3)添加设

6、备 Form3 代码如下:Private Sub Command1_Click()Adodc1.RefreshAdodc1.Recordset.AddNewAdodc1.Recordset.Fields(1) = Trim(Text1)Adodc1.Recordset.Fields(2) = Trim(Text2)Adodc1.Recordset.Fields(3) = Trim(Text3)Adodc1.Recordset.Fields(4) = Trim(Text4)Adodc1.Recordset.Fields(5) = Trim(Text5)Adodc1.Recordset.Field

7、s(6) = Trim(Text6) 将文本框中的值赋值给数据库Adodc1.Recordset.UpdateAdodc1.Recordset.MoveLastMsgBox 该设备已添加End Sub Private Sub Command2_Click()Text1.Text = Text2.Text = Text3.Text = Text4.Text = Text5.Text = Text6.Text = End SubPrivate Sub Command3_Click()Unload MeForm2.ShowEnd SubForm4 代码如下:Private Sub Command1_

8、Click()Dim check As IntegerAdodc1.RefreshAdodc1.Recordset.MoveFirstM = Trim(Text1)While Adodc1.Recordset.EOF True If Adodc1.Recordset.Fields(1) = M Then Text2.Text = Adodc1.Recordset.Fields(2) Text3.Text = Adodc1.Recordset.Fields(3) Text4.Text = Adodc1.Recordset.Fields(4) Text5.Text = Adodc1.Records

9、et.Fields(5) Text6.Text = Adodc1.Recordset.Fields(6) check = check + 1 用循环语句判断文本框中的 End If 值 是否等于数据库中相应 Adodc1.Recordset.MoveNext 的值 WendAdodc1.RefreshX = Trim(Text2)While Adodc1.Recordset.EOF True If Adodc1.Recordset.Fields(2) = X Then Text1.Text = Adodc1.Recordset.Fields(1) Text3.Text = Adodc1.Rec

10、ordset.Fields(3) Text4.Text = Adodc1.Recordset.Fields(4) Text5.Text = Adodc1.Recordset.Fields(5) Text6.Text = Adodc1.Recordset.Fields(6) check = check + 1 End If Adodc1.Recordset.MoveNextWendAdodc1.RefreshD = Val(Trim(Text3)While Adodc1.Recordset.EOF True If Adodc1.Recordset.Fields(3) = D Then Text1

11、.Text = Adodc1.Recordset.Fields(1) Text2.Text = Adodc1.Recordset.Fields(2) Text4.Text = Adodc1.Recordset.Fields(4) Text5.Text = Adodc1.Recordset.Fields(5) Text6.Text = Adodc1.Recordset.Fields(6) check = check + 1 End If Adodc1.Recordset.MoveNextWendAdodc1.RefreshS = Val(Trim(Text4)Adodc1.Recordset.M

12、oveFirstWhile Adodc1.Recordset.EOF True If Adodc1.Recordset.Fields(4) = S Then Text1.Text = Adodc1.Recordset.Fields(1) Text2.Text = Adodc1.Recordset.Fields(2) Text3.Text = Adodc1.Recordset.Fields(3) Text5.Text = Adodc1.Recordset.Fields(5) Text6.Text = Adodc1.Recordset.Fields(6) check = check + 1 End

13、 If Adodc1.Recordset.MoveNextWendAdodc1.RefreshG = Trim(Text5)While Adodc1.Recordset.EOF True If Adodc1.Recordset.Fields(5) = G Then Text1.Text = Adodc1.Recordset.Fields(1) Text2.Text = Adodc1.Recordset.Fields(2) Text3.Text = Adodc1.Recordset.Fields(3) Text4.Text = Adodc1.Recordset.Fields(4) Text6.T

14、ext = Adodc1.Recordset.Fields(6) check = check + 1 End If Adodc1.Recordset.MoveNextWendAdodc1.RefreshR = Trim(Text6)While Adodc1.Recordset.EOF True If Adodc1.Recordset.Fields(6) = R Then Text1.Text = Adodc1.Recordset.Fields(1) Text2.Text = Adodc1.Recordset.Fields(2) Text3.Text = Adodc1.Recordset.Fie

15、lds(3) Text4.Text = Adodc1.Recordset.Fields(4) Text5.Text = Adodc1.Recordset.Fields(5) check = check + 1 End If Adodc1.Recordset.MoveNextWendIf check = 0 Then MsgBox (无此设备!) End If Text1.Locked = True 显示查询结果后,文本框内容不可更改 Text2.Locked = True Text3.Locked = True Text4.Locked = True Text5.Locked = True T

16、ext6.Locked = TrueEnd SubPrivate Sub Command2_Click()Text1.Text = Text2.Text = Text3.Text = Text4.Text = Text5.Text = Text6.Text = Text1.Locked = False 按清除键后,文本框内容不可更改Text2.Locked = FalseText3.Locked = FalseText4.Locked = FalseText5.Locked = FalseText6.Locked = FalseEnd Sub效果及存在问题不能将添加的设备马上显示出来,功能较为

17、简单,不够完善总结通过这次实验周的实践,我感受到了VB设计的趣味性,了解了VB的实用性。 虽然在实践时出现了许多问题,但通过老师和同学们的帮助,顺利的完成了课程设计,使我对VB有了进一步的认识,更渐渐喜欢上VB。目 录第一章项目概要11.1 项目背景11.2 项目建设内容与工期21.3 投资估算和资金筹措31.3.1投资估算31.3.2 资金筹措方案31.4 效益分析41.4.1 经济效益41.4.2 社会效益51.4.3 生态效益5第二章 项目区概况62.1 自然概况62.2 社会经济状况8第三章 项目建设的必要性和可行性103.1 项目区农业发展的制约因素103.2项目建设的必要性103.

18、3 项目建设的可行性13第四章 水资源评价及水利工程设施144.1 项目区水资源概况144.2 水利工程措施14第五章 规划设计185.1 指导思想185.2 选项原则185.3 建设标准185.4 道路建设195.5 建设规模205.6 规划布局20第六章 开发任务与开发原则226.1 开发任务226.2 开发原则22第七章 投资估算与资金筹措247.1投资估算247.2 资金来源构成及筹措方案24第八章 综合效益分析268.1 经济效益268.2 社会效益268.3 生态效益26第九章 组织实施和运行管护289.1 组织机构设置289.2 项目实施管理299.3 运行管理和维护29第十章 环境影响与评价3110.1生态影响分析评价3110.2 环境质量影响分析评价31第十一章 可行性研究结论和建议3311.1 项目可行性研究的总体评价3311.2 主要污染物及治理措施3511.3 问题与建议36

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 学术论文 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服