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

📄 房态图.frm

📁 酒店管理系统实现了员工管理
💻 FRM
📖 第 1 页 / 共 4 页
字号:
         Left            =   1890
         TabIndex        =   9
         Top             =   255
         Width           =   420
      End
      Begin VB.Label Label1 
         Caption         =   "楼号:"
         Height          =   270
         Left            =   165
         TabIndex        =   7
         Top             =   255
         Width           =   615
      End
   End
   Begin VB.Frame Frame1 
      Height          =   1815
      Left            =   6525
      TabIndex        =   1
      Top             =   885
      Width           =   2895
      Begin VB.OptionButton Option4 
         Caption         =   "全部显示"
         Height          =   255
         Left            =   350
         TabIndex        =   5
         Top             =   1335
         Value           =   -1  'True
         Width           =   2385
      End
      Begin VB.OptionButton Option3 
         Caption         =   "按类型显示"
         Height          =   255
         Left            =   345
         TabIndex        =   4
         Top             =   1005
         Width           =   2385
      End
      Begin VB.OptionButton Option2 
         Caption         =   "按状态显示"
         Height          =   255
         Left            =   350
         TabIndex        =   3
         Top             =   645
         Width           =   2385
      End
      Begin VB.OptionButton Option1 
         Caption         =   "按楼层显示"
         Height          =   255
         Left            =   350
         TabIndex        =   2
         Top             =   300
         Width           =   2385
      End
   End
   Begin MSAdodcLib.Adodc Adodc9 
      Height          =   345
      Left            =   4290
      Top             =   5205
      Visible         =   0   'False
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      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         =   "Adodc9"
      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 ComctlLib.ListView ListView1 
      Height          =   5610
      Left            =   90
      TabIndex        =   0
      Top             =   75
      Width           =   6075
      _ExtentX        =   10716
      _ExtentY        =   9895
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   327682
      Icons           =   "imgLarge"
      SmallIcons      =   "imgSmall"
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.Label Label13 
      Caption         =   "出租率:"
      Height          =   255
      Left            =   4920
      TabIndex        =   39
      Top             =   6165
      Width           =   1110
   End
   Begin VB.Label Label12 
      Caption         =   "空  房:"
      Height          =   285
      Left            =   3435
      TabIndex        =   34
      Top             =   6150
      Width           =   1500
   End
   Begin VB.Label Label11 
      Caption         =   "空  房:"
      Height          =   285
      Left            =   1860
      TabIndex        =   33
      Top             =   6150
      Width           =   1500
   End
   Begin VB.Label Label10 
      Caption         =   "空  房:"
      Height          =   285
      Left            =   255
      TabIndex        =   32
      Top             =   6135
      Width           =   1500
   End
   Begin VB.Label Label9 
      Caption         =   "空  房:"
      Height          =   285
      Left            =   3435
      TabIndex        =   31
      Top             =   5820
      Width           =   1500
   End
   Begin VB.Label Label8 
      Caption         =   "空  房:"
      Height          =   285
      Left            =   1845
      TabIndex        =   30
      Top             =   5820
      Width           =   1500
   End
   Begin VB.Label Label7 
      Caption         =   "空  房:"
      Height          =   285
      Left            =   240
      TabIndex        =   29
      Top             =   5805
      Width           =   1500
   End
   Begin ComctlLib.ImageList imgLarge 
      Left            =   5940
      Top             =   5670
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   33
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   5
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":5103
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":5DB5
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":6A67
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":7719
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":83CB
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin ComctlLib.ImageList imgSmall 
      Left            =   6225
      Top             =   6000
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   36
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   1
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":907D
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "房态图FORM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim CuanWeiShu As Long
Dim ZhuKeRenShu As Long
Dim Room(5) As Long
Dim Q_Name As String

Private Sub Command1_Click()
 On Error GoTo err13
    Dim List_item As ListItem
    If Me.Text2.Text <> "" Then
        Adodc9.ConnectionString = My_PROVIDER
        Adodc9.CommandType = adCmdText
        Adodc9.RecordSource = "select * from 客房 where 楼号 like '" & Me.Text1.Text & "' and 层 like '" & Me.Text2.Text & "'"
        Adodc9.Refresh
    Else
        Adodc9.ConnectionString = My_PROVIDER
        Adodc9.CommandType = adCmdText
        Adodc9.RecordSource = "select * from 客房 where 楼号 like '" & Me.Text1.Text & "'"
        Adodc9.Refresh
    End If
    Me.ListView1.ListItems.Clear
    While Not Adodc9.Recordset.EOF
        Select Case Adodc9.Recordset.Fields("当前状态")
        Case "空房"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
        Case "脏房"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 2
        Case "维修房"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 3
        Case "售出"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 4
        Case "预订"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 5
        Case Else
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
        End Select
        Adodc9.Recordset.MoveNext
        
    Wend
    Adodc9.Recordset.Close
    
    Exit Sub
    
