📄 管理员登录.frm
字号:
VERSION 5.00
Begin VB.Form Form15
BackColor = &H00FFC0C0&
Caption = "Form15"
ClientHeight = 5655
ClientLeft = 60
ClientTop = 345
ClientWidth = 8550
LinkTopic = "Form15"
Picture = "管理员登录.frx":0000
ScaleHeight = 5655
ScaleWidth = 8550
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
BackColor = &H00FFC0C0&
Caption = "登录界面"
Height = 2535
Left = 1320
TabIndex = 0
Top = 1440
Width = 5415
Begin VB.CommandButton Command4
Caption = "忘记密码"
Height = 495
Left = 360
Picture = "管理员登录.frx":E939
Style = 1 'Graphical
TabIndex = 8
Top = 1800
Width = 1335
End
Begin VB.CommandButton Command3
Caption = "返回"
Height = 495
Left = 3480
Picture = "管理员登录.frx":1720F
Style = 1 'Graphical
TabIndex = 6
Top = 1800
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "管理员号码"
Height = 495
Index = 1
Left = 360
Picture = "管理员登录.frx":1FAE5
Style = 1 'Graphical
TabIndex = 5
Top = 360
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "密码"
Height = 495
Index = 3
Left = 360
Picture = "管理员登录.frx":283BB
Style = 1 'Graphical
TabIndex = 4
Top = 1080
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "登录"
Height = 495
Left = 1800
Picture = "管理员登录.frx":30C91
Style = 1 'Graphical
TabIndex = 3
Top = 1800
Width = 1575
End
Begin VB.TextBox Text2
Height = 495
Left = 2400
TabIndex = 2
Top = 360
Width = 2535
End
Begin VB.TextBox Text3
Height = 495
IMEMode = 3 'DISABLE
Left = 2400
PasswordChar = "*"
TabIndex = 1
Top = 1080
Width = 2535
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Height = 375
Left = 5160
TabIndex = 7
Top = 3600
Width = 975
End
End
End
Attribute VB_Name = "Form15"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command2_Click()
Dim bank15 As String
If Text2.Text = "" Or Text3.Text = "" Then
MsgBox "输入不能为空!", vbRetryCancel + vbExclamation, "错误提示"
Text2.SetFocus
Exit Sub
ElseIf Not IsNumeric(Text2.Text) Then
MsgBox "登录号必须为数字"
Text2.SetFocus
Exit Sub
ElseIf Len(Text2.Text) <> 4 Then
MsgBox "登录号长为4位!"
Text2.SetFocus
Exit Sub
ElseIf Len(Text3.Text) < 6 Then
MsgBox "密码长为应该大于等于6位!"
Text3.SetFocus
Exit Sub
ElseIf Len(Text3.Text) > 12 Then
MsgBox "密码长为应该小于12位!"
Text3.SetFocus
Exit Sub
Else
Call openconn
rs.Open "select * from employee_xx053_06 where e_No='" & Trim(Text2.Text) & "' and e_key='" & Trim(Text3.Text) & "' and e_No in (select manager from employee_xx053_06)", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "登录失败!"
rs.Close
Unload Me
Form15.Show
Else
bank15 = rs!bank
MsgBox "登录成功!"
Form4.yg4 = Text2.Text
Form5.yg5 = Text2.Text
Form12.yg12 = Text2.Text
Form13.yg13 = Text2.Text
Form16.yg16 = Text2.Text
Form18.yg18 = Text2.Text
Form13.bz13 = 1
Form12.bank12 = bank15
rs.Close
Unload Me
Form11.Show
End If
End If
End Sub
Private Sub Command3_Click()
Unload Me
Form1.Show
End Sub
Private Sub Command4_Click()
If Text2.Text = "" Then
MsgBox "请填入管理员号!"
Unload Me
Form15.Show
Else
Call openconn
rs.Open "select * from employee_xx053_06 where e_No='" & Trim(Text2.Text) & "'and e_No in (select manager from employee_xx053_06) ", conn, adOpenDynamic, adLockOptimistic
If rs.BOF And rs.EOF Then
MsgBox "您没有权限进入!"
rs.Close
Unload Me
Form15.Show
Else
Form16.yg16 = Text2.Text
Form13.yg13 = Text2.Text
Form16.bz16 = 1
Form13.bz13 = 1
rs.Close
Unload Me
Form16.Show
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -