Download - Hotel Management Final
-
7/29/2019 Hotel Management Final
1/77
1
-
7/29/2019 Hotel Management Final
2/77
2
CONTENTS
S.NO NAME OF THE CHAPTER PAGE NO.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
INTRODUCTION
1.1 Introduction about the Project
SYSTEM ANALYSIS
2.1 Existing System
2.2 Proposed System
PROBLEM DESCRIPTION
SYSTEM REQUIREMENTS
4.1 Hardware Requirements
4.2 Software Requirements
4.3 About the Software
SYSTEM DESIGN5.1 Data Flow Diagram
5.2 Data Base Design
SYSTEM TESTING AND
IMPLEMENTATION
FUTURE ENHANCEMENT
CONCLUSION
BIBLIOGRAPHY
APPENDIX
10.1 Source Code
10.2 Screen Layout
-
7/29/2019 Hotel Management Final
3/77
3
-
7/29/2019 Hotel Management Final
4/77
4
INTRODUCTION
ABOUT THE PROJECT:-
The resort management project will automate the manual
and legacy operation of a resort or a hotel. The project will keep
track of Guest details, Room Reservation, Room Booking ,
Finance and Reports.
The main form consists of five menus. They are
Login Screen Room Description Room Booking Room Vacating Reporting View
Login Screen:-
This includes Administrator and User login. There will
be a username and password to login into the system to use all
the facilities.
-
7/29/2019 Hotel Management Final
5/77
5
Room Description:-
This form consists of the following sub menus
Room EntryRoom Entry Update and Delete
Room Entry :-
This form display the information Room No, Room
Rent, Booking Type and arrival date ,deposit. If the room
entered in the form is vacant then only we can allot that room.
Room entry called another name Room reservation
Room Entry Update and Delete :-
Room entry Update means already reserve the room
any more changes using these options. Then delete option used
for booking code, Room number, cancel date, fine levied, fine
waived. We can select the rooms that are reserved, forcancellations.
-
7/29/2019 Hotel Management Final
6/77
6
Room Booking:-
This form display the information like Booking code,
Booking name, Booking date, guest name, and check in date. if the room
entered in the form is vacant then only we can reserve that room.
Room Vacating:-
This will form display the information like room number,
check out date, advance amount, balance amount, total amount, guest
phone number, address etc., also display the room vacating form.
Reporting View:-
There are only one report are available. That is like
vacating are includes financial ,departure report and payment
report are generated between booking dates to vacating dates.
-
7/29/2019 Hotel Management Final
7/77
7
-
7/29/2019 Hotel Management Final
8/77
8
SYSTEM ANALYSIS
EXISTING SYSTEM:
The existing system is manual. It maintains huge
records for various departments. The book keeping procedure is
tedious and is prompt to errors. Very careful handling is needed
in manual systems. Even a very minute mistake may lead to
imbalanced results. Manual processes results in waste of time
and energy.
In the earlier system the inventory report is
calculated manually. Whenever the accounting is to be
performed. That information must be extracted from the files
and the calculation will have to check by the Concern person.
The existing system leads to a lot of problems. The
existing system consumed a lot of stationary cost. Dailytransactions are maintained in journals. These journal entries are
then posted on to the ledger accounts correspondingly.
-
7/29/2019 Hotel Management Final
9/77
9
PROPOSED SYSTEM:
This project integrates all Operation processes in thecomputer to synergies the important resources of Material and
Money. The department people can gather the needed
information at their desk without any manual burdens.
This project reduces manual burdens and
automates the functions of various departments. In manual
process, to decide the Room booking details, vacating details
have to be verified each time. But with this project these process
are automated and no manual checking is required.
This project reports can be automatically generated.
The processes of creating reports are manually very tedious
which are made very easy and automatically through this
project. The reports produced helps in making management
decision easily. With this project, since all information about
previous years is readily available, such reports can be produced
within few seconds.
Thus the project eliminates many difficulties
saving a lot of time and energy, which could be used for some
other constructive purpose towards the organizations success.
-
7/29/2019 Hotel Management Final
10/77
10
ADVANTAGES:
1. Less effort
2. Quick reference
3. Future enhancement
-
7/29/2019 Hotel Management Final
11/77
11
-
7/29/2019 Hotel Management Final
12/77
12
PROBLEM DESCRIPTION:
This project is HOTEL MANAGEMENT SYSTEM; the
main aim of this project is gives the customer view of the hotel.
The customer needs in hotel are, enquiry about rooms,
reservation process, vacating process, canceling the reservation.
In this project the first module gives the administrator view for
logging.
The customer needs enquiry for first process. So the
enquiry process is shown in the project that works more
effectively than the manual process. The next process of
customer is reservation. This reservation is for may today or
future, for this the reservation form can work more efficient than
the manual process. This form also checks the rooms for
reservation dates. It is interactive to the customer, if the rooms
are not available it gives message and not allows reserving forthat date. It is more efficient, more reliable, time saving and
accurate.
The next process for the customer is vacating the room.
For this he needs the total bills.The vacating form works for this
information effectively. This form calculates the user bills of
room it is minus by the advance. Shows the total bill he need to
pay. It is having all details of the database.
-
7/29/2019 Hotel Management Final
13/77
13
-
7/29/2019 Hotel Management Final
14/77
14
SYSTEM REQUIREMENTS
HARDWARE REQUIREMENTS:-
Processor : Dual Core 2.5GHZ
Monitor : 15 LCD Monitor
Ram : 1GB DDR 1
Hard Disk Drive : 160 GB
Keyboard : TVS Electronics
Mouse : Front tech
-
7/29/2019 Hotel Management Final
15/77
15
SOFTWARE REQUIREMENTS:-
Operating system : Windows XP
Front End : V.B 6.0
Back End : Ms-Access
-
7/29/2019 Hotel Management Final
16/77
16
VISUAL BASIC
Visual Basic is a programming language and
development environment that us to create programs that run
under Windows operating system. Visual Basic has many
features.
Bill Gates describes Visual Basic as an, easy yet
powerful tool for developing windows applications in basic.
This may not seem like enough to justify all the user until you
realize that Microsoft Windows applications formerly required
an expert C/C++ programmer supplied with about 20 pounds
worth of documentation for the needed c/c++ compiler and the
essential add-ons. As Charles Petzold (author of one of the
standard books on windows programming in C) put it in the
NEWYORK TIMES: For those of us who make our living
explaining the complexities of windows programming to
programmers, Visual Basic poses a real threat to livelihood.
-
7/29/2019 Hotel Management Final
17/77
17
The following is a list of some of the more prominent features:
Includes a GUI development environment fordeveloping Windows Applications.
Object based development is possible using classmodules.
Rapid application development (RAD).Includes good debugging facilities.Allows for the creation of COM components such as
ActiveX Controls, DLLs etc.,
Has many internet development possibilities likeActiveX documents.
Windows become most popular, Microsoft realized that
the text based basic would not work as a windowed
programming language based on BASIC but one much more
suited to todays windowed environments. Majority of visual
basic program consist of basic program consist of graphical
elements.
PROGRAMMING PROCESS:
Decide what your application is to do by creating on overall design.
-
7/29/2019 Hotel Management Final
18/77
18
Create the visual portion of your application (the screensand menus that your users will interact with)
Add visual basic programming language code on thevisual elements together and to automate the program.
Test your application language to locate and remove anybugs you find.
Compile your tested application and distribute thecompiled application to your users.
A debugger is an interactive monitoring system that you
can turn on and off inside visual basic helps you locate
statements that contain bugs.
Programming maintenance is necessary because
requirements change, companies change, and laws change. You
must also change program you write so that they remain viable
programs; you will need to update your program periodically to
reflect changes that impact the program. In addition, users will
think of new things that they want the program to do.
-
7/29/2019 Hotel Management Final
19/77
19
PROGRAM MAINTENANCE:
Programming maintenance is the term used for
updating of a program after the program is put into use. This
update may be a result or a users request or a change in the way
the program needs operate.
Documentation is completed of descriptions of the
program. You can place documentation inside the program
itself so that when you (or some one else) later make a change to
the program you will read what sections of the program are
without having to figure out what the codes purpose is. Internal
Visual Basic descriptions are called remarks. Document your
programs, make other programmers to understand your code if
they must make changes to it later.
A project is a collection of files that make up your
application. A simple application might contain code, one or
more files might consist of several files, and the project is the
collection of those files. One of these files contain descriptions
of screens inside their respective form windows and one or more
files contain advanced programming information that your
program will us to communicate with other programs and
modules inside the program .
-
7/29/2019 Hotel Management Final
20/77
20
MULTIPLE DOCUMENT INTERFACE:
This allows your application to contain multiple
document windows. In effect this interface lets you work with
several sets of date in multiple windows with several sets of date
in multiple windows with in your program. Each document
window is called a child window.
FORM:
The form template is a model of the form that you
can customize. Form templates are form with similar properties.
That might appear in several different applications.
EVENT-DRIVEN PROGRAMMING:
The window contains several kinds of window
controls such as command buttons, check boxes, and a scroll
bar. These controls are just a sample of many window controls
available for you within the visual Basic Programming
environment to add to the programs that you write.
PROPERTIES:
The property helps to differentiate a control from
other controls because the property shows appearance and a
-
7/29/2019 Hotel Management Final
21/77
21
behavior of a control. Properties have values such as colors, text
labels size and location of the form. An object is an element
form a visual Basic program. Such as a control, form, or code
module that holds programming statements.
FUNCTIONS AND PROCEDURES:
Decreases the workload of rewriting the same code
in different places, thus reducing the code size to the maximum
level. Functions and Procedures optimize the program sizes and
make use of the functions effectively and efficiently.
USER-DEFINED DATA TYPES:
VB provides facilities to create our own data types
which give more flexibility for programming. These types can
be used just like built in date types.
DATABASE CONNECTIONS:
VB allow easy access to database. Database can be
accessed through DAO (Data access Object), RDO (Remote
Data Object), and ADO (ActiveX Data Object). Using DAO we
can access databases in MS-Access only. With RDO and ADO
-
7/29/2019 Hotel Management Final
22/77
22
controls we can access databases in MS-Access only. With RDO
ADO Controls we can access Oracle, SOL and any such
databases. With we use RDO or DAO for connecting VB to
databases. When we use RDO or DAO for connecting VB to a
database we need a ODBC driver. But in case of ADO we need
an OLEDB.
ODBC provides a universal for accessing data in a
database. Database developers will write ODBC compliant
drivers to interface with their DBMS. An ODBC data source is a
collection of data that can be indexed and referenced for data
retrieval. ODBC client requires proper drivers for each data type
(MS-Access SQL, FoxPro etc.)
In our project we have3w used ADO controls. This allows us toconnect information in a table to different controls on our form.
Thus we will be able to view and edit data without writing a line
of code.
CONNECTION:
A connection defines a named session for the user. It
contains open databases and provider mechanisms for
simultaneous transactions.
-
7/29/2019 Hotel Management Final
23/77
23
Record set : A record set object represents the records in a
database table or the Records that result from a
running query.
Fields : Field collection contains all stored field objects
of An index, QD, Record set, relation or table
definition object.
ADVANTAGES INCLUDE THE FOLLOWING:
Multiple Windows on Screen.
Mire Internet Features & Web Tools.
Better support for Database Environment.
More Wizards.
Features of Integrated Development Environment.
Improved data access Facilities.
MS-ACCESS
-
7/29/2019 Hotel Management Final
24/77
24
MS-ACCESS is powerful multi-user DBMS. It can
be used to store and manipulate large amount of information and
automate repetitive task, Such as maintaining and inventory and
generating invoices. By using ACCESS you can develop easy-
to-use data input forms. You can process your data and create
meaningful reports.
Data in ACCESS is organized in the form table with in a
cable records are arranged according to a common reference
value known as primary key for the key field the value in the
key fields in the document for every record and thus help for
unique records. A combination of two are more fields can also
we used us the primary key search a combination is called
composite key
Since a value on a table can be replicated across other
tables thus should be a way to maintain a relation between the
two tables this relation is implemented through the concept of a
foreign key. A foreign key is a table which links to other tables.
Database access has a default extension of .mdb. Access
also maintains index file s for tables. An index is a table of value
that access maintains to store the order of records. Index object
thus provide access to data. Similarly in a table indexes control
-
7/29/2019 Hotel Management Final
25/77
25
the way data is accessed. However it thus not duplicates the data
itself.
DATABASE:
Database is an organized collection information
about an entity without redundancy and server multiple
applications.
RECORD:
It is an organized collection of information in other
words, records can be termed as group of data items or data
aggregates.
RELATIONAL DATABASE MANAGEMENT SYSTEM:
A relational database management system is the most
popular and most dominant information management system
available today. Commencing in 1971 this concept has proven to
the one of the highly prudent ways of storing, retrieving,
analyzing and managing data. One who uses system built on
RELATIONAL MODEL will instantly appreciate this as a
convenient and powerful system.
-
7/29/2019 Hotel Management Final
26/77
26
OPEN DATABASE CONNECTIVITY:
The code requesting the data from the database
whether in the java server or in the server component must have
a way of a locating that databases this can be achieved grows the
open database connectivity (ODBC). `With ODBC, we
create with ODBC, we create a DATA SOURCE NAME (DSN)
through the ODBC data source administrator by clicking on the
add button. We setup a connection with any reachable database
for which we have an ODBC DRIVER.
The DSN is created to allow communication between
oracle and active server page. When this connection was
initially created, the database type the IP address of the server
and the name of the server and the name of the database were
supplied.
SQL *PLUS is applicable only for Ms-Access while SQL
is the unified language which is applicable for all the RDBMS
packages.
-
7/29/2019 Hotel Management Final
27/77
27
CLIENT / SERVER ARCHITECTURE:
In this architecture system is divided into two parts.
A Front End or A Client.A Back End or A Server
Client executes the database application that accesses
database information and interacts with the user. The server
executes the oracle software and handles the function required
for concurrent, shares data access to an oracle database.
MICROSOFT ACCESS AND ITS FEATURES:-
MOVEABLE, CUSTOMIZABLE TOOLBARS:
Microsoft Access toolbars are now moveable and
customizable. You can move toolbars around in the Microsoft
Access window, Hide them individually, and customize them by
adding buttons you can also create your own toolbars and attach
them to forms and reports.
TOOL TIPS:-
Move the pointer onto the face of any toolbar button,
including those in the toolbox or palette, to display the name of
the button or option. Shortcut menus.
-
7/29/2019 Hotel Management Final
28/77
28
Press the right mouse button when youre defining a
control, setting a property or performing most any other task in
Microsoft Access to display a shortcut menu. Commands
appraise to the current task appear on the menu.
QUICK SORTING:-
In table and form datasheets and in forms, You can
click the sort Ascending or Descending buttons on the toolbar to
quickly sort the current records based on the selected column.
-
7/29/2019 Hotel Management Final
29/77
29
-
7/29/2019 Hotel Management Final
30/77
30
SYSTEM DESIGN:-
Any Process that is only in the planning stage and
needs to be converted into reality requires three important steps
namely planning, analysis and design. All the above three
design is very important. It is conversion of the ideas into
reality by putting together all ideas block and achieving realism.
System design is the process of planning a new business or
one to replace or complement an existing system. It describes
how a system will meet the requirement identified during the
system analysis. It also describes the data .Calculations to be
performed and data stored desired. In short, system design
stated how to accomplish the objectives. Many tools assist
system design, including data flow diagram.
-
7/29/2019 Hotel Management Final
31/77
31
DATA FLOW DIAGRAM:-
Data flow diagram (DFD) is a tool developed for he
purpose of graphically representing t he system in order t make
the classification of system requirements easy and identifying
the major transformation that will become modules in system
design. So, it is starting point of the design phase that
functionally decomposes specifications down phase to the
lowest level of details. This diagram follows a top down
approach. As the overview mode is exploded, lower level
diagrams can be obtained that shows additional features. Each
process in the data flows diagram can be exploded into yet more
detailed data flow diagram.
Data flow diagram is used to descried the actual
process that makeup the system, the data stores and data flows.
ADFD typically shows the minimum contents of the data stores.
Each data stores well contain all the data elements the flow in
and or f it. DFD shows the flow of the data within the system. Itconsists of a series of bubblesjoied by lines The bubble
represents data transformations and the line represents data flow
in the system.
-
7/29/2019 Hotel Management Final
32/77
32
TABLE DETAILS:-
Table: Room Entry
Column Name Data Type Description
Room_num Number(6) Unique identification for ever Room
Room_rent Number(6) Rent received the Guest
bed_model Text(10) Bed Model Single or Double
Room_fe Text(10) Bed Facility A/c or Non A/c
Table: Room Update / Delete
Column Name Data Type Description
Room_num Number(6) Unique identification for ever Room
Room_rent Number(6) Rent received the Guest
bed_model Text(10) Bed Model Single or Double
Room_fe Text(10) Bed Facility A/c or Non A/c
-
7/29/2019 Hotel Management Final
33/77
33
Table: Room Current Booking
Column Name Data Type Description
Name Text(20) Whether corporate friends or guest
Address Text(40) Street/House No. of the Guests
residence
Date_Booking Date/Time Date on which this information was
fed into the data base and default is
todays date.
Amount Number(60) Advance amount Received
Phone Number(10) Phone of the gust Residence
Room_num Number(6) Unique identification for ever Room
-
7/29/2019 Hotel Management Final
34/77
34
Table: Room Vacating
Column Name Data Type Description
Room_num Number(6) Unique identification for ever Room
Name Text(20) Whether corporate friends or guest
Address Text(40) Street/House No. of the Guests
residence
Phone Number(10) Phone of the gust Residence
Date_Booking Date/Time Date on which this information was
fed into the data base and default is
todays date.
Date_Vacating Date/Time Date on which the guest vacated the
room
No_Of_Day Number(2) Number of days staying in hotel
Ad_amount Number(5) How much received by advance
amount
Tot_amount Number(5) How much received by total amount
Bal_amount Number(5) Display the Balance amount
-
7/29/2019 Hotel Management Final
35/77
35
-
7/29/2019 Hotel Management Final
36/77
36
SYSTEM TESTING AND IMPLEMENTATION:
Testing in the system was done to ensure the integrity of
the system. Testing to vital for the success of the project, which
is the last stage of the software development testing, has several
purpose.
To affirm the availability of project.
To find and eliminate the errors from previous stage.
To validate the software and to eliminate the operationalreliability of system.
Testing is done for each module. After testing all the
modules, the modules are integrated and testing of the final
system is done with the test data, specially designed to show that
the system will operated successfully in all its aspects
conditions. The procedure level testing is made first. By giving
improper inputs, the errors occurred are noted and eliminated.Thus the system testing is a confirmation that all is correct and
an opportunity to show the user that the system works. The
final step involves validation testing, which determines whether
the software function as the user expected. The end-user rather
than the system developer conduct this test most software
-
7/29/2019 Hotel Management Final
37/77
37
developers as a process called Alpha and Beta test to uncover
that only the end user seems able to find.
This is the final step in system life cycle. Here we
implement the tested error free system into real life environment
and make necessary changes, which runs is an online fashion.
Here system maintenance is done every months or year based on
company policies, and is checked for errors like runtime errors,
long run errors and other maintenances like table verification
and reports.
-
7/29/2019 Hotel Management Final
38/77
38
TYPES OF TESTING:
UNIT TESTING:
Unit testing verifications efforts on the smallest unit of
software design, module. This is known as Module Testing.
The modules are tested separately. This testing is carried out
during programming stage itself. In these testing steps. Each
module is found to be working satisfactorily as regard to the
expected output from the module.
CATEGORIES OF UNIT TESTING:
FUNCTIONAL TESTING:
Functional test cases specify typical operating conditions,
typical input value and typical expected results. Function tests
also test behavior just inside, on adjust beyond the functionalboundaries.
PERFORMANCE TESTING:
Performance testing is carried out to test the run time
performance of the system.
STRESS TESTING:
Stress tests are designed to overload a system in various
ways.
STRUCTURE TESTING:
Structure tests are concerned with examining the internal
processing logic of a software system.
-
7/29/2019 Hotel Management Final
39/77
39
VALIDATION TESTING:
Validation is the process of evaluating software at the
software development process to determine compliance with
requirements block box testing techniques are used exclusively
during validation.
OUTPUT TESTING:
Output testing is series of different test whole primary
purpose is the fully exercise the company based system.
Although each test has a different purpose all the works should
verify that all system elements have been properly integrated
and perform allocated function.
Output testing is the stage of implementation, which
a ensuring that system works accurately before live operation
commences. The input screens, output documents, database
structure etc.were checked and required modification made suit
specification. Then using the test data prepared, the whole
system was tested and found to be a successful one.
-
7/29/2019 Hotel Management Final
40/77
40
IMPLEMENTATION PLAN:
The requirements for implementing the project is
determined and also tested to confirm the effectiveness while
implementing the project design into the source code. The
main goal of the implementation plan is the development of
source code that is easy to read and understand. The
implementation plan will help the project to proceed with the
available resources. Once the implementation plan is over the
source code can be developed easily because it will provide a
clear idea about the project.
IMPLEMENTATION:
Implementation is the process of installing the softwareinto the system so that it will be provided with original data to
process. Implementation phase is started after o9nly the
successful completion of the testing phase in which the above
tests should be carried. To complete the implementation into
success, a test should be carried out.
Compatibility testing: this testing is carried out to check thecompatibility that whether this software will run smoothly on
the provided system configuration.
-
7/29/2019 Hotel Management Final
41/77
41
After this test implementation gets over only for the
implementation purpose. But it should be maintained so that the
performance will remain same and it will not be degraded. To
maintain the performance of the software, continuously the
performance test should be carried.
Performance testing : to test the performance of the modules,their Response time, device utilization etc.
The performance o f a software may deguard when more
application or software are handled by operating system at a
time or due to less available resource i.e. Less memory etc.,But
anyway the performance of the software may degrade due to the
external events such as processor speed and memory etc. So the
processor should be upgrade to maintain the performance.
-
7/29/2019 Hotel Management Final
42/77
42
FUTURE ENHANCEMENT:
The project is developed considering only material and
money but it can be extended for man and machine also. Since
our objective of the project is successfully completed. This is
system provides efficiency in many ways.
All the features that is required for the HOTEL
MANAGEMENT SYSTEM has been finished successfully.
All the complications concerned with this project are
successfully solved. Every application has it s own merits and
demerits. The project has covered almost all the requirements.Further requirements and improvements can easily be done
since the coding is mainly structured or modular in nature.
Changing the existing modules or adding new module can
append improvements.
This project provides detailed information about all the
Room Booking, Rook vacating and Reporting details for all
transactions.
-
7/29/2019 Hotel Management Final
43/77
43
-
7/29/2019 Hotel Management Final
44/77
44
CONCLUSION
This project work is an attempt to develop a system that
can be used for computerization of activities in the resort. Since
these activities are tedious process requiring lot of effort, more
care has been taken for the system development. The
requirements a suitable database is created maximum effortwere taken to avoid duplication in data entry and data storage.
Various reports can be generated by this system.
The major advantage of the system is fast and accurate
information retrieval, minimization of clerical work, easy and
efficient data storage and report generation.
-
7/29/2019 Hotel Management Final
45/77
45
-
7/29/2019 Hotel Management Final
46/77
46
BIBLIOGRAPHY
VB6 Complete Reference- Siben
Visual Basic 6 Programming Reference- Brain Overland
Software Engineering Concept- Richard E.Fairly
Mastering Microsoft ofice97-Lonney E.Mosley
- David M.Boodley
-
7/29/2019 Hotel Management Final
47/77
47
-
7/29/2019 Hotel Management Final
48/77
48
SOURCE CODING:
LOGIN:
Private Sub Command1_Click()
If Text1.Text = "SABARI" And Text2.Text = "DINESH" Then
Form1.Show
Form7.Hide
Else
MsgBox "PASSWORD IS WRONG ! TRY AGAIN"
End If
End Sub
MENU BAR:
Private Sub Close_Click()
End
End Sub
Private Sub Curr_Click()DataEnvironment1.Command1
If DataEnvironment1.rsCommand1.BOF = False Then
DataReport1.Show
Else
A = MsgBox("Record Not Found", vbInformation +
vbOKOnly, "Information")
DataEnvironment1.rsCommand1.Close
-
7/29/2019 Hotel Management Final
49/77
49
End If
End Sub
Private Sub CurrentBooking_Click()
Form4.Show
Unload Me
End Sub
Private Sub Form_Load()
Me.WindowState = 2
End Sub
Private Sub list1_Click()Form6.Show
Unload Me
End Sub
Private Sub RoomEntry_Click()
Form2.Show
End Sub
Private Sub roomvegating_Click()
Form5.ShowUnload Me
End Sub
Private Sub ruc_Click()
Form3.Show
Unload Me
End Sub
Private Sub vecat_Click()
DataEnvironment1.Command2
If DataEnvironment1.rsCommand2.BOF = False Then
DataReport2.Show
Else
A = MsgBox("Record Not Found", vbInformation +
vbOKOnly, "Information")
DataEnvironment1.rsCommand2.Close
-
7/29/2019 Hotel Management Final
50/77
50
End If
End Sub
Room Entry:
Unload Me
End Sub
Private Sub Command2_Click()Call CLEAR
End Sub
Sub CLEAR()
Text1.Text = ""
Text2.Text = ""
Option1.Value = False
Option2.Value = False
Option3.Value = FalseOption4.Value = False
End Sub
Private Sub Command3_Click()
Dim S As String
Dim s1 As String
If Text1.Text = "" Or Text2.Text = "" Or (Option1.Value =
False And Option2.Value = False) Or (Option3.Value = False
And Option4.Value = False) ThenA = MsgBox("DataMissing", vbInformation + vbOKOnly,
"Missing")
Else
If Option1.Value = True Then
S = "SINGLE"
End If
If Option2.Value = True Then
S = "DOUBLE"
-
7/29/2019 Hotel Management Final
51/77
51
End If
If Option3.Value = True Then
s1 = "YES"
End If
If Option4.Value = True Then
s1 = "NO"
End If
rs.Open ("select * from room_detail where room_no='" &
Trim(UCase(Text1.Text)) & "'"), db
If rs.BOF = False Then
A = MsgBox("Room Number Already Exists", vbCritical +
vbOKOnly, "Information")
Elsedb.Execute ("INSERT INTO ROOM_DETAIL
VALUES('" & Trim(UCase(Text1.Text)) & "','" &
Trim(UCase(Text2.Text)) & "','" & Trim(UCase(S)) & "','" &
Trim(UCase(s1)) & "')")
db.Execute ("insert into room_status values('" &
Trim(UCase(Text1.Text)) & "','YES')")
A = MsgBox("Insert Sucessfully", vbInformation +
vbOKOnly, "Message")End If
rs.Close
End If
End Sub
Private Sub Form_Load()
Me.Top = 2000
Me.Left = 3000Call conn
End Sub
ROOM CHANGE AND UPDATE:
Dim S As String
Private Sub Command1_Click()
If Text1.Text = "" Then
-
7/29/2019 Hotel Management Final
52/77
52
A = MsgBox("Specify The Room Number", vbInformation +
vbOKOnly, "Message")
Call CLEAR
Else
rs.Open ("select * from room_detail where room_no='" &
Trim(UCase(Text1.Text)) & "'"), db
If rs.BOF = False Then
Frame2.Enabled = True
Command3.Enabled = True
Command2.Enabled = True
rs.MoveFirst
While Not rs.EOF
Text2.Text = rs(0)Text3.Text = rs(1)
Combo1.Text = rs(2)
S = Text1.Text
If rs(3) = "YES" Then
Combo2.Text = "WITH A/C"
Else
Combo2.Text = "WITHOUT A/C"
End Ifrs.MoveNext
Wend
Else
Call CLEAR
A = MsgBox("Record Not Found", vbInformation +
vbOKOnly, "Information")
End If
rs.CloseEnd If
End Sub
Sub CLEAR()
Text2.Text = ""
Text3.Text = ""
Combo2.Text = ""
Combo1.Text = ""
Frame2.Enabled = False
-
7/29/2019 Hotel Management Final
53/77
53
Command2.Enabled = False
Command3.Enabled = False
End Sub
Private Sub Command2_Click()
Dim s1 As String
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
A = MsgBox("Data Missing", vbCritical + vbOKOnly,
"Missing")
Else
If UCase(Combo2.Text) = UCase("WITH A/C") Then
s1 = "YES"
Elses1 = "NO"
End If
db.Execute ("update room_detail set Room_no='" &
UCase(Trim(Text2.Text)) & "',room_rent='" &
UCase(Trim(Text3.Text)) & "',bed_model='" &
UCase(Trim(Combo1.Text)) & "',room_fe='" &
UCase(Trim(s1)) & "' where room_no='" & UCase(Trim(S)) &
"'")db.Execute ("UPDATE ROOM_STATUS SET
ROOM_NO='" & UCase(Trim(Text2.Text)) & "' WHERE
ROOM_NO='" & UCase(Trim(S)) & "'")
A = MsgBox("Update Sucessfully", vbInformation +
vbOKOnly, "Sucessful")
End If
End Sub
Private Sub Command3_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
Else
db.Execute ("DELETE FROM ROOM_DETAIL WHERE
ROOM_NO='" & Trim(UCase(S)) & "'")
db.Execute ("DELETE FROM ROOM_STATUS WHERE
ROOM_NO='" & Trim(UCase(S)) & "'")
-
7/29/2019 Hotel Management Final
54/77
54
A = MsgBox("Record Deleted Sucessfully", vbInformation +
vbOKOnly, "Information")
Call CLEAR
Text1.Text = ""
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Call connMe.WindowState = 2
Frame2.Enabled = False
Combo1.AddItem ("SINGLE")
Combo1.AddItem ("DOUBLE")
Combo2.AddItem ("WITH A/C")
Combo2.AddItem ("WITHOUT A/C")
Call CLEAR
End SubPrivate Sub Form_Unload(Cancel As Integer)
Form1.Show
End Sub
ROOM CURRENT BOOKING:
Private Sub Command1_Click()
Unload MeEnd Sub
Private Sub Command2_Click()
Call CLEAR
End Sub
Sub CLEAR()
Text1.Text = ""
Text5.Text = ""
-
7/29/2019 Hotel Management Final
55/77
55
Text4.Text = ""
RT.Text = ""
End Sub
Private Sub Command3_Click()
If Text1.Text = "" Or Text2.Text = "" Or RT.Text = "" Or
Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Then
A = MsgBox("Check The Data", vbInformation + vbOKOnly,
"Message")
Else
db.Execute ("insert into cur_booking values('" &
Trim(UCase(Text4.Text)) & "','" & Trim(UCase(Text1.Text)) &
"','" & Trim(UCase(RT.Text)) & "','" &
Trim(UCase(Text5.Text)) & "','" & Trim(UCase(Text2.Text)) &"','" & Trim(UCase(Text3.Text)) & "')")
db.Execute ("UPDATE ROOM_STATUS SET
ROOM_STATUS='NO' WHERE ROOM_NO='" &
Trim(UCase(Text4.Text)) & "'")
Call M1DIS
'Call CLEAR
A = MsgBox("Room Booking Sucessfully", vbInformation +
vbOKOnly, "Sucessful")Call CLEAR
End If
End Sub
Private Sub Form_Load()
Me.WindowState = 2
Call conn
Call M1DISText2.Text = Date
Text3.Text = "0"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Show
End Sub
Sub M1DIS()
-
7/29/2019 Hotel Management Final
56/77
56
Dim I As Integer
Dim J As Integer
Dim K As Integer
rs.Open ("SELECT ROOM_NO FROM ROOM_STATUS
WHERE ROOM_STATUS='YES'"), db
If rs.BOF = False Then
rs.MoveFirst
While Not rs.EOF
rs1.Open ("SELECT * FROM ROOM_DETAIL WHERE
ROOM_NO='" & rs(0) & "'"), db
If rs1.BOF = False Then
J = J + 1
M1.Rows = J + 1M1.Cols = 5
rs1.MoveFirst
While Not rs1.EOF
M1.Row = J
For I = 0 To 3
M1.Col = I + 1
M1.Text = rs1(I)
M1.CellFontBold = TrueM1.CellForeColor = vbBlue
Next
rs1.MoveNext
Wend
Call M1APP
End If
rs1.Close
rs.MoveNextWend
Else
End If
rs.Close
End Sub
Sub M1APP()
M1.Row = 0
M1.Col = 1
-
7/29/2019 Hotel Management Final
57/77
57
M1.Text = "ROOM NO"
M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.Col = 2
M1.Text = "ROOM RENT"
M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.Col = 3
M1.Text = "BED MODEL "
M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.Col = 4
M1.Text = "A/C OR NOT"M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.ColWidth(1) = 1900
M1.ColWidth(2) = 2000
M1.ColWidth(3) = 2000
M1.ColWidth(4) = 2000
M1.ColWidth(0) = 0
M1.ColAlignment(1) = 3M1.ColAlignment(2) = 3
M1.ColAlignment(3) = 3
M1.ColAlignment(4) = 3
End Sub
Private Sub M1_Click()
Dim I As Integer
I = M1.RowSelM1.Row = I
M1.Col = 1
Text4.Text = M1.Text
End Sub
Private Sub Text3_LostFocus()
If Text3.Text = "" Then
Text3.Text = "0"
-
7/29/2019 Hotel Management Final
58/77
58
End If
End Sub
ROOM VECATING:
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
Call CLEAR
Text1.Text = ""
End Sub
Private Sub Command3_Click()db.Execute ("UpDATE ROOM_STATUS SET
ROOM_STATUS='YES' WHERE ROOM_NO='" &
Trim(UCase(Text1.Text)) & "'")
db.Execute ("INSERT INTO VECAT_DETAILs VALUES('" &
Trim(UCase(Text1.Text)) & "','" &
Trim(UCase(Label8.Caption)) & "','" &
Trim(UCase(Label10.Caption)) & "','" &
Trim(UCase(Label3.Caption)) & "','" & Trim(UCase(RT.Text))& "','" & Trim(UCase(Label6.Caption)) & "'," &
Trim(Val(Label12.Caption)) & "," &
Trim(Val(Label18.Caption)) & ")")
db.Execute ("delete from cur_booking where room_no='" &
Trim(UCase(Text1.Text)) & "'")
A = MsgBox("Register Sucessfully", vbInformation +
vbOKOnly, "Sucessful")
End Sub
-
7/29/2019 Hotel Management Final
59/77
59
Private Sub Form_Load()
Me.WindowState = 2
Call conn
Call CLEAR
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Show
End Sub
Sub CLEAR()
Label3.Caption = ""
Label6.Caption = ""
Label8.Caption = ""Label10.Caption = ""
Label12.Caption = ""
Label14.Caption = ""
Label16.Caption = ""
Label18.Caption = ""
RT.Text = ""
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As
Integer)
'Call CALCU
End Sub
Sub CALCU()
Dim I As Integer
Dim AM As Double
Dim TOT As Doublers.Open ("SELECT * FROM CUR_BOOKING WHERE
ROOM_NO='" & Trim(UCase(Text1.Text)) & "'"), db
If rs.BOF = False Then
rs.MoveFirst
While Not rs.EOF
Label3.Caption = rs(1)
RT.Text = rs(2)
Label6.Caption = rs(3)
-
7/29/2019 Hotel Management Final
60/77
60
Label8.Caption = rs(4)
Label10.Caption = Date
If Date - CDate(Label8.Caption) > 0 Then
Label12.Caption = Date - CDate(Label8.Caption)
Else
Label12.Caption = 1
End If
Label14.Caption = rs(5)
I = 1
rs.MoveNext
Wend
Else
Call CLEAREnd If
rs.Close
If I = 1 Then
rs.Open ("SELECT ROOM_RENT FROM ROOM_DETAIL
WHERE ROOM_NO='" & Trim(UCase(Text1.Text)) & "'"), db
If rs.BOF = False Then
rs.MoveFirst
While Not rs.EOFAM = CDbl(rs(0))
rs.MoveNext
Wend
End If
rs.Close
TOT = AM * Val(Label12.Caption)
Label18.Caption = TOT
Label16.Caption = Val(Label18.Caption) -Val(Label14.Caption)
End If
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As
Integer)
Call CALCU
End Sub
-
7/29/2019 Hotel Management Final
61/77
61
REPORT:
Private Sub Form_Load()
Me.WindowState = 2
Call connFrame1.Top = 320
Frame2.Top = 320
M1.Rows = 1
M1.Cols = 6
Call M1DIS
Call M1APP
Call M2DIS
End SubSub M1DIS()
Dim C As Integer
Dim I As Integer
Dim J As Integer
rs.Open ("SELECT * FROM CUR_BOOKING"), db
If rs.BOF = False Then
M1.Rows = rs.RecordCount + 1
C = rs.RecordCountM1.Cols = 6
rs.MoveFirst
While Not rs.EOF
I = I + 1
M1.Row = I
J = J + 1
M1.Col = J
M1.Text = rs(0)
-
7/29/2019 Hotel Management Final
62/77
62
M1.CellFontBold = True
M1.CellForeColor = vbBlue
J = J + 1
M1.Col = J
M1.Text = rs(1)
M1.CellFontBold = True
M1.CellForeColor = vbBlue
J = J + 1
M1.Col = J
M1.Text = rs(2)
M1.CellFontBold = True
M1.CellForeColor = vbBlue
J = J + 1M1.Col = J
M1.Text = rs(3)
M1.CellFontBold = True
M1.CellForeColor = vbBlue
J = J + 1
M1.Col = J
M1.Text = rs(4)
M1.CellFontBold = TrueM1.CellForeColor = vbBlue
rs.MoveNext
J = 0
Wend
Call M1APP
End If
rs.Close
Label6.Caption = CEnd Sub
Sub M1APP()
M1.Row = 0
M1.Col = 1
M1.Text = "ROOM NO"
M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.Col = 2
-
7/29/2019 Hotel Management Final
63/77
63
M1.Text = "NAME"
M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.Col = 3
M1.Text = "ADDRESS"
M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.Col = 4
M1.CellFontBold = True
M1.CellForeColor = vbRed
M1.Text = "PHONE"
M1.Col = 5
M1.CellFontBold = TrueM1.CellForeColor = vbRed
M1.Text = "DATE OF BOOKING"
M1.ColWidth(1) = 1500
M1.ColWidth(2) = 2000
M1.ColWidth(3) = 3500
M1.ColWidth(4) = 1500
M1.ColWidth(5) = 2000
M1.ColWidth(0) = 0M1.ColAlignment(1) = 3
M1.ColAlignment(2) = 3
M1.ColAlignment(3) = 3
M1.ColAlignment(4) = 3
M1.ColAlignment(5) = 3
End Sub
Sub M2DIS()
Dim I As IntegerDim J As Integer
Dim C As Double
Dim D As Integer
rs.Open ("SELECT * FROM VECAT_DETAILS"), db
If rs.BOF = False Then
M2.Rows = rs.RecordCount + 1
D = rs.RecordCount
M2.Cols = 9
-
7/29/2019 Hotel Management Final
64/77
64
rs.MoveFirst
While Not rs.EOF
I = I + 1
M2.Row = I
For J = 0 To 7
M2.Col = J + 1
M2.Text = rs(J)
M2.CellFontBold = True
M2.CellForeColor = vbBlue
Next
C = C + rs(J - 1)
rs.MoveNext
WendM2APP
End If
rs.Close
Label2.Caption = C
Label4.Caption = D
End Sub
Sub M2APP()
Dim I As IntegerM2.Row = 0
M2.Col = 1
M2.Text = "ROOM NO"
M2.CellFontBold = True
M2.CellForeColor = vbRed
M2.Col = 2
M2.Text = "DATE OF BOOKING"
M2.CellFontBold = TrueM2.CellForeColor = vbRed
M2.Col = 3
M2.Text = "DATE OF VECATING"
M2.CellFontBold = True
M2.CellForeColor = vbRed
M2.Col = 4
M2.Text = "NAME"
M2.CellFontBold = True
-
7/29/2019 Hotel Management Final
65/77
65
M2.CellForeColor = vbRed
M2.Col = 5
M2.Text = "ADDRESS"
M2.CellFontBold = True
M2.CellForeColor = vbRed
M2.Col = 6
M2.Text = "PHONE NUMBER"
M2.CellFontBold = True
M2.CellForeColor = vbRed
M2.Col = 7
M2.Text = "NO OF DAYS"
M2.CellFontBold = True
M2.CellForeColor = vbRedM2.Col = 8
M2.Text = "PAID AMMOUNT"
M2.CellFontBold = True
M2.CellForeColor = vbRed
For I = 1 To 8
M2.ColAlignment(I) = 3
M2.ColWidth(I) = 2000
NextM2.ColWidth(1) = 1000
M2.ColWidth(0) = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.Show
End Sub
Private Sub M1_Click()
End Sub
-
7/29/2019 Hotel Management Final
66/77
66
-
7/29/2019 Hotel Management Final
67/77
67
-
7/29/2019 Hotel Management Final
68/77
68
-
7/29/2019 Hotel Management Final
69/77
69
-
7/29/2019 Hotel Management Final
70/77
70
-
7/29/2019 Hotel Management Final
71/77
71
-
7/29/2019 Hotel Management Final
72/77
72
-
7/29/2019 Hotel Management Final
73/77
73
-
7/29/2019 Hotel Management Final
74/77
74
-
7/29/2019 Hotel Management Final
75/77
75
-
7/29/2019 Hotel Management Final
76/77
76
-
7/29/2019 Hotel Management Final
77/77