Вы находитесь на странице: 1из 96

A PROJECT REPORT ON

Hotel management system


For the Partial Fulfillment for the Award of degree BACHELOR OF COMPUTER APPLICATION (BCA) Session 2010-2013 Submitted To: Mrs. SANGEETA JOHARI Faculty of B.C.A. Department Submitted By: ASIF USMANI Roll No. 9054070 B.C.A. VI Sem

INSTITUTE OF MANAGEMENT AND RESEARCH, GHAZIABAD

CERTIFICATE
This is to certify that the project work entitled HOTEL MANAGEMENT SYSTEM submitted by ASIF USMANI for the partial fulfillment of the requirement for the B.C.A. VI Sem in record of the student own work carried out under my supervision. I have instructed / guided them the said work from time to time and I found them to be satisfactorily progressive. I have assessed the said work. I am satisfied that the same is up to the standard required for the course.

Mrs. SANGEETA JOHARI Project Guide

ACKNOWLEDGEMENT
I am extremely grateful to project MRS.SANGEETA JOHARI for her invaluable help and support throughout the completion of this project. Without her help it would have been really difficult to complete the project. I express my deep sense of respect and thanks to Ms. Sangeeta Johari for her encouragement and coordination at every step of this project. At last I would like to thank my team members and everybody for always being supportive and leading a helping hand whenever required.

ASIF USMANI

CONTENTS
Cover Page Acknowledgement Forwarding Letter Certificate Index 1. PROJECT MANUAL
a. b. c. d. e. f. Introduction Problem Description Objective of Project Scope for New Existing System Advantages Proposed Menu Design

2. THEORITICAL BACKGROUND
a. About Front-End (MS Visual Basic 6.0) b. About Back-End(MS Access 2003) c. About SDLC Steps

3. HARDWARE & SOFTWARE REQUIREMENT


a. Minimum Hardware Requirement b. Minimum Software Requirement

4. DATABASE MANUAL
a. b. c. d. e. f. g. h. Data Model Entity Attribute Relationship Tables & Keys Constraints & Validation E-R Diagram Database Design View In Ms Access

5. USER MANUAL
a. Requirement Analysis b. Functional Decomposition Chart of Project c. Data Flow Diagram(DFD)
Context Analysis Diagram (Level-0) Level-1 Level-2

d. Form Design Window with Form description e. Coding

f. Report

6. TESTING
a. Methodology used for Testing b. Testing Strategies & Techniques

7. FUTURE ENHANCEMENT(Limitation) 8. CONCLUSION 9. BIBLIOGRAPHY

PROJECT MANUAL

INTRODUCTION
If you are looking for different career option apart form the regular once like Engineering or Bachelor degree? Computer Science is quite Exciting and challenging job. In this career daily you get an opportunity to work and meet different people. This career offer immense satisfaction, good salary and bright future too. Hotel management system is an extension and computerization to the manual examination system. It contains all the facilities, tricks and tracks and all that which could be used to enhance the overall procedure and operating style. It removes all the anomalies which were present in the manual examination. In manual examination system we made the assessment manually which cause dissatisfaction and it was rather irritating. In management System removed it by giving the facility to produce the instant result which it turns induced accuracy, time factor.

AREA OF PROJECT
The existing system of is manual. It maintains huge records for various departments. The book keeping procedure is tedious and it prompts to errors. Very careful handling is needed is manual systems. Even a very minute mistake may lead to imbalanced results. Manual processes results is waste of time and energy. In the earlier system the inventory report is calculated manually. Whenever the accounting is to be performed. That info. Must be extracted from file and calculation will have to check person. The existing system leads to a lot of problems. The existing system consumed a lot of stationary cost. Daily transactions are maintained in journals. These journal entries are then posted on to the ledger accounts correspondingly. This s/w will be useful for any hotel branches. This software will useful for manager, administrator, and customer. This s/w covers all computerized activities which can be perform in the hotel through computer as much as possible.

PROBLEM DISCRIPTION
This project is HOTEL MANAGEMENT SYSYEM; the main aim of this project is gives the customer view of the hotel. The customer needs in hotel are, enquiry about room reservation process, vacating process, canceling the reservation. In this project the first module gives the administrator we for log in. The customer need enquiry for first process. So the enquiry process is shown in the project that more effectively then the manual process the next process of customer is reservation. This reservation is for May today or future, for this the reservation from can work more efficient then 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 receiving for that date.

OBJECTIVES OF PROJECT
The main objective of my project is to computerize the rememberance.Maintaining records manually will be a hard task and also a time consuming process. By doing computerization it will gives lots of facilities to the remembering like whole data will now be computerized updating will done automatically, maintaining the records of customer will be easy, saved lots of time. Every day lots of saving, transactions, takes place. Keepings records of all these tracks manually will a very hard and challenging task; a small mistake can corrupts the whole task, therefore, need for computerization is necessary in this field.

SCOPE FOR NEW EXISTING SYSTEM


The existing system is manual. It maintains huge records for various departments. The Reservation of Rooms procedure is tedious and can promote to errors. Very carefully handling is needed in manual systems. Even a very minute mistake may lead to imbalanced results. M annual processes result is waste for Tim and energy. In the earlier system the inventory is calculated manually. That information must be extracted from the file and the calculation will have to check by the concern person. The existing system leads to lots of problems. The existing system consumed a lot of stationary cost. Daily transaction and maintained In journals. These journal entries are then posted on to the ledger accounts correspondingly.

ADVANTAGES
The system has the following advantages:1. The data can be maintained and updated easily with minimum efforts. 2. The complex reports were generated easily and without delay. 3. The allocation of the rooms status is immediately provided to the customer as earlier. 4. Various kinds of queries put in the customer can be answered immediately. Various level of security is maintained for the information at most

