車輛管理系統(tǒng)_第1頁
車輛管理系統(tǒng)_第2頁
車輛管理系統(tǒng)_第3頁
車輛管理系統(tǒng)_第4頁
車輛管理系統(tǒng)_第5頁
已閱讀5頁,還剩40頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、摘 要1Abstract2第一章 引言411 課題背景412 系統(tǒng)簡介5第二章 系統(tǒng)的分析621 系統(tǒng)開發(fā)的目標(biāo)和思想622 系統(tǒng)的可行性分析8第三章 系統(tǒng)的設(shè)計1831 系統(tǒng)的功能結(jié)構(gòu)設(shè)計1832 系統(tǒng)的數(shù)據(jù)庫設(shè)計33 界面設(shè)計與代碼設(shè)計2324結(jié)束語46致謝47參考文獻摘 要 車輛管理系統(tǒng)用計算機管理機動車輛的檔案,運營管理以及駕駛員信息的一種計算機應(yīng)用技術(shù)的創(chuàng)新,在計算機還未普及之前車輛管理都是由工作人員手工抄寫的方式來操作的.現(xiàn)在一般的車輛管理都是采用計算機作為工具的實用的計算機智能化車輛管理程序來幫助工作人員進行更有效的機動車輛管理。車輛管理系統(tǒng)是典型的信息管理系統(tǒng)(MIS),其開發(fā)

2、主要包括后臺數(shù)據(jù)庫的建立和維護以及前端應(yīng)用程序的開發(fā)兩個方面。對于前者要求建立起數(shù)據(jù)一致性和完整性強、數(shù)據(jù)安全性好的庫。而對于后者則要求應(yīng)用程序功能完備,易使用等特點。 經(jīng)過分析,我們使用 MICROSOFT公司的 VISUAL BASIC開發(fā)工具,利用其提供的各種面向?qū)ο蟮拈_發(fā)工具,尤其是數(shù)據(jù)窗口這一能方便而簡潔操縱數(shù)據(jù)庫的智能化對象,首先在短時間內(nèi)建立系統(tǒng)應(yīng)用原型,然后,對初始原型系統(tǒng)進行需求迭代,不斷修正和改進,直到形成用戶滿意的可行系統(tǒng)。關(guān)鍵字:評語管理,MIS,visual basic ,數(shù)據(jù)庫AbstractVehicle Management System Computer us

3、ed 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 to

4、ol for computer computer intelligent vehicle management procedures to help staff more effective 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

5、 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,

6、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 revis

7、e and improve until the formation of a viable system of user satisfaction. keyword : comments management MIS,visual basic database第一章 引言11 課題背景車輛管理系統(tǒng)用計算機管理機動車輛的檔案,運營管理以及駕駛員信息的一種計算機應(yīng)用技術(shù)的創(chuàng)新,在計算機還未普及之前車輛管理都是由工作人員手工抄寫的方式來操作的.現(xiàn)在一般的車輛管理都是采用計算機作為工具的實用的計算機智能化車輛管理程序來幫助工作人員進行更有效的機動車輛管理。車輛管理系統(tǒng)是典型的信息管理系統(tǒng)(MIS),其

8、開發(fā)主要包括后臺數(shù)據(jù)庫的建立和維護以及前端應(yīng)用程序的開發(fā)兩個方面。對于前者要求建立起數(shù)據(jù)一致性和完整性強、數(shù)據(jù)安全性好的庫。而對于后者則要求應(yīng)用程序功能完備,易使用等特點。12 系統(tǒng)簡介本系統(tǒng)主要服務(wù)于車管所工作人員管理轄區(qū)機動車輛,以及駕駛員相關(guān)信息,本系統(tǒng)由以下幾大功能模塊構(gòu)成.一:車輛檔案管理(車輛檔案建立,車輛檔案查詢,車輛檔案刪除,車輛檔案變更查詢等.)二:車輛運營管理(車輛運營表,車輛運營查詢,清空車輛運營表)三:車輛管理(車輛維修管理,車輛報廢管理等)四:駕駛員管理(駕駛員檔案管理,駕駛員檔案查詢等)五:系統(tǒng)維護(系統(tǒng)備份,系統(tǒng)還原,系統(tǒng)檢查)第二章 系統(tǒng)的分析2.1系統(tǒng)開發(fā)的目

