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

📄 frm_jl.frm

📁 美容院管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_jl 
   BackColor       =   &H0080C0FF&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "经理"
   ClientHeight    =   1752
   ClientLeft      =   2760
   ClientTop       =   3756
   ClientWidth     =   4476
   Icon            =   "frm_jl.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1752
   ScaleWidth      =   4476
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      BackColor       =   &H0080C0FF&
      Caption         =   "请输入:"
      Enabled         =   0   'False
      Height          =   912
      Left            =   96
      TabIndex        =   8
      Top             =   756
      Width           =   3000
      Begin VB.TextBox Text1 
         BackColor       =   &H00C0E0FF&
         Height          =   264
         IMEMode         =   3  'DISABLE
         Index           =   3
         Left            =   1092
         MaxLength       =   8
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   540
         Width           =   1800
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00C0E0FF&
         Height          =   264
         IMEMode         =   3  'DISABLE
         Index           =   2
         Left            =   1092
         MaxLength       =   8
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   180
         Width           =   1800
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "确认密码:"
         Height          =   180
         Index           =   3
         Left            =   180
         TabIndex        =   10
         Top             =   588
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "新密码:"
         Height          =   180
         Index           =   2
         Left            =   180
         TabIndex        =   9
         Top             =   240
         Width           =   720
      End
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0E0FF&
      Height          =   264
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   1188
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   468
      Width           =   1800
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0E0FF&
      Height          =   264
      Index           =   0
      Left            =   1188
      TabIndex        =   0
      Top             =   132
      Width           =   1800
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Cancel          =   -1  'True
      Height          =   390
      Index           =   1
      Left            =   3192
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_jl.frx":000C
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   1272
      UseMaskColor    =   -1  'True
      Width           =   1185
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Enabled         =   0   'False
      Height          =   390
      Index           =   2
      Left            =   3192
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_jl.frx":0FC6
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   840
      UseMaskColor    =   -1  'True
      Width           =   1185
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "旧密码:"
      Height          =   180
      Index           =   1
      Left            =   216
      TabIndex        =   7
      Top             =   492
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "经  理:"
      Height          =   180
      Index           =   0
      Left            =   216
      TabIndex        =   6
      Top             =   168
      Width           =   732
   End
End
Attribute VB_Name = "frm_jl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim rec As Recordset

Private Sub OKButton_Click()

End Sub

Private Sub Command1_Click(Index As Integer)
If Index = 1 Then
    Unload Me
Else
    If Text1(2) <> Text1(3) Then
        MsgBox "您输入的密码不能确定", vbOKOnly + vbCritical, "错误"
        Text1(3).SetFocus
        Exit Sub
        
    End If
    sqlstr = "update 经理表 set 姓名='" + Text1(0) + "',密码='" + Text1(2) + "'"
    db.Execute sqlstr
    MsgBox "修改密码成功", vbOKOnly + vbInformation, "提示"
    Unload Me
End If
End Sub

Private Sub Form_Load()
Set rec = db.OpenRecordset("经理表")
Text1(0) = rec.Fields("姓名")

End Sub

Private Sub Text1_GotFocus(Index As Integer)
  Text1(Index).SelStart = 0
Text1(Index).SelLength = Len(Text1(Index))
End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If Index = 1 Then
    If KeyAscii = 13 Then
        Set rec = db.OpenRecordset("select * from 经理表 where 密码='" + Text1(1) + "'")
        If rec.EOF And rec.BOF Then
            Frame1.Enabled = False
            Text1(1).SelStart = 0
            Text1(1).SelLength = Len(Text1(1))
            MsgBox "您输入的旧密码输入错误", vbOKOnly + vbCritical, "错误"
        Else
            Frame1.Enabled = True
            Command1(2).Enabled = True
            Text1(2).SetFocus
        End If
    End If
End If
If Index = 3 Then
    If KeyAscii = 13 Then
        Command1_Click 2
    End If
End If
End Sub

⌨️ 快捷键说明

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