PROPOSED MENU DESIGN


This project integrates all operation processes in the computer to synergies the important resources of material and money. The department people can gather the needed information at their desk without any manual burden. This project reduce manual burden 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 report 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 organization success.

THEORTICAL BACKGROUND

About front-End (MS Visual Basic 6.)


Visual Basic allows accessing and manipulating data database. It allows managing database, object, & structures. It includes a no. of features that makes database access relatively simple like: close attachment with the ms-access database programs. Data control to access and display database info. With ODBC and sql drivers in order to access and managing the data in relational databases. Vb includes Microsoft jet database engine that powers MS-access. It allows displaying, editing and updating information from many types of databases. In visual basic professional edition we can also create or modify database using the data access objects programming interfaces. Visual basic provides the features DDE, (Dynamic data exchange), Which is a establishes protocols that enables your application to directly & continuously exchange data through active links b/w a visual basic program & other programs. The data exchange is also called conversation. One can exchange data by establishing DDE links. These links can be created an application, which displays time as well as run-time. Visual basic also enables to create an application, which displays data from much different application and also allows editing the data from with in the application in which it was created. Thus with all the above-mentioned features, visual basic has created a pleasant revolution by proving by proving itself to be nearly perfect by satisfying their needs. So, it was used as a front-end tool in our module.

About back-end (MS-Access 2003)


A database is a collection of information thats related to a particular, such as tracking customer orders or maintaining a music collection. If your data base is not stored on computer or only a part of it are, you may be tracking information from verity of sources that you have to coordinate and organized yourself. Using MS-access, you can manage all your information form a single database file. Within the file, divided your file into separate storage containers called tables: view, add, update table data by using online forms; find and retrieve just the data you want by using queries; and analyze the database from the internet or an intranet by creating data access pages. To store the data, create one table for each type for each type of information that you track. To bring the data form multiple table together in a query, from, data or data access page, define relationship b/w the tables, create a query. A query can also update or delete multiple records at the same time, & perfume predefine or custom calculation on your data. To easily view, enter, & change data directly in the table, create a form. When you open a form, ms-access relieves the data from one or more tables scratch. To analyze yore data or present it is a certain way in print, create a report for ex: - you might print one report that group data and calculated totals, and another reports with different data formatted for printing mailing labels. To make data available on the internet for interactive reporting, data entry, or data analysis, use a data access page. Ms-access retrieves the data from one or more tables & displays it on the screen with the layout you choose in the page wizard, or a layout that you create from scratch. User can interact with the date by using features on the data access page.

About SDLC steps


The HOTEL MANAGEMENT SYSTEM is developed using the SYSTEM DEVELOPMENT LOFE CYCLE approaches. The various stages of life cycle are: System Requirement

System Design

Detailed Design

Coding and Testing

Integration and System Testing

Implementation

Maintenance

HARDWARE & SOFTWARE REQUIRMENT

HARDWARE SPECIFICATION:
Hardware is a term given to machine itself and to various pieces of equipment. It refers to physical devices of a computer system, thus, the input, storage, processing, control and output devices are hardware.

Processor: Pentium-V 2.0 GHz Ram: 256 MB Hard disk capacity: 40.0 GB Monitor: 15 Colored Keyboard: 104 Keys Keyboard Mouse: Option Mouse

SOFTWARE SPECIFICATION:
Software means a program where the objective is to enhance the capabilities of the hardware machine. The following defines the software of the proposed system developmentOperating system: 2000 professional Programming language: Microsoft visual basic 6.0(enterprise edition). Database: MS-Access 2000

DATABASE MANUAL

A. Data Model

B. Entity
CUSTOMER FACILITIES ROOMS BILL

C. ATTRIBUTE
CUSTOMER
Customer-id Customer-name Customer-address Customer-ph.no

FACILITIES
Facilities-type Facilities-name

ROOMS
Customer_id(foreign Key) Room-no. Room-type Room-charge

BILL
Type facilities Type room

RELATIONSHIP
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. Once who use system built on RELATIONAL MODEL will instantly appreciate this is a convenient and powerful system. Customer : it must be a customer id(Constraints Primary Key) Room Service : it must be no. and room type(Composite Key)(customer id will be : it must be the service provided to the customer foreign key in room table)

ENTITIES: 1. CUSTOMER 2. FACILITIES 3. ROOMS 4. BILL ATTRIBUTES: CUSTOMER: This table CUSTOMER keeps all customer information. The structure
is as:

NAME
Cid Cname CAddress Cph.no.

Constraints
Primary key Not Null Not Null Not Null

Type
Text Text Text Number

Description
Customer id Customer name Customer Address Customer ph.no.

FACILITIES: FACILITIES: This table FACILITIES is used to provide the facilities to fulfill the
customers need. The structure is as:

NAME
Type Name

Constraints
Not Null Not Null

Type
Text Text

Description
Facilities Type Facilities Name

ROOMS: ROOMS: This table ROOMS is shows the no. of room, type and charges according to
customer configuration.

NAME
Cus Cusid Rno. RType Rcharges

Constraints
Primary key Not Null Not Null Not Null

Type
Text Number Text Currency

Description
Customer id Room number Room type Room charges

BILL: BILL: This table BILL is used to generate the bill for the customer of the charges and
other facilities which is provided by the hotel for the customer.

NAME
Tfacilities Trooms

Constraints
Not Null Not Null

Type
Text Text

Description
Type Facilities Type Rooms

ER-diagram

DATABASE DESIGN VIEW IN MS ACCESS


