www.pudn.com > VBproject VCD.rar > ManPsChange.frm, change:2003-06-18,size:6544b


VERSION 5.00 
Object = "{8ED8CCC1-8472-46D0-93E7-F66929B98442}#2.0#0"; "XPCMD.OCX" 
Begin VB.Form ManPsChange  
   Caption         =   "密码修改" 
   ClientHeight    =   3195 
   ClientLeft      =   5085 
   ClientTop       =   3600 
   ClientWidth     =   4680 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   3195 
   ScaleWidth      =   4680 
   Begin XPCmd.xpcmdbutton ManPsChangeCancelBT  
      Height          =   375 
      Left            =   2760 
      TabIndex        =   6 
      Top             =   2520 
      Width           =   975 
      _ExtentX        =   1720 
      _ExtentY        =   661 
      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 ManPsChangeOKBT  
      Height          =   375 
      Left            =   720 
      TabIndex        =   5 
      Top             =   2520 
      Width           =   975 
      _ExtentX        =   1720 
      _ExtentY        =   661 
      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 Text3  
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   375 
      Left            =   2040 
      TabIndex        =   2 
      Top             =   1680 
      Width           =   1815 
   End 
   Begin VB.TextBox Text2  
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   375 
      Left            =   2040 
      TabIndex        =   1 
      Top             =   960 
      Width           =   1815 
   End 
   Begin VB.TextBox Text1  
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   375 
      Left            =   2040 
      TabIndex        =   0 
      Top             =   240 
      Width           =   1815 
   End 
   Begin VB.Label Label2  
      AutoSize        =   -1  'True 
      Caption         =   "重复新密码" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00FF0000& 
      Height          =   240 
      Left            =   600 
      TabIndex        =   7 
      Top             =   1800 
      Width           =   1200 
   End 
   Begin VB.Label Label3  
      AutoSize        =   -1  'True 
      Caption         =   "新密码" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00FF0000& 
      Height          =   240 
      Left            =   840 
      TabIndex        =   4 
      Top             =   1080 
      Width           =   720 
   End 
   Begin VB.Label Label1  
      AutoSize        =   -1  'True 
      Caption         =   "旧密码" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   12 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      ForeColor       =   &H00FF0000& 
      Height          =   240 
      Left            =   840 
      TabIndex        =   3 
      Top             =   360 
      Width           =   720 
   End 
End 
Attribute VB_Name = "ManPsChange" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Dim OldPs, OldPs1, NewPs1, NewPs2, ManID As String 
Dim com As Command 
Dim rst As Recordset 
 
Private Sub Form_Load() 
Set com = New Command 
Set rst = New Recordset 
End Sub 
 
Private Sub ManPsChangeCancelBT_Click() 
Unload Me 
End Sub 
 
Private Sub ManPsChangeOKBT_Click() 
If Text1.Text = "" Then 
   MsgBox "请输入旧密码!" 
   Text1.SetFocus 
   Exit Sub 
ElseIf Text2.Text = "" Then 
   MsgBox "请输入新密码!" 
   Text2.SetFocus 
   Exit Sub 
ElseIf Text3.Text = "" Then 
   MsgBox "请再次输入新密码!" 
   Text3.SetFocus 
   Exit Sub 
End If 
OldPs1 = Text1.Text 
NewPs1 = Text2.Text 
NewPs2 = Text3.Text 
ManID = ManagerView.Text1.Text 
MsgBox ManID 
com.ActiveConnection = con 
'rst.Close 
'rst.Open "select * from manager where cmanageid = '" & ManID & "'", con, adOpenDynamic, adLockBatchOptimistic 
'OldPs = Trim(rst(1)) 
OldPs = ManagerView.Text2.Text 
MsgBox OldPs 
If OldPs1 <> OldPs Then 
   MsgBox OldPs1 & 11 
   MsgBox OldPs & 11 
   MsgBox "密码不正确!请重试!" 
   Text1.Text = "" 
   'Text2.Text = "" 
   Text1.SetFocus 
   'rst.Close 
   Exit Sub 
ElseIf NewPs1 <> NewPs2 Then 
   MsgBox "两次新密码输入有误!请重输!" 
   Text2.Text = "" 
   Text3.Text = "" 
   Text2.SetFocus 
   'rst.Close 
   Exit Sub 
Else 
   ManagerView.Text2.Text = NewPs2 
   MsgBox NewPs2 
   MsgBox "密码修改成功!请返回上一窗口确定保存!" 
   'rst.Close 
End If 
End Sub