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

📄 frmsrchcheckin1.frm

📁 智能门锁的程序,用于控制门锁发卡程序,是科布尔的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmSrchCheckIn 
   Caption         =   "查询客房住宿情况"
   ClientHeight    =   6420
   ClientLeft      =   255
   ClientTop       =   930
   ClientWidth     =   9495
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   10.5
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   6420
   ScaleWidth      =   9495
   Begin VB.ListBox LstRoomBook 
      BackColor       =   &H00E0E0E0&
      Height          =   1530
      ItemData        =   "FrmSrchCheckIn1.frx":0000
      Left            =   1320
      List            =   "FrmSrchCheckIn1.frx":0002
      TabIndex        =   6
      Top             =   240
      Visible         =   0   'False
      Width           =   1575
   End
   Begin VB.CommandButton CmdPrint 
      Caption         =   "打印"
      Height          =   375
      Left            =   6840
      TabIndex        =   5
      Top             =   240
      Visible         =   0   'False
      Width           =   975
   End
   Begin VB.CommandButton CmdCancel 
      Caption         =   "取消"
      Height          =   375
      Left            =   7920
      TabIndex        =   7
      Top             =   240
      Width           =   975
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   3240
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   0
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.TextBox TxtClientKey 
      Height          =   375
      Left            =   5040
      TabIndex        =   4
      Top             =   240
      Width           =   1575
   End
   Begin VB.CommandButton CmdRoomSrch 
      Caption         =   ">>"
      Height          =   375
      Left            =   2880
      TabIndex        =   2
      Top             =   240
      Width           =   375
   End
   Begin VB.TextBox TxtRoomKey 
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Top             =   240
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "按客人查询"
      Height          =   255
      Left            =   3840
      TabIndex        =   3
      Top             =   360
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "按房间查询"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   1095
   End
End
Attribute VB_Name = "FrmSrchCheckIn"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub CmdCancel_Click()
    Unload Me
End Sub


Private Sub CmdRoomSrch_Click()
    LstRoomBook.Clear
    With RC_Room
        If Not (.BOF And .EOF) Then
            .MoveFirst
            While Not .EOF
                  LstRoomBook.AddItem .Fields("ShortroomNumber")
                  .MoveNext
            Wend
        End If
    End With
    LstRoomBook.Visible = True
    LstRoomBook.SetFocus
End Sub

Private Sub Form_Load()
    Dim sSQL As String
    Data1.DatabaseName = SystemDir & "icdata.mdb"
    sSQL = "select checkinsdate as 入住时间," & _
        "staydays as 预住天数,checkinsdate as 发卡时间," & _
        "checkoutsdate as 注销时间," & _
        "ShortRoomNumber as 房间," & _
        "Name as 客人 from client"
    Data1.RecordSource = sSQL
End Sub

Private Sub LstRoomBook_Click()
    If LstRoomBook.Text <> "" Then
       TxtRoomKey.Text = LstRoomBook.Text
       LstRoomBook.Visible = False
    End If
End Sub

Private Sub LstRoomBook_LostFocus()
  LstRoomBook.Visible = False
End Sub
Private Sub TxtClientKey_KeyPress(KeyAscii As Integer)
  If (KeyAscii = 13) And (TxtClientKey <> "") Then
    Dim sSQL As String
    Data1.DatabaseName = SystemDir & "icdata.mdb"
    sSQL = "select checkinsdate as 入住时间," & _
        "staydays as 预住天数,checkinsdate as 发卡时间," & _
        "checkoutsdate as 注销时间," & _
        "ShortRoomNumber as 房间," & _
        "Name as 客人 from client where name='" & TxtClientKey.Text & "'"
    Data1.RecordSource = sSQL
    Data1.Refresh
  End If
End Sub

Private Sub TxtRoomKey_KeyPress(KeyAscii As Integer)
  If (KeyAscii = 13) And (TxtRoomKey <> "") Then
    Dim sSQL As String
    Data1.DatabaseName = SystemDir & "icdata.mdb"
    sSQL = "select checkinsdate as 入住时间," & _
        "staydays as 预住天数,checkinsdate as 发卡时间," & _
        "checkoutsdate as 注销时间," & _
        "ShortRoomNumber as 房间," & _
        "Name as 客人 from client where ShortRoomNumber='" & TxtRoomKey.Text & "'"
    Data1.RecordSource = sSQL
    Data1.Refresh
  End If
End Sub

⌨️ 快捷键说明

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