MS-ACCESS is the powerful multi-user DBMS. It can be used to store & manipulate large amount of info. 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 report. Data in ACCESS is organized in the form table within records and arranged according to a common reference value known as primary key fro 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 b/w that we tables this relation will be implemented through a concept of a foreign key. A foreign key is a table which links to other tables. Database access has a default extension of db. Access also maintains index files 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 the way data is accessed. However it thus not duplicates the data itself.

USER MANUAL

REQUIRMENT ANALYSIS
The origin of most s/w system is in the need of a client, who either wants to automate an existing manual system or desires a new s/w system. Thus there are three major parties interested in a new system: the client use and the developers. The basic purpose of s/w requirement specification is to bridge communication gap b/w the s/w development process and client problems. I have done this analysis in order to make a prototype of what the new system should look like. Since my main aim is to learn that how project are made and maintained, so this project of mine has gone through all stages of s/w development process.

DATA FLOW DIAGRAM (DFD)


Data flow diagram (dfd) is a tool developed for purpose of graphically representing the system in order makes the classification of system requirement easy and identifying the major transformation that will become a modules in system design. So, it is starting point of the design phase that functionally decomposes specification down phase to the lowest level of details. This dia. follows a top down approach. As the over view mode is exploded, lower level dia. Can be obtained that shows additional features. Each process in the data flows dia. Can be exploded into yet more detailed data flow diagram. DFD is used to describe the actual process that makeup the system, the data store and the data flows. A DFD typically shows the minimum contents of the data. Each data well contains all the data elements the flow in and or fit. DFD shows the flow data within a system. It consists of a series of bubbles joined by lines the bubbles represents data transformations and the line represents dataflow in the system

(0 LEVEL)DFD

CUSTOMER
ALLOT FILL REQUEST FROM

CUSTOMER

HOTEL MANAGEMENT

ROOM

MANAGER
VACANT ROOM

IST LEVEL DFD


ROOM AVAILABILTY
VERIFICATION UPDATE ROOM ALLOTMENT ROOM VACANT ROOM STATUS CHECK IN CONCELLING ROOM

CUSTOMER

CHECK OUT

TESTING

