当前位置:文档之家› 车辆管理系统毕业设计(论文)

车辆管理系统毕业设计(论文)

毕业设计车辆管理系统摘要 (1)Abstract (2)第一章引言 (4)1.1 课题背景 (4)1.2 系统简介 (5)第二章系统的分析 (6)2.1 系统开发的目标和思想 (6)2.2 系统的可行性分析 (8)第三章系统的设计 (18)3.1 系统的功能结构设计 (18)3.2 系统的数据库设计3.3 界面设计与代码设计 (23) (24)结束语 (46)致谢 (47)参考文献…………………………………………………摘要车辆管理系统用计算机管理机动车辆的档案,运营管理以及驾驶员信息的一种计算机应用技术的创新,在计算机还未普及之前车辆管理都是由工作人员手工抄写的方式来操作的.现在一般的车辆管理都是采用计算机作为工具的实用的计算机智能化车辆管理程序来帮助工作人员进行更有效的机动车辆管理。

车辆管理系统是典型的信息管理系统(MIS),其开发主要包括后台数据库的建立和维护以及前端应用程序的开发两个方面。

对于前者要求建立起数据一致性和完整性强、数据安全性好的库。

而对于后者则要求应用程序功能完备,易使用等特点。

经过分析,我们使用 MICROSOFT公司的 VISUAL BASIC开发工具,利用其提供的各种面向对象的开发工具,尤其是数据窗口这一能方便而简洁操纵数据库的智能化对象,首先在短时间内建立系统应用原型,然后,对初始原型系统进行需求迭代,不断修正和改进,直到形成用户满意的可行系统。

关键字:评语管理,MIS,visual basic ,数据库AbstractVehicle Management System Computer used motor vehicles archives management, operation and management of a driver information computer applications innovation, Management has not yet popular in the computer before the vehicles are from the staff manual transcription to operate. Now the general management of the vehicles are used as a tool for computer computer intelligent vehicle management procedures to help staff moreeffective management of motor vehicles. Vehicle management system is a typical management information system (MIS), including its main development background to the establishment and maintenance of the database and front-end application development 2. The request for the establishment of strong data consistency and integrity, good for the security of the data. For the latter request applications functions, such as easy to use features.After analysis, we use Microsoft visual basic development tool companies, the use of its various object-oriented development tools, especially data that can be easily accessible and concise window manipulation database intelligent objects, the first prototype application system in a short time and then, computation of the initial prototype system needs to constantly revise and improve until the formation of a viable system of user satisfaction.keyword : comments management MIS,visual basic database第一章引言1.1课题背景车辆管理系统用计算机管理机动车辆的档案,运营管理以及驾驶员信息的一种计算机应用技术的创新,在计算机还未普及之前车辆管理都是由工作人员手工抄写的方式来操作的.现在一般的车辆管理都是采用计算机作为工具的实用的计算机智能化车辆管理程序来帮助工作人员进行更有效的机动车辆管理。

车辆管理系统是典型的信息管理系统(MIS),其开发主要包括后台数据库的建立和维护以及前端应用程序的开发两个方面。

对于前者要求建立起数据一致性和完整性强、数据安全性好的库。

而对于后者则要求应用程序功能完备,易使用等特点。

