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

📄 frm_changepin.frm

📁 一个完整的非接触IC卡会员管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_ChangePin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "更改密码"
   ClientHeight    =   2760
   ClientLeft      =   45
   ClientTop       =   450
   ClientWidth     =   4215
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2760
   ScaleWidth      =   4215
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtpwd 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Index           =   0
      Left            =   1800
      MaxLength       =   6
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   240
      Width           =   1935
   End
   Begin VB.TextBox txtpwd 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   1800
      MaxLength       =   6
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   720
      Width           =   1935
   End
   Begin VB.TextBox txtpwd 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Index           =   2
      Left            =   1800
      MaxLength       =   6
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1200
      Width           =   1935
   End
   Begin VB.CommandButton Exit 
      Caption         =   "退出(&X)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2160
      TabIndex        =   1
      Top             =   2040
      Width           =   1335
   End
   Begin VB.CommandButton Issue 
      Caption         =   "修改(&E)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   480
      TabIndex        =   0
      Top             =   2040
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "旧口令"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   7
      Top             =   360
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "新口令:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "确认新口令:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   1320
      Width           =   1695
   End
End
Attribute VB_Name = "frm_ChangePin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'
'
Private Sub Exit_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Me.Top = (Screen.Height - Me.Height) / 2
    Me.Left = (Screen.Width - Me.Width) / 2
End Sub

Private Sub Issue_Click()
    Dim pbRet As Boolean
    Dim psOldPIN As String
    Dim psNewPIN As String
    Dim DeCpassword As String

    If Len(Trim(txtpwd(0))) <> 6 Or Len(Trim(txtpwd(1))) <> 6 Or Len(Trim(txtpwd(2))) <> 6 Then
        MsgBox "密码不能少于6个数字", vbInformation, "提示信息"
        Exit Sub
    End If
       
    DeCpassword = DeCrypt(txtpwd(0).Text, "19760419")
    Set rs = GetRecordset(maSys_db, "select * from 用户信息表 where 员工姓名='" & strUserName & "'")
    If Not rs.EOF Then  '该员工编号在数据库中已经存在!
         If rs!登录密码 <> DeCpassword Then
            MsgBox "旧密码错误!", vbInformation, "提示信息": Exit Sub
         End If
    Else
        MsgBox "用户信息搜索失败,请重试!", vbInformation, "提示信息": Exit Sub
    End If
    
    If txtpwd(1) <> txtpwd(2) Then
        MsgBox "新口令两次输入不相同", vbInformation, "提示信息"
        Exit Sub
    End If
    
    DeCpassword = DeCrypt(txtpwd(1).Text, "19760419")
    maSys_db.Execute "update 用户信息表 set 登录密码='" & DeCpassword & "'  where 员工姓名='" & strUserName & "'"
    MsgBox "密码修改成功!", vbInformation, "提示信息": Exit Sub
   
End Sub
'
Private Sub txtpwd_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
    'Call Key_Trans(KeyCode)
End Sub

Private Sub txtpwd_KeyPress(Index As Integer, KeyAscii As Integer)
    If KeyAscii > 57 Or KeyAscii < 48 And KeyAscii <> 8 Then
        KeyAscii = 0
    End If
End Sub
'


⌨️ 快捷键说明

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