【正文】
表示 x 由 0個或多個 a組成) 如列舉用戶登錄模塊的定義如下 : 用戶登錄模塊 ◎ 用戶登錄的定義格式: 用戶名 = [{字母 }, {數(shù)字 }] 用戶 = 管理員 密 碼 = [{字母 }, {數(shù)字 }] 用戶驗證表 =用戶名 +密碼 另一種方式是以 ER圖來描述數(shù)據(jù)之間的關(guān)聯(lián) . 如系統(tǒng)用戶表的 ER圖如下 : 第六 章 系統(tǒng)的設(shè)計 系統(tǒng)流程圖 通過對該系統(tǒng)的研究 ,將系統(tǒng)數(shù)據(jù) Employeemanage 分為以下幾個表 .DepartList,Edulevel,Employees,JobList,LeavelList,LeavelStatus,LeavelType,MarrageStatus,OperatorList,Plitics,TitalList 等幾個表 .各表的具體設(shè)計結(jié)構(gòu)如下 : powered by DepartList表 Edulevel表 : Employees 表 : JobList表 : LeavelList表 : LeavelStatus 表 LeavelType 表 : MarrageStatus 表 : OperatorList 表 Plitics 表 TitalList表 其系統(tǒng)主界面設(shè)計運行效果圖如下 : 登錄窗體的設(shè)計 其運行效果圖如下 : 其具體的設(shè)計如下 : 新建一個窗體 .在窗體上放 上二個 label控件 ,一個 TextBox 控件 ,一個 Combo1控件 ,二個 CommandButton控件 .其屬性的設(shè)置比較簡單 ,請參照上面的窗體中的文字顯視 .我們具體分析一下確定按鈕的源碼 ,如下 : Private Sub cmdOK_Click() Dim strSql As String strSql = Oper_ID = amp。 amp。 39。記錄當前用戶 39。移到最后一行 = 0 39。選定一行 = 1 39。.AllowBigSelection = True .AllowUserResizing = flexResizeNone .ColWidth(0) = 1 .ColWidth(1) = 1000 .ColWidth(2) = 5410 .ColAlignment(1) = 3 .ColAlignment(2) = 0 .ColAlignmentFixed(1) = 3 .FillStyle = flexFillSingle .ScrollTrack = True .Row = 1 .Col = 0 .RowSel = 1 .ColSel = .Cols 1 End With End Sub Private Sub showdata(ByVal Recordset As , ByVal flexGrid As MSHFlexGrid) Dim i As Integer Dim j As Integer If 0 Then With = 1 While Not .Rows = .Rows + 1 For i = 1 To .Col = i If (.Row Mod 2) = 0 Then .CellBackColor = amp。.Col = 1 .Row = 1 .Col = 0 .RowSel = 1 .ColSel = .Cols 1 39。 amp。 _ 錯誤描述 : amp。 amp。 _ 錯誤描述 : amp。 If 2 Then = 1 = 0 = 1 = 1 If 15 Then = 15 End If End If = 新增記錄 = False = False = False vbModal Case delete If strEmpFirstFieldValue Empty Then If MsgBox(您確定要刪除此條記錄嗎 ?, vbQuestion + vbYesNo, 刪除記錄 = vbYes Then If (rctEmployees, adAffectCurrent) = True Then = False Call IniGrid(flexEmployees) Call showdata(rctEmployees, flexEmployees) = True End If End If End If Case modify If strEmpFirstFieldValue Empty Then = 修改記錄 Call (rctEmployees) = False = False vbModal End If Case exit Unload Me End Select End Sub 打印按鈕的源碼如下 : Private Sub tlbPrint_ButtonClick(ByVal Button As ) If ExcuteSql(rctQueryEmployeesWithID, select * from QueryEmployeesWithID= True Then = Set = rctQueryEmployeesWithID End If If = 0 Then MsgBox 沒有合適的記錄 , vbInformation + vbOKOnly, 打印信息 Exit Sub End If Select Case Case Preview vbModal Case print On Error GoTo Error_on_print False 39。 amp。 ******ion, vbCritical + vbOKOnly, 打印錯誤 End Select End Sub 員工查詢窗運行如下 : 其中查詢按鈕的源碼分析如下 : Private Sub cmdOK_Click() Select Case Case 0 If 3 And _ 4 And _ 5 And _ 6 And _ 7 Then If Trim() = Empty Then MsgBox 查詢內(nèi)容不能為空 , vbInformation + vbOKOnly, 查詢數(shù)據(jù) Exit Sub Else FieldValue = Trim() If = 2 Then If Trim() = 男 Then FieldValue = 1 Else If Trim() = 女 Then FieldValue = 0 Else MsgBox 輸入錯誤 !, vbCritical + vbOKOnly, 查詢數(shù)據(jù) Exit Sub End If End If strFilter = FieldName amp。 FieldValue Else If = 1 Then strFilter = FieldName amp。 39。 % amp。 % amp。 Else strFilter = FieldName amp。 39。 FieldValue amp。 End If End If End If 39。 = amp。 = amp。 amp。 39。 amp。 amp。 amp。 39。 MsgBox strFilter = strFilter = False Call () Call (rctEmployees, ) = True End Sub 其中請假管理中的修改記錄窗體運行如下 : 其中保存按鈕的源碼如下 : Private Sub cmdSave_Click() Dim Emp_ID As Variant Dim Emp