err13:
    MsgBox "操作错误,错误代码1013", 48, "提示"

End Sub


Private Sub Command2_Click()
On Error GoTo err14
    Dim List_item As ListItem
    Dim i As Long
    
    If Me.Option3 Then
        Adodc9.ConnectionString = My_PROVIDER
        Adodc9.CommandType = adCmdText
        Adodc9.RecordSource = "select * from 客房 where 类型 like '" & Me.Combo1.Text & "'"
        Adodc9.Refresh
    Else
        Adodc9.ConnectionString = My_PROVIDER
        Adodc9.CommandType = adCmdText
        Adodc9.RecordSource = "select * from 客房 where 当前状态 like '" & Me.Combo1.Text & "'"
        Adodc9.Refresh
    End If
    Me.ListView1.ListItems.Clear
    For i = 0 To 4
        Room(i) = 0
    Next
    While Not Adodc9.Recordset.EOF
        Select Case Adodc9.Recordset.Fields("当前状态")
        Case "空房"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
            Room(0) = Room(0) + 1
        Case "脏房"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 2
            Room(1) = Room(1) + 1
        Case "维修房"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 3
            Room(2) = Room(2) + 1
        Case "售出"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 4
            Room(3) = Room(3) + 1
        Case "预订"
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 5
            Room(4) = Room(4) + 1
        Case Else
            ListView1.ListItems.Add , , Adodc9.Recordset.Fields("房号"), 1
        End Select
        Adodc9.Recordset.MoveNext
        
    Wend
    Adodc9.Recordset.Close
    Me.Label7.Caption = "空房:" & CStr(Room(0))
    Me.Label8.Caption = "脏房:" & CStr(Room(1))
    Me.Label9.Caption = "维修房:" & CStr(Room(2))
    Me.Label10.Caption = "售出:" & CStr(Room(3))
    Me.Label11.Caption = "预订:" & CStr(Room(4))
    Me.Label12.Caption = "合计:" & CStr(Room(0) + Room(1) + Room(2) + Room(3) + Room(4))
    
Me.Label13.Caption = "出租率:" & (Round(Room(3) / (Room(0) + Room(1) + Room(2) + Room(3) + Room(4)), 2) * 100) & "%"


    Exit Sub
    
err14:
    MsgBox "操作错误,错误代码1014", 48, "提示"

End Sub

Private Sub Command3_Click()
    RoomNO = ""
    Room_Rate = 0
    Room_Statu = ""
    Unload Me
End Sub

Private Sub Command4_Click()
On Error GoTo E200204
    If QAccount_ID = "" Then
        MsgBox "请注意:没有登记帐号,请通过其他方式查询!", 48, "提示"
    Else
        Registration_Type = "显示"
        住宿登录.Show
    End If
    Exit Sub
E200204:
    MsgBox "请注意:可能重复打开窗口,请先关闭后再查询!", 64, "提示"

End Sub

Private Sub Command5_Click()
On Error GoTo err15

    If Registration_Type <> "快速入住" Then

    If Room_Statu = "空房" Then
        If Load_Statu = "使用" Then
            Room_Use_Type = "包房"
            Room_Update = True
            Adodc9.Recordset.Close
            Unload Me
        End If
    Else
        If Room_Statu = "预订" Then
            If Account_ID = QAccount_ID Then
                Room_Use_Type = "包房"
                Room_Update = True
                Adodc9.Recordset.Close
                Unload Me
            Else
                MsgBox "请注意:" & RoomNO & "房间当前状态是:[" & Room_Statu & "],被[" & QAccount_ID & "]帐号" & Room_Share_Type & ",不能" & Registration_Type & "!", 48, "提示"
                Room_Update = False
            End If
        Else
            If Room_Statu = "售出" Then
                Select Case Room_Share_Type
                Case "共享"
                    MsgBox "请注意:" & RoomNO & "房间当前状态是:[" & Room_Statu & "],被[" & QAccount_ID & "]帐号" & Room_Share_Type & ",不能" & Registration_Type & "!", 48, "提示"
                Case "包房"
                    MsgBox "请注意:" & RoomNO & "房间当前状态是:[" & Room_Statu & "],被[" & QAccount_ID & "]帐号" & Room_Share_Type & ",不能" & Registration_Type & "!", 48, "提示"
                Case Else
                    MsgBox "房间状态错误,请核查!", 64, "提示"
                End Select
                Room_Update = False
            End If

⌨️ 快捷键说明

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