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

📄 changeotherpasswordform.frm

📁 即时通讯
💻 FRM
字号:
VERSION 5.00
Begin VB.Form ChangeOtherPasswordForm 
   Caption         =   "修改密码"
   ClientHeight    =   2955
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4080
   LinkTopic       =   "Form1"
   ScaleHeight     =   2955
   ScaleWidth      =   4080
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame2 
      Height          =   735
      Left            =   0
      TabIndex        =   9
      Top             =   2280
      Width           =   4095
      Begin VB.CommandButton Command2 
         Caption         =   "退出"
         Height          =   375
         Left            =   3000
         TabIndex        =   11
         Top             =   240
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "修改"
         Default         =   -1  'True
         Height          =   375
         Left            =   1920
         TabIndex        =   10
         Top             =   240
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      Height          =   2415
      Left            =   0
      TabIndex        =   0
      Top             =   -120
      Width           =   4095
      Begin VB.TextBox Text4 
         Height          =   300
         IMEMode         =   3  'DISABLE
         Left            =   1680
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   8
         Top             =   1800
         Width           =   1695
      End
      Begin VB.TextBox Text3 
         Height          =   300
         IMEMode         =   3  'DISABLE
         Left            =   1680
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   7
         Top             =   840
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         Height          =   300
         IMEMode         =   3  'DISABLE
         Left            =   1680
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   6
         Top             =   1320
         Visible         =   0   'False
         Width           =   1695
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   300
         Left            =   1680
         MaxLength       =   20
         TabIndex        =   5
         Top             =   480
         Width           =   1695
      End
      Begin VB.Label Label4 
         Caption         =   "新密码确认:"
         Height          =   255
         Left            =   600
         TabIndex        =   4
         Top             =   1800
         Width           =   1215
      End
      Begin VB.Label Label3 
         Caption         =   "新  密  码:"
         Height          =   255
         Left            =   600
         TabIndex        =   3
         Top             =   920
         Width           =   1215
      End
      Begin VB.Label Label2 
         Caption         =   "旧  密  码:"
         Height          =   255
         Left            =   600
         TabIndex        =   2
         Top             =   1360
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "用  户  名:"
         Height          =   255
         Left            =   600
         TabIndex        =   1
         Top             =   480
         Width           =   1215
      End
   End
End
Attribute VB_Name = "ChangeOtherPasswordForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'*    模 块 名 称 :应用程序修改其它用户密码窗体
'*    功 能 描 述 :应用程序修改其它用户密码窗体
'*    程序员姓名  : 陈齐国
'*    最后修改人  : 陈齐国
'*    最后修改时间:2005/10/30
'**************************************
Private m_passwordDAO As employeeDAO ' 数据库操作类
Private m_recordset As ADODB.Recordset ' 数据操作数据集对象
Private oldpassword As String          ' 旧密码
Private f As String

Public m_employeeId As String          ' 要修改密码的用户ID

Private Sub Command1_Click()
Check
If f = 1 Then
    m_passwordDAO.Modifypassword m_recordset, Trim(m_employeeId), Trim(Text3.text)
    MainForm.g_msgText = "修改成功!"
    HMsgBox MainForm.g_msgText, 0, 4
    Unload Me
End If
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Form_Load()
Set m_passwordDAO = New employeeDAO
Set m_recordset = New ADODB.Recordset
SetToCenter Me


m_passwordDAO.FindById m_recordset, Trim(m_employeeId)
With m_recordset
    Text1.text = Trim(.Fields("员工姓名"))
    oldpassword = Trim(.Fields("密码"))
End With
m_recordset.Close
End Sub
Private Sub Check()
    f = "1"

    If Trim(Text3.text) = "" Then
        MainForm.g_msgText = "新密码不能为空,请重新输入!"
        HMsgBox MainForm.g_msgText, 0, 1
        Text3.SetFocus
        f = "0"
        Exit Sub
    End If
    
        
    If Trim(Text3.text) <> Trim(Text4.text) Then
        MainForm.g_msgText = "确认密码和新密码不一样,请重新输入!"
        HMsgBox MainForm.g_msgText, 0, 1
        Text4.SetFocus
        f = "0"
        Exit Sub
    End If
        
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set m_passwordDAO = Nothing
    Set m_recordset = Nothing
End Sub

⌨️ 快捷键说明

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