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

📄 main_ftcx.frm

📁 酒店客房管理系统(vb^+SQLServer2000+使用说明)
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form main_ftcx 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "房态查询"
   ClientHeight    =   4755
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7455
   Icon            =   "main_ftcx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   4755
   ScaleWidth      =   7455
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   375
      Left            =   6180
      TabIndex        =   13
      Top             =   3390
      Width           =   1140
   End
   Begin VB.Frame Frame1 
      Caption         =   "注释"
      Height          =   750
      Left            =   30
      TabIndex        =   4
      Top             =   3945
      Width           =   7320
      Begin VB.Label Labsyl 
         Height          =   225
         Left            =   5970
         TabIndex        =   12
         Top             =   330
         Width           =   1200
      End
      Begin VB.Label Label7 
         Caption         =   "房间使用率:"
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   4755
         TabIndex        =   11
         Top             =   345
         Width           =   1095
      End
      Begin VB.Label Labwx 
         Height          =   210
         Left            =   3840
         TabIndex        =   10
         Top             =   345
         Width           =   690
      End
      Begin VB.Label Label6 
         Caption         =   "维修:"
         ForeColor       =   &H00FF0000&
         Height          =   225
         Left            =   3255
         TabIndex        =   9
         Top             =   345
         Width           =   585
      End
      Begin VB.Label Labkx 
         Height          =   225
         Left            =   2445
         TabIndex        =   8
         Top             =   345
         Width           =   750
      End
      Begin VB.Label Label5 
         Caption         =   "空闲:"
         ForeColor       =   &H00FF0000&
         Height          =   210
         Left            =   1815
         TabIndex        =   7
         Top             =   345
         Width           =   555
      End
      Begin VB.Label Labsy 
         Height          =   225
         Left            =   915
         TabIndex        =   6
         Top             =   345
         Width           =   675
      End
      Begin VB.Label Label4 
         Caption         =   "入住:"
         ForeColor       =   &H00FF0000&
         Height          =   270
         Left            =   210
         TabIndex        =   5
         Top             =   345
         Width           =   570
      End
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   4740
      Top             =   3195
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_ftcx.frx":000C
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_ftcx.frx":1C96
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_ftcx.frx":3920
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   3870
      Left            =   45
      TabIndex        =   0
      Top             =   15
      Width           =   5880
      _ExtentX        =   10372
      _ExtentY        =   6826
      Sorted          =   -1  'True
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   393217
      Icons           =   "ImageList1"
      SmallIcons      =   "ImageList1"
      ColHdrIcons     =   "ImageList1"
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.Label Label3 
      Caption         =   "维修"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   255
      Left            =   6990
      TabIndex        =   3
      Top             =   2400
      Width           =   435
   End
   Begin VB.Label Label2 
      Caption         =   "空房"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   240
      Left            =   6960
      TabIndex        =   2
      Top             =   1380
      Width           =   450
   End
   Begin VB.Label Label1 
      Caption         =   "入住"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000040C0&
      Height          =   240
      Left            =   6960
      TabIndex        =   1
      Top             =   360
      Width           =   435
   End
   Begin VB.Image Image3 
      Height          =   690
      Left            =   6120
      Picture         =   "main_ftcx.frx":55AA
      Stretch         =   -1  'True
      Top             =   2175
      Width           =   660
   End
   Begin VB.Image Image2 
      Height          =   690
      Left            =   6120
      Picture         =   "main_ftcx.frx":68AE
      Stretch         =   -1  'True
      Top             =   1140
      Width           =   660
   End
   Begin VB.Image Image1 
      Height          =   690
      Left            =   6135
      Picture         =   "main_ftcx.frx":7BB2
      Stretch         =   -1  'True
      Top             =   105
      Width           =   660
   End
End
Attribute VB_Name = "main_ftcx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim itmX As ListItem   '声明一个ListItem对象
Dim text As String  '声明字符串变量
Dim MyIcon As Integer    '声明一个整型变量
Private Sub Command1_Click()
    Unload Me
    Main.Enabled = True
End Sub
Private Sub Form_Activate()
    Dim rs1 As ADODB.Recordset
    Dim rs2 As ADODB.Recordset
    Dim rs3 As ADODB.Recordset
    Dim sql As String '定义一个字符串变量
    ListView1.ListItems.Clear
    'ListView 控件ListView 控件可使用四种不同视图显示项目。通过此控件,可将项目组成带有或不带有列标头的列,并显示伴随的图标和文本。
    sql = "select * from tb_kf where tb_kf.房态='入住'"
    Set rs1 = ESQL(sql)   '调用模块中的自定义函数
    If rs1.RecordCount > 0 Then
        Do While rs1.EOF = False
            text = rs1.Fields("房间号")
            Set itmX = ListView1.ListItems.Add(, , text, 1)
            rs1.MoveNext
        Loop
    End If
    sql = "select * from tb_kf where tb_kf.房态='空房'"
    Set rs1 = ESQL(sql)
    If rs1.RecordCount > 0 Then
        Do While rs1.EOF = False
            text = rs1.Fields("房间号")
            Set itmX = ListView1.ListItems.Add(, , text, 2)
            rs1.MoveNext
        Loop
    End If
    sql = "select * from tb_kf where tb_kf.房态='维修'"
    Set rs1 = ESQL(sql)   '调用模块中的自定义函数
    If rs1.RecordCount > 0 Then
        Do While rs1.EOF = False
            text = rs1.Fields("房间号")
            Set itmX = ListView1.ListItems.Add(, , text, 3)
            rs1.MoveNext
        Loop
    End If
    sql = "select * from tb_kf where tb_kf.房态='入住'"
    Set rs2 = ESQL(sql)     '调用模块中的自定义函数
    sql = "select * from tb_kf where tb_kf.房态='维修'"
    Set rs3 = ESQL(sql)  '调用模块中的自定义函数
    Labsy.Caption = rs2.RecordCount     '客房入住数
    Labwx.Caption = rs3.RecordCount     '客房维修数
    Labkx.Caption = 25 - Val(Labwx.Caption) - Val(Labsy.Caption)     '客房空闲数
    Labsyl.Caption = Val(Labsy.Caption) / 25 * 100 & "%"     '客房使用率
End Sub
Private Sub Form_Unload(Cancel As Integer)
    Main.Enabled = True
End Sub

Private Sub ListView1_Click()
    'ListView 控件可使用四种不同视图显示项目。通过此控件,可将项目组成带有或不带有列标头的列,并显示伴随的图标和文本。
    main_zscx.Text2.text = "1"
    main_zscx.Adodc1.RecordSource = "select * from tb_djb where 标志='1' and 房间号='" + ListView1.SelectedItem + "'"
    main_zscx.Adodc1.Refresh
    Load main_zscx
    main_zscx.Show
End Sub

⌨️ 快捷键说明

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