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

📄 main_qxsz.frm

📁 酒店客房管理系统(vb^+SQLServer2000+使用说明)
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Begin VB.CheckBox Check1 
               Caption         =   "权限设置"
               Height          =   315
               Index           =   18
               Left            =   165
               TabIndex        =   30
               Top             =   1785
               UseMaskColor    =   -1  'True
               Width           =   1110
            End
            Begin VB.CheckBox Check1 
               Caption         =   "初始化"
               Height          =   315
               Index           =   17
               Left            =   165
               TabIndex        =   20
               Top             =   1440
               UseMaskColor    =   -1  'True
               Width           =   1110
            End
            Begin VB.CheckBox Check1 
               Caption         =   "密码设置"
               DataSource      =   "Data1"
               Height          =   315
               Index           =   16
               Left            =   165
               TabIndex        =   16
               Top             =   735
               Width           =   1290
            End
            Begin VB.CheckBox Check1 
               Caption         =   "操作员设置"
               Height          =   315
               Index           =   15
               Left            =   165
               TabIndex        =   15
               Top             =   345
               Width           =   1230
            End
         End
         Begin VB.Frame Frame6 
            Caption         =   "日结"
            Height          =   2550
            Left            =   7215
            TabIndex        =   7
            Top             =   495
            Width           =   1665
            Begin VB.CheckBox Check1 
               Caption         =   "客房销售统计"
               Height          =   315
               Index           =   14
               Left            =   150
               TabIndex        =   29
               Top             =   1380
               UseMaskColor    =   -1  'True
               Width           =   1455
            End
            Begin VB.CheckBox Check1 
               Caption         =   "客房销售报表"
               Height          =   315
               Index           =   13
               Left            =   135
               TabIndex        =   21
               Top             =   945
               Width           =   1425
            End
            Begin VB.CheckBox Check1 
               Caption         =   "登记预收报表"
               Height          =   315
               Index           =   12
               Left            =   135
               TabIndex        =   13
               Top             =   510
               Width           =   1425
            End
         End
         Begin VB.Frame Frame5 
            Caption         =   "查询统计"
            Height          =   2550
            Left            =   5355
            TabIndex        =   6
            Top             =   480
            Width           =   1695
            Begin VB.CheckBox Check1 
               Caption         =   "宿费提醒"
               Height          =   480
               Index           =   11
               Left            =   180
               TabIndex        =   12
               Top             =   1230
               Width           =   1095
            End
            Begin VB.CheckBox Check1 
               Caption         =   "退宿查询"
               Height          =   315
               Index           =   10
               Left            =   180
               TabIndex        =   11
               Top             =   885
               Width           =   1230
            End
            Begin VB.CheckBox Check1 
               Caption         =   "住宿查询"
               Height          =   315
               Index           =   9
               Left            =   180
               TabIndex        =   10
               Top             =   480
               Width           =   1200
            End
         End
         Begin VB.Frame Frame4 
            Caption         =   "客房管理"
            Height          =   2550
            Left            =   1815
            TabIndex        =   5
            Top             =   480
            Width           =   1590
            Begin VB.CheckBox Check1 
               Caption         =   "房态查看"
               Height          =   315
               Index           =   6
               Left            =   225
               TabIndex        =   24
               Top             =   1275
               Width           =   1080
            End
            Begin VB.CheckBox Check1 
               Caption         =   "客房查询"
               Height          =   315
               Index           =   5
               Left            =   225
               TabIndex        =   9
               Top             =   855
               Width           =   1080
            End
            Begin VB.CheckBox Check1 
               Caption         =   "客房管理"
               Height          =   600
               Index           =   4
               Left            =   225
               TabIndex        =   8
               Top             =   300
               Width           =   1065
            End
         End
         Begin VB.Frame Frame3 
            Caption         =   "住宿管理"
            Height          =   2550
            Left            =   225
            TabIndex        =   2
            Top             =   480
            Width           =   1440
            Begin VB.CheckBox Check1 
               Caption         =   "调房登记"
               Height          =   315
               Index           =   2
               Left            =   195
               TabIndex        =   25
               Top             =   1365
               Width           =   1095
            End
            Begin VB.CheckBox Check1 
               Caption         =   "住宿登记"
               Height          =   315
               Index           =   0
               Left            =   195
               TabIndex        =   22
               Top             =   330
               Width           =   1080
            End
            Begin VB.CheckBox Check1 
               Caption         =   "追加押金"
               Height          =   315
               Index           =   1
               Left            =   195
               TabIndex        =   4
               Top             =   870
               Width           =   1095
            End
            Begin VB.CheckBox Check1 
               Caption         =   "退宿结账"
               Height          =   315
               Index           =   3
               Left            =   195
               TabIndex        =   3
               Top             =   1800
               Width           =   1095
            End
         End
      End
   End
End
Attribute VB_Name = "main_qxsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()     '自动识别数据库路径
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB_KFGL.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from tb_qxsz"
    Adodc1.Refresh
    Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DB_KFGL.mdb;Persist Security Info=False"
    Adodc2.RecordSource = "select * from tb_qxsz"
    Adodc2.Refresh
    Set DataList1.RowSource = Adodc2
End Sub
Private Sub Form_Unload(Cancel As Integer)
    Main.Enabled = True
End Sub
Private Sub Datalist1_Click()
   On Error Resume Next
        Adodc1.RecordSource = "select * from tb_qxsz where 操作员='" & DataList1.BoundText & "'"
        Adodc1.Refresh
        If Adodc1.Recordset.RecordCount > 0 Then
            For i = 0 To 21
                If Adodc1.Recordset.Fields(i) = -1 Then Check1(i).Value = 1 Else Check1(i).Value = 0
            Next i
        Else
            DataList1.BoundText = 0
        End If
    
End Sub
Private Sub Command1_Click()     '全选
For i = 0 To 21
  Check1(i).Value = 1
Next i
End Sub
Private Sub Command2_Click()     '全不选
    For i = 0 To 21
        Check1(i).Value = 0
    Next i
End Sub
Private Sub Command3_Click()     '为操作员设置权限
    If DataList1.BoundText <> "" Then
        'DBList 控件DBList 控件是和数据相连的列表框,它能自动从与之相连的 Data 控件的字段中移居,并有选择地更新其它 Data 控件中相关表的字段。
        Adodc1.RecordSource = "select * from tb_qxsz where 操作员='" + DataList1.BoundText + "'"
        Adodc1.Refresh
        If Adodc1.Recordset.RecordCount > 0 Then
            For i = 0 To 21
                If Check1(i).Value = 1 Then Adodc1.Recordset.Fields(i) = -1 Else Adodc1.Recordset.Fields(i) = 0
            Next i
            Adodc1.Recordset.Update
        End If
        MsgBox "权限设置成功!", , "系统提示"
    End If
End Sub
Private Sub Command4_Click()     '删除操作员
    On Error Resume Next
    A = MsgBox("确认删除该操作员?", 4, "系统提示")
    If A = vbYes Then
        Adodc1.Recordset.Delete
        Adodc1.Refresh
        Dim rs2 As New ADODB.Recordset
        rs2.Open "select * from tb_user where 操作员 = '" + DataList1.BoundText + "'", StrCnn, adOpenKeyset, adLockPessimistic
        If rs2.RecordCount > 0 Then
            rs2.Delete
            rs2.Update
        End If
        Unload Me
        Adodc1.Refresh
        main_qxsz.Show
    End If
End Sub
Private Sub comend_Click()
    Unload Me
    Main.Enabled = True
End Sub

⌨️ 快捷键说明

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