⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 员工登录.frm

📁 C/S模块
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   BackColor       =   &H00FFC0C0&
   Caption         =   "Form2"
   ClientHeight    =   4335
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8280
   LinkTopic       =   "Form2"
   Picture         =   "员工登录.frx":0000
   ScaleHeight     =   4335
   ScaleWidth      =   8280
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "员工登录界面"
      Height          =   2295
      Left            =   1080
      TabIndex        =   0
      Top             =   840
      Width           =   5295
      Begin VB.TextBox Text3 
         Height          =   495
         IMEMode         =   3  'DISABLE
         Left            =   2400
         PasswordChar    =   "*"
         TabIndex        =   7
         Top             =   960
         Width           =   2655
      End
      Begin VB.TextBox Text2 
         Height          =   495
         Left            =   2400
         TabIndex        =   6
         Top             =   360
         Width           =   2655
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H00FFC0C0&
         Caption         =   "登录"
         Height          =   495
         Left            =   2400
         Picture         =   "员工登录.frx":4F4CC
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   1560
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H00FFC0C0&
         Caption         =   "密码"
         Height          =   495
         Index           =   3
         Left            =   480
         Picture         =   "员工登录.frx":57DA2
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   960
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H00FFC0C0&
         Caption         =   "员工号"
         Height          =   495
         Index           =   1
         Left            =   480
         Picture         =   "员工登录.frx":60678
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   360
         Width           =   1455
      End
      Begin VB.CommandButton Command3 
         BackColor       =   &H00FFC0C0&
         Caption         =   "返回"
         Height          =   495
         Left            =   3840
         Picture         =   "员工登录.frx":68F4E
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   1560
         Width           =   1215
      End
      Begin VB.CommandButton Command4 
         BackColor       =   &H00FFC0C0&
         Caption         =   "忘记密码"
         Height          =   495
         Left            =   480
         Picture         =   "员工登录.frx":71824
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   1560
         Width           =   1455
      End
      Begin VB.Label Label1 
         BackColor       =   &H00FFC0C0&
         Height          =   375
         Left            =   5160
         TabIndex        =   8
         Top             =   3600
         Width           =   975
      End
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub Command2_Click()
Dim bank1 As String
If Text2.Text = "" Then
  MsgBox "登录号不能为空!", vbRetryCancel + vbExclamation, "错误提示"
  Text2.SetFocus
  Exit Sub
ElseIf Text3.Text = "" Then
    MsgBox "密码不能为空!", vbRetryCancel + vbExclamation, "错误提示"
     Text3.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 e_No,e_key from employee_xx053_06 where e_No='" & Trim(Text2.Text) & "' and e_key='" & Trim(Text3.Text) & "'", conn, adOpenDynamic, adLockOptimistic
 If rs.BOF And rs.EOF Then
    MsgBox "登录失败!"
    rs.Close
    conn.Close
    Unload Me
    Form2.Show
 Else
   MsgBox "登录成功!"
   Form13.bz13 = 0
   Form6.yg6 = Text2.Text
   Form8.yg8 = Text2.Text
   Form9.yg9 = Text2.Text
   Form13.yg13 = Text2.Text
   Form10.yg10 = Text2.Text
   Form22.yg22 = Text2.Text
    rs.Close
    rs.Open "select * from employee_xx053_06 where e_No='" & Trim(Text2.Text) & "'", conn, adOpenDynamic, adLockOptimistic
     bank1 = rs!bank
    Form6.yh6 = bank1
    Form8.yh8 = bank1
    Form9.yh9 = bank1
    Form10.yh10 = bank1
    Form22.yh22 = bank1
   rs.Close
   conn.Close
   Unload Me
   Form3.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
Form2.Show
Else
 Call openconn
 rs.Open "select * from employee_xx053_06 where e_No='" & Trim(Text2.Text) & "' ", conn, adOpenDynamic, adLockOptimistic
 If rs.BOF And rs.EOF Then
    MsgBox "您没有权限进入!"
    rs.Close
    Unload Me
    Form2.Show
    Else
   Form13.yg13 = Text2.Text
   Form16.yg16 = Text2.Text
   Form16.bz16 = 0
   Form13.bz13 = 0
   rs.Close
   Unload Me
   Form16.Show
End If
End If
End Sub







⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -