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

📄 房态图.frm

📁 利用VB编写的一个完整的酒店管理程序,支持双数据库!
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form 房态图FORM 
   BackColor       =   &H000080FF&
   BorderStyle     =   0  'None
   Caption         =   "房态图"
   ClientHeight    =   9825
   ClientLeft      =   0
   ClientTop       =   -105
   ClientWidth     =   15360
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   9825
   ScaleWidth      =   15360
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command10 
      Caption         =   "房间详细说明"
      Height          =   375
      Left            =   12720
      TabIndex        =   33
      Top             =   600
      Width           =   1815
   End
   Begin VB.Frame Frame5 
      BackColor       =   &H000080FF&
      Caption         =   "请输入房间号,选择您要进行的操作"
      Height          =   4215
      Left            =   12120
      TabIndex        =   25
      Top             =   5040
      Visible         =   0   'False
      Width           =   3135
      Begin VB.CommandButton Command9 
         Caption         =   "改为空闲房"
         Height          =   495
         Left            =   720
         TabIndex        =   32
         Top             =   840
         Width           =   1695
      End
      Begin VB.CommandButton Command8 
         Caption         =   "改为维修房"
         Height          =   495
         Left            =   720
         TabIndex        =   31
         Top             =   2880
         Width           =   1695
      End
      Begin VB.CommandButton Command7 
         Caption         =   "改为入住房"
         Height          =   495
         Left            =   720
         TabIndex        =   30
         Top             =   3480
         Width           =   1695
      End
      Begin VB.CommandButton Command4 
         Caption         =   "改为打扫房"
         Height          =   495
         Left            =   720
         TabIndex        =   29
         Top             =   1440
         Width           =   1695
      End
      Begin VB.CommandButton Command5 
         Caption         =   "改为自用房"
         Height          =   495
         Left            =   720
         TabIndex        =   28
         Top             =   2160
         Width           =   1695
      End
      Begin VB.TextBox txtfield 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15.75
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Index           =   0
         Left            =   1320
         TabIndex        =   27
         Top             =   240
         Width           =   1335
      End
      Begin VB.CommandButton Command6 
         Caption         =   "房间号"
         Height          =   375
         Left            =   240
         TabIndex        =   26
         Top             =   360
         Width           =   1095
      End
   End
   Begin VB.Frame Frame4 
      BackColor       =   &H000080FF&
      Height          =   735
      Left            =   12240
      TabIndex        =   23
      Top             =   2880
      Width           =   2895
      Begin VB.CheckBox Check1 
         BackColor       =   &H000080FF&
         Caption         =   "程序自动刷新状态"
         Height          =   375
         Left            =   360
         TabIndex        =   24
         Top             =   240
         Value           =   1  'Checked
         Width           =   1935
      End
   End
   Begin VB.Timer Timer2 
      Interval        =   60000
      Left            =   11880
      Top             =   120
   End
   Begin VB.CommandButton Command3 
      Caption         =   "关闭房态图"
      Height          =   315
      Left            =   12720
      TabIndex        =   15
      Top             =   240
      Width           =   1755
   End
   Begin VB.Frame Frame3 
      BackColor       =   &H000080FF&
      BorderStyle     =   0  'None
      Height          =   705
      Left            =   12120
      TabIndex        =   12
      Top             =   3960
      Visible         =   0   'False
      Width           =   3210
      Begin VB.CommandButton Command2 
         Caption         =   "显示"
         Height          =   270
         Left            =   1875
         TabIndex        =   14
         Top             =   270
         Width           =   1185
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   285
         TabIndex        =   13
         Top             =   255
         Width           =   1365
      End
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H000080FF&
      Height          =   1005
      Left            =   12120
      TabIndex        =   6
      Top             =   3960
      Visible         =   0   'False
      Width           =   3195
      Begin VB.CommandButton Command1 
         Caption         =   "显示"
         Height          =   270
         Left            =   1080
         TabIndex        =   11
         Top             =   615
         Width           =   1185
      End
      Begin VB.TextBox Text2 
         Height          =   300
         Left            =   2310
         TabIndex        =   10
         Top             =   210
         Width           =   720
      End
      Begin VB.TextBox Text1 
         Height          =   285
         Left            =   735
         TabIndex        =   8
         Top             =   210
         Width           =   885
      End
      Begin VB.Label Label2 
         Caption         =   "层:"
         Height          =   225
         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 
      BackColor       =   &H000080FF&
      Height          =   1815
      Left            =   12240
      TabIndex        =   1
      Top             =   960
      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         =   "按楼层显示"
         Enabled         =   0   'False
         Height          =   255
         Left            =   350
         TabIndex        =   2
         Top             =   300
         Width           =   2385
      End
   End
   Begin ComctlLib.ListView ListView1 
      Height          =   8250
      Left            =   90
      TabIndex        =   0
      Top             =   75
      Width           =   11715
      _ExtentX        =   20664
      _ExtentY        =   14552
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   327682
      Icons           =   "imgLarge"
      SmallIcons      =   "imgSmall"
      ForeColor       =   -2147483640
      BackColor       =   16777152
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.Label Label13 
      BackStyle       =   0  'Transparent
      Caption         =   "出租率:"
      Height          =   255
      Left            =   6120
      TabIndex        =   22
      Top             =   9165
      Width           =   1110
   End
   Begin VB.Label Label12 
      BackStyle       =   0  'Transparent
      Caption         =   "空  房:"
      Height          =   285
      Left            =   4635
      TabIndex        =   21
      Top             =   9150
      Width           =   1500
   End
   Begin VB.Label Label11 
      BackStyle       =   0  'Transparent
      Caption         =   "空  房:"
      Height          =   285
      Left            =   3060
      TabIndex        =   20
      Top             =   9150
      Width           =   1500
   End
   Begin VB.Label Label10 
      BackStyle       =   0  'Transparent
      Caption         =   "空  房:"
      Height          =   285
      Left            =   1455
      TabIndex        =   19
      Top             =   9135
      Width           =   1500
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "空  房:"
      Height          =   285
      Left            =   4635
      TabIndex        =   18
      Top             =   8820
      Width           =   1500
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "空  房:"
      Height          =   285
      Left            =   3045
      TabIndex        =   17
      Top             =   8820
      Width           =   1500
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "空  房:"
      Height          =   285
      Left            =   1440
      TabIndex        =   16
      Top             =   8805
      Width           =   1500
   End
   Begin ComctlLib.ImageList imgLarge 
      Left            =   7140
      Top             =   8670
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   33
      MaskColor       =   12632256
      _Version        =   327682
      BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7} 
         NumListImages   =   6
         BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":0CB2
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":1964
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":2616
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":32C8
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "房态图.frx":3F7A
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin ComctlLib.ImageList imgSmall 
      Left            =   7425
      Top             =   9000
      _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":4294
            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
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量                                          FixIT90210ae-R383-H1984

'---------------------------------------------------------------------
'
Public mysql As String
Dim CuanWeiShu As Long
Dim ZhuKeRenShu As Long
Dim Room(5) As Long
Dim Q_Name As String


        
  

Private Sub Check1_Click()
If Check1.Value = Checked Then
Timer2.Enabled = True
Else
Timer2.Enabled = False
End If
End Sub

Private Sub Command1_Click()
Dim i As Long
Dim List_item As ListItem

 mysql = "select * from kf where 楼='" & Text1.Text & "'and 层='" & Text2.Text & "'  order by 房间号"
  Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, False, True, Constr)
  Set EF = db.OpenRecordset(mysql, dbOpenDynaset)
  
 
      
      
  
     '列出记录
     
    Me.ListView1.ListItems.Clear
    
    While Not EF.EOF
        Select Case EF("房态")
        Case "空房"
            ListView1.ListItems.Add , , EF("房间号"), 1
            Room(0) = Room(0) + 1
        Case "脏房"
            ListView1.ListItems.Add , , EF("房间号"), 2
            Room(1) = Room(1) + 1
        Case "维修"
            ListView1.ListItems.Add , , EF("房间号"), 3
            Room(2) = Room(2) + 1
        Case "售出"
            ListView1.ListItems.Add , , EF("房间号"), 4
            Room(3) = Room(3) + 1
        Case "预订"
            ListView1.ListItems.Add , , EF("房间号"), 5
            Room(4) = Room(4) + 1
         Case "自用"
            ListView1.ListItems.Add , , EF("房间号"), 6
            
        Case Else
            ListView1.ListItems.Add , , EF("房间号"), 1
        End Select
        EF.MoveNext
        
    Wend
    EF.Close
    db.Close
End Sub

Private Sub Command10_Click()
Form20.Show
End Sub

Private Sub Command2_Click()
Dim i As Long
Dim List_item As ListItem
If Option2 = True Then mysql = "select * from kf where 房态='" & Combo1.Text & "' order by 房间号"
If Option3 = True Then mysql = "select * from kf where 房间类型='" & Combo1.Text & "' order by 房间号"
  Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, False, True, Constr)
  Set EF = db.OpenRecordset(mysql, dbOpenDynaset)
  
 
      
      
  
     '列出记录
     
    Me.ListView1.ListItems.Clear
    
    While Not EF.EOF
        Select Case Combo1
        Case "空房"
            ListView1.ListItems.Add , , EF("房间号"), 1
            Room(0) = Room(0) + 1
        Case "脏房"
            ListView1.ListItems.Add , , EF("房间号"), 2
            Room(1) = Room(1) + 1
        Case "维修"
            ListView1.ListItems.Add , , EF("房间号"), 3
            Room(2) = Room(2) + 1
        Case "售出"
            ListView1.ListItems.Add , , EF("房间号"), 4
            Room(3) = Room(3) + 1
        Case "预订"
            ListView1.ListItems.Add , , EF("房间号"), 5
            Room(4) = Room(4) + 1
         Case "自用"
            ListView1.ListItems.Add , , EF("房间号"), 6
            
        Case Else
            ListView1.ListItems.Add , , EF("房间号"), 1
        End Select
        EF.MoveNext
        
    Wend
    EF.Close
    db.Close
   
    

End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Activate()
 Dim db As Database
  Dim EF As Recordset
  Set db = OpenDatabase(ConData, False, True, Constr)
  Set EF = db.OpenRecordset("select * from qxsz where 操作员='" & MDIForm1.StatusBar1.Panels(4).Text & "'", dbOpenDynaset)
  
     '列出记录
      If Not (EF.BOF And EF.EOF) Then
         Do While Not EF.EOF
           
           
            Form26.Command1.Enabled = EF("房务中心")
             

⌨️ 快捷键说明

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