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

📄 managerview.frm

📁 原创VB+SQL影音租赁系统 醮简单 具体看里边的文本文档
💻 FRM
字号:
VERSION 5.00
Object = "{8ED8CCC1-8472-46D0-93E7-F66929B98442}#2.0#0"; "XPCMD.OCX"
Begin VB.Form ManagerView 
   Caption         =   "Form1"
   ClientHeight    =   6270
   ClientLeft      =   3045
   ClientTop       =   2520
   ClientWidth     =   8295
   LinkTopic       =   "Form1"
   ScaleHeight     =   6270
   ScaleWidth      =   8295
   Begin VB.TextBox Text7 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2880
      TabIndex        =   5
      Top             =   3120
      Width           =   1695
   End
   Begin XPCmd.xpcmdbutton ManPsChangeBT 
      Height          =   375
      Left            =   4680
      TabIndex        =   2
      Top             =   1320
      Width           =   855
      _ExtentX        =   1508
      _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 ManCancelBT 
      Height          =   495
      Left            =   5880
      TabIndex        =   10
      Top             =   5280
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   873
      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 ManClearBT 
      Height          =   495
      Left            =   3360
      TabIndex        =   9
      Top             =   5280
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   873
      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 ManOKBT 
      Height          =   495
      Left            =   840
      TabIndex        =   8
      Top             =   5280
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   873
      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 Text6 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2880
      TabIndex        =   7
      Top             =   4320
      Width           =   3495
   End
   Begin VB.TextBox Text5 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2880
      TabIndex        =   6
      Top             =   3720
      Width           =   1335
   End
   Begin VB.TextBox Text4 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2880
      TabIndex        =   4
      Top             =   2520
      Width           =   855
   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            =   2880
      TabIndex        =   3
      Top             =   1920
      Width           =   1215
   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
      IMEMode         =   3  'DISABLE
      Left            =   2880
      Locked          =   -1  'True
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1320
      Width           =   1215
   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            =   2880
      Locked          =   -1  'True
      TabIndex        =   0
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label7 
      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            =   1800
      TabIndex        =   17
      Top             =   3240
      Width           =   960
   End
   Begin VB.Label Label6 
      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            =   2040
      TabIndex        =   16
      Top             =   4440
      Width           =   480
   End
   Begin VB.Label Label5 
      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            =   2040
      TabIndex        =   15
      Top             =   3840
      Width           =   480
   End
   Begin VB.Label Label4 
      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            =   2040
      TabIndex        =   14
      Top             =   2640
      Width           =   480
   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            =   2040
      TabIndex        =   13
      Top             =   2040
      Width           =   480
   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            =   2040
      TabIndex        =   12
      Top             =   1440
      Width           =   480
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "管理员ID"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   1800
      TabIndex        =   11
      Top             =   840
      Width           =   960
   End
End
Attribute VB_Name = "ManagerView"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim com As Command
Dim rst As Recordset

Private Sub Form_Load()
Set com = New Command
Set rst = New Recordset
rst.Open "select * from manager", con, adOpenDynamic, adLockBatchOptimistic
Text1.Text = Trim(rst(0))
Text2.Text = Trim(rst(1))
Text3.Text = Trim(rst(2))
Text4.Text = Trim(rst(3))
Text5.Text = Trim(rst(5))
Text6.Text = Trim(rst(6))
Text7.Text = Trim(rst(4))
rst.Close
End Sub

Private Sub ManCancelBT_Click()
Unload Me
End Sub

Private Sub ManClearBT_Click()
For Each Control In MemberRE
    If TypeOf Control Is TextBox Then
      If Control <> TID Then
        Control.Text = ""
      End If
    End If
Next
End Sub

Private Sub ManOKBT_Click()
For Each Control In ManagerView
    If TypeOf Control Is TextBox Then
     'If Control <> TID Then
        If Trim(Control.Text) = "" Then
            MsgBox "请输入完整信息"
            Exit Sub
        End If
      'End If
    End If
Next
'If Len(Text1.Text) > 10 Then
'   MsgBox "ID过长!"
'ElseIf Len(Text1.Text) < 5 Then
'   MsgBox "ID过短!"
'End If
If Len(Text3.Text) > 15 Then
    MsgBox "姓名过长!请检查!"
    Text3.SetFocus
    Exit Sub
End If
If Asc(Trim(Text4.Text)) > 57 Or Asc(Trim(Text4.Text)) < 48 Then
   MsgBox "您的年龄有问题!请输入数字!"
   Text4.SetFocus
    ElseIf Len(Trim(Text4.Text)) > 3 Then
           MsgBox "您的年龄有那么大嘛!请检查!"
           Text4.SetFocus
   ElseIf Trim(Text4.Text) = 0 Then
           MsgBox "0岁的您!"
           Text4.SetFocus
    Exit Sub
End If
'If ComboSex.Text = "" Then
'   MsgBox "请选择您的性别!"
'   ComboSex.SetFocus
'End If
If Len(Trim(Text7.Text)) > 30 Then
    MsgBox "电子邮件过长!请检查!"
    Text7.SetFocus
    Exit Sub
End If

If MemberRE.checkemail(Text7.Text) = 0 Then
    MsgBox "电子邮件输入有误!请检查!"
    Text7.SetFocus
    Exit Sub
End If

If Asc(Trim(Text5.Text)) > 57 Or Asc(Trim(Text5.Text)) < 48 Then
    MsgBox "电话号码有误!请输入数字!"
    Text5.SetFocus
    ElseIf Len(Trim(Text5.Text)) > 13 Or Len(Trim(Text5.Text)) < 8 Then
            MsgBox "电话号码有误!请检查!"
            Text5.SetFocus
    Exit Sub
End If
Dim id, name, money, age, ps, sex, email, address, postcode, phone, cardnum As String

id = Text1.Text
ps = Text2.Text
name = Trim(Text3.Text)
age = Trim(Text4.Text)
'sex = ComboSex.Text
email = Trim(Text7.Text)
address = Trim(Text6.Text)
'postcode = TPostcode.Text
phone = Trim(Text5.Text)
'cardnum = TCardnum.Text
'money = TMoney.Text
'On Error GoTo err
'com.ActiveConnection = con
'rst.Close
rst.Open "update manager set cpassword='" & ps & "',cname='" & name & "',cage='" & age & "',cemail='" & email & "',ctel='" & phone & "',caddress='" & _
address & "'", con, adOpenDynamic, adLockOptimistic
MsgBox "您的信息修改成功!:)欢迎光临!"
'rst.Close
Unload Me
Exit Sub
err:
MsgBox "请确认数据库是否连接!"
End Sub

Private Sub ManPsChangeBT_Click()
ManPsChange.Show
End Sub

⌨️ 快捷键说明

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