1.2系统简介本系统主要服务于车管所工作人员管理辖区机动车辆,以及驾驶员相关信息,本系统由以下几大功能模块构成.一:车辆档案管理(车辆档案建立,车辆档案查询,车辆档案删除,车辆档案变更查询等.)二:车辆运营管理(车辆运营表,车辆运营查询,清空车辆运营表)三:车辆管理(车辆维修管理,车辆报废管理等)四:驾驶员管理(驾驶员档案管理,驾驶员档案查询等)五:系统维护(系统备份,系统还原,系统检查)第二章系统的分析2.1系统开发的目标和思想本系统主要服务于机动车管理人员的日常工作.利用本系统可以方便的监控管理本区域的驾驶员信息.在此基础上力求软件界面人性化以及操作简单,程序具有健壮性等.2.2系统的可行性分析技术上:本系统采用visual basic 6.0与微软的access作为数据库,技术上开发难度一般.经济上:本系统服务于车辆管理人员,提高了车管工作者办事效率,节省了开支.所以具有经济上的可行性.社会上:本系统同时也方便了广大驾驶员.所以具有社会可行性.第三章系统的设计3.1 系统的功能结构设计3.2系统的数据库设计1.车辆报废表:2.车辆档案表:3.车辆事故表:4:车辆违规表:5:车辆维修表:6:车辆变更表:7:车辆运营表:8:驾驶员档案9:奖惩表:10:零件表:11:用户表:3.3 界面设计与代码设计1:登陆界面设计登陆界面代码设计:Private Sub Combo1_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenCommand1.SetFocusEnd IfEnd SubPrivate Sub Command1_Click()Set adors = adoCon.Execute("select * from 用户表where 用户姓名=ltrim('" & Text1 & "') and 密码=ltrim('" & Text2 & "') and 用户类型=ltrim('" & Combo1.Text & "')")If adors.EOF ThenMsgBox "您输入的信息有误,请重新输入!", , "系统提示"Text1 = ""Text2 = ""Text1.SetFocusi = i + 1If i = 3 ThenMsgBox "对不起,您已无权使用本系统!", , "系统提示"Unload MeEnd IfElseSelect Case adors!用户类型Case "管理员"Case "普通用户"MDIForm1.mnuyydelete.Enabled = FalseMDIForm1.mnusyscsh.Enabled = FalseMDIForm1.mnuglyset.Enabled = FalseEnd SelectMDIForm1.Showadors.CloseUnload MeEnd IfEnd SubPrivate Sub Command2_Click()Unload Me'adoRs.CloseEnd SubPrivate Sub Form_Load()Combo1.ListIndex = 0End SubPrivate Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 ThenText2.SetFocusEnd IfEnd SubPrivate Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 ThenCombo1.SetFocusEnd IfEnd Sub2车辆报废查询:代码分析:Private Sub ckcp_Click()If ckcp.Value Thencmcp.Enabled = True Elsecmcp.Enabled = False End IfEnd SubPrivate Sub cktime_Click() If cktime.Value ThendtStart.Enabled = TruedtEnd.Enabled = True ElsedtStart.Enabled = FalsedtEnd.Enabled = FalseEnd IfEnd SubPrivate Sub ckyy_Click()If ckyy.Value Thencmyy.Enabled = TrueElsecmyy.Enabled = FalseEnd IfEnd SubPrivate Sub cmdCha_Click()'点击查询按纽后首先清空车辆报废列表Call QingKong'定义查询条件的字符串Dim sql As StringDim scp As StringIf ckcp.Value Thenscp = "车牌号码like '%" & cmcp.Text & "%'" Elsescp = "车牌号码like '%'"End IfDim stime As StringIf cktime.Value Thenstime = "报废日期between #" & dtStart.Month & "/" & dtStart.Day & "/" & dtStart.Year & "# and #" & dtEnd.Month & "/" & dtEnd.Day & "/" & dtEnd.Year & "#"Elsestime = "报废日期like '%'"End IfDim sdd As StringIf ckyy.Value Thensyy = "报废原因like'%" & cmyy.Text & "%'"Elsesyy = "报废原因like '%'"End Ifsql = "select * from 车辆报废表where " & scp & "and " & syy & "and " & stime'如果没有选择查询条件,那么清空上一次查询结果并给出对话框提示,退出查询过程If sql = "select * from 车辆报废表where 车牌号码like '%'and 报废原因like '%'and 报废日期like '%'" ThenCall QingKongMsgBox "请选择查询条件", , "系统提示"Exit SubEnd If'返回符合查询条件的记录集Set adors = adoCon.Execute(sql)'如果记录集为空,说明没有符合条件的记录存在,清空上一次查询结果集并提示,'退出此次查询过程,否则在datagrid1控件里显示记录集If adors.EOF ThenCall QingKongMsgBox "对不起,没有符合您查询条件的车辆!", , "系统提示" ElseAdodc1.RecordSource = sqlAdodc1.RefreshEnd Ifadors.Closeckcp.Value = 0cktime.Value = 0ckyy.Value = 0End SubPrivate Sub cmdExit_Click()MDIForm1.StatusBar1.Panels(1).Text = ""Unload MeEnd SubPrivate Sub Form_Load()frmcarBFcha.Height = 4155frmcarBFcha.Width = 5730Label1.Caption = "车辆报废列表"Call Rebind'将车辆报废表里的车牌号码加到cmcp控件里Set adors = adoCon.Execute("select distinct 车牌号码,报废原因from 车辆报废表")On Error Resume NextDocmcp.AddItem adors.Fields(0)cmyy.AddItem adors.Fields(1)adors.MoveNextLoop Until adors.EOFEnd SubPrivate Sub Rebind()Label1.Caption = "车辆报废列表"'进行与数据库的绑定及选择作为记录源的表Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=" & App.Path & "\clgl.mdb " & ";Persist Security Info=False" Adodc1.RecordSource = "select * from 车辆报废表"Adodc1.RefreshEnd SubPrivate Sub QingKong()Label1.Caption = "您所要查询的报废车辆记录如下:"Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb " & ";Persist Security Info=False"Adodc1.RecordSource = "select * from 车辆报废表where 0=1"Adodc1.RefreshEnd SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)cmdExit_ClickEnd Sub3.车辆档案查询:代码分析:Private Sub ckbf_Click()If ckbf.Value ThenCombo6.Enabled = True ElseCombo6.Enabled = False End IfEnd SubPrivate Sub ckbx_Click()If ckbx.Value ThenCombo4.Enabled = True ElseCombo4.Enabled = FalseEnd SubPrivate Sub ckcp_Click()If ckcp.Value ThenCombo1.Enabled = True ElseCombo1.Enabled = False End IfEnd SubPrivate Sub ckdw_Click()If ckdw.Value ThenCombo3.Enabled = True ElseCombo3.Enabled = False End IfEnd SubPrivate Sub cklx_Click()If cklx.Value ThenCombo2.Enabled = TrueCombo2.Enabled = False End IfEnd SubPrivate Sub ckyd_Click()If ckyd.Value ThenCombo5.Enabled = True ElseCombo5.Enabled = False End IfEnd SubPrivate Sub cmdAll_Click() Frame1.Enabled = False ckcp.Value = 0cklx.Value = 0ckdw.Value = 0ckbx.Value = 0ckyd.Value = 0ckbf.Value = 0Call RebindcmdCha.Visible = TruecmdAll.Visible = FalsecmdOk.Enabled = FalseEnd SubPrivate Sub cmdExit_Click()MDIForm1.StatusBar1.Panels(1).Text = "" Unload MeEnd SubPrivate Sub cmdCha_Click()'点击查询按纽后首先清空车辆档案列表Call QingKongcmdCha.Visible = FalsecmdAll.Visible = TrueFrame1.Enabled = TruecmdOk.Enabled = TrueEnd SubPrivate Sub cmdOk_Click()Dim sql As StringDim scp As StringIf ckcp.Value Thenscp = "车牌号码like '" & Combo1.Text & "%'"Elsescp = "车牌号码like '%'"End IfDim slx As StringIf cklx.Value Thenslx = "车辆类型like'%" & Combo2.Text & "%'"Elseslx = "车辆类型like '%'"End IfDim sdw As StringIf ckdw.Value Thensdw = "车辆所在单位like'%" & Combo3.Text & "%'"Elsesdw = "车辆所在单位like '%'"End IfDim sbx As StringIf ckbx.Value Thensbx = "保险否='" & Combo4.Text & "'"Elsesbx = "保险否like '%'"End IfDim syd As StringIf ckyd.Value Thensyd = "异动否='" & Combo5.Text & "'"Elsesyd = "异动否like '%'"End IfDim sbf As StringIf ckbf.Value Thensbf = " 报废否='" & Combo6.Text & "'"Elsesbf = "报废否like '%'"End Ifsql = "select * from 车辆档案where " & scp & "and " & slx & "and " & sdw & "and " & sbx & "and " & syd & "and " & sbf 'MsgBox sqlIf sql = "select * from 车辆档案where 车牌号码like '%'and 车辆类型like '%'and 车辆所在单位like '%'and 保险否like '%'and 异动否like '%'and 报废否like '%'" ThenMsgBox "请选择查询条件", , "系统提示"'清空上一次的查询记录Call QingKongExit SubEnd IfSet adors = adoCon.Execute(sql)If adors.EOF Then'清空上一次的查询记录Call QingKong'给出文本框提示MsgBox "没有符合您查询车辆的条件!", , "系统提示"ElseAdodc1.RecordSource = sqlAdodc1.RefreshEnd Ifadors.Closeckcp.Value = 0cklx.Value = 0ckdw.Value = 0ckbx.Value = 0ckyd.Value = 0ckbf.Value = 0End SubPrivate Sub Form_Load()Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"Call RebindcmdAll.Visible = FalsecmdCha.Visible = TruecmdOk.Enabled = Falsefrmcardacha.Height = 5070frmcardacha.Width = 7935'将表里存在的所有车牌加到控件combo1里On Error Resume NextAdodc1.RecordSource = "select distinct 车牌号码from 车辆档案"DoCombo1.AddItem Adodc1.Recordset.Fields(0)Adodc1.Recordset.MoveNextLoop Until Adodc1.Recordset.EOFAdodc1.RefreshAdodc2.RecordSource = "select distinct 车辆类型from 车辆档案"Adodc2.RefreshDoCombo2.AddItem Adodc2.Recordset.Fields(0)Adodc2.Recordset.MoveNextLoop Until Adodc2.Recordset.EOFAdodc3.RecordSource = "select distinct 车辆所在单位from 车辆档案"Adodc3.RefreshDoCombo3.AddItem Adodc3.Recordset.Fields(0)Adodc3.Recordset.MoveNextLoop Until Adodc3.Recordset.EOFAdodc1.RecordSource = "select * from 车辆档案"Adodc1.RefreshEnd SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)cmdExit_ClickEnd SubPrivate Sub Rebind()Frame2.Caption = "车辆档案列表"'联接数据库及选表Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb " & ";Persist Security Info=False"Adodc1.RecordSource = "select * from 车辆档案"Adodc1.RefreshEnd SubPrivate Sub QingKong()Frame2.Caption = "您所要查询的车辆档案如下:"'清空datagrid1控件里的记录Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb " & ";Persist Security Info=False"Adodc1.RecordSource = "select * from 车辆档案where 0=1"Adodc1.RefreshEnd Sub4车辆事故查询界面:代码分析:Private Sub ckcp_Click()If ckcp.Value ThencmCP.Enabled = True ElsecmCP.Enabled = False End IfEnd SubPrivate Sub cktime_Click()If cktime.Value ThendtStart.Enabled = TruedtEnd.Enabled = True ElsedtStart.Enabled = FalsedtEnd.Enabled = FalseEnd IfEnd SubPrivate Sub cmdCha_Click()'点击查询按纽后首先清空车辆档案列表Call QingKong'定义查询字符串Dim sql As StringDim scp As StringIf ckcp.Value Thenscp = "车牌号码like '" & cmCP.Text & "%'"Elsescp = "车牌号码like '%'"End IfDim stime As StringIf cktime.Value Thenstime = "事故时间between #" & dtStart.Month & "/" & dtStart.Day & "/" & dtStart.Year & "# and #" & dtEnd.Month & "/" & dtEnd.Day & "/" & dtEnd.Year & "#"Elsestime = "事故时间like '%'"End Ifsql = "select * from 车辆事故表where " & scp & "and " & stime 'MsgBox sqlIf sql = "select * from 车辆事故表where 车牌号码like '%'and 事故时间like '%'" ThenCall QingKongMsgBox "请选择查询条件", , "系统提示"Exit SubEnd IfSet adors = adoCon.Execute(sql)If adors.EOF ThenCall QingKongMsgBox "对不起,没有符合您查询条件的车辆事故记录!", , "系统提示"ElseAdodc1.RecordSource = sqlAdodc1.RefreshEnd Ifadors.Closeckcp.Value = 0cktime.Value = 0End SubPrivate Sub cmdExit_Click()MDIForm1.StatusBar1.Panels(1).Text = ""Unload MeEnd SubPrivate Sub Form_Load()frmcarSGcha.Width = 6375frmcarSGcha.Height = 3885Call RebindSet adors = adoCon.Execute("select distinct 车牌号码from 车辆事故表")On Error Resume NextDocmCP.AddItem adors.Fields(0)adors.MoveNextLoop Until adors.EOFadors.CloseEnd SubPrivate Sub Rebind()Frame2.Caption = "车辆事故列表"Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"Adodc1.RecordSource = "select * from 车辆事故表"Adodc1.RefreshEnd SubPrivate Sub QingKong()Frame2.Caption = "您所要查询的车辆事故记录如下:"Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"Adodc1.RecordSource = "select * from 车辆事故表where 0=1"Adodc1.RefreshEnd SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)cmdExit_ClickEnd Sub5.车辆维修查询界面:代码分析:Private Sub ckcp_Click()If ckcp.Value Thencmcp.Enabled = True Elsecmcp.Enabled = False End IfEnd SubPrivate Sub ckfy_Click()If ckfy.Value ThenCombo1.Enabled = TrueCombo1.ListIndex = 0txtFY.Enabled = True ElsetxtFY.Enabled = FalseCombo1.Enabled = False End IfEnd SubPrivate Sub cktime_Click()If cktime.Value ThendtStart.Enabled = TruedtEnd.Enabled = True ElsedtStart.Enabled = FalsedtEnd.Enabled = False End IfEnd SubPrivate Sub cmdCha_Click()Call QingKongDim sql As StringDim scp As StringIf ckcp.Value Thenscp = "车牌号码like '" & cmcp.Text & "%'"Elsescp = "车牌号码like '%'"End IfDim stime As StringIf cktime.Value Thenstime = "维修日期between #" & dtStart.Month & "/" & dtStart.Day & "/" & dtStart.Year & "# and #" & dtEnd.Month & "/" & dtEnd.Day & "/" & dtEnd.Year & "#"Elsestime = "维修日期like '%'"End IfDim sfy As StringIf ckfy.Value Thensfy = "共计费用" & Combo1.Text & "" & txtFY & ""Elsesfy = "共计费用like '%'"End Ifsql = "select * from 车辆维修表where " & scp & "and " & stime & "and " & sfy'MsgBox sqlIf sql = "select * from 车辆维修表where 车牌号码like '%'and 维修日期like '%'and 共计费用like '%'" ThenCall QingKongMsgBox "请选择查询条件", , "系统提示"Exit SubEnd IfSet adors = adoCon.Execute(sql)If adors.EOF ThenCall QingKongMsgBox "对不起,没有符合您查询条件的车辆维修记录!", , "系统提示"ElseAdodc1.RecordSource = sqlAdodc1.RefreshEnd Ifadors.Closeckcp.Value = 0cktime.Value = 0ckfy.Value = 0End SubPrivate Sub cmdExit_Click()MDIForm1.StatusBar1.Panels(1).Text = ""Unload MeEnd SubPrivate Sub Form_Load()frmcarWXcha.Width = 6345frmcarWXcha.Height = 4395Call Rebind'add all cp in the table carWXSet adors = adoCon.Execute("select distinct 车牌号码from 车辆维修表")On Error Resume NextDocmcp.AddItem adors.Fields(0)adors.MoveNextLoop Until adors.EOFadors.CloseEnd SubPrivate Sub Rebind()Frame2.Caption = "车辆维修列表"Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"Adodc1.RecordSource = "select * from 车辆维修表"Adodc1.RefreshEnd SubPrivate Sub QingKong()Frame2.Caption = "您所要查询的车辆维修记录如下:"Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"Adodc1.RecordSource = "select * from 车辆维修表where 1=0"Adodc1.RefreshEnd SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)cmdExit_ClickEnd Sub结束语本软件的设计目的是为车管人员方便管理机动车与驾驶员信息提供方便。

相关主题