【正文】
信息查詢 此功能可以根據(jù)用戶需求查找用戶需要的資料。 :此功能可以刪除此系統(tǒng)的用戶,首先選擇要刪除的用戶名,然后在密碼輸入框里輸入選中用戶的密碼,點(diǎn)擊“確定”就會提示刪除用戶成功。點(diǎn)擊“確定”就會提示添加用戶成功。本系統(tǒng)所使用的是漢化后的軟件,根據(jù)提示進(jìn)行一步步操作,將所有軟件依次打包,最終生成可獨(dú)立安裝運(yùn)行及卸載的應(yīng)用文件包。這個安裝包在 pc機(jī)上直接安裝后就可以正常運(yùn)行使用。從工具箱中選擇相應(yīng)控件將其添加到窗體中,根據(jù)需要設(shè)置其各項(xiàng)屬性。 + + 39。Data Source=F:\倉庫管理系統(tǒng) \。) If Then MsgBox 此儀器名稱不存在,請重新輸入! , vbOKOnly, 警告 = Else = (yiqibianhao) = (fenleihao) = (yiqimingcheng) 成都理工大學(xué)畢業(yè)論文 28 = (xinghao) = (guige) = (danjia) = (changjia) = (gouzhiriqi) = (xianzhuang) = (lingyongren) = (jingshouren) = (rukushijian) = End If End If End If End If End Sub Private Sub Command2_Click() If = Then MsgBox 請選擇一條記錄! , vbOKOnly + vbExclamation, 信息提示 Else Set xinxi = New = adUseClient Provider=。Persist Security Info=False Set rstxinxi = New Set = xinxi select * from yiqixinxi, xinxi, adOpenStatic, adLockOptimistic If = Then MsgBox 請輸入儀器名稱 , vbOKOnly, 警告 Else (yiqimingcheng = 39。User ID=admin。 + + 39。Data Source=F:\倉庫管理系統(tǒng) \。Persist Security Info=False Set rstxinxi = New Set = xinxi select * from yiqixinxi, xinxi, adOpenStatic, adLockOptimistic End Sub Private Sub Command1_Click() If = True Then = False Set xinxi = New = adUseClient Provider=。User ID=admin。從 工具箱中選擇相應(yīng)控件將其添加到窗體中,根據(jù)需要設(shè)置其各項(xiàng)屬性 。 如圖 315: 圖 315 修改信息窗體 當(dāng)用戶需要修改某個設(shè)備的信息時,只需 將修改后設(shè)備的詳細(xì)信息填上,然后電擊“修改”即可。) If (yiqibianhao) = Trim() Then MsgBox 此儀器編號已經(jīng)存在! , vbOKOnly + vbExclamation, 警告 = Else (yiqibianhao) = Trim() (fenleihao) = Trim() (xinghao) = Trim() (yiqimingcheng) = Trim() (guige) = Trim() (danjia) = Trim() (changjia) = Trim() (gouzhiriqi) = Trim() (xianzhuang) = Trim() (lingyongren) = Trim() (jingshouren) = Trim() (rukushijian) = Trim() MsgBox 添加信息成功 , vbOKOnly + vbExclamation, 信息提示 Call Command1_Click End If End Sub Private Sub Command3_Click() Call Command1_Click End Sub Private Sub f11_Click(Index As Integer) Select Case Index Case 0 Unload Me Load mainForm Case 2 Dim i As Byte Beep i = MsgBox(你確定要退出倉庫管理系統(tǒng)嗎? , vbYesNo, 退出系統(tǒng) ) 成都理工大學(xué)畢業(yè)論文 24 If i = vbYes Then End End If End Select End Sub Private Sub s11_Click(Index As Integer) Select Case Index Case 0 Unload Me Load Formchaxun End Select End Sub Private Sub Timer1_Timer() = Now End Sub 創(chuàng)建修 改信息窗體( ) 在 visual basic中新建一個 form,保存為 。Persist Security Info=False 成都理工大學(xué)畢業(yè)論文 22 Set rstxinxi = New Set = xinxi select * from yiqixinxi, xinxi, adOpenStatic, adLockOptimistic If Trim() = Then MsgBox 請輸入儀器編號! , vbOKOnly + vbExclamation, 信息提示 Exit Sub End If If Trim() = Then MsgBox 請輸入儀器名稱! , vbOKOnly + vbExclamation, 信息提示 Exit Sub End If If Trim() = Then MsgBox 請輸入儀器型號! , vbOKOnly + vbExclamation, 信息提示 Exit Sub End If If Trim() = Then MsgBox 請輸入儀 器單價! , vbOKOnly + vbExclamation, 信息提示 Exit Sub End If If Trim() = Then MsgBox 請輸入購置日期! , vbOKOnly + vbExclamation, 信息提示 Exit Sub End If If Trim() = Then MsgBox 請輸入領(lǐng)用單位號! , vbOKOnly + vbExclamation, 信息提示 Exit Sub End If If Trim() = Then MsgBox 請輸入領(lǐng)用人! , vbOKOnly + vbExclamation, 信息提示 Exit Sub End If If Trim() = Then MsgBox 請輸入經(jīng)手人! , vbOKOnly + vbExclamation, 信息提示 Exit Sub 成都理工大學(xué)畢業(yè)論文 23 End If (yiqibianhao = 39。User ID=admin。Data Source=F:\倉庫管理系統(tǒng) \。如圖 314 圖 314 添加信息窗體 將窗體及其各控件的屬性設(shè)置完畢后,根據(jù)需要為窗體及控件添加事件處理函數(shù),程序如下: Dim xinxi As New Dim rstxinxi As New Private Sub Form_Load() 輸入名稱或編號 和數(shù)據(jù)庫信息對比 顯示設(shè)備詳細(xì)信息 end 查詢 yes no 成都理工大學(xué)畢業(yè)論文 21 Set xinxi = New = adUseClient Provider=。其流程圖如下: 成都理工大學(xué)畢業(yè)論文 20 圖 313 信息查詢流程圖 創(chuàng)建添加信息窗體( ) 在 visual basic 中新建一個 form,保存為 。 從工具箱中選擇相應(yīng)控件將其添加到窗體中,根據(jù)需要設(shè)置其各項(xiàng)屬性 。從工具箱中選擇相應(yīng)控件將其添加到窗體中,根據(jù)需要設(shè)置其各項(xiàng)屬性。Data Source=F:\倉庫管理系統(tǒng) \。) If Then MsgBox 用戶名不存在,請重新輸入用戶名 , vbOKOnly, 警告 Else If (mima) Trim() Then = MsgBox 請輸入正確的密碼! , vbOKOnly, 警告 Else If (vbYes = MsgBox(您確定要刪除該用戶嗎? , vbYesNo + vbQuestion, 信息提示 )) Then 成都理工大學(xué)畢業(yè)論文 18 Call Command2_Click MsgBox 刪除信息成功! , vbOKOnly + vbExclamation, 信息提示 End If End If End If End Sub Private Sub Command2_Click() = = End Sub Private Sub Form_Load() Set denglu = New = adUseClient Provider=。代碼如下: Dim denglu As New Dim rstdenglu As New Private Sub Command1_Click() If = Then MsgBox 請輸入用戶名 , vbOKOnly, 警告 End If If = Then MsgBox 請輸入密碼 , vbOKOnly, 警告 E