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

📄 frmcheckout.frm

📁 一个功能完善,界面比较精美的酒店管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   32
      Top             =   5160
      Width           =   945
   End
   Begin VB.Label lblRoomType 
      AutoSize        =   -1  'True
      Caption         =   "Select Room Type"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   31
      Top             =   4800
      Width           =   1770
   End
   Begin VB.Label lbltime 
      AutoSize        =   -1  'True
      Caption         =   "Time"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   5160
      TabIndex        =   30
      Top             =   960
      Width           =   525
   End
   Begin VB.Label lbldate 
      AutoSize        =   -1  'True
      Caption         =   "Date"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   360
      TabIndex        =   29
      Top             =   960
      Width           =   510
   End
   Begin VB.Line Line1 
      BorderColor     =   &H000000FF&
      X1              =   0
      X2              =   7800
      Y1              =   840
      Y2              =   840
   End
   Begin VB.Label lbltitle 
      AutoSize        =   -1  'True
      Caption         =   "Check Out Information"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   345
      Left            =   1320
      TabIndex        =   28
      Top             =   240
      Width           =   3720
   End
   Begin VB.Label lblPhone 
      AutoSize        =   -1  'True
      Caption         =   "Telephone/Mobile"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   27
      Top             =   4440
      Width           =   1785
   End
   Begin VB.Label lblCity 
      AutoSize        =   -1  'True
      Caption         =   "City"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   26
      Top             =   2640
      Width           =   390
   End
   Begin VB.Label lblDesignation 
      AutoSize        =   -1  'True
      Caption         =   "Designation"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   25
      Top             =   4080
      Width           =   1170
   End
   Begin VB.Label lblCompany 
      AutoSize        =   -1  'True
      Caption         =   "Company"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   24
      Top             =   3720
      Width           =   915
   End
   Begin VB.Label lbladdress1 
      AutoSize        =   -1  'True
      Caption         =   "Address"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   23
      Top             =   2280
      Width           =   795
   End
   Begin VB.Label lblname 
      AutoSize        =   -1  'True
      Caption         =   "Name of Guest"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   22
      Top             =   1920
      Width           =   1455
   End
   Begin VB.Label lblState 
      AutoSize        =   -1  'True
      Caption         =   "State"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   21
      Top             =   3000
      Width           =   525
   End
   Begin VB.Label lblCountry 
      AutoSize        =   -1  'True
      Caption         =   "Country"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   20
      Top             =   3360
      Width           =   780
   End
   Begin VB.Label lblGuestID 
      AutoSize        =   -1  'True
      Caption         =   "Guest ID"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   120
      TabIndex        =   19
      Top             =   1560
      Width           =   870
   End
End
Attribute VB_Name = "frmCheckOut"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Variable Declaration
Dim DOA As String
Dim result, i As Integer

Public Sub Blank()
    cboGuID.ListIndex = -1
    txtname.Text = ""
    txtaddress.Text = ""
    txtcity.Text = ""
    txtState.Text = ""
    txtCountry.Text = ""
    txtcompany.Text = ""
    txtdesignation.Text = ""
    txttelephone.Text = ""
    txtRoomType.Text = ""
    txtRoomNo.Text = ""
    txtadvance.Text = ""
    txtDOChkin.Text = ""
    txtTOChkIn.Text = ""
    txtBalance.Text = ""
    txtTotalBill.Text = ""
End Sub

