vb课程设计题目设备管理系统.docx
- 文档编号:25556824
- 上传时间:2023-06-09
- 格式:DOCX
- 页数:15
- 大小:175.27KB
vb课程设计题目设备管理系统.docx
《vb课程设计题目设备管理系统.docx》由会员分享,可在线阅读,更多相关《vb课程设计题目设备管理系统.docx(15页珍藏版)》请在冰豆网上搜索。
vb课程设计题目设备管理系统
VB程序设计
课程设计
课程设计题目
设备管理系统
目录
一、课程设计的目的与要求
二、任务描述
对系统要实现的功能进行确切的描述。
三、设计
详细说明程序的设计思想,所用到的算法、数据结构技巧等
四、效果及存在问题
说明系统的运行效果(附上界面图形)、存在哪些不足以及预期的解决办法
五、总结
课程设计的目的与要求
1、教学目的
使学生在理论课程结束后,通过课程设计能进一步巩固对VB编程机制的理解,真正掌握运用VB进行软件开发的方法和原理,从而锻炼学生开发能力、程序调试的能力,及程序错误处理的能力。
2、教学要求
从课程设计的目的出发,通过课程设计的各个环节,达到以下教学要求
(1)进一步掌握VB语言程序设计的基本思想和方法;
(2)掌握面向对象的可视化程序设计的基本原理及应用;
任务描述
建立设备数据库表,存储设备的信息,包括设备的名称、数量、型号、规格等信息;能够实现对设备的查询、修改、添加等操作。
设计
1、设备管理系统的功能
1、查看设备:
用来实现对设备的浏览、删除
2、查询设备:
用来实现对设备的查询
3、添加设备:
用来实现对设备的添加
2、连接数据源
利用ADO控件将Access数据源连接到程序中
建立Access数据库
打开Access,建立名为“设备”的数据库。
在数据库中选择“使用设计器创建表”输入名称、型号、单价、数量、规格、购买日期。
保存命名为“设备管理”。
3、窗体
名称
标题
From1
登陆界面
From2
查看设备
From3
添加设备
From4
查找设备
(1)登陆界面
From1代码如下:
PrivateSubCommand1_Click()
Form2.Show
EndSub
(2)查看设备
Form2代码如下:
PrivateSubCommand1_Click()
Adodc1.Recordset.MovePrevious’数据移到上一条
IfAdodc1.Recordset.BOFThen
Adodc1.Recordset.MoveFirst
MsgBox"已经是第一条"
EndIf
EndSub
PrivateSubCommand2_Click()
Adodc1.Recordset.MoveNext’数据移到下一条
IfAdodc1.Recordset.EOFThen
Adodc1.Recordset.MoveLast
MsgBox"已经是最后一条"
EndIf
EndSub
PrivateSubCommand3_Click()
Form3.Show
EndSub
PrivateSubCommand4_Click()
Form4.Show
EndSub
PrivateSubCommand5_Click()
OnErrorResumeNext
IfMsgBox("确定删除该记录?
",vbOKCancel,"提示")=vbOKThen
Adodc1.Recordset.Delete’删除正显示的记录
Adodc1.Recordset.MoveNext’显示下一条数据
IfAdodc1.Recordset.EOFThen
Adodc1.Recordset.MoveLast
EndIf
EndIf
EndSub
PrivateSubCommand6_Click()
End
EndSub
PrivateSubCommand7_Click()
Adodc1.Recordset.MoveFirst’显示第一条数据
EndSub
PrivateSubCommand8_Click()
Adodc1.Recordset.MoveLast’显示最后一条数据
EndSub
(3)添加设备
Form3代码如下:
PrivateSubCommand1_Click()
Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.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.Fields(6)=Trim(Text6)’将文本框中的值赋值给数据库
Adodc1.Recordset.Update
Adodc1.Recordset.MoveLast
MsgBox"该设备已添加"
EndSub
PrivateSubCommand2_Click()
Text1.Text=""
Text2.Text=""
Text3.Text=""
Text4.Text=""
Text5.Text=""
Text6.Text=""
EndSub
PrivateSubCommand3_Click()
UnloadMe
Form2.Show
EndSub
Form4代码如下:
PrivateSubCommand1_Click()
DimcheckAsInteger
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
M=Trim(Text1)
WhileAdodc1.Recordset.EOF<>True
IfAdodc1.Recordset.Fields
(1)=MThen
Text2.Text=Adodc1.Recordset.Fields
(2)
Text3.Text=Adodc1.Recordset.Fields(3)
Text4.Text=Adodc1.Recordset.Fields(4)
Text5.Text=Adodc1.Recordset.Fields(5)
Text6.Text=Adodc1.Recordset.Fields(6)
check=check+1’用循环语句判断文本框中的
EndIf值是否等于数据库中相应
Adodc1.Recordset.MoveNext的值
Wend
Adodc1.Refresh
X=Trim(Text2)
WhileAdodc1.Recordset.EOF<>True
IfAdodc1.Recordset.Fields
(2)=XThen
Text1.Text=Adodc1.Recordset.Fields
(1)
Text3.Text=Adodc1.Recordset.Fields(3)
Text4.Text=Adodc1.Recordset.Fields(4)
Text5.Text=Adodc1.Recordset.Fields(5)
Text6.Text=Adodc1.Recordset.Fields(6)
check=check+1
EndIf
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
D=Val(Trim(Text3))
WhileAdodc1.Recordset.EOF<>True
IfAdodc1.Recordset.Fields(3)=DThen
Text1.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
EndIf
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
S=Val(Trim(Text4))
Adodc1.Recordset.MoveFirst
WhileAdodc1.Recordset.EOF<>True
IfAdodc1.Recordset.Fields(4)=SThen
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
EndIf
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
G=Trim(Text5)
WhileAdodc1.Recordset.EOF<>True
IfAdodc1.Recordset.Fields(5)=GThen
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.Text=Adodc1.Recordset.Fields(6)
check=check+1
EndIf
Adodc1.Recordset.MoveNext
Wend
Adodc1.Refresh
R=Trim(Text6)
WhileAdodc1.Recordset.EOF<>True
IfAdodc1.Recordset.Fields(6)=RThen
Text1.Text=Adodc1.Recordset.Fields
(1)
Text2.Text=Adodc1.Recordset.Fields
(2)
Text3.Text=Adodc1.Recordset.Fields(3)
Text4.Text=Adodc1.Recordset.Fields(4)
Text5.Text=Adodc1.Recordset.Fields(5)
check=check+1
EndIf
Adodc1.Recordset.MoveNext
Wend
Ifcheck=0Then
MsgBox("无此设备!
")
EndIf
Text1.Locked=True’显示查询结果后,文本框内容不可更改
Text2.Locked=True
Text3.Locked=True
Text4.Locked=True
Text5.Locked=True
Text6.Locked=True
EndSub
PrivateSubCommand2_Click()
Text1.Text=""
Text2.Text=""
Text3.Text=""
Text4.Text=""
Text5.Text=""
Text6.Text=""
Text1.Locked=False’按清除键后,文本框内容不可更改
Text2.Locked=False
Text3.Locked=False
Text4.Locked=False
Text5.Locked=False
Text6.Locked=False
EndSub
效果及存在问题
不能将添加的设备马上显示出来,功能较为简单,不够完善
总结
通过这次实验周的实践,我感受到了VB设计的趣味性,了解了VB的实用性。
虽然在实践时出现了许多问题,但通过老师和同学们的帮助,顺利的完成了课程设计,使我对VB有了进一步的认识,更渐渐喜欢上VB。
目录
第一章总论1
一、项目概况1
二、项目提出的理由与过程6
三、项目建设的必要性8
四、项目的可行性12
第二章市场预测15
一、市场分析15
二、市场预测16
三、产品市场竞争力分析19
第三章建设规模与产品方案22
一、建设规模22
二、产品方案22
三、质量标准22
第四章项目建设地点25
一、项目建设地点选择25
二、项目建设地条件25
第五章技术方案、设备方案和工程方案28
一、技术方案28
二、产品特点30
三、主要设备方案32
四、工程方案32
第六章原材料与原料供应35
一、原料来源及运输方式35
二、燃料供应与运输方式35
第七章总图布置、运输、总体布局与公用辅助工程37
一、总图布置37
二、运输38
三、总体布局38
四、公用辅助工程39
第八章节能、节水与安全措施44
一、主要依据及标准44
二、节能44
三、节水45
四、消防与安全45
第九章环境影响与评价47
一、法规依据47
二、项目建设对环境影响48
三、环境保护措施48
四、环境影响评价49
第十章项目组织管理与运行50
一、项目建设期管理50
二、项目运行期组织管理52
第十一章项目实施进度55
第十二章投资估算和资金筹措56
一、投资估算56
二、资金筹措58
第十三章财务评价与效益分析61
一、项目财务评价61
二、财务评价结论65
三、社会效益68
四、生态效益68
第十四章风险分析70
一、主要风险分析识别70
二、风险程度分析及防范风险的措施70
第十五章招标方案72
一、招标范围72
二、招标组织形式72
三、招标方式72
第十六章结论与建议74
一、可行性研究结论74
二、建议75
附件77
一、附表77
二、附件77
三、附图77
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- vb课程设计题目 设备管理系统 vb 课程设计 题目 设备管理 系统
![提示](https://static.bdocx.com/images/bang_tan.gif)