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

📄 管理员登陆.frm

📁 原创VB+SQL影音租赁系统 醮简单 具体看里边的文本文档
💻 FRM
字号:
VERSION 5.00
Object = "{8ED8CCC1-8472-46D0-93E7-F66929B98442}#2.0#0"; "XPCMD.OCX"
Begin VB.Form ManagerLogin 
   BackColor       =   &H00FFC0FF&
   Caption         =   "管理员登陆"
   ClientHeight    =   3315
   ClientLeft      =   5760
   ClientTop       =   4920
   ClientWidth     =   4515
   LinkTopic       =   "Form2"
   ScaleHeight     =   3315
   ScaleMode       =   0  'User
   ScaleWidth      =   450
   Begin XPCmd.xpcmdbutton xpcmdbutton2 
      Height          =   495
      Left            =   2760
      TabIndex        =   4
      Top             =   2640
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   873
      Caption         =   "   取   消"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin XPCmd.xpcmdbutton xpcmdbutton1 
      Height          =   495
      Left            =   600
      TabIndex        =   3
      Top             =   2640
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   873
      Caption         =   "   确   定"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.TextBox Text2 
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   1
      Top             =   1680
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1800
      TabIndex        =   0
      Top             =   960
      Width           =   1695
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFC0FF&
      Height          =   1815
      Left            =   480
      TabIndex        =   5
      Top             =   600
      Width           =   3735
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0FF&
         Caption         =   "ID"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   285
         Left            =   600
         TabIndex        =   7
         Top             =   360
         Width           =   345
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0FF&
         Caption         =   "密码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   285
         Left            =   480
         TabIndex        =   6
         Top             =   1080
         Width           =   615
      End
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackColor       =   &H00FFC0FF&
      Caption         =   "管理员登陆"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   315
      Left            =   1440
      TabIndex        =   2
      Top             =   120
      Width           =   1740
   End
End
Attribute VB_Name = "ManagerLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset
Dim com As Command
Dim strcompare, Mps, Mid As String

Private Sub xpcmdbutton1_Click()
Set rst = New Recordset
Set com = New Command
Mid = Text1.Text
Mps = Text2.Text
'MsgBox Mps
'MsgBox Mid
If Text1.Text = "" Then
    MsgBox "请输入ID号!"
    ElseIf Text2.Text = "" Then
    MsgBox "请输入密码!"
    ElseIf Text1.Text <> "" And Text2.Text <> "" Then
       'On Error GoTo err
       Call Connect
       com.ActiveConnection = con
       rst.Open "select cPassword from manager where cManageID= '" & Mid & " ' ", con, adOpenStatic, adLockOptimistic
       If rst.EOF Then
          MsgBox "没有此管理员!请确认!"
       Else
       'MsgBox CStr(rst(0))
       
       'strcompare = StrComp(CStr(Text2.Text), CStr(rst(0)), 1)
       'MsgBox strcompare
       If Trim(rst(0)) = Trim(Mps) Then
             MsgBox "密码正确!欢迎光临! :)"
             Text1.Text = ""
             Text2.Text = ""
             ManagerLogin.Visible = False
             VCDMS.Show
            VCDView.MoneyAddText.Enabled = True
            VCDView.MoneyOKBT.Enabled = True
            VCDMS.movieAdd.Enabled = True
            VCDMS.movieEdit.Enabled = True
            VCDMS.rentbydate.Enabled = True
            VCDMS.rentSearch.Enabled = True
            VCDMS.Browse.Enabled = True
            VCDMS.PrintRentdetails.Enabled = True
            VCDMS.customerAdd.Enabled = True
            
            VCDMS.customerSearch.Enabled = True
            VCDMS.customerView.Enabled = True
            VCDMS.Modify.Enabled = True
            VCDView.AddBT.Enabled = True
            VCDView.DetelBT.Enabled = True
            VCDView.EditBT.Enabled = True
            VCDView.PrintBT.Enabled = True
            VCDMS.Toolbar1.Enabled = True
            VCDView.MoneyAddText.Enabled = True
         Else
             MsgBox "密码错误!拒绝登陆!:(您只能浏览影片信息!"
             Text1.Text = ""
             Text2.Text = ""
             'End
             ManagerLogin.Visible = False
             VCDMS.Show
            VCDMS.movieAdd.Enabled = False
            VCDMS.movieEdit.Enabled = False
            VCDMS.rentbydate.Enabled = False
            VCDMS.rentSearch.Enabled = False
            VCDMS.Browse.Enabled = False
            VCDMS.PrintRentdetails.Enabled = False
            VCDMS.customerSearch.Enabled = False
            VCDMS.customerSearch.Enabled = False
            VCDMS.customerView.Enabled = False
            VCDMS.Modify.Enabled = False
            VCDView.AddBT.Enabled = False
            VCDView.DetelBT.Enabled = False
            VCDView.EditBT.Enabled = False
            VCDView.PrintBT.Enabled = False
            VCDMS.Toolbar1.Enabled = False
             Exit Sub
      End If
  End If
End If
Exit Sub
err:
MsgBox "没有数据库信息!无法连接!请在以下窗口填写数据库信息!"
LoginSet.Show
End Sub

Private Sub xpcmdbutton2_Click()
Text1.Text = ""
Text2.Text = ""
Unload Me
VCDMS.Show
VCDMS.movieAdd.Enabled = False
VCDMS.movieEdit.Enabled = False
VCDMS.rentbydate.Enabled = False
VCDMS.rentSearch.Enabled = False
VCDMS.Browse.Enabled = False
VCDMS.PrintRentdetails.Enabled = False
VCDMS.customerSearch.Enabled = False
VCDMS.customerSearch.Enabled = False
VCDMS.customerView.Enabled = False
VCDMS.Modify.Enabled = False
VCDView.AddBT.Enabled = False
VCDView.DetelBT.Enabled = False
VCDView.EditBT.Enabled = False
VCDView.PrintBT.Enabled = False
VCDMS.Toolbar1.Enabled = False
End Sub

⌨️ 快捷键说明

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