Private Sub cboGuID_Click()
 cmdDelete.Enabled = True
 With RS_GuestIn
  .MoveFirst
  While Not .EOF
   If cboGuID.List(cboGuID.ListIndex) = .Fields(1) Then
    txtDOChkin.Text = .Fields(0)
    txtname.Text = .Fields(2)
    txtaddress.Text = .Fields(3)
    txtcity.Text = .Fields(4)
    txtState.Text = .Fields(5)
    txtCountry.Text = .Fields(6)
    txtTOChkIn.Text = .Fields(7)
    txtcompany.Text = .Fields(8)
    txtdesignation.Text = .Fields(9)
    txttelephone.Text = .Fields(10)
    txtRoomType.Text = .Fields(11)
    txtRoomNo.Text = .Fields(12)
   
   
    DOA = .Fields(0)
    result = Date - CDate(DOA)
    If result = 0 Then
     result = 1
    End If
    With RS_Payment
    .MoveFirst
    While Not .EOF
     If cboGuID.List(cboGuID.ListIndex) = RS_Payment.Fields(0) Then
    txtBalance.Text = Val(RS_Payment.Fields(9)) - Val(RS_Payment.Fields(8))
    txtTotalBill.Text = RS_Payment.Fields(9)
     txtadvance.Text = .Fields(8)
    End If
    .MoveNext
    Wend
    End With
   ' If txtRoomType.Text = "Single Room" Then
  '   txtTotalBill.Text = result * Rs_Rate.Fields(0)
 '    txtBalance.Text = txtTotalBill.Text - txtadvance.Text
 '   End If
 '   If txtRoomType.Text = "Double Room" Then
 '    txtTotalBill.Text = result * Rs_Rate.Fields(1)
 '    txtBalance.Text = txtTotalBill.Text - txtadvance.Text
 '   End If
 '   If txtRoomType.Text = "Suite Room" Then
 '    txtTotalBill.Text = result * Rs_Rate.Fields(2)
 '    txtBalance.Text = txtTotalBill.Text - txtadvance.Text
 '   End If
 '   If txtRoomType.Text = "Deluxe Suite" Then
 '    txtTotalBill.Text = result * Rs_Rate.Fields(3)
 '    txtBalance.Text = txtTotalBill.Text - txtadvance.Text
 '  End If
   Exit Sub
   Else
   .MoveNext
   End If
  Wend
 End With

End Sub

Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdDelete_Click()
With RS_GuestOut
 .AddNew
 .Fields(0) = lbldate.Caption
 .Fields(1) = lbltime.Caption
 .Fields(2) = cboGuID.List(cboGuID.ListIndex)
 .Fields(3) = txtname.Text
 .Fields(4) = txtaddress.Text
 .Fields(5) = txtcity.Text
 .Fields(6) = txtState.Text
 .Fields(7) = txtCountry
 .Fields(8) = txtcompany.Text
 .Fields(9) = txtdesignation.Text
 .Fields(10) = txttelephone.Text
 .Fields(11) = txtRoomType.Text
 .Fields(12) = txtRoomNo.Text
 .Fields(13) = txtadvance.Text
 .Fields(14) = txtDOChkin.Text
 .Fields(15) = txtTOChkIn.Text
 .Fields(16) = txtBalance.Text
 .Fields(17) = txtTotalBill.Text
 .Update
 End With
  If txtRoomType.Text = "Single Room" Then
   RS_SingleRoom.AddNew
   RS_SingleRoom.Fields(0) = txtRoomNo.Text
   RS_SingleRoom.Update
  End If
  If txtRoomType.Text = "Double Room" Then
  RS_DoubleRoom.AddNew
  RS_DoubleRoom.Fields(0) = txtRoomNo.Text
  RS_DoubleRoom.Update
 End If
 If txtRoomType.Text = "Suite Room" Then
  RS_SuiteRoom.AddNew
  RS_SuiteRoom.Fields(0) = txtRoomNo.Text
  RS_SuiteRoom.Update
 End If
 If txtRoomType.Text = "Deluxe Suite" Then
  RS_DeluxeSuite.AddNew
  RS_DeluxeSuite.Fields(0) = txtRoomNo.Text
  RS_DeluxeSuite.Update
 End If
 
 With RS_GuestIn
  .MoveFirst
smart:
 If cboGuID.List(cboGuID.ListIndex) = _
  .Fields(1) Then
  .Delete
  cboGuID.RemoveItem cboGuID.ListIndex
   
 Else
  .MoveNext
  GoTo smart
  End If
 MsgBox "Record Is Successfully Checked Out"
 cmdDelete.Enabled = False
 cboGuID.SetFocus
End With

With RS_Userlog
       .AddNew
       .Fields(0) = UserName
       .Fields(1) = "Check Out"
       .Fields(2) = Date
       .Fields(3) = Time
        .Fields(4) = "Successful"
       .Update
    End With
Blank
End Sub

Private Sub Form_Load()
Me.Top = 3000
Me.Left = 3000

lbldate.Caption = Date
lbltime.Caption = Time
cmdDelete.Enabled = False

Call Connect
 With RS_GuestIn
  While Not .EOF
   cboGuID.AddItem .Fields(1)
   .MoveNext
  Wend
 End With
End Sub

⌨️ 快捷键说明

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