【正文】
系統(tǒng)管理 Case 用戶管理 If frmActiveNow Is frmUser Then Exit Sub Call UnloadActiveForm Load frmUser Set frmActiveNow = frmUser Case 委托統(tǒng)計(jì) If frmActiveNow Is FrmStat Then Exit Sub Call UnloadActiveForm Load FrmStat Set frmActiveNow = FrmStat Case 查詢 If frmActiveNow Is frmSearch Then Exit Sub Call UnloadActiveForm Load frmSearch 。現(xiàn)場(chǎng)檢測(cè) Case 混凝土回彈 If frmActiveNow Is frmConcResile Then Exit Sub Call UnloadActiveForm Load frmConcResile Set frmActiveNow = frmConcResile 39。根據(jù)用戶的不同權(quán)限建立相應(yīng)的目錄樹 Dim rootNode As Node, nd As Node 建筑工程質(zhì)量檢測(cè)管理系統(tǒng) 第 27 頁 共 55 頁 If bmconsign = True Then Set rootNode = (, , 委托 , 委托 , 委暗 , 委亮 ) = True End If If bMstat = True Then Set rootNode = (, , 委托統(tǒng)計(jì) , 委托統(tǒng)計(jì) , 統(tǒng)暗 , 統(tǒng)亮 ) = True End If If bMroomtest = True Then Set rootNode = (, , 室內(nèi)檢測(cè) , 室內(nèi)檢測(cè) , 室暗 , 室亮 ) Set nd = (rootNode, tvwChild, 混凝土抗壓 , 混凝土抗壓 , 混暗 , 混亮 ) = True End If If bMlocaltest = True Then Set rootNode = (, , 現(xiàn)場(chǎng)檢測(cè) , 現(xiàn)場(chǎng)檢測(cè) , 現(xiàn)暗 , 現(xiàn)亮 ) Set nd = (rootNode, tvwChild, 混凝土回彈 , 混凝土回彈 , 混暗 , 混亮 ) = True End If If bMwateltest = True Then Set rootNode = (, , 水電檢測(cè) , 水電檢測(cè) , 水暗 , 水亮 ) Set nd = (rootNode, tvwChild, 水電檢測(cè) _委托 , 委托 , 委暗2, 委亮 2) = True End If If bMsearch = True Then Set rootNode = (, , 查詢 , 查詢 , 查暗 , 查亮 ) = True End If If bMtotal = True Then Set rootNode = (, , 匯總 , 匯總 , 匯暗 , 匯亮 ) = True End If If bMprint = True Then Set rootNode = (, , 打印 , 打印 , 打暗 , 打亮 ) = True End If If bMwork = True Then If bMchargemanage = True Then Set rootNode = (, , 收費(fèi)管理 , 收費(fèi)管理 , 收暗 , 收亮 ) 建筑工程質(zhì)量檢測(cè)管理系統(tǒng) 第 28 頁 共 55 頁 = True End If If bMsystemmanage = True Then Set rootNode = (, , 系統(tǒng)管理 , 系統(tǒng)管理 , 系暗 , 系亮 ) Set nd = (rootNode, tvwChild, 用戶管理 , 用戶管理 , 用暗 , 用亮 ) = True End If End Sub Private Sub Form_Resize() = 0 = 0 = = 3300 = 100 = 100 = 200 = 200 = True End Sub Private Sub Form_Unload(cancel As Integer) If Not frmActiveNow Is Nothing Then If 0 Then cancel = True End If End Sub Private Sub tvFunction_NodeClick(ByVal Node As ) Select Case Case 委托 If frmActiveNow Is frmConsign Then Exit Sub Call UnloadActiveForm Load frmConsign Set frmActiveNow = frmConsign 39。 \Temp 39。刪除文件夾 temp If Dir( amp。 \Temp\*.*) Then Kill amp。根據(jù)用戶的權(quán)限來顯示相關(guān)的菜單 If bmconsign = True Then = True If bMstat = True Then = True If bMroomtest = True Then = True If bMlocaltest = True Then = True If bMwateltest = True Then = True If bMsystemmanage = True Then = True = True End If If bMchargemanage = True Then = True If bMsearch = True Then = True If bMprint = True Then = True If bMtotal = True Then = True If bMwork = True Then = True Load frmFunction End Sub Private Sub MDIForm_Unload(cancel As Integer) If Dir( amp。 將源文件的內(nèi)容復(fù)制到目的文件中。 指定目的文件名。 Format(Now, YY 年 MM月 dd 日 hh 時(shí) mm 分 ss 秒 ) amp。 With CDlg .CancelError = True .DialogTitle = 數(shù)據(jù)庫備份 選擇存盤路徑及名稱 .Filter = Microsoft Acess(*.mdb)|*.mdb|所有文件 (*.*)|*.* .FilterIndex = 1 .FileName = amp。 \ 39。 End With Exit Sub err: End Sub 39。 指定源文件名 .FileName = Call CopyDB(SourceFile, DestinationFile) 39。 With CDlg .CancelError = True .DialogTitle = 數(shù)據(jù)庫重裝 選擇要恢復(fù)的數(shù)據(jù)庫備份文件 .Filter = Microsoft Acess(*.mdb)|*.mdb|所有文件 (*.*)|*.* .FilterIndex = 1 .InitDir = amp。 \db\ 39。顯示登錄窗口 Load frmLogin vbModal End Sub 39。 strTemp, , , adBookmarkFirst If Not Then (userpass) = adAffectAll userpassword = Trim() Unload Me Exit Sub End If End If End Sub 建筑工程質(zhì)量檢測(cè)管理系統(tǒng) 第 23 頁 共 55 頁 3. 系統(tǒng)主界面 登陸后進(jìn)入系統(tǒng)主界面,此時(shí)可以進(jìn)行各個(gè)不同的操作。 Trim() amp。 部分代碼如下: Private Sub cmdok_Click() trytimes = trytimes + 1 If = 確定 Then If trytimes 2 Then MsgBox 對(duì)不起,你無權(quán)使用密碼更改功能 !, 16, 身份驗(yàn)證 Call cmdcancel_Click Exit Sub End If If Trim() username Then MsgBox 無效的當(dāng)前用戶名,請(qǐng)重新錄入 !, 48, 身份驗(yàn)證 = vbRed Exit Sub Else If Trim(txtPassword) userpassword Then MsgBox 無效的密碼,請(qǐng)重新錄入 !, 48, 身份驗(yàn)證 = vbRed Exit Sub End If End If 建筑工程質(zhì)量檢測(cè)管理系統(tǒng) 第 22 頁 共 55 頁 MsgBox 身份驗(yàn)證合格,請(qǐng)錄入新的密碼 !, 64, 身份驗(yàn)證 = 修改密碼 = 修改密碼 = False txtPassword = trytimes = 1 Else If trytimes 3 Then MsgBox 對(duì)不起,你不遵守密碼使用規(guī)范,本功能不再對(duì)你開放 !, 16, 密碼修改 Call cmdcancel_Click Exit Sub End If If Trim(txtPassword) = Then MsgBox 密碼不能為空 , vbOKOnly + 48, 提示信息 = vbRed Ex