TESTING
Testing is the only phase in the whole s/w development process that is regarded as a destructive process rather than a constructive one. During the testing phase, the engineer creates a series of test cases that is intended to demolish the s/w that has been built. The basic testing principles that a s/w engineer must understand before applying method to design effective test cases are:1. All tests should be traceable to customer requirement. 2. Tests should be planned long before testing begins. 3. Testing should be begin in the small and progress toward testing in the large. 4. To be most effective, an independent third party should conduct testing. There are mainly two fundamental approaches to testing. These are:-`

Black box testing, which check for the fundamental aspect of a system with little
regard for the internal logic structure of the s/w. black box tests are used to demonstrate that s/w function are operational, that input is properly accepted and output is correctly produced, and that the integrity of external information is maintained.

White box testing, which check for the correctness of the procedural details at the
grass root level of the code. White box testing is used to ensure that internal opr. Are performed according to specifications and all internal components have been adequately exercised. White box testing of s/w is predicted on close examination of procedural detail. Providing test cases, which exercise specific sets of conditions and/ or loops, tests logical paths through the s/w.

The overall strategy for s/w testing may also be viewed in the context of the spiral. The spiral model of s/w development has following types of testing:-

1. Unit testing: - unit testing begins at the vortex of the spiral and concentrates on
each unit (i.e., component) of the s/w implemented in source code. Using the component level design description as a guide, important control paths are tested to uncover errors within the boundary of the module. The unit test is white box oriented and the step can be conducted is parallel for the multiple components. Test of data flow across s module interface are required before any other test is initiated. In addition, local data structures should be exercised and the local impact on global data should be ascertained during unit testing.

2. Integration testing: - Integration testing focuses on the design and the


construction of the s/w architecture. Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing the objective is to take unit tested components and build a program structure that has been dictated by design.

3. Validation testing: - in validation testing, requirements established as part of s/w


requirements analysis are validated against the s/w that has been constructed. S/w validation is achieved through a series of black box tests that demonstrates conformity with requirements. A test plan outlines the classes of tests to be conducted and a test procedure defines specific test case that will be use to demonstrate conformity with requirements. Both the plan and procedure are designed to ensure that all functional requirements are satisfied, all behavioral characteristics are achieved, all performance requirements are attained, documentation is correct and human-engineered and other requirements are met.

4. System testing: - In system testing, the software and other system elements are
tested as a whole. System testing is actually a series of tests whose primary purpose is to fully exercise the computer based system. Although each test has a different purpose, all work to verify that system elements have been properly have been properly integrated and perform allocated functions.

CODING

Private Sub Animation1_Click()

End Sub

Private Sub Label3_Click()

End Sub

Private Sub Timer1_Timer() Unload Me LOGIN.Show Timer1.Enabled = False

End Sub Private Sub Command1_Click() Unload Me

FRONT_OFFICE.Show End Sub

Private Sub Command2_Click() Unload Me HKEEPING.Show

End Sub

Private Sub Command3_Click() Unload Me FOOD.Show

End Sub

Private Sub Command4_Click() Unload Me KITCHEN.Show End Sub

Private Sub Command5_Click() Unload Me INTRODUCTION.Show

End Sub

Private Sub Command1_Click() Unload Me INTRODUCTION.Show End Sub

Private Sub Form_Load() On Error Resume Next Data1.DatabaseName = App.Path & "/" & "HMDATA1.MDB" Data1.RecordSource = " SELECT * FROM ROOMS " Data1.Refresh Text1.Text = Data1.Recordset.Fields(3).Value Data1.Recordset.MoveNext Text2.Text = Data1.Recordset.Fields(3).Value Data1.Recordset.MoveNext Text3.Text = Data1.Recordset.Fields(3).Value Data1.Recordset.MoveNext Text4.Text = Data1.Recordset.Fields(3).Value Data1.Recordset.MoveNext Text5.Text = Data1.Recordset.Fields(3).Value Data1.Recordset.MoveNext Text6.Text = Data1.Recordset.Fields(3).Value Data1.Recordset.MoveNext Text7.Text = Data1.Recordset.Fields(3).Value

End Sub

Private Sub Command1_Click() Unload Me INTRODUCTION.Show INTRODUCTION.Refresh End Sub Private Sub Command10_Click() Text5.Text = "LANAL" Text4.Text = "8000" End Sub Private Sub Command11_Click() KITMENU2.Show End Sub Private Sub Command2_Click() On Error Resume Next D1.RecordSource = "SELECT * FROM HOTEL " D1.Refresh D1.Recordset.AddNew D1.Recordset.Fields("ROOMS") = Command4.Caption D1.Recordset.Update ROOMS.Text1.Text = Val(ROOMS.Text1.Text) - 1 D1.Recordset.AddNew

D1.Recordset.Fields(0) = Trim(T1.Text) D1.Recordset.Fields(1) = Trim(T2.Text) D1.Recordset.Fields(2) = Trim(DTPicker1.Value) D1.Recordset.Fields(3) = Trim(DTPicker2.Value) D1.Recordset.Fields(9) = Trim(Combo2.Text) D1.Recordset.Fields("ROOM_NO") = Val(Trim(Text1.Text)) D1.Recordset.Fields(10) = Val(Trim(Text6.Text)) D1.Recordset.Fields(4) = Trim(T7.Text) D1.Recordset.Fields(5) = Trim(T8.Text) D1.Recordset.Fields(6) = Trim(Combo1.Text) D1.Recordset.Fields(7) = Trim(T11.Text) D1.Recordset.Fields(8) = Trim(T12.Text) D1.Recordset.Fields(14) = Trim(Text5.Text) D1.Recordset.Fields(12) = Trim(Text2.Text) D1.Recordset.Fields(11) = Val(Trim(Text4.Text)) D1.Recordset.Fields(14) = Trim(Text5.Text) D1.Recordset.Fields(15) = Trim(T3.Text) D1.Recordset.Fields(16) = Trim(Text7.Text) D1.Recordset.Update D1.RecordSource = "SELECT * FROM ROOMS WHERE ROOMS='" & Trim(Text5.Text) & "'" D1.Refresh D1.Recordset.Edit

D1.Recordset.Fields("ROOMS AVALIBLE") = D1.Recordset.Fields("ROOMS AVALIBLE").Value - 1 D1.Recordset.Update T1.Text = "" T2.Text = "" T3.Text = "" Text7.Text = "" Text6.Text = "" Text1.Text = "" T7.Text = "" T8.Text = "" T9.Text = "" T11.Text = "" T12.Text = "" End Sub Private Sub Command3_Click() BILLS.Show End Sub Private Sub Command4_Click() Text5.Text = "SINGLE" Text4.Text = "1000" End Sub Private Sub Command5_Click()

Text5.Text = "DOUBLE" Text4.Text = "2000" End Sub Private Sub Command6_Click() Text5.Text = "SWEET" Text4.Text = "3500" End Sub Private Sub Command7_Click() Text5.Text = "DUPLEX" Text4.Text = "5500" End Sub Private Sub Command8_Click() Text5.Text = "SWEET" Text4.Text = "8000" End Sub Private Sub Command9_Click() Text5.Text = "DOUBLE DOUBLE" Text4.Text = "10000" End Sub

Private Sub DTPicker2_LostFocus() If DTPicker2.Value < DTPicker1.Value Then DTPicker2.SetFocus

MsgBox "Enter correct date", vbExclamation

End If End Sub Private Sub Form_Activate() On Error Resume Next D1.DatabaseName = App.Path & "/" & "HMDATA1.MDB" D1.RecordSource = "SELECT ROOM_NO FROM HOTEL" Cbo1.Clear Do While Not D1.Recordset.EOF = True Cbo1.AddItem D1.Recordset.Fields("ROOM_NO").Value D1.Recordset.MoveNext Loop End Sub Private Sub Form_Load() On Error Resume Next D1.DatabaseName = App.Path & "/" & "HMDATA1.MDB" D1.RecordSource = "SELECT * FROM HOTEL" D1.Refresh Text2.Text = Date Combo1.AddItem (1000) Combo1.AddItem (2000) Combo1.AddItem (3000)

Combo1.AddItem (4000) Combo1.AddItem (5000) Combo2.AddItem (1) Combo2.AddItem (2) Combo2.AddItem (3) Combo2.AddItem (4) Combo2.AddItem (5) Combo2.AddItem (6) Combo2.AddItem (7) Combo2.AddItem (8) Combo2.AddItem (9) Combo2.AddItem (10) End Sub Private Sub T13_Change() If KeyAscii > 47 And KeyAscii < 58 Or KeyAscii = 13 Then Else KeyAscii = 0 End If End Sub Private Sub Option6_Click() End Sub

Private Sub T1_KeyPress(KeyAscii As Integer)

If KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 123 Or KeyAscii = 8 Or KeyAscii = 32 Then Exit Sub Else KeyAscii = 0 End If End Sub Private Sub T11_KeyPress(KeyAscii As Integer) If KeyAscii >= 67 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 123 Or KeyAscii = 8 Or KeyAscii = 32 Then Exit Sub Else KeyAscii = 0 End If End Sub

Private Sub T12_KeyPress(KeyAscii As Integer) If KeyAscii >= 67 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 123 Or KeyAscii = 8 Or KeyAscii = 32 Then Exit Sub Else KeyAscii = 0 End If

End Sub

Private Sub T3_KeyPress(KeyAscii As Integer) If KeyAscii > 47 And KeyAscii < 58 Or KeyAscii = 13 Then

Exit Sub Else KeyAscii = 0 End If End Sub

Private Sub T5_KeyPress(KeyAscii As Integer) If KeyAscii > 47 And KeyAscii < 58 Or KeyAscii = 13 Then

Exit Sub Else KeyAscii = 0 End If

End Sub

Private Sub T9_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Or KeyAscii = 32 Then Exit Sub ElseIf KeyAscii <= 48 And KeyAscii >= 58 Then KeyAscii = 0 Exit Sub End If End Sub

Private Sub Text1_LostFocus() On Error Resume Next D1.RecordSource = "SELECT * FROM HOTEL WHERE ROOM_NO=" & Val(Text1.Text) & "'" D1.Recordset.MoveLast A = D1.Recordset.RecordCount D1.Recordset.MoveFirst For I = 0 To A - 1 If D1.Recordset.Fields("ROOM_NO").Value = Val(Text1.Text) Then MsgBox "ROOM ALREADY BOOKED" Text1.Text = "" Exit Sub

End If D1.Recordset.MoveNext Next End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Or KeyAscii = 32 Then

Exit Sub ElseIf KeyAscii >= 48 And KeyAscii <= 58 Then Exit Sub Else KeyAscii = 0 End If End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Or KeyAscii = 32 Then

Exit Sub ElseIf KeyAscii >= 48 And KeyAscii <= 58 Then Exit Sub Else

KeyAscii = 0 End If End Sub Private Sub Check1_Click() If Check1.Value = 1 Then TXT1.Text = "ADMINISTRATOR" TXT1.Enabled = False TXT2.SetFocus Else TXT1.BackColor = &H80000005 TXT1.Text = "" TXT1.Enabled = True End If End Sub

Private Sub Command3_Click() If TXT1.Text = "anubhav" And TXT2.Text = "welcome123" Then Unload Me INTRODUCTION.Show Else Unload Me intro2.Show End If

End Sub

Private Sub Command4_Click() On Error Resume Next Dim I As Integer I = MsgBox("Do you want to quit?", vbYesNo + vbQuestion, "HOTEL MESSAGE") If I = 6 Then End Else TXT1.Text = "" TXT2.Text = "" TXT1.SetFocus End If End Sub

Private Sub Form_Load() On Error Resume Next D1.DatabaseName = App.Path & "\" & "HMDATA1.MDB" End Sub

Private Sub Label3_Click() End Sub

Private Sub Timer1_Timer() LBL3.Caption = Time End Sub Private Sub Combo1_Click() On Error Resume Next Dim TRY As Integer Dim I As Integer D2.RecordSource = "SELECT * FROM MENU3 WHERE TYPE=" & "'" & combo1.Text & "'" D2.Refresh Combo2.Clear Do While Not D2.Recordset.EOF For I = 0 To Combo2.ListCount - 1 If Combo2.List(I) = Trim(D2.Recordset.Fields("MAIN_ITEM").Value) Then FLAG = 1 Exit For Else FLAG = 0 End If Next If FLAG = 0 Then Combo2.AddItem Trim(D2.Recordset.Fields("MAIN_ITEM").Value) End If

D2.Recordset.MoveNext Loop End Sub

Private Sub Combo2_Click() On Error Resume Next D2.RecordSource = "SELECT * FROM MENU3 WHERE MAIN_ITEM='" & Trim(Combo2.Text) & "'" D2.Refresh Combo3.Clear Do While Not D2.Recordset.EOF Combo3.AddItem (D2.Recordset.Fields(2).Value) D2.Recordset.MoveNext Loop End Sub

Private Sub Combo3_Click() On Error Resume Next End Sub

Private Sub Command11_Click() Unload Me CREATE_NEW_USER.Show

End Sub

Private Sub Command12_Click() Unload Me KITMENU.Show End Sub

Private Sub Command13_Click() Unload Me KITMENU2.Show End Sub

Private Sub Command2_Click() Unload Me KITCHEN.Show End Sub

Private Sub Command3_Click() Unload Me FOOD.Show End Sub

Private Sub Command4_Click()

Unload Me HKEEPING.Show End Sub

Private Sub Command5_Click() End End Sub

Private Sub Command6_Click() Unload Me RESERVATION.Show End Sub

Private Sub Command7_Click() Unload Me ROOMS.Show End Sub

Private Sub Command8_Click() Unload Me BILLS.Show End Sub

Private Sub Picture1_Click(Index As Integer) End Sub

Private Sub Command9_Click() Unload Me BAR.Show End Sub

Private Sub CP_Click() Unload Me CHANGE_PASSWORD.Show End Sub

Private Sub ET_Click() End End Sub

Private Sub FO_Click() Unload Me FRONT_OFFICE.Show End Sub

Private Sub HK_Click()

Unload Me HKEEPING.Show End Sub

Private Sub KM_Click()

Unload Me KITMENU2.Show End Sub Private Sub N() End Sub

Private Sub KS_Click() Unload Me KITCHEN.Show End Sub

Private Sub NE_Click() Unload Me KITMENU.Show End Sub

Private Sub OLE1_Updated(Code As Integer)

End Sub

Private Sub RA_Click() Unload Me ROOMS.Show End Sub Private Sub Command1_Click() CHANGE_PASSWORD.Show

End Sub

Private Sub Command2_Click() view.Show

End Sub

Private Sub Command3_Click() KITMENU2.Show

End Sub

Private Sub Command4_Click()

BAR.Show End Sub

Private Sub Command5_Click() RESERVATION.Show End Sub

Private Sub Command6_Click() ROOMS.Show End Sub

Private Sub Command7_Click() BILLS.Show End Sub

Private Sub Command8_Click() End End Sub

Private Sub Command1_Click() Unload Me view.Show

End Sub

Private Sub CMDCAN_Click() Unload Me INTRODUCTION.Show End Sub

Private Sub CMDOK_Click() Dim PASS As String If Text1 = "" Then MsgBox "Enter valid Username", vbExclamation

Text1.SetFocus Else Data1.RecordSource = "SELECT * FROM LOGON WHERE NAME='" & Trim(Text1.Text) & "'" Data1.Refresh If Data1.Recordset.RecordCount = 0 Then If Text2.Text = "" Then MsgBox "Enter valid Password", vbExclamation

Text2.SetFocus Else

If Text2.Text = Text3.Text Then Data1.Recordset.AddNew Data1.Recordset.Fields("NAME") = Trim(Text1.Text) Data1.Recordset.Fields("PASSWORD") = Trim(Text2.Text) Data1.Recordset.Update MsgBox "User Created", vbInformation

Unload Me INTRODUCTION.Show Else MsgBox " Password and Retype Password must be same", vbExclamation

Text3.SetFocus End If End If Else MsgBox "User already exists", vbExclamation

Text1.SetFocus Text1.Text = "" End If End If End Sub

Private Sub DEEP_Load() Data1.DatabaseName = App.Path & "/" & "HMDATA1.MDB" Data1.RecordSource = "SELECT * FROM LOGON " Data1.Refresh End Sub

Private Sub Command1_Click() Dim PASS As String d1.RecordSource = "SELECT * FROM LOGON WHERE NAME='" & Trim(TXT1.Text) & "'" d1.Refresh If d1.Recordset.RecordCount = 0 Then MsgBox "User not found", vbExclamation TXT1.SetFocus TXT2.Text = "" TXT3.Text = "" TXT4.Text = "" Else If TXT2.Text = d1.Recordset.Fields("PASSWORD").Value Then If TXT3.Text = "" Then MsgBox "Enter a valid Password", vbExclamation

TXT3.SetFocus Else If TXT3.Text = TXT4.Text Then d1.Recordset.Edit d1.Recordset.Fields("PASSWORD").Value = TXT3.Text d1.Recordset.Update MsgBox "Password has been changed", vbInformation

Unload Me INTRODUCTION.Show Else MsgBox "Password does not match", vbExclamation TXT4.SetFocus End If End If Else MsgBox "Incorrect Password", vbExclamation TXT2.SetFocus End If End If

End Sub Private Sub Command2_Click() Unload Me INTRODUCTION.Show End Sub Private Sub Form_Load() d1.DatabaseName = App.Path & "/" & "HMDATA1.MDB" d1.RecordSource = "SELECT * FROM LOGON" d1.Refresh End Sub

Private Sub CAN_Click() Txt1.Text = "" Txt2.Text = "" Txt5.Text = "" Txt4.Text = "" Txt9.Text = "" Txt10.Text = "" Txt11.Text = "" Txt7.Text = "" Txt14.Text = "" Txt3.Text = "" Txt12.Text = ""

Text6.Text = "" Text8.Text = "" End Sub

Private Sub Command1_Click() Unload Me INTRODUCTION.Show End Sub

Private Sub Command2_Click() On Error Resume Next Data4.RecordSource = "SELECT * FROM HOTEL WHERE ROOMNO=" & "'" & Txt1.Text & "'" Data4.Refresh End Sub

Private Sub Command4_Click() On Error Resume Next D1.Recordset.AddNew D1.Recordset.Fields(0) = Trim(Txt1.Text) D1.Recordset.Fields(1) = Trim(Txt7.Text) D1.Recordset.Fields(2) = Trim(Txt2.Text) D1.Recordset.Fields(3) = Trim(Txt14.Text)

D1.Recordset.Fields(4) = Trim(Txt3.Text) D1.Recordset.Fields(5) = Trim(Txt5.Text) D1.Recordset.Fields(6) = Trim(Txt4.Text) D1.Recordset.Fields(8) = Trim(Txt11.Text) D1.Recordset.Fields(9) = Trim(Txt12.Text) D1.Recordset.Fields(10) = Trim(Txt10.Text) D1.Recordset.Fields(11) = Trim(Text6.Text) D1.Recordset.Fields(12) = Trim(Text8.Text) D1.Recordset.Update Txt1.Text = "" Txt2.Text = "" Txt3.Text = "" Txt4.Text = "" Txt5.Text = "" Txt14.Text = "" Txt9.Text = "" Txt7.Text = "" Txt2.Text = "" Txt11.Text = "" Txt12.Text = "" Txt10.Text = "" Text6.Text = "" Text8.Text = ""

End Sub

Private Sub Command5_Click() Txt1.Text = "" Txt2.Text = "" Txt5.Text = "" Txt4.Text = "" Txt9.Text = "" Txt10.Text = "" Txt11.Text = "" Txt7.Text = "" Txt14.Text = "" Txt3.Text = "" Txt12.Text = "" Text6.Text = "" Text8.Text = "" End Sub

Private Sub Command6_Click() Txt12.Text = Val(Text6.Text) + Val(Text8.Text) + Val(Txt3.Text) End Sub

Private Sub Command7_Click()

DETAIL_MEN.Show End Sub

Private Sub Command9_Click() On Error Resume Next Dim B As Integer B = Txt1.Text Data4.DatabaseName = App.Path & "\" & "HMDATA1.MDB" Data4.RecordSource = "SELECT * FROM HOTEL2 WHERE ROOM_NO=" & B Data4.Refresh Data4.Recordset.AddNew Data4.Recordset.Fields(4).Value = Txt11.Text Data4.Recordset.Fields(14).Value = Txt14.Text Data4.Recordset.Fields(6).Value = Txt10.Text Data4.Recordset.Fields(13).Value = Txt9.Text Data4.Recordset.Fields(9).Value = Txt7.Text Data4.Recordset.Fields(10).Value = Txt1.Text Data4.Recordset.Fields(16).Value = Txt4.Text Data4.Recordset.Fields(11).Value = Txt3.Text Data4.Recordset.Fields(0).Value = Txt2.Text Data4.RecordSource = "SELECT * FROM HOTEL WHERE ROOM_NO=" & B Data4.Refresh Data4.Recordset.Delete

Data4.Refresh End Sub Private Sub DET_Click() DETAIL_MEN.Show End Sub Private Sub EN_Click() INTRODUCTION.Show End Sub

Private Sub Form_Load() On Error Resume Next DATA1.DatabaseName = App.Path & "\" & "HMDATA1.MDB" DATA1.RecordSource = "HOTEL" D1.DatabaseName = App.Path & "\" & "HMDATA1.MDB" D1.RecordSource = "BILLGEN" End Sub Private Sub SAV_Click() Command4.Value = True End Sub Private Sub TOT_Click() Command6.Value = True End Sub

Private Sub TXT1_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Or KeyAscii = 32 Then Exit Sub ElseIf KeyAscii >= 48 And KeyAscii <= 58 Then Exit Sub Else KeyAscii = 0 End If End Sub

Private Sub TXT1_LostFocus() On Error Resume Next Dim B As Integer B = Val(Txt1.Text) DATA1.RecordSource = "SELECT * FROM HOTEL WHERE ROOM_NO=" & B DATA1.Refresh If DATA1.Recordset.RecordCount <> 0 Then MsgBox "Record already Exists", vbInformation

If Not IsNull(DATA1.Recordset.Fields(11).Value) = True Then Txt2.Text = DATA1.Recordset.Fields(0).Value Txt3.Text = DATA1.Recordset.Fields(11).Value

Txt4.Text = DATA1.Recordset.Fields(16).Value Txt5.Text = DATA1.Recordset.Fields(10).Value Txt7.Text = DATA1.Recordset.Fields(9).Value Txt9.Text = DATA1.Recordset.Fields(13).Value Txt10.Text = DATA1.Recordset.Fields(6).Value Txt14.Text = DATA1.Recordset.Fields(14).Value Txt11.Text = DATA1.Recordset.Fields(4).Value Txt11.Text = DATA1.Recordset.Fields(3).Value End If End If DATA1.Recordset.Close Data2.RecordSource = "SELECT * FROM MENUBILLS WHERE ROOMNO=" & "'" & Txt1.Text & "'" Data2.Refresh If Data2.Recordset.RecordCount <> 0 Then Do While Not Data2.Recordset.EOF If Not IsNull(Data2.Recordset.Fields("PRICE").Value) = True And Data2.Recordset.Fields("ROOMNO").Value = Val(Txt1.Text) Then Text6.Text = Val(Text6.Text) + Data2.Recordset.Fields("PRICE").Value End If Data2.Recordset.MoveNext Loop End If

Data3.RecordSource = "SELECT * FROM BARBILLS WHERE ROOMNO=" & "'" & Txt1.Text & "'" Data3.Refresh If Data3.Recordset.RecordCount <> 0 Then Do While Not Data3.Recordset.EOF If Not IsNull(Data3.Recordset.Fields("PRICE").Value = True And Data3.Recordset.Fields("ROOMNO").Value = Val(Txt1.Text)) Then Text8.Text = Val(Text8.Text) + Data3.Recordset.Fields("PRICE").Value Txt12.Text = Val(Txt10.Text) - Val(Txt12.Text) Txt12.Text = (Val(Txt3.Text) * Val(Txt5.Text)) - Val(Txt10.Text) End If Data3.Recordset.MoveNext Loop End If 0 End Sub

Private Sub Txt12_Change() Txt12.Text = (Val(Txt3.Text) * Val(Txt5.Text)) - Val(Txt10.Text) + (Val(Text6.Text) + Val(Text8.Text)) End Sub

Private Sub Txt5_LostFocus()

On Error Resume Next B = Txt1.Text DATA1.RecordSource = "SELECT * FROM HOTEL WHERE ROOM_NO=" & B DATA1.Refresh Txt3.Text = Val(DATA1.Recordset.Fields(11)) * Val(Txt5.Text) End Sub

Dim A As Currency Private Sub Combo1_Click() On Error Resume Next Dim A As Currency Combo2.Clear If Combo1.Text = "WHISKY" Then D2.RecordSource = "SELECT * FROM BAR1 WHERE MAIN_ITEM='" & "WHISKY" & "'" D2.Refresh Do While Not D2.Recordset.EOF Combo2.AddItem D2.Recordset.Fields(1).Value D2.Recordset.MoveNext Loop ElseIf Combo1.Text = "RUM" Then D2.RecordSource = "SELECT * FROM BAR1 WHERE MAIN_ITEM='" & "RUM" & "'"

D2.Refresh Do While Not D2.Recordset.EOF Combo2.AddItem D2.Recordset.Fields(1).Value D2.Recordset.MoveNext Loop ElseIf Combo1.Text = "BARANDY" Then D2.RecordSource = "SELECT * FROM BAR1 WHERE MAIN_ITEM='" & "BARANDY" & "'" D2.Refresh Do While Not D2.Recordset.EOF Combo2.AddItem D2.Recordset.Fields(1).Value D2.Recordset.MoveNext Loop ElseIf Combo1.Text = "BEER" Then D2.RecordSource = "SELECT * FROM BAR1 WHERE MAIN_ITEM='" & "BEER" & "'" D2.Refresh Do While Not D2.Recordset.EOF Combo2.AddItem D2.Recordset.Fields(1).Value D2.Recordset.MoveNext Loop ElseIf Combo1.Text = "SHAMPION" Then

D2.RecordSource = "SELECT * FROM BAR1 WHERE MAIN_ITEM='" & "SHAMPION" & "'" D2.Refresh Do While Not D2.Recordset.EOF Combo2.AddItem D2.Recordset.Fields(1).Value D2.Recordset.MoveNext Loop ElseIf Combo1.Text = "SOFT DRINKS" Then D2.RecordSource = "SELECT * FROM BAR1 WHERE MAIN_ITEM=" & "'" & Combo1.Text & "'" D2.Refresh Do While Not D2.Recordset.EOF Combo2.AddItem D2.Recordset.Fields(1).Value D2.Recordset.MoveNext Loop End If End Sub Private Sub Combo2_Click() On Error Resume Next Dim A As Currency D2.RecordSource = "SELECT * FROM BAR1 WHERE MAIN_ITEM='" & Combo1.Text & "'" D2.Recordset.MoveFirst

D2.Refresh A = D2.Recordset.Fields("PRICE").Value List3.AddItem D2.Recordset.Fields("MEASURMENT").Value List1.AddItem Combo2.Text List2.AddItem A TXT4.Text = Val(TXT4.Text) + A End Sub

Private Sub Combo3_Click() On Error Resume Next Dim A As Currency D2.RecordSource = "SELECT * FROM BAR1 WHERE ITEM='" & Trim(Combo3.Text) & "'" D2.Refresh A = D2.Recordset.Fields("PRICE").Value List3.AddItem D2.Recordset.Fields("MEASURMENT").Value List1.AddItem Combo3.Text List2.AddItem A Text2.Text = Val(Text2.Text) + A End Sub

Private Sub Combo4_Click() On Error Resume Next

Dim A As Currency D2.RecordSource = "SELECT * FROM BAR1 WHERE ITEM='" & Trim(Combo4.Text) & "'" D2.Refresh A = D2.Recordset.Fields("PRICE").Value List3.AddItem D2.Recordset.Fields("MEASURMENT").Value List1.AddItem Combo4.Text List2.AddItem A Text2.Text = Val(Text2.Text) + A End Sub

Private Sub Combo5_Click() On Error Resume Next Dim A As Currency D2.RecordSource = "SELECT * FROM BAR1 WHERE ITEM='" & Trim(Combo5.Text) & "'" D2.Refresh A = D2.Recordset.Fields("PRICE").Value List3.AddItem D2.Recordset.Fields("MEASURMENT").Value List1.AddItem Combo5.Text List2.AddItem A Text2.Text = Val(Text2.Text) + A End Sub

Private Sub Combo6_Click() On Error Resume Next Dim A As Currency D2.RecordSource = "SELECT * FROM BAR1 WHERE ITEM='" & Trim(Combo6.Text) & "'" D2.Refresh A = D2.Recordset.Fields("PRICE").Value List3.AddItem D2.Recordset.Fields("MEASURMENT").Value List1.AddItem Combo6.Text List2.AddItem A Text2.Text = Val(Text2.Text) + A End Sub

Private Sub Command1_Click() On Error Resume Next D3.Recordset.AddNew D3.Recordset.Fields(0) = Text1.Text D3.Recordset.Fields(1) = TEXT3.Text D3.Recordset.Fields(2) = Combo1.Text D3.Recordset.Fields(3) = List1.Text D3.Recordset.Fields(4) = TXT4.Text For I = 0 To List1.ListCount - 1

Next D3.Recordset.Update Text1.Text = "" TEXT3.Text = "" Combo1.Clear Combo2.Clear List1.Clear List2.Clear List3.Clear End Sub

Private Sub Command2_Click() Unload Me INTRODUCTION.Show End Sub Private Sub EN_Click() INTRODUCTION.Show End Sub Private Sub Form_Activate() On Error Resume Next D2.RecordSource = "SELECT DISTINCT MAIN_ITEM FROM BAR1" D2.Refresh Do While Not D2.Recordset.EOF = True

If Not IsNull(D2.Recordset.Fields("MAIN_ITEM").Value) = True Then Combo1.AddItem D2.Recordset.Fields("MAIN_ITEM").Value End If D2.Recordset.MoveNext Loop Text1.Text = Date End Sub

Private Sub Form_Load() On Error Resume Next SAV.Enabled = False D3.DatabaseName = App.Path & "/" & "HMDATA1.MDB" D3.RecordSource = "SELECT * FROM BARBILLS" D2.DatabaseName = App.Path & "/" & "HMDATA1.MDB" Exit Sub Text1.Text = Date End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 32 Or KeyAscii = 8 Then Exit Sub Else KeyAscii = 0

End If End Sub

FORMS

LIMITATIONS
This project should not be run online Due to lack of resources this project should not be full fleged

CONCLUSION
After the completion of project can say that the project is repaying back the countless hour of my effort. After running the whole project and performing all the testing and debugging method this project is fulfilling the requirement of the client. This project also having the scope of future enhancement. At last one again to specify it very clearly that the project is fulfilling the requirement of the client.

BIBLIOGRAPHY

MICROSOFT VISUAL BASIC, By John w.penfold Galgotia,


publication PVT.LTD.

ADVANCED VISUAL BASIC By Black. VISUAL BASIC FOR WINDOWS 95 BYGary Cornall & Tata Macgraww.hill. PROGRAMMING IN VISUAL BASIC 6.0 By Jullia case Bradley,