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

📄

📁 酒店宾馆管理系统 包括住房管理 查询客户还有住客人数
💻
字号:
VERSION 5.00
Begin VB.Form frmQuery 
   Caption         =   "查询"
   ClientHeight    =   4395
   ClientLeft      =   3240
   ClientTop       =   2250
   ClientWidth     =   5850
   LinkTopic       =   "Form4"
   ScaleHeight     =   4395
   ScaleWidth      =   5850
   Begin VB.TextBox txtOut 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3480
      TabIndex        =   19
      Top             =   3360
      Width           =   2175
   End
   Begin VB.TextBox txtIn 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3480
      TabIndex        =   18
      Top             =   2880
      Width           =   2175
   End
   Begin VB.TextBox txtIsIn 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3480
      TabIndex        =   13
      Top             =   2400
      Width           =   2175
   End
   Begin VB.CommandButton cmdReturn 
      Caption         =   "返回主窗口"
      Height          =   375
      Left            =   3480
      TabIndex        =   11
      Top             =   3960
      Width           =   2055
   End
   Begin VB.TextBox txtTitle 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3480
      TabIndex        =   10
      Top             =   1800
      Width           =   2175
   End
   Begin VB.TextBox txtAge 
      Enabled         =   0   'False
      Height          =   375
      Left            =   5040
      TabIndex        =   8
      Top             =   720
      Width           =   615
   End
   Begin VB.TextBox txtCompany 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3480
      TabIndex        =   6
      Top             =   1200
      Width           =   2175
   End
   Begin VB.TextBox txtSex 
      Enabled         =   0   'False
      Height          =   375
      Left            =   3480
      TabIndex        =   4
      Top             =   720
      Width           =   735
   End
   Begin VB.ListBox lstName 
      Height          =   1860
      Left            =   240
      TabIndex        =   2
      Top             =   1560
      Width           =   1815
   End
   Begin VB.ComboBox cboRoom 
      Height          =   300
      Left            =   840
      Style           =   2  'Dropdown List
      TabIndex        =   1
      Top             =   720
      Width           =   1335
   End
   Begin VB.Frame fraName 
      Caption         =   "住客姓名:"
      Height          =   2415
      Left            =   120
      TabIndex        =   15
      Top             =   1200
      Width           =   2055
   End
   Begin VB.Label lblOutTime 
      Caption         =   "退房时间:"
      Height          =   255
      Left            =   2400
      TabIndex        =   17
      Top             =   3480
      Width           =   975
   End
   Begin VB.Label lblInTime 
      Caption         =   "入住时间:"
      Height          =   255
      Left            =   2400
      TabIndex        =   16
      Top             =   3000
      Width           =   975
   End
   Begin VB.Line Line2 
      X1              =   0
      X2              =   5760
      Y1              =   3840
      Y2              =   3840
   End
   Begin VB.Line Line1 
      X1              =   120
      X2              =   5640
      Y1              =   600
      Y2              =   600
   End
   Begin VB.Label Label8 
      Caption         =   "查询"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   26.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF00FF&
      Height          =   615
      Left            =   0
      TabIndex        =   14
      Top             =   0
      Width           =   2535
   End
   Begin VB.Label lblIsIn 
      Caption         =   "是否已退房:"
      Height          =   255
      Left            =   2280
      TabIndex        =   12
      Top             =   2520
      Width           =   1095
   End
   Begin VB.Label lblTitle 
      Caption         =   "职称:"
      Height          =   375
      Left            =   2760
      TabIndex        =   9
      Top             =   1920
      Width           =   615
   End
   Begin VB.Label lblAge 
      Caption         =   "年龄:"
      Height          =   255
      Left            =   4320
      TabIndex        =   7
      Top             =   840
      Width           =   615
   End
   Begin VB.Label lblCompany 
      Caption         =   "工作单位:"
      Height          =   255
      Left            =   2400
      TabIndex        =   5
      Top             =   1320
      Width           =   975
   End
   Begin VB.Label lblSex 
      Caption         =   "性别:"
      Height          =   255
      Left            =   2760
      TabIndex        =   3
      Top             =   840
      Width           =   615
   End
   Begin VB.Label lblRoom 
      Caption         =   "房间号:"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   855
   End
End
Attribute VB_Name = "frmQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
    Option Explicit
    Dim intnum As Integer
    Dim guest1() As guest                       '声明模块级动态数组
    Private Sub Form_Load()
        Dim str1 As String
        If Dir(strRoomNo) <> "" Then
            Open strRoomNo For Input As 1
            Do While Not EOF(1)
                Input #1, str1
                cboRoom.AddItem str1
            Loop
            Close 1
        End If
    End Sub
    
    Private Sub cboRoom_click()
        intnum = 0
        Dim guest2 As guest
        Dim int1 As Integer
        lstName.Clear
        Open strGuestData For Random As 1 Len = Len(guest2)
        Do While Not EOF(1)
            Get 1, , guest2
            If Trim(guest2.strRoom) = Trim(cboRoom.Text) Then
                intnum = intnum + 1
                ReDim Preserve guest1(intnum)
                guest1(intnum) = guest2
                lstName.AddItem guest2.strName
            End If
        Loop
        Close 1
        Call ClearControl
    End Sub
    
    Private Sub cmdReturn_Click()
        Unload Me
    End Sub
    
    Private Sub lstName_Click()
        Dim int1 As Integer
        int1 = lstName.ListIndex + 1
        If guest1(int1).blnSex Then txtSex.Text = "男" Else txtSex.Text = "女"
        txtCompany.Text = guest1(int1).strCompany
        txtAge.Text = guest1(int1).bytAge
        txtTitle.Text = guest1(int1).strTitle
        If guest1(int1).blnIsIn Then txtIsIn.Text = "未退房" Else txtIsIn.Text = "已退房"
        txtIn.Text = guest1(int1).dtmIn
        If guest1(int1).blnIsIn = True Then
            txtOut.Text = "(未退房)"
        Else
            txtOut.Text = guest1(int1).dtmOut
        End If
    End Sub
    Private Sub ClearControl()
        txtIsIn.Text = ""
        txtTitle.Text = ""
        txtSex.Text = ""
        txtAge.Text = ""
        txtCompany.Text = ""
    End Sub

⌨️ 快捷键说明

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