9、標(biāo)和思想 本系統(tǒng)主要服務(wù)于機動車管理人員的日常工作.利用本系統(tǒng)可以方便的監(jiān)控管理本區(qū)域的駕駛員信息.在此基礎(chǔ)上力求軟件界面人性化以及操作簡單,程序具有健壯性等.2.2 系統(tǒng)的可行性分析技術(shù)上:本系統(tǒng)采用visual basic 6.0與微軟的access作為數(shù)據(jù)庫,技術(shù)上開發(fā)難度一般.經(jīng)濟上:本系統(tǒng)服務(wù)于車輛管理人員,提高了車管工作者辦事效率,節(jié)省了開支.所以具有經(jīng)濟上的可行性.社會上:本系統(tǒng)同時也方便了廣大駕駛員.所以具有社會可行性.第三章 系統(tǒng)的設(shè)計31 系統(tǒng)的功能結(jié)構(gòu)設(shè)計程序登陸主界面車輛檔案管理車輛運盈管理車輛管理駕駛員管理系統(tǒng)維護32 系統(tǒng)的數(shù)據(jù)庫設(shè)計1.車輛報廢表:2.車輛檔案表:

10、3.車輛事故表:4:車輛違規(guī)表:5:車輛維修表:6:車輛變更表:7:車輛運營表:8:駕駛員檔案9:獎懲表:10:零件表:11:用戶表:33 界面設(shè)計與代碼設(shè)計1:登陸界面設(shè)計登陸界面代碼設(shè)計:Private Sub Combo1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Command1.SetFocus End IfEnd SubPrivate Sub Command1_Click() Set adors = adoCon.Execute(select * from 用戶表 where 用戶姓名=ltrim( & Text1 &

11、) and 密碼=ltrim( & Text2 & ) and 用戶類型=ltrim( & Combo1.Text & ) If adors.EOF Then MsgBox 您輸入的信息有誤,請重新輸入!, , 系統(tǒng)提示 Text1 = Text2 = Text1.SetFocus i = i + 1 If i = 3 Then MsgBox 對不起,您已無權(quán)使用本系統(tǒng)!, , 系統(tǒng)提示 Unload Me End If Else Select Case adors!用戶類型 Case 管理員 Case 普通用戶 MDIForm1.mnuyydelete.Enabled = False MDI

12、Form1.mnusyscsh.Enabled = False MDIForm1.mnuglyset.Enabled = False End Select MDIForm1.Show adors.Close Unload Me End 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

13、Then Text2.SetFocus End IfEnd SubPrivate Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Combo1.SetFocus End IfEnd Sub2車輛報廢查詢:代碼分析:Private Sub ckcp_Click() If ckcp.Value Then cmcp.Enabled = True Else cmcp.Enabled = False End IfEnd SubPrivate Sub cktime_Click() If cktime.Value Then dtSt

14、art.Enabled = True dtEnd.Enabled = True Else dtStart.Enabled = False dtEnd.Enabled = False End IfEnd SubPrivate Sub ckyy_Click() If ckyy.Value Then cmyy.Enabled = True Else cmyy.Enabled = False End IfEnd SubPrivate Sub cmdCha_Click() 點擊查詢按紐后首先清空車輛報廢列表 Call QingKong 定義查詢條件的字符串 Dim sql As String Dim s

15、cp As String If ckcp.Value Then scp = 車牌號碼 like % & cmcp.Text & % Else scp = 車牌號碼 like % End If Dim stime As String If cktime.Value Then stime = 報廢日期 between # & dtStart.Month & / & dtStart.Day & / & dtStart.Year & # and # & dtEnd.Month & / & dtEnd.Day & / & dtEnd.Year & # Else stime = 報廢日期 like % E

16、nd If Dim sdd As String If ckyy.Value Then syy = 報廢原因 like% & cmyy.Text & % Else syy = 報廢原因 like % End If sql = select * from 車輛報廢表 where & scp & and & syy & and & stime 如果沒有選擇查詢條件,那么清空上一次查詢結(jié)果并給出對話框提示,退出查詢過程 If sql = select * from 車輛報廢表 where 車牌號碼 like %and 報廢原因 like %and 報廢日期 like % Then Call QingK

17、ong MsgBox 請選擇查詢條件, , 系統(tǒng)提示 Exit Sub End If 返回符合查詢條件的記錄集 Set adors = adoCon.Execute(sql) 如果記錄集為空,說明沒有符合條件的記錄存在,清空上一次查詢結(jié)果集并提示, 退出此次查詢過程,否則在datagrid1控件里顯示記錄集 If adors.EOF Then Call QingKong MsgBox 對不起,沒有符合您查詢條件的車輛!, , 系統(tǒng)提示 Else Adodc1.RecordSource = sql Adodc1.Refresh End If adors.Close ckcp.Value = 0

18、cktime.Value = 0 ckyy.Value = 0End SubPrivate Sub cmdExit_Click() MDIForm1.StatusBar1.Panels(1).Text = Unload MeEnd SubPrivate Sub Form_Load() frmcarBFcha.Height = 4155 frmcarBFcha.Width = 5730 Label1.Caption = 車輛報廢列表 Call Rebind 將車輛報廢表里的車牌號碼加到cmcp控件里 Set adors = adoCon.Execute(select distinct 車牌號碼,

19、報廢原因 from 車輛報廢表) On Error Resume Next Do cmcp.AddItem adors.Fields(0) cmyy.AddItem adors.Fields(1) adors.MoveNext Loop Until adors.EOFEnd SubPrivate Sub Rebind() Label1.Caption = 車輛報廢列表 進行與數(shù)據(jù)庫的綁定及選擇作為記錄源的表 Adodc1.ConnectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data Source= & App.Path & clgl.mdb

20、& ;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 = sel

21、ect * 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 Then Combo6.Enabled = True Else Combo6.Enabled = False End IfEnd SubPrivate Sub ckbx_Click() If ckbx.Value T

22、hen Combo4.Enabled = True Else Combo4.Enabled = False End IfEnd SubPrivate Sub ckcp_Click() If ckcp.Value Then Combo1.Enabled = True Else Combo1.Enabled = False End IfEnd SubPrivate Sub ckdw_Click() If ckdw.Value Then Combo3.Enabled = True Else Combo3.Enabled = False End IfEnd SubPrivate Sub cklx_Cl

23、ick() If cklx.Value Then Combo2.Enabled = True Else Combo2.Enabled = False End IfEnd SubPrivate Sub ckyd_Click() If ckyd.Value Then Combo5.Enabled = True Else Combo5.Enabled = False End IfEnd SubPrivate Sub cmdAll_Click() Frame1.Enabled = False ckcp.Value = 0 cklx.Value = 0 ckdw.Value = 0 ckbx.Value

24、 = 0 ckyd.Value = 0 ckbf.Value = 0 Call Rebind cmdCha.Visible = True cmdAll.Visible = False cmdOk.Enabled = FalseEnd SubPrivate Sub cmdExit_Click() MDIForm1.StatusBar1.Panels(1).Text = Unload MeEnd SubPrivate Sub cmdCha_Click() 點擊查詢按紐后首先清空車輛檔案列表 Call QingKong cmdCha.Visible = False cmdAll.Visible =

25、True Frame1.Enabled = True cmdOk.Enabled = TrueEnd SubPrivate Sub cmdOk_Click() Dim sql As String Dim scp As String If ckcp.Value Then scp = 車牌號碼 like & Combo1.Text & % Else scp = 車牌號碼 like % End If Dim slx As String If cklx.Value Then slx = 車輛類型 like% & Combo2.Text & % Else slx = 車輛類型 like % End If

26、 Dim sdw As String If ckdw.Value Then sdw = 車輛所在單位 like% & Combo3.Text & % Else sdw = 車輛所在單位 like % End If Dim sbx As String If ckbx.Value Then sbx = 保險否= & Combo4.Text & Else sbx = 保險否 like % End If Dim syd As String If ckyd.Value Then syd = 異動否= & Combo5.Text & Else syd = 異動否 like % End If Dim sbf

27、 As String If ckbf.Value Then sbf = 報廢否= & Combo6.Text & Else sbf = 報廢否 like % End If sql = select * from 車輛檔案 where & scp & and & slx & and & sdw & and & sbx & and & syd & and & sbf MsgBox sql If sql = select * from 車輛檔案 where 車牌號碼 like %and 車輛類型 like %and 車輛所在單位 like %and 保險否 like %and 異動否 like %a

28、nd 報廢否 like % Then MsgBox 請選擇查詢條件, , 系統(tǒng)提示 清空上一次的查詢記錄 Call QingKong Exit Sub End If Set adors = adoCon.Execute(sql) If adors.EOF Then 清空上一次的查詢記錄 Call QingKong 給出文本框提示 MsgBox 沒有符合您查詢車輛的條件!, , 系統(tǒng)提示 Else Adodc1.RecordSource = sql Adodc1.Refresh End If adors.Close ckcp.Value = 0 cklx.Value = 0 ckdw.Value

29、 = 0 ckbx.Value = 0 ckyd.Value = 0 ckbf.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 Rebind cmdAll.Visible = False cmdCha.Visible = True cmdOk.Enabled = False frmcardacha.Height

30、= 5070 frmcardacha.Width = 7935 將表里存在的所有車牌加到控件combo1里 On Error Resume Next Adodc1.RecordSource = select distinct 車牌號碼 from 車輛檔案 Do Combo1.AddItem Adodc1.Recordset.Fields(0) Adodc1.Refresh Adodc2.RecordSource = select distinct 車輛類型 from 車輛檔案 Adodc2.Refresh Do Combo2.AddItem Adodc2.Recordset.Fields(0)

31、 Adodc3.RecordSource = select distinct 車輛所在單位 from 車輛檔案 Adodc3.Refresh Do Combo3.AddItem Adodc3.Recordset.Fields(0) Adodc1.RecordSource = select * from 車輛檔案 Adodc1.RefreshEnd SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) cmdExit_ClickEnd SubPrivate Sub Rebind() Frame2.Cap

