【文章內(nèi)容簡介】
255 End IfEnd FunctionPrivate Sub cmdCancel_Click() Unload Me EndEnd SubPrivate Sub cmdOK_Click() Dim intCheck As Integer 39。Static intLogTimes to save user login times Static intLogTimes As Integer intLogTimes = intLogTimes + 1 39。Save login times If intLogTimes MaxLogTimes Then 39。Over allowed login times then list information MsgBox You have over allowed loghin times,login failure !, vbCritical, LoginError Unload Me Else intCheck = Check_Password(Trim(txtPassword), Trim(cboName)) Select Case intCheck Case 0 MsgBox Your are not a system user !, vbInformation + vbOKOnly, LoginError Case 1 MsgBox Password error ,please check your password !, vbInformation + vbOKOnly, LoginError Case 2 Unload Me If CurrentOpname = Admin And CurrentOppassword = 1 Then = True Else = False End If Load MainWin End Select End IfEnd SubOption ExplicitPrivate Sub MDIForm_Activate() If CurrentOpname = Admin Then (1).Text = 管理員: amp。 CurrentOpname (1).Visible = True (2).Visible = True Else (1).Text = 操作員: amp。 CurrentOpname (1).Visible = False (2).Visible = False End IfEnd SubPrivate Sub MDIForm_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbRightButton Then PopupMenu mnuOperation 39。Design popup menu End IfEnd SubPrivate Sub MDIForm_Unload(Cancel As Integer) CheckConnect 39。Reference function to make objcon break if connection is openEnd SubPrivate Sub mnuAbout_Click() End SubPrivate Sub mnuBookQuery_Click() CheckConnect 39。Reference function to make objcon break if connection is open Load frmBookQuery End SubPrivate Sub mnuBookRegist_Click() CheckConnect 39。Reference function to make objcon break if connection is open Load frmBookReg End SubPrivate Sub mnuBorrowQuery_Click() CheckConnect 39。Reference function to make objcon break if connection is open Load frmReadQuery End SubPrivate Sub mnuExit_Click() CheckConnect 39。Reference function to make objcon break if connection is open Unload Me EndEnd SubPrivate Sub mnuReLogin_Click() CheckConnect 39。Reference function to make objcon break if connection is open Unload Me Load frmLogin End SubPrivate Sub mnuVipQuery_Click() CheckConnect 39。Reference function to make objcon break if connection is open Load frmVipQuery End SubPrivate Sub mnuVipRegist_Click() CheckConnect 39。Reference function to make objcon break if connection is open Load frmVipReg End SubPrivate Sub munReadRegist_Click() CheckConnect 39。Reference function to make objcon break if connection is open Load frmReadRegist End SubPrivate Sub Toolbar1_ButtonClick(ByVal Button As )Select Case Case operatorReg CheckConnect 39。Reference function to make objcon break if connection is open Load frmAdmin Case vipReg CheckConnect 39。Reference function to make objcon break if connection is open Load frmVipReg Case vipQuery CheckConnect 39。Reference function to make objcon break if connection is open Load frmVipQuery Case BookReg CheckConnect 39。Reference function to make objcon break if connection is open Load frmBookReg Case bookQuery CheckConnect 39。Reference function to make objcon break if connection is open Load frmBookQuery Case readReg CheckConnect 39。Reference function to make objcon break if connection is open Load frmReadRegist Case readQuery CheckConnect 39。Reference function to make objcon break if connection is open Load frmReadQuery End SelectEnd SubOption ExplicitSub SetTextEmpty()39。This function is set all text to empty = = = = = End SubSub RefreshOperator()39。This function is to Refresh text = (0).Value = (1).Value = (2).Value = (3).Value 39。 = (4).ValueEnd SubPrivate Sub cmdAdd_Click() = True 39。You don39。t change datagrid untill you add data finish = False If = 添加 Then = 確定 SetTextEmpty 39。 reference settextempty founction to set empty = False = False = False Else If Trim() = Then MsgBox Operator name must not null ,please input operator name !, vbInformation + vbOKOnly Exit Sub ElseIf Trim() = Then MsgBox Operator ID must not null ,please input operator ID !, vbInformation + vbOKOnly Exit Sub ElseIf Trim() = Then MsgBox Operator password must not null ,please input operator password !, vbInformation + vbOKOnly Exit Sub Else With objRs checkAddNew = True .Filter = cOperatorID=39。 amp。 Trim() amp。 39。 If .RecordCount 0 Then MsgBox This operator has been exist ! = .Filter = cOperatorID39。39。 = True 39。To executer refresh once checkAddNew = False = True = True = 添加(amp。A) = False = True = True checkAddNew = False Exit Sub End If checkAddNew = True