【文章內(nèi)容簡介】
ElseIf And And = Then Provider=。Data Source= amp。 amp。 \。Persist Security Info=False select * from 用戶, adocon, adOpenKeyset, adLockOptimistic (用戶名) = (密碼) = Provider=。Data Source= amp。 amp。 \。Persist Security Info=False select * from 權限設置, adocon, adOpenKeyset, adLockOptimistic (用戶名) = (密碼) = = : = : = MsgBox 添加用戶成功!, , 系統(tǒng)提示 ElseIf = Then MsgBox 請輸入確認密碼, , 系統(tǒng)提示 ElseIf Then MsgBox 兩次輸入的密碼不相同, , 系統(tǒng)提示 = = End If Else MsgBox 請輸入用戶名!, , 系統(tǒng)提示 End IfEnd SubPrivate Sub Command2_Click() = : = : = End SubPrivate Sub Command3_Click() Unload Me = TrueEnd Sub四.密碼設置 本功能允許使用者對密碼進行修改,取保系統(tǒng)的安全與方便。如果你是系統(tǒng)的用戶,輸入用戶名可對自己的密碼進行修改。圖44 密碼設置它的具體代碼為:Private Sub Form_Load() = Provider=。Data Source= amp。 amp。 \。Persist Security Info=False = select * from 權限設置 End SubPrivate Sub Command1_Click() If = Or = Or = Then MsgBox 輸入不能為空!!, 48, 提示信息 Else = select * from 權限設置 where 用戶名=39。 + + 39。 If 0 Then If = (密碼) Then Provider=。Data Source= amp。 amp。 \。Persist Security Info=False Set adoRs = (update 權限設置 set 密碼=39。 + + 39。 where 用戶名=39。 + + 39。) Dim rs1 As New select * from 用戶 where 用戶名=39。 + + 39。, StrCnn, adOpenKeyset, adLockPessimistic If 0 Then (密碼) = End If MsgBox 密碼修改成功,退出密碼設置!, , 系統(tǒng)提示 = True Unload Me Else MsgBox 原密碼錯誤,請重新輸入原密碼!, , 系統(tǒng)提示 End If Else MsgBox 該用戶不存在,請重新輸入, , 系統(tǒng)提示 End IfEnd IfEnd SubPrivate Sub Form_Unload(Cancel As Integer) = TrueEnd SubPrivate Sub Command2_Click() = True Unload Me End SubPrivate Sub Form_Activate() 39。回車text1獲得焦點End SubPrivate Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then 39?;剀噒ext2獲得焦點End SubPrivate Sub text2_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn Then 39?;剀噒ext3獲得焦點End SubPrivate Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Command1_ClickEnd Sub五.權限管理: ,包括系統(tǒng)設置,資料管理,采購管理,庫存管理和退貨管理。圖45 權限管理它的具體代碼為:Private Sub Form_Load() = Provider=。Data Source= amp。 amp。 \。Persist Security Info=False = select * from 權限設置 = Provider=。Data Source= amp。 amp。 \。Persist Security Info=False = select * from 權限設置 Set = Adodc2End SubPrivate Sub Form_Unload(Cancel As Integer) = TrueEnd SubPrivate Sub Datalist1_Click() = select * from 權限設置 where 用戶名=39。 amp。 amp。 39。 If 0 Then For i = 0 To 11 If (i) = 1 Then Check1(i).Value = 1 Else Check1(i).Value = 0 Next i Else = 0 End IfEnd SubPrivate Sub Command1_Click() 39。全選For i = 0 To 11 Check1(i).Value = 1Next iEnd SubPrivate Sub Command2_Click() 39。全不選 For i = 0 To 11 Check1(i).Value = 0 Next iEnd SubPrivate Sub Command3_Click() 39。為用戶設置權限 If Then = select * from 權限設置 where 用戶名=39。 + + 39。 If 0 Then For i = 0 To 11 If Check1(i).Value = 1 Then (i) = 1 Else (i) = 0 Next i End If MsgBox 權限設置成功!, , 系統(tǒng)提示 End IfEnd SubPrivate Sub Command4_Click() Unload Me = True End SubPrivate Sub Command5_Click() 39。刪除用戶 On Error Resume Next A = MsgBox(確認刪除該用戶?, 4, 系統(tǒng)提示) If A = vbYes Then Dim rs2 As New select * from 用戶 where 用戶名 = 39。 + + 39。, StrCnn, adOpenKeyset, adLockPessimistic If 0 Then End If Unload Me End IfEnd Sub六.采購訂單企業(yè)向供應商訂貨物時,開據(jù)采購訂單,以便供應商及時供貨。在界面內(nèi)填入相應的商品信息,點擊添加則會將所輸入的訂單信息保存到采購訂單中中。如果輸入有誤,且已保存,可以應用刪除功能,將錯誤信息刪除。訂單號不能為空,否則會彈出對話框提醒請輸入完整信息!在單價和數(shù)量中輸入數(shù)字