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

📄 frmuser.frm

📁 针对于订房中心的酒店合同管理。管理权限有管理员和业务员等。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmUser 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "更改资料"
   ClientHeight    =   2640
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4770
   Icon            =   "frmUser.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2640
   ScaleWidth      =   4770
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame2 
      Height          =   2415
      Left            =   3600
      TabIndex        =   10
      Top             =   120
      Width           =   1095
      Begin VB.CommandButton Command3 
         Caption         =   "返回"
         Height          =   375
         Left            =   120
         TabIndex        =   13
         Top             =   1800
         Width           =   855
      End
      Begin VB.CommandButton Command2 
         Caption         =   "取消"
         Height          =   375
         Left            =   120
         TabIndex        =   12
         Top             =   1080
         Width           =   855
      End
      Begin VB.CommandButton Command1 
         Caption         =   "更改"
         Height          =   375
         Left            =   120
         TabIndex        =   11
         Top             =   360
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      Height          =   2415
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3375
      Begin VB.TextBox TxtTel 
         Height          =   375
         Left            =   1080
         TabIndex        =   8
         Top             =   1800
         Width           =   1935
      End
      Begin VB.OptionButton OptionFemail 
         Caption         =   "女"
         Height          =   375
         Left            =   1920
         TabIndex        =   5
         Top             =   720
         Width           =   975
      End
      Begin VB.OptionButton OptionMan 
         Caption         =   "男"
         Height          =   375
         Left            =   1200
         TabIndex        =   4
         Top             =   720
         Value           =   -1  'True
         Width           =   615
      End
      Begin VB.TextBox TxtUmail 
         Height          =   375
         Left            =   1080
         TabIndex        =   3
         Top             =   1200
         Width           =   1935
      End
      Begin VB.TextBox TxtName 
         Height          =   375
         Left            =   1080
         TabIndex        =   2
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label4 
         Caption         =   "电  话:"
         Height          =   255
         Left            =   360
         TabIndex        =   9
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "E-Mail:"
         Height          =   375
         Left            =   360
         TabIndex        =   7
         Top             =   1320
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "性  别:"
         Height          =   255
         Left            =   360
         TabIndex        =   6
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "姓  名:"
         Height          =   255
         Left            =   360
         TabIndex        =   1
         Top             =   360
         Width           =   735
      End
   End
End
Attribute VB_Name = "frmUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim conn As New ADODB.Connection
Dim rs_mima As New ADODB.Recordset
Dim sql As String
conn.Open "provider=Microsoft.Jet.OLEDB.4.0; data source=" & App.Path & "\database\yh8888.mdb"

  If Trim(TxtName.Text) = "" Then
    MsgBox "姓名不能为空!", vbOKOnly + vbExclamation, ""
    TxtName.SetFocus
    TxtName.Text = ""
    Exit Sub
End If
 If Trim(TxtUmail.Text) = "" Then
    MsgBox "电子邮件不能为空!", vbOKOnly + vbExclamation, ""
    TxtUmail.SetFocus
    TxtUmail.Text = ""
    Exit Sub
End If
 If Trim(TxtTel.Text) = "" Then
    MsgBox "电话不能为空!", vbOKOnly + vbExclamation, ""
    TxtTel.SetFocus
    TxtTel.Text = ""
    Exit Sub
'End If
  Else
    
    sql = "select * from admin where 用户ID='" & username & "'"
    
    rs_mima.Open sql, conn, adOpenKeyset, adLockPessimistic
    rs_mima.Fields(1) = TxtName.Text
    If OptionMan.Value Then
      rs_mima.Fields(4) = "男"
      Else
      rs_mimars_mima.Fields(4) = "女"
      End If
    rs_mima.Fields(5) = TxtUmail.Text
    rs_mima.Fields(6) = TxtTel.Text
    rs_mima.Update
    MsgBox "资料修改成功", vbOKOnly + vbExclamation, ""
    Unload Me
  End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Unload Me
Load frmInfo
frmInfo.Show vbModal
End Sub

⌨️ 快捷键说明

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