frmModifyuserinfo.frm
上传用户:rocksue
上传日期:2013-06-17
资源大小:41926k
文件大小:4k
源码类别:

SQL Server

开发平台:

SQL

  1. VERSION 5.00
  2. Begin VB.Form frmModifyuserinfo 
  3.    Caption         =   "修改密码"
  4.    ClientHeight    =   3096
  5.    ClientLeft      =   48
  6.    ClientTop       =   348
  7.    ClientWidth     =   4044
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3096
  10.    ScaleWidth      =   4044
  11.    StartUpPosition =   2  'CenterScreen
  12.    Begin VB.TextBox Text1 
  13.       BeginProperty Font 
  14.          Name            =   "宋体"
  15.          Size            =   10.8
  16.          Charset         =   0
  17.          Weight          =   700
  18.          Underline       =   0   'False
  19.          Italic          =   0   'False
  20.          Strikethrough   =   0   'False
  21.       EndProperty
  22.       Height          =   492
  23.       IMEMode         =   3  'DISABLE
  24.       Index           =   1
  25.       Left            =   1920
  26.       PasswordChar    =   "*"
  27.       TabIndex        =   3
  28.       Top             =   360
  29.       Width           =   1572
  30.    End
  31.    Begin VB.TextBox Text1 
  32.       BeginProperty Font 
  33.          Name            =   "宋体"
  34.          Size            =   10.8
  35.          Charset         =   0
  36.          Weight          =   700
  37.          Underline       =   0   'False
  38.          Italic          =   0   'False
  39.          Strikethrough   =   0   'False
  40.       EndProperty
  41.       Height          =   492
  42.       IMEMode         =   3  'DISABLE
  43.       Index           =   2
  44.       Left            =   1920
  45.       PasswordChar    =   "*"
  46.       TabIndex        =   2
  47.       Top             =   1080
  48.       Width           =   1572
  49.    End
  50.    Begin VB.CommandButton cmdOK 
  51.       Caption         =   "确认"
  52.       BeginProperty Font 
  53.          Name            =   "宋体"
  54.          Size            =   10.8
  55.          Charset         =   0
  56.          Weight          =   700
  57.          Underline       =   0   'False
  58.          Italic          =   0   'False
  59.          Strikethrough   =   0   'False
  60.       EndProperty
  61.       Height          =   492
  62.       Left            =   840
  63.       TabIndex        =   1
  64.       Top             =   1800
  65.       Width           =   972
  66.    End
  67.    Begin VB.CommandButton cmdCancel 
  68.       Caption         =   "取消"
  69.       BeginProperty Font 
  70.          Name            =   "宋体"
  71.          Size            =   10.8
  72.          Charset         =   0
  73.          Weight          =   700
  74.          Underline       =   0   'False
  75.          Italic          =   0   'False
  76.          Strikethrough   =   0   'False
  77.       EndProperty
  78.       Height          =   492
  79.       Left            =   2160
  80.       TabIndex        =   0
  81.       Top             =   1800
  82.       Width           =   972
  83.    End
  84.    Begin VB.Label Label2 
  85.       Caption         =   "请输入新密码"
  86.       BeginProperty Font 
  87.          Name            =   "宋体"
  88.          Size            =   10.8
  89.          Charset         =   0
  90.          Weight          =   700
  91.          Underline       =   0   'False
  92.          Italic          =   0   'False
  93.          Strikethrough   =   0   'False
  94.       EndProperty
  95.       Height          =   372
  96.       Left            =   360
  97.       TabIndex        =   5
  98.       Top             =   480
  99.       Width           =   1452
  100.    End
  101.    Begin VB.Label Label3 
  102.       Caption         =   "请确认新密码"
  103.       BeginProperty Font 
  104.          Name            =   "宋体"
  105.          Size            =   10.8
  106.          Charset         =   0
  107.          Weight          =   700
  108.          Underline       =   0   'False
  109.          Italic          =   0   'False
  110.          Strikethrough   =   0   'False
  111.       EndProperty
  112.       Height          =   372
  113.       Left            =   360
  114.       TabIndex        =   4
  115.       Top             =   1200
  116.       Width           =   1452
  117.    End
  118. End
  119. Attribute VB_Name = "frmModifyuserinfo"
  120. Attribute VB_GlobalNameSpace = False
  121. Attribute VB_Creatable = False
  122. Attribute VB_PredeclaredId = True
  123. Attribute VB_Exposed = False
  124. Private Sub cmdCancel_Click()
  125.     Unload Me
  126. End Sub
  127. Private Sub cmdOK_Click()
  128.     Dim txtSQL, MsgText As String
  129.     Dim mrc As ADODB.Recordset
  130.     
  131.     If Trim(Text1(1).Text) <> Trim(Text1(2).Text) Then
  132.         MsgBox "密码输入不正确!", vbOKOnly + vbExclamation, "警告"
  133.         Text1(1).SetFocus
  134.         Text1(1).Text = ""
  135.     Else
  136.         txtSQL = "select * from user_Info where user_ID = '" & UserName & "'"
  137.         Set mrc = ExecuteSQL(txtSQL, MsgText)
  138.         mrc.Fields(1) = Text1(1).Text
  139.         mrc.Update
  140.         mrc.Close
  141.         MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "修改密码"
  142.         Me.Hide
  143.         
  144.     End If
  145.         
  146.         
  147. End Sub