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

📄 frm_qxgl.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 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 frm_qxgl 
   Caption         =   "权限管理"
   ClientHeight    =   3900
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6525
   Icon            =   "frm_qxgl.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3900
   ScaleWidth      =   6525
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame4 
      Caption         =   "操作员"
      Height          =   3675
      Left            =   60
      TabIndex        =   6
      Top             =   60
      Width           =   1725
      Begin MSDataListLib.DataList DataList1 
         Height          =   3210
         Left            =   60
         TabIndex        =   10
         Top             =   240
         Width           =   1590
         _ExtentX        =   2805
         _ExtentY        =   5662
         _Version        =   393216
         ListField       =   "操作员姓名"
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "权限设置"
      Height          =   3135
      Left            =   1755
      TabIndex        =   0
      Top             =   60
      Width           =   4710
      Begin VB.CheckBox Check1 
         Caption         =   "系统维护"
         Height          =   375
         Index           =   9
         Left            =   3135
         TabIndex        =   15
         Top             =   2655
         Width           =   1545
      End
      Begin VB.CheckBox Check1 
         Caption         =   "系统设置"
         Height          =   375
         Index           =   8
         Left            =   3135
         TabIndex        =   8
         Top             =   2310
         Width           =   1545
      End
      Begin VB.CheckBox Check1 
         Caption         =   "管理部"
         Height          =   375
         Index           =   3
         Left            =   3135
         TabIndex        =   7
         Top             =   540
         Width           =   1545
      End
      Begin VB.CheckBox Check1 
         Caption         =   "经理室"
         Height          =   390
         Index           =   7
         Left            =   3135
         TabIndex        =   5
         Top             =   1950
         Width           =   1185
      End
      Begin VB.CheckBox Check1 
         Caption         =   "保安部"
         Height          =   375
         Index           =   6
         Left            =   3135
         TabIndex        =   4
         Top             =   1620
         Width           =   1545
      End
      Begin VB.CheckBox Check1 
         Caption         =   "财务部"
         Height          =   375
         Index           =   5
         Left            =   3135
         TabIndex        =   3
         Top             =   1260
         Width           =   1545
      End
      Begin VB.CheckBox Check1 
         Caption         =   "工程部"
         Height          =   375
         Index           =   4
         Left            =   3135
         TabIndex        =   2
         Top             =   885
         Width           =   1545
      End
      Begin VB.CheckBox Check1 
         Caption         =   "经营部"
         Height          =   375
         Index           =   2
         Left            =   3135
         TabIndex        =   1
         Top             =   210
         Width           =   1545
      End
      Begin VB.Image Image1 
         Height          =   2625
         Left            =   120
         Picture         =   "frm_qxgl.frx":1C7A
         Stretch         =   -1  'True
         Top             =   270
         Width           =   2835
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   840
      Top             =   4365
      Visible         =   0   'False
      Width           =   1860
      _ExtentX        =   3281
      _ExtentY        =   582
      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         =   ""
      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 Frame2 
      Height          =   660
      Left            =   1755
      TabIndex        =   9
      Top             =   3075
      Width           =   4710
      Begin VB.CommandButton Command4 
         Caption         =   "退出"
         Height          =   375
         Left            =   3585
         TabIndex        =   14
         Top             =   195
         Width           =   900
      End
      Begin VB.CommandButton Command3 
         Caption         =   "确定"
         Height          =   375
         Left            =   2535
         TabIndex        =   13
         Top             =   195
         Width           =   900
      End
      Begin VB.CommandButton Command2 
         Caption         =   "全不选"
         Height          =   375
         Left            =   1230
         TabIndex        =   12
         Top             =   195
         Width           =   900
      End
      Begin VB.CommandButton Command1 
         Caption         =   "全选"
         Height          =   375
         Left            =   180
         TabIndex        =   11
         Top             =   195
         Width           =   900
      End
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   330
      Left            =   3000
      Top             =   4440
      Visible         =   0   'False
      Width           =   1860
      _ExtentX        =   3281
      _ExtentY        =   582
      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         =   ""
      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
End
Attribute VB_Name = "frm_qxgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer     '定义一个整型变量
Private Sub Form_Load()
    '自动识别路径
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from tab_power"
    Adodc1.Refresh
    Set DataList1.RowSource = Adodc1

    Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc2.RecordSource = "select * from tab_power"
    Adodc2.Refresh

    For i = 2 To 9
        Check1(i).Value = 1
    Next i
End Sub

Private Sub DataList1_Click()
    '查看操作员权限
    Adodc2.RecordSource = "select * from tab_power where 操作员姓名='" & Trim(DataList1.BoundText) & "'"
    'Trim 函数返回 Variant (String),其中包含指定字符串的拷贝,没有前导和尾随空白。
    Adodc2.Refresh
    If Adodc2.Recordset.RecordCount > 0 Then
        For i = 2 To 9
            If Adodc2.Recordset.Fields(i) = 0 Then Check1(i).Value = 1 Else Check1(i).Value = 0
        Next i
        Adodc2.Recordset.Update      '更新记录
    End If
End Sub
Private Sub Command1_Click()
    '全选
    For i = 2 To 9
        Check1(i).Value = 1
    Next i
End Sub
Private Sub Command2_Click()
    '全不选
    For i = 2 To 9
        Check1(i).Value = 0
    Next i
End Sub
Private Sub Command3_Click()
    '为操作员设置权限
    If DataList1.SelectedItem Then
        If DataList1.BoundText <> "" Then
            Adodc2.RecordSource = "select * from tab_power where 操作员姓名='" & DataList1.BoundText & "'"
            Adodc2.Refresh
            With Adodc2.Recordset
                If .RecordCount > 0 Then
                    For i = 2 To 9
                        If Check1(i).Value = 1 Then .Fields(i) = 0 Else .Fields(i) = 1
                    Next i
                    .Update     '更新记录
                End If
            End With
        End If
        MsgBox "设置权限已完成!", , "系统提示"
    Else
        MsgBox "请选择操作员!", , "系统提示"
    End If
End Sub
Private Sub Command4_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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