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

📄 frmmmxg.frm

📁 c++酒店管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmMMXG 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "用户密码修改"
   ClientHeight    =   1860
   ClientLeft      =   30
   ClientTop       =   330
   ClientWidth     =   3750
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1860
   ScaleWidth      =   3750
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   372
      Left            =   120
      Top             =   1440
      Visible         =   0   'False
      Width           =   972
      _ExtentX        =   2117
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Height          =   1152
      Left            =   240
      TabIndex        =   2
      Top             =   120
      Width           =   3192
      Begin VB.TextBox Text1 
         Height          =   315
         IMEMode         =   3  'DISABLE
         Left            =   960
         TabIndex        =   4
         Top             =   240
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Height          =   315
         IMEMode         =   3  'DISABLE
         Left            =   960
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   660
         Width           =   1935
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "当前用户"
         Height          =   180
         Left            =   180
         TabIndex        =   6
         Top             =   300
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "密码"
         Height          =   180
         Left            =   360
         TabIndex        =   5
         Top             =   720
         Width           =   360
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   315
      Left            =   1320
      TabIndex        =   1
      Top             =   1440
      Width           =   1092
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   315
      Left            =   2520
      TabIndex        =   0
      Top             =   1440
      Width           =   1092
   End
End
Attribute VB_Name = "frmMMXG"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error GoTo ErrorMsg

If Text2.Text = "" Then
If MsgBox("密码为空!你确定不设置密码吗?", vbQuestion + vbYesNo, "修改密码") = vbNo Then
Text2.SetFocus
Exit Sub
End If
End If

password = Text2.Text
Adodc1.Recordset(2) = password
Adodc1.Recordset.UpdateBatch adAffectAllChapters
MsgBox "修改密码成功!", vbInformation + vbOKOnly, "修改密码"
Unload Me
Exit Sub

ErrorMsg:

MsgBox "修改密码失败!", vbInformation + vbOKOnly, "修改密码"
Unload Me

End Sub

Private Sub Command2_Click()
Unload Me

End Sub

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

Text1.Text = UserName
Text1.Locked = True
Text2.Text = password

Adodc1.ConnectionString = constr
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from 用户表 where 用户名称 = '" & Text1.Text & "'"
Adodc1.Refresh



End Sub

⌨️ 快捷键说明

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