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

📄 main_xtwh_klsz.frm

📁 一个比较完整的数据库编程技巧”洗浴管理系统“
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form main_xtwh_klsz 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "系统维护--【口令设置】"
   ClientHeight    =   2235
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5265
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2235
   ScaleWidth      =   5265
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      Height          =   2115
      Left            =   60
      TabIndex        =   0
      Top             =   45
      Width           =   5160
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   435
         Left            =   4665
         Top             =   960
         Visible         =   0   'False
         Width           =   2640
         _ExtentX        =   4657
         _ExtentY        =   767
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   1
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
         OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=XYGLXT"
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   "select * from 权限信息表"
         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.CommandButton Command2 
         Caption         =   "取消"
         Height          =   360
         Left            =   1770
         TabIndex        =   7
         Top             =   1620
         Width           =   1530
      End
      Begin VB.TextBox Text2 
         Height          =   330
         Left            =   1170
         MaxLength       =   6
         TabIndex        =   6
         Top             =   1095
         Width           =   3420
      End
      Begin VB.CommandButton Command3 
         Caption         =   "退出"
         Height          =   360
         Left            =   3315
         TabIndex        =   5
         Top             =   1620
         Width           =   1530
      End
      Begin VB.CommandButton Command1 
         Caption         =   "保存"
         Height          =   360
         Left            =   240
         TabIndex        =   4
         Top             =   1620
         Width           =   1530
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   330
         Left            =   1170
         Locked          =   -1  'True
         MaxLength       =   6
         TabIndex        =   3
         Top             =   705
         Width           =   3420
      End
      Begin MSDataListLib.DataCombo DataCombo1 
         Bindings        =   "main_xtwh_klsz.frx":0000
         Height          =   330
         Left            =   1185
         TabIndex        =   2
         Top             =   330
         Width           =   3420
         _ExtentX        =   6033
         _ExtentY        =   582
         _Version        =   393216
         ListField       =   "操作员名称"
         BoundColumn     =   "操作员名称"
         Text            =   ""
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "操作员名称:             原  密  码:              现  密  码:"
         Height          =   990
         Left            =   150
         TabIndex        =   1
         Top             =   435
         Width           =   1110
      End
   End
End
Attribute VB_Name = "main_xtwh_klsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'定义数据集对象
Dim rs1 As New ADODB.Recordset
Dim txtSQL As String     '定义字符串变量
Private Sub Form_Activate()
 '清空文本框数据
 Text1.Text = ""
 Text2.Text = ""
 '设置窗体标题栏内容
' Me.Caption = Me.Caption & "     操作员: " & frm_main.St1.Panels(3).Text
End Sub
Private Sub DataCombo1_Change()
 '按操作员名称查询权限信息
 txtSQL = "select * from 权限信息表 where 操作员名称='" & DataCombo1.BoundText & "'"
 Set rs1 = ESQL(txtSQL)
 If rs1.RecordCount > 0 Then     '当记录大于零时
  Text1.Text = Trim(rs1.Fields("密码"))     '赋值给text1.text
 Else
  Text1.Text = ""
 End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
 frm_main.Enabled = True     '设置frm_main窗体有效
End Sub
Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then Text2.SetFocus     '按回车键text2获得焦点
End Sub
Private Sub Command1_Click()     '保存操作员信息
 '按操作员名称查询权限信息
 txtSQL = "select * from 权限信息表 where 操作员名称='" & DataCombo1.BoundText & "'"
 Set rs1 = ESQL(txtSQL)
 If Text2.Text <> "" Then
  rs1.Fields("密码") = Trim(Text2.Text)     '赋值给rs1.Fields("密码")
  rs1.Update     '更新记录
  '清空文本框内的数据
  Text1.Text = ""
  Text2.Text = ""
  MsgBox "密码设置成功!", , "系统提示"
  Unload Me
 End If
End Sub
Private Sub Command2_Click()     '取消操作员信息
 Text2.Text = ""
End Sub
Private Sub Command3_Click()
  frm_main.Enabled = True
  Unload Me
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
  If KeyAscii = vbKeyReturn Then Command1.SetFocus
End Sub

⌨️ 快捷键说明

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