Professional Documents
Culture Documents
Project Report On "Hotel Management System"
Project Report On "Hotel Management System"
Project Report on
“HOTEL MANAGEMENT SYSTEM”
Submitted by:
HARSHITHA.V(15KUSB7028)
BCA (V Semester)
Academic year 2017-2018
SIGNATURE OF EXAMINERS:
1. 2.
Mrs. Prathiba. V. Kalburgi (H.O.D BCA) for her valuable and inspiring
guidance and encouragement given throughout the period of this project with
reviews, evaluations of our work. We appreciate her immense patience.
We also grateful to our friends for their valuable suggestion and words of
inspiration for our project work, “HOTEL MANEGEMENT SYSTEM”.
ABSTRACT
Earlier everything was hand written and manually done through pen and
paper, and it would take a lot of time also, the work difficult and time
consuming.
So to make the work easy the entire management was changed and there
came into existence a device by the name “Computer”.
CONTENTS
1. INTRODUCTION
About Project
About Hotel Management System
2. SYSTEM ANALYSIS
Introduction
Existing System
Proposed System
3. SYSTEM DESIGN
Input design
Output design
Form design
Database design
4. SCREEN SHOTS
5. CODING
6. SYSTEM CONFIGURATION
7. CONCLUSION
8. BIBLIOGRAPHY
INTRODUCTION
The main aim of the entire activity is to automate the process of day to
day activities of Hotel like Room activities, Admission of a New
Customer, Assign a room according to customer’s demand, checkout of a
computer and releasing the room and finally compute the bill etc.
SOFTWRE REQUIREMENT
Windows 7 OS
MS Access
Visual basic
MS ACESS is helpful in the creativity of the database. A database provides the all the information
to the related topics with helps of the TABLE and Query which is through SQL (structural query
language).
It is easy to handle
VISUAL BASIC provides the view side of the library management system. visual basic
is the front view of the library management.
The main causes of the using the visual basic are as following:-
It is easy to operate
It is the best way to deal.
V.B. provide the front view.
It easy to purchase
HARDWARE REQUIREMENTS
Display Adapter.
512 MB DDR2 RAM or above.
X86 Conpatible Processor
Hard Disk 20 GB or more.
ADVANTAGES OF
“HOTEL MANAGEMENT SYSTEM”
1. PROJECT OBJECTIVE:
To develop a project which will maintain booking of rooms and handle account of a
hotel.
2. PROJECT FEATURES:
BILLING FACILITY
Operator, using this project can easily generate the bill for the customer,
He need not make any calculation for it
REPORT GENERATION
This feature help in easy maintenance of record of customer & their
report Generation
ADMINISTRATOR:
Administrator can add and delete rooms.
USER
User can do everything except adding & deleting the rooms records.
3. EXTENSIBLITY
NEW BRANCHES
This feature provides confirm advance booking of room in another branch of that hotel
TEST-CONDITIONS
5. Check for guest User has left the Message “ fill all
entries in room entries to be the entries.
booking fulfilled, blank
LIMITATIONS
3. This project does not deal with the employee of Hotels such as
clerk, manager etc.
ERROR HANDLING
ADVANTAGES OF VISUAL
PROGRAMMING
One of the principle advantages is that the programmer need not write code to
display the required component.
SYSTEM DESIGN
Design is the first step into the development phase for any engineered
product or system. Design is a creative process. A good design is the key
to effective system. The term “design” is defined as “the process of
applying various techniques and principles for the purpose of defining a
process or a system in sufficient detail to permit its physical realization”.
It may be defined as a process of applying various techniques and
principles for the purpose of defining a device, a process or a system in
sufficient detail to permit its physical realization. Software design sits at
the technical kernel of the software engineering process and is applied
regardless of the development paradigm that is used. The system design
develops the architectural detail required to build a system or product. As
in the case of any systematic approach, this software too has undergone
the best possible design phase fine tuning all efficiency, performance and
accuracy levels. The design phase is a transition from a user oriented
document to a document to the programmers or database personnel.
System design goes through two phases of development: Logical and
Physical Design.
Input design
OUTPUT DESIGN
A quality output is one, which meets the requirements of the end user
and presents the information clearly. In output design it is determined how
the information is to be displaced for immediate need and also the hard
copy output. It is the most important and direct source information to the
user. Efficient and intelligent output design improves the system’s
relationship to help user decision-making.
As we know the manual processing is quite tedious, time consuming, less accurate
in comparison to computerized processing.
Obviously the present system is not exception consultant in counting the entire above
problem.
Time consuming
It is very tedious.
All information are not placed separately.
Lot of paper work.
Slow data processing
Not user-friendly environment
It is difficult to found record due file management system.
SCREEN
SHOTS
CODING
Form Splash :
Private Sub Label6_Click()
End Sub
Login Form :
Dim s1 As String
Dim s2 As String
Private Sub cmdexit_Click()
If MsgBox("Do You Really Want To Exit ?", vbQuestion + vbYesNo +
vbDefaultButton, "WARNING") = vbYes Then
Unload Me
Else
Exit Sub
End If
End Sub
Form1.Show
End Sub
End Sub
rs.ActiveConnection = cn
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.Open
End Sub
End Sub
rs.AddNew
rs.Fields(0) = Text1.Text
rs.Fields(1) = Text3.Text
rs.Update
Unload Me
menu.Show
End Sub
End Sub
Menu Form :
Private Sub cmdcheckout_Click()
Unload Me
checkout.Show
End Sub
searchguest.Show
End Sub
Private Sub Command1_Click()
Unload Me
checkin.Show
End Sub
Private Sub cmdcal_Click()
On Error GoTo Err
Shell "calc.exe", vbNormalFocus
Exit Sub
Err:
MsgBox "You don't have a Calculator installed in your computer.",
vbExclamation, "CSRS version 1"
End Sub
Private Sub cmdlogout_Click()
If MsgBox("Do You Really Want To LogOut ?", vbQuestion + vbYesNo +
vbDefaultButton, "WARNING") = vbYes Then
Unload menu
login.Show
Else
Exit Sub
End If
End Sub
Private Sub cmdnotepad_Click()
On Error GoTo Err
Shell "notepad.exe", vbNormalFocus
Exit Sub
Err:
MsgBox "You don't have a NotePad installed in your computer.",
vbExclamation, "CSRS version 1"
End Sub
MSRCASC-BCA V SEM Page 49
HOTEL MANAGEMENT SYSTEM
rmenu.Show
End Sub
Private Sub cmdpayment_Click()
payment.Show
End Sub
Private Sub cmdstatus_Click()
status.Show
End Sub
Private Sub Form_Load()
Me.WindowState = vbMaximized
Timer1.Enabled = True
lbldate.Caption = Date
End Sub
End Sub
Reservation :
Private Sub cmdadd_Click()
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text16.Text = ""
Text17.Text = ""
Text18.Text = ""
MSRCASC-BCA V SEM Page 50
HOTEL MANAGEMENT SYSTEM
Text19.Text = ""
Combo1.Text = "--SELECT--"
Combo2.Text = "--SELECT--"
Combo3.Text = "--SELECT--"
DTPicker3.Value = Date
On Error GoTo errmsg
Dim id As String
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
id = 1
Adodc1.Recordset.AddNew
Text1.Text = id
Adodc4.Recordset.AddNew
Adodc2.Recordset.AddNew
Adodc3.Recordset.AddNew
rs.AddNew
a.AddNew
Else
Adodc1.Recordset.MoveLast
id = Adodc1.Recordset("Customer_ID") + 1
Adodc1.Recordset.AddNew
Text1.Text = id
Adodc4.Recordset.AddNew
Adodc2.Recordset.AddNew
Adodc3.Recordset.AddNew
rs.AddNew
a.AddNew
Text1.Text = id
End If
Text2.SetFocus
Exit Sub
errmsg:
If Err.Number = "-2147467259" Then
Call MsgBox("CustomerID Already Exist")
End If
End Sub
MSRCASC-BCA V SEM Page 51
HOTEL MANAGEMENT SYSTEM
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
Exit Sub
End If
If (room_type = "SUITE-ROOM" And val(Text9.Text) > 5) Then
MsgBox "Suite Room can have only 5 member"
Exit Sub
End If
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(12) = "ACTIVE"
Adodc1.Recordset.Fields(1) = Text2.Text
Adodc1.Recordset.Fields(2) = Combo1.Text
Adodc1.Recordset.Fields(3) = DTPicker1.Value
Adodc1.Recordset.Fields(4) = Text3.Text
Adodc1.Recordset.Fields(5) = Text16.Text
Adodc1.Recordset.Fields(6) = Text17.Text
Adodc1.Recordset.Fields(7) = Text18.Text
Adodc1.Recordset.Fields(8) = Text19.Text
Adodc1.Recordset.Fields(9) = Combo2.Text
Adodc1.Recordset.Fields(10) = Text20.Text
Adodc1.Recordset.Fields(11) = Text4.Text
Adodc1.Recordset.Fields(12) = "BOOKED"
Adodc3.Recordset.Fields(0) = Text1.Text
Adodc3.Recordset.Fields(3) = Text5.Text
Adodc3.Recordset.Fields(2) = Text7.Text
Adodc3.Recordset.Fields(1) = Combo4.Text
Adodc3.Recordset.Fields(4) = Text9.Text
Adodc2.Recordset.Fields(0) = Text1.Text
Adodc2.Recordset.Fields(1) = Text8.Text
Adodc2.Recordset.Fields(7) = Text6.Text
Adodc2.Recordset.Fields(2) = 0
Adodc2.Recordset.Fields(3) = 0
Adodc2.Recordset.Fields(4) = 0
Adodc2.Recordset.Fields(5) = 0
Adodc2.Recordset.Fields(6) = 0
Adodc2.Recordset.Fields(9) = 0
Adodc2.Recordset.Fields(8) = "DUE"
Adodc4.Recordset.Fields(0) = Text1.Text
MSRCASC-BCA V SEM Page 53
HOTEL MANAGEMENT SYSTEM
Adodc4.Recordset.Fields(1) = DTPicker2.Value
Adodc4.Recordset.Fields(2) = Combo3.Text
Adodc4.Recordset.Fields(3) = Text2.Text
Adodc4.Recordset.Fields(5) = Text6.Text
Adodc4.Recordset.Fields(6) = Text5.Text
Adodc4.Recordset.Fields(4) = DTPicker3.Value
rs.Fields(0) = Text1.Text
a.Fields(0) = Text1.Text
a.Fields(1) = "12:00:00 AM"
a.Fields(2) = "18/09/2015"
a.Fields(3) = "12:00:00 AM"
a.Fields(4) = "18/09/2015"
Adodc1.Recordset.Update
Adodc2.Recordset.Update
Adodc3.Recordset.Update
Adodc4.Recordset.Update
rs.Update
a.Update
MsgBox " COUSTOMER BOOKED"
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
End If
val = Combo4.Text
Select Case val
Case "STANDARD-ROOM"
Label17.Caption = "2"
If Label17.Caption = "2" Then
standardroom1.Show
End If
End Sub
rs9.Open "select * from Reservation where rid ='" & Text1 & "'", cn, 3, 2
DataReport2.Show
End If
End Sub
connect
Set a = New ADODB.Recordset
a.Source = "checkin"
a.ActiveConnection = cn
a.CursorLocation = adUseClient
a.LockType = adLockOptimistic
a.Open
End Sub
End Sub
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
MSRCASC-BCA V SEM Page 57
HOTEL MANAGEMENT SYSTEM
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
End Sub
End Sub
End Sub
val = Combo3.Text
Select Case val
Case "STANDARD-ROOM"
Label11.Caption = "2"
If Label11.Caption = "2" Then
standardroom.Show
End If
suiteroom.Show
End If
End Select
End Sub
DTPicker2.Value = Date
DTPicker3.Value = Time
connect
Set rs = New ADODB.Recordset
rs.Source = "laundry"
rs.ActiveConnection = cn
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.Open
End Sub
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text11.Text <> "" Then
Text12.SetFocus
ElseIf (KeyAscii < 48 And KeyAscii <> 8) Or KeyAscii > 57 Then
KeyAscii = 0
MsgBox "DIGITS ONNLY"
End If
MSRCASC-BCA V SEM Page 61
HOTEL MANAGEMENT SYSTEM
End Sub
Private Sub Text12_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text12.Text <> "" Then
Text13.SetFocus
ElseIf (KeyAscii < 48 And KeyAscii <> 8) Or KeyAscii > 57 Then
KeyAscii = 0
MsgBox "DIGITS ONLY"
End If
End Sub
Private Sub Text13_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text13.Text <> "" Then
ElseIf (KeyAscii < 48 And KeyAscii <> 8) Or KeyAscii > 57 Then
KeyAscii = 0
MsgBox "DIGITS ONLY"
End If
End Sub
End If
End Sub
Else
MsgBox Err.Description
MSRCASC-BCA V SEM Page 63
HOTEL MANAGEMENT SYSTEM
End If
End Sub
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
End If
End Sub
Private Sub checkin_Change()
On Error GoTo errmsg
Adodc3.Refresh
Else
Adodc3.Recordset.Filter = "[cid] Like '" & checkin & "'"
Text1.Text = Adodc4.Recordset.Fields(0)
Text2.Text = Adodc4.Recordset.Fields(1)
Combo1.Text = Adodc4.Recordset.Fields(2)
DTPicker1.Value = Adodc4.Recordset.Fields(3)
Text3.Text = Adodc4.Recordset.Fields(4)
Text4.Text = Adodc4.Recordset.Fields(5)
Text5.Text = Adodc4.Recordset.Fields(6)
Text6.Text = Adodc4.Recordset.Fields(7)
Text7.Text = Adodc4.Recordset.Fields(8)
Combo2.Text = Adodc4.Recordset.Fields(9)
Text8.Text = Adodc4.Recordset.Fields(10)
Text9.Text = Adodc4.Recordset.Fields(11)
Text14.Text = Adodc1.Recordset.Fields(4)
Combo3.Text = Adodc1.Recordset.Fields(1)
Text10.Text = Adodc1.Recordset.Fields(2)
Text12.Text = Adodc1.Recordset.Fields(3)
Text13.Text = Adodc2.Recordset.Fields(7)
Exit Sub
DTPicker3.Value = Adodc3.Recordset.Fields(1)
DTPicker2.Value = Adodc3.Recordset.Fields(2)
MSRCASC-BCA V SEM Page 66
HOTEL MANAGEMENT SYSTEM
End If
Exit Sub
errmsg:
MsgBox "DATA NOT FOUND"
End Sub
End Sub
End Sub
val = Combo3.Text
Select Case val
Case "STANDARD-ROOM"
Label11.Caption = "2"
If Label11.Caption = "2" Then
MSRCASC-BCA V SEM Page 68
HOTEL MANAGEMENT SYSTEM
standardroom.Show
End If
Text13.Text = Adodc2.Recordset.Fields(7)
Text11.Text = Adodc2.Recordset.Fields(8)
End If
Exit Sub
errmsg:
MSRCASC-BCA V SEM Page 69
HOTEL MANAGEMENT SYSTEM
End Sub
Private Sub room_Change()
On Error GoTo errmsg
If room = "" Then
Adodc1.Recordset.Filter = ""
Adodc1.Refresh
Else
Adodc1.Recordset.Filter = "[ID] Like '" & room & "'"
Combo3.Text = Adodc1.Recordset.Fields(1)
Text10.Text = Adodc1.Recordset.Fields(2)
Text12.Text = Adodc1.Recordset.Fields(3)
Text14.Text = Adodc1.Recordset.Fields(4)
End If
Exit Sub
errmsg:
End Sub
Private Sub Text15_Change()
On Error GoTo errmsg
If Text15 = "" Then
Adodc4.Recordset.Filter = ""
Adodc4.Refresh
Else
Adodc4.Recordset.Filter = "[Customer_ID] Like '" & Text15 & "'"
Label15.Caption = Adodc4.Recordset.Fields(12)
Text1.Text = Adodc4.Recordset.Fields(0)
Text2.Text = Adodc4.Recordset.Fields(1)
Text16.Text = Adodc4.Recordset.Fields(2)
Text17.Text = Adodc4.Recordset.Fields(3)
Text3.Text = Adodc4.Recordset.Fields(4)
Text4.Text = Adodc4.Recordset.Fields(5)
Text5.Text = Adodc4.Recordset.Fields(6)
Text6.Text = Adodc4.Recordset.Fields(7)
Text7.Text = Adodc4.Recordset.Fields(8)
Text18.Text = Adodc4.Recordset.Fields(9)
Text8.Text = Adodc4.Recordset.Fields(10)
Text9.Text = Adodc4.Recordset.Fields(11)
End If
payment.Caption = Text15.Text
MSRCASC-BCA V SEM Page 70
HOTEL MANAGEMENT SYSTEM
room.Caption = Text15.Text
checkin.Caption = Text15.Text
Exit Sub
errmsg:
If Err.Number = "3021" Then
Text15.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text16.Text = ""
Text18.Text = ""
Text11.Text = ""
Combo1.Text = "--select--"
Combo3.Text = "--SELECT--"
Text10.Text = ""
Text14.Text = ""
Text12.Text = ""
Text13.Text = ""
Call MsgBox("Customer Not exist")
Else
MsgBox Err.Description
End If
End Sub
Adodc3.Recordset.Filter = ""
Adodc3.Refresh
Else
Adodc3.Recordset.Filter = "[cid] Like '" & checkin & "'"
DTPicker3.Value = Adodc3.Recordset.Fields(3)
DTPicker2.Value = Adodc3.Recordset.Fields(4)
End If
Exit Sub
errmsg:
End Sub
End If
End Sub
End If
End If
Unload Me
End Sub
End Sub
End Sub
End If
End If
MSRCASC-BCA V SEM Page 73
HOTEL MANAGEMENT SYSTEM
End If
Unload Me
End Sub
End Sub
End Sub
' Unload Me
' login.Show
' End If
' End If
'
'End Sub
Option Explicit
Dim operand1 As Double, operand As Double
Dim op1 As Double, op2 As Double
Dim operator As String
Dim cleardisplay As Boolean
Private Sub cmdadd_Click()
If Label2.Caption = "NOT ACTIVE" Then
MsgBox "CUSTOMER IS NOT ACTIVE"
Exit Sub
End If
op1 = val(Text3.Text)
operator = "*"
Dim result1 As Double
MSRCASC-BCA V SEM Page 75
HOTEL MANAGEMENT SYSTEM
op2 = val(Label12.Caption)
result1 = mul(ByVal op1, ByVal op2)
Label10.Caption = result1
op1 = val(Text4.Text)
operator = "*"
Dim result2 As Double
op2 = val(Label15.Caption)
result2 = mul(ByVal op1, ByVal op2)
Label11.Caption = result2
op1 = val(Label10.Caption)
operator = "+"
Dim result3 As Double
op2 = val(Label11.Caption)
result3 = add(ByVal op1, ByVal op2)
Label17.Caption = result3
op1 = val(Label17.Caption)
operator = "+"
Dim result4 As Double
op2 = val(Label16.Caption)
result4 = add(ByVal op1, ByVal op2)
Text5.Text = result4
Dim result5 As Double
op1 = val(Label24.Caption)
operator = "+"
op2 = val(Text3.Text)
result5 = add(ByVal op1, ByVal op2)
Label24.Caption = result5
Dim result6 As Double
op1 = val(Label25.Caption)
operator = "+"
op2 = val(Text4.Text)
result6 = add(ByVal op1, ByVal op2)
Label25.Caption = result6
End Sub
Private Sub cmdback_Click()
Unload Me
menu.Show
End Sub
Private Function mul(ByVal operand1 As Double, ByVal operand2 As
Double) As Double
mul = operand1 * operand2
MSRCASC-BCA V SEM Page 76
HOTEL MANAGEMENT SYSTEM
End Function
Private Function add(ByVal operand1 As Double, ByVal operand2 As
Double) As Double
add = operand1 + operand2
End Function
Private Sub cmdsave_Click()
On Error GoTo errmsg
If Text1.Text = "" Or Text2.Text = "" Or Text6.Text = "" Or Combo1.Text =
"--SELECT--" Then
MsgBox "TRANSACTION NOT ALLOWED,FILL ALL DETAILS"
Exit Sub
End If
Adodc3.Recordset.Fields(1) = Label24.Caption
Adodc3.Recordset.Fields(5) = Combo1.Text
Adodc3.Recordset.Fields(2) = Label25.Caption
Adodc3.Recordset.Fields(3) = DTPicker1.Value
Adodc3.Recordset.Fields(4) = DTPicker2.Value
Adodc2.Recordset.Fields(5) = Text5.Text
Adodc1.Recordset.Update
Adodc2.Recordset.Update
Adodc3.Recordset.Update
MsgBox "TRANSACTION COMPLETE"
Exit Sub
errmsg:
MsgBox Err.Description
End Sub
End Sub
menu.Enabled = True
End Sub
Text6.Text = Adodc4.Recordset.Fields(1)
Label2.Caption = Adodc4.Recordset.Fields(12)
End If
payment.Caption = Text1.Text
room.Caption = Text1.Text
Label26.Caption = Text1.Text
Exit Sub
errmsg:
If Err.Number = "3021" Then
MSRCASC-BCA V SEM Page 78
HOTEL MANAGEMENT SYSTEM
Text1.Text = ""
Text2.Text = ""
Text6.Text = ""
Label16.Caption = ""
Label17.Caption = ""
Combo1.Text = "--SELECT--"
Call MsgBox("Customer Not exist")
Else
MsgBox Err.Description
End If
End Sub
Private Sub payment_Change()
If payment = "" Then
Adodc2.Recordset.Filter = ""
Adodc2.Refresh
Else
Adodc2.Recordset.Filter = "[PID] Like '" & payment & "'"
Label16.Caption = Adodc2.Recordset.Fields(5)
End If
End Sub
Private Sub room_Change()
If room = "" Then
Adodc1.Recordset.Filter = ""
Adodc1.Refresh
Else
Adodc5.Recordset.Filter = "[ID] Like '" & room & "'"
Text2.Text = Adodc5.Recordset.Fields(2)
End If
End Sub
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Update
Else
If Option2.Value = True Then
Adodc1.Recordset.Fields(1) = Text1.Text
Adodc1.Recordset.Update
Else
End If
End If
End Sub
Dim s1 As String
Dim s2 As String
Private Sub cmdexit_Click()
If MsgBox("Do You Really Want To Exit ?", vbQuestion + vbYesNo +
vbDefaultButton, "WARNING") = vbYes Then
Unload Me
Else
Exit Sub
End If
End Sub
End Sub
End Sub
KeyAscii = 0
cmdlogin_Click
End If
End Sub
searchguest.Show
End Sub
Private Sub Command1_Click()
Unload Me
checkin.Show
End Sub
Private Sub cmdcal_Click()
On Error GoTo Err
Shell "calc.exe", vbNormalFocus
Exit Sub
Err:
MsgBox "You don't have a Calculator installed in your computer.",
vbExclamation, "CSRS version 1"
End Sub
Private Sub cmdlogout_Click()
If MsgBox("Do You Really Want To LogOut ?", vbQuestion + vbYesNo +
vbDefaultButton, "WARNING") = vbYes Then
MSRCASC-BCA V SEM Page 82
HOTEL MANAGEMENT SYSTEM
Unload menu
login.Show
Else
Exit Sub
End If
End Sub
Private Sub cmdnotepad_Click()
On Error GoTo Err
Shell "notepad.exe", vbNormalFocus
Exit Sub
Err:
MsgBox "You don't have a NotePad installed in your computer.",
vbExclamation, "CSRS version 1"
End Sub
Private Sub cmdreservation_Click()
rmenu.Show
End Sub
Private Sub cmdpayment_Click()
payment.Show
End Sub
Private Sub cmdstatus_Click()
status.Show
End Sub
Private Sub Form_Load()
Me.WindowState = vbMaximized
Timer1.Enabled = True
lbldate.Caption = Date
End Sub
Label11.Caption = Adodc6.Recordset.Fields(2)
End If
End Sub
Adodc3.Refresh
c = Adodc3.Recordset("standardroom") * val(Text9.Text)
Text13.Text = c
End If
Dim tot As Double
tot = val(Text5) + val(Text6) + val(Text10) + val(Text11) + val(Text13)
Text7.Text = val(tot) + (4 / 100) * val(tot)
Text15.Text = (4 / 100) * val(tot)
Dim bal As Double
bal = val(tot) - val(Text4) + val(Text15.Text)
Text8.Text = val(bal)
End Sub
rs.Open "select * from Paymentlog where Customer_ID ='" & Text1 & "'",
cn, 3, 2
DataReport1.Show
End If
End Sub
Exit Sub
End If
Adodc2.Recordset.Fields(1) = Text6.Text
Adodc2.Recordset.Fields(2) = Text5.Text
Adodc2.Recordset.Fields(3) = Text8.Text
Adodc2.Recordset.Fields(6) = Text7.Text
Adodc2.Recordset.Fields(8) = Combo1.Text
MSRCASC-BCA V SEM Page 85
HOTEL MANAGEMENT SYSTEM
Adodc2.Recordset.Fields(9) = Text13.Text
Adodc1.Recordset.Fields(3) = Text9.Text
Adodc2.Recordset.Fields(10) = Text15.Text
Adodc5.Recordset.AddNew
Adodc5.Recordset.Fields(1) = Text1.Text
Adodc5.Recordset.Fields(2) = Text2.Text
Adodc5.Recordset.Fields(3) = Text13.Text
Adodc5.Recordset.Fields(5) = Text6.Text
Adodc5.Recordset.Fields(6) = Text5.Text
Adodc5.Recordset.Fields(7) = Text10.Text
Adodc5.Recordset.Fields(8) = Text11.Text
Adodc5.Recordset.Fields(9) = Text7.Text
Adodc5.Recordset.Fields(10) = Combo1.Text
Adodc5.Recordset.Fields(11) = Text9.Text
Adodc5.Recordset.Fields(12) = Combo1.Text
Adodc5.Recordset.Fields(13) = Text3.Text
Adodc5.Recordset.Fields(14) = Label14.Caption
Adodc5.Recordset.Fields(15) = Text8.Text
Adodc5.Recordset.Fields(4) = Text4.Text
Adodc5.Recordset.Fields(16) = Text15.Text
Adodc5.Recordset.Update
Adodc2.Recordset.Update
Adodc1.Recordset.Update
End Sub
End Sub
payment.Caption = Text1.Text
End Sub
Text1.Text = Adodc4.Recordset.Fields(0)
Text2.Text = Adodc4.Recordset.Fields(1)
Text3.Text = Adodc4.Recordset.Fields(2)
Text4.Text = Adodc4.Recordset.Fields(3)
Text5.Text = Adodc4.Recordset.Fields(4)
Text6.Text = Adodc4.Recordset.Fields(5)
Text7.Text = Adodc4.Recordset.Fields(6)
Text8.Text = Adodc4.Recordset.Fields(7)
Text9.Text = Adodc4.Recordset.Fields(8)
Text10.Text = Adodc4.Recordset.Fields(9)
Text11.Text = Adodc4.Recordset.Fields(10)
Text12.Text = Adodc4.Recordset.Fields(11)
Label10.Caption = Adodc4.Recordset.Fields(12)
Text13.Text = Adodc1.Recordset.Fields(1)
MSRCASC-BCA V SEM Page 87
HOTEL MANAGEMENT SYSTEM
Text14.Text = Adodc1.Recordset.Fields(2)
Text23.Text = Adodc1.Recordset.Fields(4)
Text17.Text = Adodc2.Recordset.Fields(7)
Text18.Text = Adodc3.Recordset.Fields(1)
Text19.Text = Adodc3.Recordset.Fields(2)
Text20.Text = Adodc3.Recordset.Fields(3)
Text21.Text = Adodc3.Recordset.Fields(4)
End If
Exit Sub
errmsg:
If Err.Number = "3021" Then
Text22.Text = ""
Call MsgBox("Customer Not exist")
Else
MsgBox Err.Description
End If
End Sub
Exit Sub
Else
If Label4.Caption = "VACANT" Then
Adodc1.Recordset.Fields(1) = Label1.Caption
checkin.Text10.Text = singleroom.Label3.Caption
End If
End If
Unload Me
End Sub
End Sub
End Sub
End If
MSRCASC-BCA V SEM Page 89
HOTEL MANAGEMENT SYSTEM
End If
End If
Unload Me
End Sub
End Sub
End Sub
End If
End If
Unload Me
End Sub
Adodc1.Recordset.Update
MsgBox "ROOM DEALLOTED"
End Sub
End Sub
End Sub
End If
End If
End If
Unload Me
End Sub
End Sub
End Sub
Public a As String
Private Sub cmdback_Click()
Unload Me
menu.Show
End Sub
menu.Enabled = False
a = Label16.Caption
b = Label23.Caption
Label2.Caption = Adodc1.Recordset.RecordCount
Label3.Caption = Adodc2.Recordset.RecordCount
Label4.Caption = Adodc3.Recordset.RecordCount
Label5.Caption = Adodc4.Recordset.RecordCount
Adodc3.RecordSource = " select * from suitroom where status ='" + a + "' "
Adodc3.Refresh
If Adodc3.Recordset.RecordCount = 0 Then
Label9.Caption = "0"
Else
Label9.Caption = Adodc3.Recordset.RecordCount
End If
Adodc3.RecordSource = " select * from suitroom where status ='" + b + "' "
Adodc3.Refresh
MSRCASC-BCA V SEM Page 93
HOTEL MANAGEMENT SYSTEM
If Adodc3.Recordset.RecordCount = 0 Then
Label21.Caption = "0"
Else
Label21.Caption = Adodc3.Recordset.RecordCount
End If
End If
End If
End Sub
End If
End If
Unload Me
End Sub
End Sub
End Sub
End If
End If
End If
Unload Me
End Sub
End Sub
End Sub
MSRCASC-BCA V SEM Page 96
HOTEL MANAGEMENT SYSTEM
Single Room :
Private Sub Command1_Click()
End If
End If
Unload Me
End Sub
End Sub
End Sub
Standard Room :
Private Sub Command1_Click()
If Label4.Caption = "ALLOTED" Then
MsgBox "ROOM IS NOT VACANT"
Exit Sub
Else
If Label4.Caption = "VACANT" Then
checkin.Text10.Text = standardroom.Label3.Caption
Adodc1.Recordset.Fields(1) = Label1.Caption
End If
End If
Unload Me
End Sub
End Sub
End Sub
Suite Room :
Private Sub Command1_Click()
If Label4.Caption = "ALLOTED" Then
MsgBox "ROOM IS NOT VACANT"
Exit Sub
Else
MSRCASC-BCA V SEM Page 98
HOTEL MANAGEMENT SYSTEM
End If
End If
Unload Me
End Sub
End Sub
End Sub
Deluxe Room :
Private Sub Command1_Click()
If Label4.Caption = "ALLOTED" Then
MsgBox "ROOM IS NOT VACANT"
Exit Sub
Else
If Label4.Caption = "VACANT" Then
checkin.Text10.Text = deluxeroom.Label3.Caption
Adodc1.Recordset.Fields(1) = Label1.Caption
End If
End If
Unload Me
MSRCASC-BCA V SEM Page 99
HOTEL MANAGEMENT SYSTEM
End Sub
End Sub
End Sub
Booking History :
Private Sub Command1_Click()
searchguest.Show
End Sub
End Sub
Me.filllistview
End Sub
Sub filllistview()
Loop
Else
ListView1.ListItems.Clear
End If
rs4.Close
Set rs4 = Nothing
End Sub
Loop
Else
ListView1.ListItems.Clear
End If
rs4.Close
Set rs4 = Nothing
End Sub
End If
End Sub
Cancel Registration :
Private Sub Combo4_Click()
Dim val As String
val = Combo4.Text
Select Case val
Case "STANDARD-ROOM"
Label11.Caption = "2"
If Label11.Caption = "2" Then
standardroom1.Show
End If
Exit Sub
errmsg:
MsgBox "ENTER THE NAME OF CUSTOMER "
End Sub
Else
Adodc2.Recordset.Filter = "[cid] Like '" & checkin & "'"
End If
End Sub
End If
End Sub
End If
payment.Caption = Text1.Text
room.Caption = Text2.Text
reservation.Caption = Text1.Text
laundry.Caption = Text1.Text
checkin.Caption = Text1.Text
Exit Sub
errmsg:
If Err.Number = "3021" Then
Call MsgBox("Customer Not exist")
Else
MsgBox Err.Description
End If
End Sub
Check in :
Private Sub ccmdclear_Click()
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Combo1.Text = "--select--"
Combo2.Text = "--SELECT--"
Combo3.Text = "--SELECT--"
Text10.Text = ""
Text14.Text = ""
Text12.Text = ""
Text13.Text = ""
End Sub
Combo2.Text = "--SELECT--"
Combo3.Text = "--SELECT--"
Text10.Text = ""
Text14.Text = ""
Text12.Text = ""
Text13.Text = ""
On Error GoTo errmsg
Dim id As String
Adodc4.Refresh
Adodc4.Recordset.MoveLast
id = Adodc4.Recordset("Customer_ID") + 1
Adodc4.Recordset.AddNew
Adodc1.Recordset.AddNew
Adodc2.Recordset.AddNew
Adodc3.Recordset.AddNew
rs.AddNew
Text1.Text = id
Text2.SetFocus
Exit Sub
errmsg:
Adodc4.Recordset.AddNew
Adodc1.Recordset.AddNew
Adodc2.Recordset.AddNew
Adodc3.Recordset.AddNew
rs.AddNew
Text1.Text = 1
Text2.SetFocus
End Sub
Unload Me
menu.Show
End Sub
Private Sub cmdcheckin_Click()
On Error GoTo errmsg
If Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = ""
Or Text6.Text = "" Or Text7.Text = "" Or Text8.Text = "" Or Text9.Text =
"" Or Text10.Text = "" Or Text12.Text = "" Or Text13.Text = "" Then
MsgBox "field should not be left blank"
Exit Sub
End If
Adodc4.Recordset.Fields(0) = Text1.Text
Adodc4.Recordset.Fields(1) = Text2.Text
Adodc4.Recordset.Fields(2) = Combo1.Text
Adodc4.Recordset.Fields(3) = DTPicker1.Value
Adodc4.Recordset.Fields(4) = Text3.Text
Adodc4.Recordset.Fields(5) = Text4.Text
Adodc4.Recordset.Fields(6) = Text5.Text
Adodc4.Recordset.Fields(7) = Text6.Text
Adodc4.Recordset.Fields(8) = Text7.Text
Adodc4.Recordset.Fields(9) = Combo2.Text
Adodc4.Recordset.Fields(10) = Text8.Text
Adodc4.Recordset.Fields(11) = Text9.Text
Adodc4.Recordset.Fields(12) = "ACTIVE"
Adodc1.Recordset.Fields(0) = Text1.Text
Adodc1.Recordset.Fields(1) = Combo3.Text
Adodc1.Recordset.Fields(2) = Text10.Text
Adodc1.Recordset.Fields(3) = Text12.Text
Adodc1.Recordset.Fields(4) = Text14.Text
Adodc2.Recordset.Fields(0) = Text1.Text
Adodc2.Recordset.Fields(1) = 0
Adodc2.Recordset.Fields(2) = 0
Adodc2.Recordset.Fields(3) = 0
Adodc2.Recordset.Fields(4) = 0
Adodc2.Recordset.Fields(5) = 0
Adodc2.Recordset.Fields(6) = 0
Adodc2.Recordset.Fields(9) = 0
Adodc2.Recordset.Fields(10) = 0
Adodc2.Recordset.Fields(8) = "DUE"
MSRCASC-BCA V SEM Page 108
HOTEL MANAGEMENT SYSTEM
Adodc2.Recordset.Fields(7) = Text13.Text
Adodc3.Recordset.Fields(0) = Text1.Text
Adodc3.Recordset.Fields(1) = DTPicker3.Value
Adodc3.Recordset.Fields(2) = DTPicker2.Value
Adodc3.Recordset.Fields(3) = "00:00:00 AM"
Adodc3.Recordset.Fields(4) = "1/1/2012"
rs.Fields(0) = Text1.Text
rs.Fields(1) = 0
rs.Fields(2) = 0
rs.Fields(3) = "1/1/2012"
rs.Fields(4) = "1/1/2012"
rs.Fields(5) = "--SELECT--"
Adodc1.Recordset.Update
Adodc2.Recordset.Update
Adodc3.Recordset.Update
Adodc4.Recordset.Update
rs.Update
MsgBox "RECORD SAVED SUCCESSFULLY"
Exit Sub
errmsg:
MsgBox Err.Description
Exit Sub
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "PLEASE SELECT THE GENDER"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
MSRCASC-BCA V SEM Page 109
HOTEL MANAGEMENT SYSTEM
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
val = Combo3.Text
Select Case val
Case "STANDARD-ROOM"
Label11.Caption = "2"
If Label11.Caption = "2" Then
standardroom.Show
End If
End Sub
DTPicker2.Value = Date
DTPicker3.Value = Time
connect
Set rs = New ADODB.Recordset
rs.Source = "laundry"
rs.ActiveConnection = cn
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.Open
End Sub
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text11.Text <> "" Then
Text12.SetFocus
ElseIf (KeyAscii < 48 And KeyAscii <> 8) Or KeyAscii > 57 Then
KeyAscii = 0
MsgBox "DIGITS ONNLY"
End If
End Sub
Private Sub Text12_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text12.Text <> "" Then
MSRCASC-BCA V SEM Page 111
HOTEL MANAGEMENT SYSTEM
Text13.SetFocus
ElseIf (KeyAscii < 48 And KeyAscii <> 8) Or KeyAscii > 57 Then
KeyAscii = 0
MsgBox "DIGITS ONLY"
End If
End Sub
Private Sub Text13_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text13.Text <> "" Then
ElseIf (KeyAscii < 48 And KeyAscii <> 8) Or KeyAscii > 57 Then
KeyAscii = 0
MsgBox "DIGITS ONLY"
End If
End Sub
Else
MsgBox Err.Description
End If
End Sub
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
MSRCASC-BCA V SEM Page 114
HOTEL MANAGEMENT SYSTEM
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
ElseIf (KeyAscii < 65 And KeyAscii <> 8 And KeyAscii <> 32) Or
(KeyAscii > 90 And KeyAscii < 97) Or (KeyAscii > 122) Then
KeyAscii = 0
MsgBox "LETTERS ONLY"
End If
End Sub
End If
End Sub
Private Sub checkin_Change()
MSRCASC-BCA V SEM Page 115
HOTEL MANAGEMENT SYSTEM
Adodc3.Refresh
Else
Adodc3.Recordset.Filter = "[cid] Like '" & checkin & "'"
Text1.Text = Adodc4.Recordset.Fields(0)
Text2.Text = Adodc4.Recordset.Fields(1)
Combo1.Text = Adodc4.Recordset.Fields(2)
DTPicker1.Value = Adodc4.Recordset.Fields(3)
Text3.Text = Adodc4.Recordset.Fields(4)
Text4.Text = Adodc4.Recordset.Fields(5)
Text5.Text = Adodc4.Recordset.Fields(6)
Text6.Text = Adodc4.Recordset.Fields(7)
Text7.Text = Adodc4.Recordset.Fields(8)
Combo2.Text = Adodc4.Recordset.Fields(9)
Text8.Text = Adodc4.Recordset.Fields(10)
Text9.Text = Adodc4.Recordset.Fields(11)
Text14.Text = Adodc1.Recordset.Fields(4)
Combo3.Text = Adodc1.Recordset.Fields(1)
Text10.Text = Adodc1.Recordset.Fields(2)
Text12.Text = Adodc1.Recordset.Fields(3)
Text13.Text = Adodc2.Recordset.Fields(7)
Exit Sub
DTPicker3.Value = Adodc3.Recordset.Fields(1)
DTPicker2.Value = Adodc3.Recordset.Fields(2)
End If
Exit Sub
errmsg:
MsgBox "DATA NOT FOUND"
End Sub
MSRCASC-BCA V SEM Page 116
HOTEL MANAGEMENT SYSTEM
End Sub
Restaurant:
End Sub
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Text1.Text <> "" Then
End Sub
Private Sub cmdback_Click()
Unload Me
menu.Show
End Sub
Private Sub Command1_Click()
If Label3.Caption = "NOT ACTIVE" Or Label3.Caption = "BOOKED"
Then
MsgBox "CUSTOMER IS NOT ACTIVE"
Exit Sub
End If
Dim a As Double
Dim b As Double
If Check1.Value = Checked Then
Text4.Text = Label9.Caption * Text3.Text
End If
If Check2.Value = Checked Then
Text6.Text = Label10.Caption * Text5.Text
End If
If Check3.Value = Checked Then
Text8.Text = Label11.Caption * Text7.Text
End If
If Check4.Value = Checked Then
Text10.Text = Label12.Caption * Text9.Text
End If
If Check5.Value = Checked Then
Text12.Text = Label13.Caption * Text11.Text
End If
If Check6.Value = Checked Then
Text14.Text = Label14.Caption * Text13.Text
End If
If Check7.Value = Checked Then
MSRCASC-BCA V SEM Page 118
HOTEL MANAGEMENT SYSTEM
End If
End Sub
Private Sub room_Change()
If room = "" Then
Adodc4.Recordset.Filter = ""
Adodc4.Refresh
Else
Adodc4.Recordset.Filter = "[ID] Like '" & room & "'"
Text17.Text = Adodc4.Recordset.Fields(2)
End If
End Sub
Private Sub Text1_Change()
On Error GoTo errmsg
If Text1 = "" Then
Adodc3.Recordset.Filter = ""
Adodc3.Refresh
Else
MSRCASC-BCA V SEM Page 119
HOTEL MANAGEMENT SYSTEM
Laundry :
Option Explicit
Dim operand1 As Double, operand As Double
Dim op1 As Double, op2 As Double
Dim operator As String
Dim cleardisplay As Boolean
Private Sub cmdadd_Click()
If Label2.Caption = "NOT ACTIVE" Then
MsgBox "CUSTOMER IS NOT ACTIVE"
Exit Sub
End If
op1 = val(Text3.Text)
operator = "*"
Dim result1 As Double
op2 = val(Label12.Caption)
result1 = mul(ByVal op1, ByVal op2)
Label10.Caption = result1
op1 = val(Text4.Text)
operator = "*"
Dim result2 As Double
op2 = val(Label15.Caption)
result2 = mul(ByVal op1, ByVal op2)
Label11.Caption = result2
op1 = val(Label10.Caption)
operator = "+"
Dim result3 As Double
op2 = val(Label11.Caption)
result3 = add(ByVal op1, ByVal op2)
Label17.Caption = result3
op1 = val(Label17.Caption)
operator = "+"
Dim result4 As Double
op2 = val(Label16.Caption)
result4 = add(ByVal op1, ByVal op2)
Text5.Text = result4
Dim result5 As Double
op1 = val(Label24.Caption)
operator = "+"
op2 = val(Text3.Text)
result5 = add(ByVal op1, ByVal op2)
Label24.Caption = result5
Dim result6 As Double
op1 = val(Label25.Caption)
operator = "+"
op2 = val(Text4.Text)
result6 = add(ByVal op1, ByVal op2)
Label25.Caption = result6
End Sub
Private Sub cmdback_Click()
Unload Me
menu.Show
End Sub
Private Function mul(ByVal operand1 As Double, ByVal operand2 As
Double) As Double
mul = operand1 * operand2
MSRCASC-BCA V SEM Page 121
HOTEL MANAGEMENT SYSTEM
End Function
Private Function add(ByVal operand1 As Double, ByVal operand2 As
Double) As Double
add = operand1 + operand2
End Function
Private Sub cmdsave_Click()
On Error GoTo errmsg
If Text1.Text = "" Or Text2.Text = "" Or Text6.Text = "" Or Combo1.Text =
"--SELECT--" Then
MsgBox "TRANSACTION NOT ALLOWED,FILL ALL DETAILS"
Exit Sub
End If
Adodc3.Recordset.Fields(1) = Label24.Caption
Adodc3.Recordset.Fields(5) = Combo1.Text
Adodc3.Recordset.Fields(2) = Label25.Caption
Adodc3.Recordset.Fields(4) = DTPicker2.Value
Adodc2.Recordset.Fields(5) = Text5.Text
Adodc1.Recordset.Update
Adodc2.Recordset.Update
Adodc3.Recordset.Update
MsgBox "TRANSACTION COMPLETE"
Exit Sub
errmsg:
MsgBox Err.Description
End Sub
End Sub
End Sub
Text6.Text = Adodc4.Recordset.Fields(1)
Label2.Caption = Adodc4.Recordset.Fields(12)
DTPicker2.Value = Adodc4.Recordset.Fields(13)
End If
payment.Caption = Text1.Text
room.Caption = Text1.Text
Label26.Caption = Text1.Text
MSRCASC-BCA V SEM Page 123
HOTEL MANAGEMENT SYSTEM
Exit Sub
errmsg:
If Err.Number = "3021" Then
Text1.Text = ""
Text2.Text = ""
Text6.Text = ""
Label16.Caption = ""
Label17.Caption = ""
Combo1.Text = "--SELECT--"
Call MsgBox("Customer Not exist")
Else
MsgBox Err.Description
End If
End Sub
Private Sub payment_Change()
If payment = "" Then
Adodc2.Recordset.Filter = ""
Adodc2.Refresh
Else
Adodc2.Recordset.Filter = "[PID] Like '" & payment & "'"
Label16.Caption = Adodc2.Recordset.Fields(5)
End If
End Sub
Private Sub room_Change()
If room = "" Then
Adodc1.Recordset.Filter = ""
Adodc1.Refresh
Else
Adodc5.Recordset.Filter = "[ID] Like '" & room & "'"
Text2.Text = Adodc5.Recordset.Fields(2)
End If
End Sub
Payment :
Private Sub checkin_Change()
If checkin = "" Then
Adodc6.Recordset.Filter = ""
Adodc6.Refresh
Else
Adodc6.Recordset.Filter = "[cid] Like '" & checkin & "'"
Label11.Caption = Adodc6.Recordset.Fields(2)
End If
End Sub
Dim b As Double
If Len(Text14) = 12 Then
Adodc3.Refresh
b = Adodc3.Recordset("deluxroom") * val(Text9.Text)
Text13.Text = b
End If
Dim c As Double
If Len(Text14) = 13 Then
Adodc3.Refresh
c = Adodc3.Recordset("standardroom") * val(Text9.Text)
Text13.Text = c
End If
Dim tot As Double
tot = val(Text5) + val(Text6) + val(Text10) + val(Text11) + val(Text13)
Text7.Text = val(tot) + (4 / 100) * val(tot)
Text15.Text = (4 / 100) * val(tot)
Dim bal As Double
bal = val(tot) - val(Text4) + val(Text15.Text)
Text8.Text = val(bal)
End Sub
rs.Open "select * from Paymentlog where Customer_ID ='" & Text1 & "'",
cn, 3, 2
DataReport1.Show
End If
End Sub
Exit Sub
End If
Adodc2.Recordset.Fields(1) = Text6.Text
Adodc2.Recordset.Fields(2) = Text5.Text
Adodc2.Recordset.Fields(3) = Text8.Text
Adodc2.Recordset.Fields(6) = Text7.Text
Adodc2.Recordset.Fields(8) = Combo1.Text
Adodc2.Recordset.Fields(9) = Text13.Text
Adodc1.Recordset.Fields(3) = Text9.Text
Adodc2.Recordset.Fields(10) = Text15.Text
Adodc5.Recordset.AddNew
Adodc5.Recordset.Fields(1) = Text1.Text
Adodc5.Recordset.Fields(2) = Text2.Text
Adodc5.Recordset.Fields(3) = Text13.Text
Adodc5.Recordset.Fields(5) = Text6.Text
Adodc5.Recordset.Fields(6) = Text5.Text
Adodc5.Recordset.Fields(7) = Text10.Text
Adodc5.Recordset.Fields(8) = Text11.Text
Adodc5.Recordset.Fields(9) = Text7.Text
Adodc5.Recordset.Fields(10) = Combo1.Text
Adodc5.Recordset.Fields(11) = Text9.Text
Adodc5.Recordset.Fields(12) = Combo1.Text
Adodc5.Recordset.Fields(13) = Text3.Text
Adodc5.Recordset.Fields(14) = Label14.Caption
Adodc5.Recordset.Fields(15) = Text8.Text
Adodc5.Recordset.Fields(4) = Text4.Text
Adodc5.Recordset.Fields(16) = Text15.Text
Adodc5.Recordset.Update
Adodc2.Recordset.Update
Adodc1.Recordset.Update
End Sub
menu.Enabled = False
Label14.Caption = Date
Timer1.Enabled = True
connect
Set rs = New ADODB.Recordset
rs.Source = "Payment"
rs.ActiveConnection = cn
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.Open
End Sub
End Sub
Text9.Text = Adodc1.Recordset.Fields(3)
End Sub
Combo1.Text = Adodc2.Recordset.Fields(8)
Text10.Text = Adodc2.Recordset.Fields(4)
Text11.Text = Adodc2.Recordset.Fields(5)
End If
End Sub
Label6.Caption = Adodc4.Recordset.Fields(12)
End If
payment.Caption = Text1.Text
room.Caption = Text1.Text
checkin.Caption = Text1.Text
Exit Sub
errmsg:
If Err.Number = "3021" Then
Call MsgBox("Customer Not exist")
MSRCASC-BCA V SEM Page 129
HOTEL MANAGEMENT SYSTEM
Text12.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text13.Text = ""
Text14.Text = ""
Combo1.Text = "--SELECT--"
Else
MsgBox Err.Description
End If
End Sub
End If
End Sub
a = val(Text9.Text)
If a = 0 Then
Text9.Text = 1
End If
End Sub
Check out :
Private Sub cmdback_Click()
Unload Me
menu.Show
End Sub
End Sub
val = Combo3.Text
Select Case val
Case "STANDARD-ROOM"
Label11.Caption = "2"
If Label11.Caption = "2" Then
standardroom.Show
End If
End Sub
Private Sub room_Change()
On Error GoTo errmsg
If room = "" Then
Adodc1.Recordset.Filter = ""
Adodc1.Refresh
Else
Adodc1.Recordset.Filter = "[ID] Like '" & room & "'"
Combo3.Text = Adodc1.Recordset.Fields(1)
Text10.Text = Adodc1.Recordset.Fields(2)
Text12.Text = Adodc1.Recordset.Fields(3)
Text14.Text = Adodc1.Recordset.Fields(4)
End If
Exit Sub
errmsg:
End Sub
Private Sub Text15_Change()
On Error GoTo errmsg
If Text15 = "" Then
Adodc4.Recordset.Filter = ""
Adodc4.Refresh
Else
Adodc4.Recordset.Filter = "[Customer_ID] Like '" & Text15 & "'"
Label15.Caption = Adodc4.Recordset.Fields(12)
Text1.Text = Adodc4.Recordset.Fields(0)
Text2.Text = Adodc4.Recordset.Fields(1)
Text16.Text = Adodc4.Recordset.Fields(2)
Text17.Text = Adodc4.Recordset.Fields(3)
Text3.Text = Adodc4.Recordset.Fields(4)
Text4.Text = Adodc4.Recordset.Fields(5)
Text5.Text = Adodc4.Recordset.Fields(6)
Text6.Text = Adodc4.Recordset.Fields(7)
Text7.Text = Adodc4.Recordset.Fields(8)
Text18.Text = Adodc4.Recordset.Fields(9)
Text8.Text = Adodc4.Recordset.Fields(10)
Text9.Text = Adodc4.Recordset.Fields(11)
DTPicker2(0).Value = Date
DTPicker2(0).MinDate = Date
End If
payment.Caption = Text15.Text
room.Caption = Text15.Text
checkin.Caption = Text15.Text
Exit Sub
errmsg:
If Err.Number = "3021" Then
Text15.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text16.Text = ""
Text18.Text = ""
Text11.Text = ""
Combo1.Text = "--select--"
Combo3.Text = "--SELECT--"
Text10.Text = ""
Text14.Text = ""
Text12.Text = ""
Text13.Text = ""
Call MsgBox("Customer Not exist")
Else
MsgBox Err.Description
End If
End Sub
Adodc3.Recordset.Filter = ""
Adodc3.Refresh
Else
Adodc3.Recordset.Filter = "[cid] Like '" & checkin & "'"
DTPicker3.Value = Adodc3.Recordset.Fields(3)
End If
Exit Sub
errmsg:
End Sub
End If
End Sub
Search Guest :
End Sub
End Sub
End Sub
Text1.Text = Adodc4.Recordset.Fields(0)
Text2.Text = Adodc4.Recordset.Fields(1)
Text3.Text = Adodc4.Recordset.Fields(2)
Text4.Text = Adodc4.Recordset.Fields(3)
Text5.Text = Adodc4.Recordset.Fields(4)
Text6.Text = Adodc4.Recordset.Fields(5)
Text7.Text = Adodc4.Recordset.Fields(6)
Text8.Text = Adodc4.Recordset.Fields(7)
Text9.Text = Adodc4.Recordset.Fields(8)
Text10.Text = Adodc4.Recordset.Fields(9)
Text11.Text = Adodc4.Recordset.Fields(10)
Text12.Text = Adodc4.Recordset.Fields(11)
Label10.Caption = Adodc4.Recordset.Fields(12)
Text13.Text = Adodc1.Recordset.Fields(1)
Text14.Text = Adodc1.Recordset.Fields(2)
Text23.Text = Adodc1.Recordset.Fields(4)
Text17.Text = Adodc2.Recordset.Fields(7)
Text18.Text = Adodc3.Recordset.Fields(1)
Text19.Text = Adodc3.Recordset.Fields(2)
Text20.Text = Adodc3.Recordset.Fields(3)
Text21.Text = Adodc3.Recordset.Fields(4)
End If
Exit Sub
errmsg:
If Err.Number = "3021" Then
Text22.Text = ""
Call MsgBox("Customer Not exist")
Else
MsgBox Err.Description
End If
End Sub
Rate List :
Private Sub Command1_Click()
roomrates.Show
End Sub
End Sub
End Sub
End Sub
Status :
Public a As String
Private Sub cmdback_Click()
Unload Me
menu.Show
End Sub
menu.Enabled = False
a = Label16.Caption
b = Label23.Caption
Label2.Caption = Adodc1.Recordset.RecordCount
Label3.Caption = Adodc2.Recordset.RecordCount
Label4.Caption = Adodc3.Recordset.RecordCount
Label5.Caption = Adodc4.Recordset.RecordCount
Label1.Caption = val(Label2.Caption) + val(Label3.Caption) +
val(Label4.Caption) + val(Label5.Caption)
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
Label19.Caption = "0"
Else
Label19.Caption = Adodc1.Recordset.RecordCount
End If
Adodc3.RecordSource = " select * from suitroom where status ='" + a + "' "
Adodc3.Refresh
If Adodc3.Recordset.RecordCount = 0 Then
Label9.Caption = "0"
Else
Label9.Caption = Adodc3.Recordset.RecordCount
End If
Adodc3.RecordSource = " select * from suitroom where status ='" + b + "' "
Adodc3.Refresh
If Adodc3.Recordset.RecordCount = 0 Then
Label21.Caption = "0"
Else
Label21.Caption = Adodc3.Recordset.RecordCount
End If
End If
End If
End Sub
Specification Analysis
The very first step in a system, for the purpose of selection is understanding the
requirements within the framework of the organization’s objectives and the environment in which
that system is being installed. Consideration is given to the user’s resources as well as to finances.
It is a document that serves as a foundation for hardware, software and database engineering. It
describes the functions of a system and the constraints that will govern its development. The
specifications bound each allocated system analyst with an indication of the role of software
within the context of the computer based system as a whole and the various subsystems described
in the data flow diagrams.
The system specification also describes the information that is to input and to output from the
system.
Fact-Finding
Fact-finding means, learning as much as possible about the present system. Fact-finding is the
formal process of using research, interviews, questionnaires, sampling and other techniques to
collect information about systems, requirements and preferences. It is also called information
gathering or data collections. Tools, such as data and process models, document facts, and
conclusions are drawn from facts. If you can’t collect the facts, you can’t use the tools. Fact-
finding skills must be learned and practiced.
How to do Fact-Finding?
For fact-finding, the system analyst does the following:
1. Sampling of written (existing) documents
2. On-site observations
3. Interview
4. Questionnaires
5. Research and site visits.
6. Observes the current system
7. Gather forms and documents currently in use
8. Determines the flow of data through the system, and
9. Clearly defines the system requirements.
Conclusion
Advantages
1. To manipulate the Hotel transactions with instant confirmation .
2. To save time and accuracy in work.
3. To increase efficiency of employee.
4. For fast access of data.
5. For secure and smooth running of the program.
6. For error free, effective and easy for database related works.
Disadvantages
1. Rooms won’t be booked if there is power failure.
2. Rooms cannot be booked online.
3. Customer id is not the same, if same customer returns to hotel.
BIBLIOGRAPHY
Books
Site Address
www.associatedcontent.com
www.members.tripod.com
www.vbcodesource.com