32、tion = 車輛檔案列表 聯(lián)接數(shù)據(jù)庫及選表 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.ConnectionS

33、tring = 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 Then cmCP.Enabled = True Else cmCP.Enabled = False End IfEnd SubPr

34、ivate Sub cktime_Click() If cktime.Value Then dtStart.Enabled = True dtEnd.Enabled = True Else dtStart.Enabled = False dtEnd.Enabled = False End IfEnd SubPrivate Sub cmdCha_Click() 點擊查詢按紐后首先清空車輛檔案列表 Call QingKong 定義查詢字符串 Dim sql As String Dim scp As String If ckcp.Value Then scp = 車牌號碼 like & cmCP.T

35、ext & % Else scp = 車牌號碼 like % End If Dim stime As String If cktime.Value Then stime = 事故時間 between # & dtStart.Month & / & dtStart.Day & / & dtStart.Year & # and # & dtEnd.Month & / & dtEnd.Day & / & dtEnd.Year & # Else stime = 事故時間 like % End If sql = select * from 車輛事故表 where & scp & and & stime

36、MsgBox sql If sql = select * from 車輛事故表 where 車牌號碼 like %and 事故時間 like % Then Call QingKong MsgBox 請選擇查詢條件, , 系統(tǒng)提示 Exit Sub End If Set adors = adoCon.Execute(sql) If adors.EOF Then Call QingKong MsgBox 對不起,沒有符合您查詢條件的車輛事故記錄!, , 系統(tǒng)提示 Else Adodc1.RecordSource = sql Adodc1.Refresh End If adors.Close ckc

37、p.Value = 0 cktime.Value = 0 End SubPrivate Sub cmdExit_Click() MDIForm1.StatusBar1.Panels(1).Text = Unload MeEnd SubPrivate Sub Form_Load() frmcarSGcha.Width = 6375 frmcarSGcha.Height = 3885 Call Rebind Set adors = adoCon.Execute(select distinct 車牌號碼 from 車輛事故表) On Error Resume Next Do cmCP.AddItem

38、 adors.Fields(0) adors.MoveNext Loop Until adors.EOF adors.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 Su

39、bPrivate 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,

40、UnloadMode As Integer) cmdExit_Click End Sub5.車輛維修查詢界面:代碼分析:Private Sub ckcp_Click() If ckcp.Value Then cmcp.Enabled = True Else cmcp.Enabled = False End IfEnd SubPrivate Sub ckfy_Click() If ckfy.Value Then Combo1.Enabled = True Combo1.ListIndex = 0 txtFY.Enabled = True Else txtFY.Enabled = False Co

41、mbo1.Enabled = False End IfEnd SubPrivate Sub cktime_Click() If cktime.Value Then dtStart.Enabled = True dtEnd.Enabled = True Else dtStart.Enabled = False dtEnd.Enabled = False End IfEnd SubPrivate Sub cmdCha_Click() Call QingKong Dim sql As String Dim scp As String If ckcp.Value Then scp = 車牌號碼 lik

42、e & cmcp.Text & % Else scp = 車牌號碼 like % End If Dim stime As String If cktime.Value Then stime = 維修日期 between # & dtStart.Month & / & dtStart.Day & / & dtStart.Year & # and # & dtEnd.Month & / & dtEnd.Day & / & dtEnd.Year & # Else stime = 維修日期 like % End If Dim sfy As String If ckfy.Value Then sfy =

43、 共計費用 & Combo1.Text & & txtFY & Else sfy = 共計費用 like % End If sql = select * from 車輛維修表 where & scp & and & stime & and & sfy MsgBox sql If sql = select * from 車輛維修表 where 車牌號碼 like %and 維修日期 like %and 共計費用 like % Then Call QingKong MsgBox 請選擇查詢條件, , 系統(tǒng)提示 Exit Sub End If Set adors = adoCon.Execute(s

44、ql) If adors.EOF Then Call QingKong MsgBox 對不起,沒有符合您查詢條件的車輛維修記錄!, , 系統(tǒng)提示 Else Adodc1.RecordSource = sql Adodc1.Refresh End If adors.Close ckcp.Value = 0 cktime.Value = 0 ckfy.Value = 0End SubPrivate Sub cmdExit_Click() MDIForm1.StatusBar1.Panels(1).Text = Unload MeEnd SubPrivate Sub Form_Load() frmc

45、arWXcha.Width = 6345 frmcarWXcha.Height = 4395 Call Rebind add all cp in the table carWX Set adors = adoCon.Execute(select distinct 車牌號碼 from 車輛維修表) On Error Resume Next Do cmcp.AddItem adors.Fields(0) adors.MoveNext Loop Until adors.EOF adors.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.

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論