Hotel Reservation Dctm

103
 MAHTMA GANDHI MISSION’S COLLEGE OF COMPUTER SCIENCE AND INFORMATION TECHINOLOGY (KAMOTHE, NAVI MUMBAI) A PROJECT REPORT ON HOTEL RESERVATION MANAGEMENT SYSTEM DEVELOPED BY VIVEKANAND BIDRI T.Y. B.Sc. (Computer Science) (2007-2008) Seat No: 15853 GUIDED BY Mrs. SUCHITA MASKE HOTEL RESERVATION MANAGEMENT SYSTEM

Transcript of Hotel Reservation Dctm

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 1/103

 

MAHTMA GANDHI MISSION’SCOLLEGE OF COMPUTER SCIENCE AND

INFORMATION TECHINOLOGY(KAMOTHE, NAVI MUMBAI)

A

PROJECT REPORT

ON

HOTEL RESERVATION MANAGEMENTSYSTEM

DEVELOPED BY

VIVEKANAND BIDRI

T.Y. B.Sc. (Computer Science)

(2007-2008)

Seat No: 15853

GUIDED BY

Mrs. SUCHITA MASKE

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 2/103

MAHTMA GANDHI MISSION’SCOLLEGE OF COMPUTER SCIENCE AND

INFORMATION TECHNOLOGY, KAMOTHE,

NAVI MUMBAINAVI MUMBAI - 410209.

CERTIFICATE

This is to certify that project work entitled , 

“HOTEL RESERVATION management SYSTEM”

is  Submitted by VIVEKANAND BIDRI In partial fulfillment of the

degree in B.Sc. Computer Science Of the Mumbai University for The

session 2007-2008.

He has worked under my supervision for the submission of this

 project, which to my knowledge has reached the requisite standards.

  _________________ _____

Head of Department Internal Guide

Mrs. CHAITALI GADEKAR Mrs. SUCHITA MASKE

  ________________ __________________ __________________ 

Principal External Examiner External Examiner

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 3/103

ACKNOWLEDGEMENT

 

It gives me great pleasure to present my project on,

“HOTEL RESERVATION MANAGEMENT SYSTEM” .

This is my first Milestone in B.Sc. with Computer Science.

I would like to give my thanks to our Principal and our in charge

Mrs. SUCHITA MASKE for her support and facilities provided tous for the project.

I would like to express my sincere thanks to all the

teachers. Who helped me throughout the project I would also like

to acknowledge the help and guidance provided by teachers in all

 places during the presentation of this project.

I would like to give my thanks to my all Friends & My

 parents for providing the great support.

DATE: - Developed by:-

PLACE: - KAMOTHE VIVEKANAND BIDRI

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 4/103

INDEX

SR.NO. CHAPTER NAME PAGE NO.

1 Gantt Chart.

2 Proposed System.

3 Hardware Specification.

4 Software Specification.

5 System Documentation.

5.1) Entity Relationship Diagram.

5.2) Data Flow Diagram.

A) Context Level Diagram.

B) 0th Level Diagram.

i) 0th Level DFD Fragment.

C) Level 1 Diagram.

D) Level 2 Diagram.

E) Level 3 Diagram.

F) Level 4 Diagram.

G) Level 5 Diagram.

5.3) Event Table.

5.4) System Flowcharts.

5.5) Structured Chart5.6) Menu Tree

5.7) Program List

5.8) Database Design

5.9)System Controls And Standard

5.10) Project Coding And Conventions

6 Program Documentation

a)Program ID

b)Program Level Pseudopodia

c)Test Datad)Test Results

7 Report

8 Conclusion

9 Future Enhancement

10 Bibliography

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 5/103

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

1♦ ♦ ♦ ♦

Gantt Chart

In This Chapter

1) Gantt chart

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 6/103

1.1) GANT CHART 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 7/103

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

2♦ ♦ ♦ ♦

ProposedSystem

In This Chapter :

1) Introduction

2) Features of Proposed System

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 8/103

 

2.1) INTRODUCTION

 

By the Computerization of this system all the records can

Be maintained easily.

Unlike the manual system particular record can be foundEasily .There is no need to maintain register.

Computerized system contains several forms for different

Purposes.

  It generates the Proper report of every stage of system.

The proposed system contain various report like Client Report,

Status Report, Room Rate Report etc.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 9/103

2.2) FEATURES OF THE

PROPOSED SYSTEM

  The search structure is used to find the entries of theDatabase from various fields which makes it more reliable

for viewing hierarchal information.

Time is saved due to faster access to records .

Validation is done at every level in the system.

 

This system is uses MS Access as database, which is strong

and secure database for proposed system.

The proposed system empowers the user with a new computer 

 based system by reducing the efforts of data maintenance.

The proposed developed according to the user specificationhence it is a user-centered system.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 10/103

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

3♦ ♦ ♦ ♦

Hardware

SpecificationIn This Chapter :

1) Minimum requirement

2) Drivers used

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 11/103

3.1) MINIMUM R REQUIREMENTS:

 1) Windows 98 Server runs with 12MB of RAM.

2) It doesn’t run until it has 16MB of RAM.

3) It doesn’t shine well until it has 32MB of RAM.

4) Minimum speed needed to run Windows NT is 486.

 

3.1) DRIVER USED:

  To access a database a suitable driver used is

“MICROSOFT ACCESS DRIVER”

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 12/103

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

4♦ ♦ ♦ ♦

Software

SpecificationIn This Chapter :

1) Minimum requirement

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 13/103

4.1) MINIMUM R EQUIREMENTS:

 

FRONT END:

VISUAL STUDIO 6.0

BACK END:

MS-ACCESS

 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 14/103

C H A P T E R 

5♦ ♦ ♦ ♦ ♦

SystemDocumentationIn This Chapter

 1) Entity Relationship Diagram

2) Data Flow Diagrami) Conventions of DFD

ii) Date Flow Diagram(DFD) in detailA). Context Level DiagramB). Zero Level DiagramC). Level One Diagram

DFD FragmentsD). Level Two DiagramE). Level Three DiagramF). Level Four DiagramG). Level Five Diagram

3) Event Table

4) System Chart5) Structure Chart

6) Menu Tree

7) Program List

8) Data Base Design

9) System Controls and Standards

10) Project Coding and Conventions

 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 15/103

5.1) ENTITY 

R ELATIONSHIP

DIAGRAM:

HOTEL RESERVATION MANAGEMENT SYSTEM

 Nam

e

Customer 

Rooms

Bill

Outsider  Employee

Pays

Borro

ws

ISA

 Nationalit

y

AgeGende

Addres

s

Room

 No

Type

 Name

 Name

 Nam

e

In-

Date

Out-

Date

Reservatio

n Date

Charge

User 

Generat

es

Room No  Nam

e Passwor 

d

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 16/103

5.2)  DATA FLOW DIAGRAM:

The DFD is short for Data Flow Diagram. It represents how

the data flows in the processes.

i) THE CONVENTIONS OF DFD :-

PROCESS

DATA FLOW

EXTERNAL AGENT

DATA STORE

 

Real-Time Link 

HOTEL RESERVATION MANAGEMENT SYSTEM

Rate

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 17/103

ii) DATA FLOW DIAGRAMS IN

DETAIL:

A). CONTEXT LEVEL DIAGRAM:

Room availability Inquiry Check room availability

Room availability Response Enter check-In and

Check-Out Details

 Room request

Generate Bills

Room Allotted

Edit Room Rates

Room Vacating Notice

Bill Provided Update Records

 

Add / Delete User and

 

HOTEL RESERVATION MANAGEMENT SYSTEM

Management

Hotel

Reservation

Management

System

Customer UserHotel

Reservation

Management

System

Customer User

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 18/103

B). ZERO LEVEL DIAGRAM:

Room Inquiry

Rooms

Status Confirmation

Room Request

Room

Allotment Confirmation

Enter Customer Details

Check Room Status

Room Status Details

Rooms

Room Vacating Notice

Bill Provided Clients

 

Generates Bill

Duplicate Bill Request

Clients

 

Duplicate Bill Provided

Edits Room Rates

Acknowledgement

Rate

Edit Room Rates Notice

Confirmation

HOTEL RESERVATION MANAGEMENT SYSTEM

Customer

1

Look Up Room

Availability

User

3

Room Vacating

4

Duplicate Bill

Generation

5

Edit Room Rates

Management

2

Room Booking /Reservation

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 19/103

B.I) DFD Fragment 1

 

Room Inquiry

Rooms

Status Confirmation

B.II) DFD Fragment 2

Customer Details +

Room Specification

Rooms

 

Confirmation

B.III) DFD Fragment 3

 

Rooms

Clients

HOTEL RESERVATION MANAGEMENT SYSTEM

Customer 1

Look Up Room

Availability

Customer2

Room Booking /Reservation

Customer 3

Room Vacating

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 20/103

B.III) DFD Fragment 4

Customer Details

Clients

Bill Provided

B.III) DFD Fragment 5

New Rates

Rate

Confirmation

HOTEL RESERVATION MANAGEMENT SYSTEM

Customer

4

Duplicate Bill

Generation

5

Edit Room Rates

Management

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 21/103

C). LEVEL ONE DIAGRAM:

Look Up Room Availability

 

Feedback 

Rooms

 

HOTEL RESERVATION MANAGEMENT SYSTEM

User

 

1.3

Check 

Availability

1.4

Room Status 

Details

Customer

 

1.2

Room 

Specification

1.1

Room Inquire

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 22/103

D). LEVEL TWO DIAGRAM:

Room Booking / Reservation

  Confirmation

 

Rooms

HOTEL RESERVATION MANAGEMENT SYSTEM

User

 

2.2

Record

Customer

Details

Customer

  2.3

Allot Room

2.1

Room Request

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 23/103

E). LEVEL THREE DIAGRAM:

Room Vacating

Bill Provided

Clients

Rooms

Customer

Records

Check Out Date

HOTEL RESERVATION MANAGEMENT SYSTEM

User

 

3.2

Update Record

Customer

  3.3

Generate Bill

3.1

Room Vacating

Notice

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 24/103

F). LEVEL FOUR DIAGRAM:

Duplicate Bill Request

Bill Provided

Clients

 

Details

 

HOTEL RESERVATION MANAGEMENT SYSTEM

User

 

4.2

Take Customer

Details

Customer

  4.3

Generate Bill

4.1

Bill Request

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 25/103

G). LEVEL FIVE DIAGRAM:

Edit Room Rates

New Room Rates Report

Rate

 New Rates

HOTEL RESERVATION MANAGEMENT SYSTEM

User

 

5.2

Edit Room

Rates

Management

 5.3

Generate

Report

5.1

Edit Room

Rates Notice

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 26/103

5.3) EVENT TABLE:

EVENT TRIGGER SOURCE ACTIVITY RESPONSE DESTINATI

ON

Customer wants to

know roomavailability

Room

Enquire

Customer Look up for  

roomavailability

Room

availabilitydetails.

Customer 

Room request

 placed

Check-In /

Reservation

Customer Room

Allotment

Allotment

confirmation

Allotment

Details

Customer 

Status DataBase

Customer wants to

VacantRoom

Check-Out Customer Room

Deallotment

Deallotment

confirmation

Bill generated

Check-Out

Details Entry

Customer 

Customer 

MasterList

database,

Status DataBase

Managementdecides to change

room rates

Edit Roomrates

Management Room ratesChanged

Confirmationof Changes

Made

Rooms DataBase

Managementdecides to

add/delete User 

Edit User Management User added/Deleted

Confirmation Existing DataBase

Customer Request

for Duplicate Bill

Duplicate

Bill Request

Customer Duplicate

BillGenerated

Duplicate Bill

 printed

Customer 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 27/103

5.4). SYSTEM

FLOWCHART:

HOTEL RESERVATION MANAGEMENT SYSTEM

MasterListClients Detail

Client Master

List Report

Status  Room Status

Room Status

Report

Rooms  Room Rate Room Rate

Report

MasterList

Customer

Details Bill

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 28/103

5.5). STRUCTURE CHART:

Room

Type Room No Customer

Information

HOTEL RESERVATION MANAGEMENT SYSTEM

Hotel Reservation ManagementSystem

Rooms Rates

Inquire

Know user Requirement

Room

Booking

Record

Customer Information

Generate Bill

Room

VacationEdit Rates

 New Rates

Add / Delete

User 

User Details

User Name Password

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 29/103

5.6). MENU TREE: 

MENU TREE

  AUTHENTICATION 

USER ACCESS

LOGIN USERS

CHANGE PASSWORD

LOG OFF

EXIT

MENU CARD

ADD

VIEW

ORDERS

  CUSTOMER DETAILS

ORDER DETAILS

 

ROOM RATES

REPORTS

CLIENT MASTER LIST

ROOM STATUS

ROOM RATESBILL

 

ABOUT US

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 30/103

5.7). PROGRAM LIST:

SR NO.

FORM NAME DESCRIPTION

1 frmSplash.frm A Splash Form

2 frmlogin.frm Login form

3 frmMain.frm Main (MDI) form where all links available

4 frmStanSingle.frm Standard Single Room Transaction Form.

5 frmStanDouble.frm Standard Double Room Transaction Form.

6 frmVipSingle.frm V.I.P Single Room Transaction Form.

7 frmVipDouble.frm V.I.P Double Room Transaction Form.

8 frmFamilyDouble.frm Family Double Room Transaction Form.

9 frmFamilyTriple.frm Family Triple Room Transaction Form.

10 frmMasterList.frm Client Master List Form.

11 frmRooms.frm Room Status Form.

12 frmAdminSecurity.frm System Security Form.

13 frmAdministrator.frm Add, Delete – User and Change Room Rate

Form.

14 frmAbout.frm Info. About system

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 31/103

5.8). DATABASE DESIGN:

 

TABLE 1 :- Users 

Description :- This table stores the information about the

users of System.

FIELD

NAME

DATATYPE DESCRIPTION

Username Text Store Name of Users

Password Text Store Password Of Users

TABLE 2:- Rates

Description :- This table stores the information about the

Rates of different types of Rooms.

FIELD

NAME

DATATYPE DESCRIPTION

Type Text Tells the type of Room is.

PerDay Text Stores the cost of Per Day for specific

Type of Room.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 32/103

TABLE 3:- Status

Description :- This table stores the information about the State of 

Rooms along with Active Customers Details, Check-In, Check-Out Date,

Total Charge etc.

FIELD

NAME

DATATYPE DESCRIPTION

RoomNumber Text Stores Room Number.

Name Text Stores Name of the Customer.

Address Text Stores Address of the Customer.

Age Text Stores age of the Customer.

Gender Text Stores Gender of the user.

Nationality Text Stores Nationality of the

Customer.

DateReserved Text Stores Date of Reservation of  

Room

DateIn Text Stores Date of Check In.

DateOut Text Stores Date of Check Out.

DaysIncurred Text Stores No of Days Stayed.

Status Text Stores Status of the Room.

Charge Text Stores Total Charge of Room.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 33/103

TABLE 4:- CustomerRecord

Description: - This table stores the Information of all those

Customer who have stayed in the Hotel.

FIELD

NAME

DATATYPE DESCRIPTION

RoomNumber Text Stores Room Number.

Name Text Stores Name of the Customer.

Address Text Stores Address of the Customer.

Age Text Stores age of the Customer.

Gender Text Stores Gender of the user.

Nationality Text Stores Nationality of the

Customer.

DateReserved Text Stores Date of Reservation of  

Room

DateIn Text Stores Date of Check In.

DateOut Text Stores Date of Check Out.

DaysIncurred Text Stores No of Days Stayed.

Status Text Stores Status of the Room.

Charge Text Stores Total Charge of Room.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 34/103

5.9). SYSTEM CONTROLS AND

STANDARDS:

11.1). Access Control:-

 My System gives access by accepting valid password only.

11.2). Input Control :-

 

• System validates every textbox. It allows entering textual values

for textual fields.

• It allows entering numeric values for numeric fields.

• Some allows both numeric and textual Values to meet the

Requirement of System.

 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 35/103

5.10). PROJECT CODING AND

CONVENTIONS:

This document discusses Common Coding Conventions and naming techniques used for 

Database designing (backend) i.e. Microsoft Access and from design layout (front-end)

i.e. for Visual Basic 6.0.

NAMING CONVENTIONSThe most important rule in naming is that are long enough and as descriptive as

 possible. Especially in a large project containing several modules the name should be

made carefully to avoid conflicts between modules. For that reason too short and general

names should be avoided when naming public identifiers of a module.

TABLE NAME

The table Name must have a unique name via which it can be referred to after its

creation.

The table name should not contain any space; underscore can be given instead of 

spaces.

Table name should not contain any special symbol.

The table name should be provided with descriptive names as far as possible.

FOR eg: EmpMaster

This clearly indicates that it contains information of the employee.

COMMENTING CONTROL STRUCTURES

All control statements should have a comment at the start.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 36/103

If it is an ‘if or a case’ statement you can provide the reason for the decision and

the summary of the outcome.

If it is a loop, you can indicate the purpose of the loop.

NAMING CONVENTIONS FOR VISUAL BASIC FORM

NAME OF THE PROJECT

  The name of the projects should reflect the contents of the project and should be

saved with a “*.vbp” extension. The name could be more than 10 characters long and a

mixture of small case and upper case letters. They cannot include any special symbols

except for an underscore i.e. “_”

Eg: SmartSoft_vb_1.vbp

NAME OF THE MODULE

The name of the module should reflect the contents of the module. It should be saved

with a “*.bas” extension. They cannot include any special symbols except for an

underscore i.e.”_”

NAME OF THE FORM

  The name of the form should reflect the contents of the project and should be saved

with a “*.frm” extension. The name could be more than 10 characters long and a mixture

of small case and upper case letters. They cannot include any special symbols except for 

an underscore i.e.”_”

Eg: frmEmpMaster.frm

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 37/103

1. FORM

The name of the form should reflect the contents of the form making it easy to

recognize.

The first alphabet of the form should be capital letter followed by small letters, if 

the form name comprises of two words then first letter of both the words should

 be capital.

The form should be saved with “*.frm” extension.

They cannot include any special symbols except for an underscore i.e.”_”

  Eg: frmXXX i.e. frmEmpMaster.frm

  2. COMMAND BUTTON

The command buttons should be named with a keyword “cmd” preceding the

name of the button making it easier to understand that we are referring to a

command button.

The first letter of the command button name after the keyword should be capital.

They cannot include any special symbol except for an underscore i.e.”_”

Eg: CmdXXX i.e. CmdAaa

  3. LABELS

The labels should be named with a keyword “lbl” preceding the name of the label

making it easier to understand that we are referring to a label.

The first letter of the label name after the keyword should be capital.

They cannot include any special symbols except for an underscore i.e.”_”

  4. TEXTBOX

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 38/103

The textbox should be named with a keyword “txt” preceding the name of the

textbox making it easier to understand that we are referring to a textbox.

The first letter of the textbox name after the keyword should be capital.

They cannot include any special symbols except for an underscore i.e.”_”

Eg: txtXXX i.e. txtCmpName

  5. FRAMES

The frames should be named with a keyword”fra” preceding the name of the

frame making it easier to understand that we are referring to a textbox.

The first letter of the frame name after the keyword should be capital.

They cannot include any special symbols except for an underscore i.e. “_”

Eg: fraXXX i.e. fraSmartSoft

6. COMBO BOX

The combo box should be named with a keyword “cmb” or "cbo" preceding the

name of the combo box making it easier to understand that we are referring to a

listbox.

The first letter of the frame name after the keyword should be capital.

They cannot include any special symbols except for an underscore i.e. “_”

Eg: cmbCmpName cboProducts

  NOTE : By default the names of all the properties of the form elements are

 beginning with the capital letter.

  7. NAMING FOR VARIABLES AND CONSTANTS

Identifiers must be meaningful. Chose a name that identifies its purpose.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 39/103

Do not abbreviate names unless the meaning is very obvious.

Do not use very short identifiers.

Precede each identifier with a lowercase prefix that specifies the data type.

It is similar to the convention we have adopted for naming form elements.Eg: Dim strname as string

Dim age as Integer

Capitalize each word of the name following the prefix.

 Never use all uppercase.

Declare constants using the keyword “const”. Its value cannot be changed.

They cannot include any special symbols except for an underscore i.e.”_”Eg: Const strCompanyName as string=”R”

Const curSales as currency=.095

NOTE

By default the names of all the properties of the variables and constants are

 beginning with a capital letter.

8. MENUS

While declaring menu name we follow the usual convention where before the

menu element name field we have a keyword “mnu” preceded by the name.

Eg: mnuOpenMain

9. TABLE NAME

The table name must have a unique name via when it can be referred to after its

creation.

The table name should not contain any space. Underscore can be given instead of 

space.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 40/103

Table name should not contain any special symbol.

e.g tblCustdetails or Client

 

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

6♦ ♦ ♦ ♦ ♦

Program

DocumentationIn This Chapter

1) Program ID

2) Program level pseudopodia3) Text data

4) Text results

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 41/103

Design Section

1) Splash Form

This is the introductory form which just appears while loading the program

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 42/103

2) Login Form

This form is used to gain access to the system by entering the user name and

 password given to the user 

As soon as you put your correct login name and password you can get the control

to use the software

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 43/103

3) MDI Form

This form gives the control to handle all the operations regarding subscriber details

storage and knowing the issues released subscription end

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 44/103

4) Standard Single Room Form

Enables the user to Reserve, Allot and Deallot the rooms.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 45/103

5) Room Status Form

Enables the user to know the Status of the Rooms

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 46/103

6) Customers MasterList Form

Displays list of all the Customers.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 47/103

7) Administrator Utility Wizard Form

Enables User/Administrator to edit the Room rates or Add/Delete User.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 48/103

8) About Form

Describes the System Objective in brief.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 49/103

Coding Section

 MDI Form :

'====================================================='Program Name : frmMain.frm

'Description : Main Form'Developed By : Vivekanand Bidri

'Date :

'Issue/Version : 1.0'=====================================================

Dim rs As ADODB.Recordset

Private Sub MDIForm_Load()

Top = 0 'Properties of the Form are Re-Set to new values.Left = 0Call ConnectDB

End Sub

Private Sub mStanSingle_Click()

frmStanSingle.Show 'Form: frmStanSingle frmStanSingle will be Displayed

End Sub

Private Sub mStanDouble_Click()

frmStanDouble.Show 'Form: frmStanDouble will be Displayed

End Sub

Private Sub mVipSingle_Click()

frmVipSingle.Show 'Form: frmVipSingle will be DisplayedEnd Sub

Private Sub mVipDouble_Click()frmVipDouble.Show 'Form: frmVipDouble will be Displayed

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 50/103

End Sub

Private Sub mFamilyDouble_Click()frmFamilyDouble.Show 'Form: frmFamilyDouble will be Displayed

End Sub

Private Sub mFamilyTriple_Click()frmFamilyTriple.Show 'Form: frmFamilyTriple will be Displayed

End Sub

Private Sub mExit_Click()

If MsgBox("You are about to quit this application. Are you sure?", vbOKCancel +

vbInformation, "Confirm Logoff") = vbOK Then

EndElse

Exit Sub

End If 

End Sub

Private Sub mClients_Click()frmMasterList.Show 'Form: frmMasterList will be Displayed

End Sub

Private Sub mRoomStat_Click()frmRooms.Show 'Form: frmRooms will be Displayed

End Sub

Private Sub mSecurity_Click()

frmAdminSecurity.Show 'Form: frmAdminSecurity will be Displayed

End Sub

Private Sub mRoomRates_Click()

frmAdminSecurity.Show 1 'Form: frmAdminSecurity will be DisplayedEnd Sub

Private Sub mmaster_Click()

DRCustRecord.Show 'DataReport: DRCustRecord will be DisplayedEnd Sub

Private Sub mstatus_Click()DRRoomStatus.Show 'DataReport: DRRoomStatus will be Displayed

End Sub

Private Sub mroomrate_Click()

DRRoomRates.Show 'DataReport: DRRoomRates will be Displayed

End Sub

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 51/103

Private Sub mAbout_Click()

frmAbout.Show 'Form: frmAbout will be Displayed

End Sub

Private Sub Timer1_Timer()

lblDate.Caption = Format(Date, "mmmm dd, yyyy")lblTime.Caption = Format(Time, "hh:dd:ss am/pm")

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

Select Case Button.Index

Case 1

frmStanSingle.Show 'Form: frmStanSingle Will be DisplayedfrmStanDouble.Show 'Form: frmStanDouble Will be Displayed

Case 2

frmVipSingle.Show 'Form: frmVipSingle Will be Displayed

frmVipDouble.Show 'Form: frmVipDouble Will be DisplayedCase 3

frmFamilyDouble.Show 'Form: frmFamilyDouble Will be DisplayedfrmFamilyTriple.Show 'Form: frmFamilyTriple Will be Displayed

Case 4

frmMasterList.Show 'Form: frmMasterList Will be Displayed

Case 5frmRooms.Show 'Form: frmRooms Will be Displayed

Case 6

frmAdminSecurity.Show 0 'Form: frmAdminSecurity Will be DisplayedCase 7

frmAbout.Show 'Form: frmAbout Will be Displayed

Case 8If MsgBox("You are about to quit this application. Are you sure?", vbOKCancel +

vbInformation, "Confirm Logoff") = vbOK Then

End 'System will be Closed.Else

Exit Sub

End If 

End SelectEnd Sub

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 52/103

Standard Single Room Form :

'=====================================================

'Program Name : frmStanSingle.frm'Description : Deals with Standard Single Rooms

'Developed By : Vivekanand Bidri

'Date :'Issue/Version : 1.0

'=====================================================

Dim rs1 As ADODB.Recordset

Dim rs2 As ADODB.Recordset

Dim rs3 As ADODB.RecordsetDim rsCR As ADODB.Recordset

Dim rsR As ADODB.Recordset

Private Sub Form_Load()Height = 6750 'Properties of the Form are set to new values

Top = 1300

Left = 400SSTab1.Tab = 0

Call ConnectDB 'Connection will be established with the Database to enable

information transectionEnd Sub

Private Sub cmdGbill1_Click()

'bill will be generated for the Customer who used Room with Room No: 1

 bill.Sections("Section2").Controls.Item("lblName").Caption = txtName1.Text

 bill.Sections("Section2").Controls.Item("lblAdd").Caption = txtAddress1.Text bill.Sections("Section2").Controls.Item("lblRUsed").Caption = " Room No : 1"

 bill.Sections("Section2").Controls.Item("lblRes").Caption = lblDateReserved1

 bill.Sections("Section2").Controls.Item("lblDI").Caption = lblDaysIncurred1 & " Day(s)"

 bill.Sections("Section2").Controls.Item("lblChkIn").Caption = lblDateIn1 bill.Sections("Section2").Controls.Item("lblChkOut").Caption = lblDateOut1

 bill.Sections("Section2").Controls.Item("lblBill").Caption = "Rs " & lblCharge1 &

"Only" bill.Show

End Sub

Private Sub cmdGbill2_Click()

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 53/103

'bill will be generated for the Customer who used Room with Room No: 2

 bill.Sections("Section2").Controls.Item("lblName").Caption = txtName2.Text bill.Sections("Section2").Controls.Item("lblAdd").Caption = txtAddress2.Text

 bill.Sections("Section2").Controls.Item("lblRUsed").Caption = " Room No : 2"

 bill.Sections("Section2").Controls.Item("lblRes").Caption = lblDateReserved2 bill.Sections("Section2").Controls.Item("lblDI").Caption = lblDaysIncurred2 & " Day(s)"

 bill.Sections("Section2").Controls.Item("lblChkIn").Caption = lblDateIn2

 bill.Sections("Section2").Controls.Item("lblChkOut").Caption = lblDateOut2 bill.Sections("Section2").Controls.Item("lblBill").Caption = "Rs " & lblCharge2 &

"Only"

 bill.Show

End Sub

Private Sub cmdGbill3_Click()

'bill will be generated for the Customer who used Room with Room No: 3

 bill.Sections("Section2").Controls.Item("lblName").Caption = txtName3.Text

 bill.Sections("Section2").Controls.Item("lblAdd").Caption = txtAddress3.Text bill.Sections("Section2").Controls.Item("lblRUsed").Caption = " Room No : 3"

 bill.Sections("Section2").Controls.Item("lblRes").Caption = lblDateReserved3

 bill.Sections("Section2").Controls.Item("lblDI").Caption = lblDaysIncurred3 & " Day(s)"

 bill.Sections("Section2").Controls.Item("lblChkIn").Caption = lblDateIn3 bill.Sections("Section2").Controls.Item("lblChkOut").Caption = lblDateOut3

 bill.Sections("Section2").Controls.Item("lblBill").Caption = "Rs " & lblCharge3 &

"Only" bill.Show

End Sub

Private Sub Timer1_Timer()

'************************* Room 1 ****************************

'set the controls of Room 1 tab to there desire state

Set rs1 = New ADODB.Recordset

rs1.Open "select * from Status where RoomNumber=1", con1, adOpenDynamic,

adLockOptimisticWith rs1

RStatus = .Fields("Status")

End With

SSTab1.TabCaption(0) = "Room 1" & " [" & RStatus & "]"

If RStatus = "Available" ThenToolbar1.Buttons(1).Enabled = False

Toolbar1.Buttons(2).Enabled = False

Toolbar1.Buttons(3).Enabled = False

Toolbar1.Buttons(4).Enabled = True

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 54/103

Toolbar1.Buttons(5).Enabled = False

ElseIf RStatus = "Reserved" Then

Toolbar1.Buttons(1).Enabled = FalseToolbar1.Buttons(2).Enabled = True

Toolbar1.Buttons(3).Enabled = False

Toolbar1.Buttons(4).Enabled = FalseToolbar1.Buttons(5).Enabled = True

 

With rs1txtName1 = .Fields("Name")

txtAddress1 = .Fields("Address")

txtAge1 = .Fields("Age")

cmdGender1 = .Fields("Gender")txtNationality1 = .Fields("Nationality")

lblDateReserved1 = .Fields("DateReserved")

End With

ElseIf RStatus = "Using" ThenToolbar1.Buttons(1).Enabled = False

Toolbar1.Buttons(2).Enabled = FalseToolbar1.Buttons(3).Enabled = True

Toolbar1.Buttons(4).Enabled = False

Toolbar1.Buttons(5).Enabled = True

 With rs1

txtName1 = .Fields("Name")

txtAddress1 = .Fields("Address")txtAge1 = .Fields("Age")

cmdGender1 = .Fields("Gender")

txtNationality1 = .Fields("Nationality")lblDateReserved1 = .Fields("DateReserved")

lblDateIn1 = .Fields("DateIn")

RStatus = .Fields("Status")End With

ElseIf RStatus = "Out" Then

Toolbar1.Buttons(1).Enabled = FalseToolbar1.Buttons(2).Enabled = False

Toolbar1.Buttons(3).Enabled = False

Toolbar1.Buttons(4).Enabled = TrueToolbar1.Buttons(5).Enabled = False

 

With rs1txtName1 = .Fields("Name")

txtAddress1 = .Fields("Address")

txtAge1 = .Fields("Age")

cmdGender1 = .Fields("Gender")

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 55/103

txtNationality1 = .Fields("Nationality")

lblDateReserved1 = .Fields("DateReserved")

lblDateIn1 = .Fields("DateIn")lblDateOut1 = .Fields("DateOut")

lblDaysIncurred1 = .Fields("DaysIncurred")

lblCharge1 = .Fields("Charge")End With

End If 

rs1.CloseTimer1.Enabled = False

End Sub

Private Sub Timer2_Timer()'************************* Room 2 ****************************

'set the controls of Room 2 tab to there desire state

Set rs2 = New ADODB.Recordsetrs2.Open "select * from Status where RoomNumber=2", con1, adOpenDynamic,

adLockOptimisticWith rs2

RStatus = .Fields("Status")

End With

SSTab1.TabCaption(1) = "Room 2" & " [" & RStatus & "]"

If RStatus = "Available" Then

Toolbar2.Buttons(1).Enabled = FalseToolbar2.Buttons(2).Enabled = False

Toolbar2.Buttons(3).Enabled = False

Toolbar2.Buttons(4).Enabled = TrueToolbar2.Buttons(5).Enabled = False

 

ElseIf RStatus = "Reserved" ThenToolbar2.Buttons(1).Enabled = False

Toolbar2.Buttons(2).Enabled = True

Toolbar2.Buttons(3).Enabled = False

Toolbar2.Buttons(4).Enabled = FalseToolbar2.Buttons(5).Enabled = True

 

With rs2

txtName2 = .Fields("Name")

txtAddress2 = .Fields("Address")txtAge2 = .Fields("Age")

cmdGender2 = .Fields("Gender")

txtNationality2 = .Fields("Nationality")

lblDateReserved2 = .Fields("DateReserved")

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 56/103

End With

ElseIf RStatus = "Using" Then

Toolbar2.Buttons(1).Enabled = FalseToolbar2.Buttons(2).Enabled = False

Toolbar2.Buttons(3).Enabled = True

Toolbar2.Buttons(4).Enabled = FalseToolbar2.Buttons(5).Enabled = True

 

With rs2

txtName2 = .Fields("Name")

txtAddress2 = .Fields("Address")

txtAge2 = .Fields("Age")cmdGender2 = .Fields("Gender")

txtNationality2 = .Fields("Nationality")

lblDateReserved2 = .Fields("DateReserved")

lblDateIn2 = .Fields("DateIn")RStatus = .Fields("Status")

End With

ElseIf RStatus = "Out" Then

Toolbar2.Buttons(1).Enabled = False

Toolbar2.Buttons(2).Enabled = FalseToolbar2.Buttons(3).Enabled = False

Toolbar2.Buttons(4).Enabled = True

Toolbar2.Buttons(5).Enabled = False 

With rs2

txtName2 = .Fields("Name")txtAddress2 = .Fields("Address")

txtAge2 = .Fields("Age")

cmdGender2 = .Fields("Gender")txtNationality2 = .Fields("Nationality")

lblDateReserved2 = .Fields("DateReserved")

lblDateIn2 = .Fields("DateIn")

lblDateOut2 = .Fields("DateOut")lblDaysIncurred2 = .Fields("DaysIncurred")

lblCharge2 = .Fields("Charge")

End WithEnd If 

rs2.Close

Timer2.Enabled = FalseEnd Sub

Private Sub Timer3_Timer()

'************************* Room 3 ****************************

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 57/103

'set the controls of Room 3 tab to there desire state

Set rs3 = New ADODB.Recordsetrs3.Open "select * from Status where RoomNumber=3", con1, adOpenDynamic,

adLockOptimistic

With rs3

RStatus = .Fields("Status")

End With 

SSTab1.TabCaption(2) = "Room 3" & " [" & RStatus & "]"

If RStatus = "Available" Then

Toolbar3.Buttons(1).Enabled = FalseToolbar3.Buttons(2).Enabled = False

Toolbar3.Buttons(3).Enabled = False

Toolbar3.Buttons(4).Enabled = True

Toolbar3.Buttons(5).Enabled = False 

End If If RStatus = "Reserved" Then

Toolbar3.Buttons(1).Enabled = False

Toolbar3.Buttons(2).Enabled = True

Toolbar3.Buttons(3).Enabled = FalseToolbar3.Buttons(4).Enabled = False

Toolbar3.Buttons(5).Enabled = True

 

With rs3

txtName3 = .Fields("Name")txtAddress3 = .Fields("Address")

txtAge3 = .Fields("Age")

cmdGender3 = .Fields("Gender")txtNationality3 = .Fields("Nationality")

lblDateReserved3 = .Fields("DateReserved")

End With

End If If RStatus = "Using" Then

Toolbar3.Buttons(1).Enabled = False

Toolbar3.Buttons(2).Enabled = FalseToolbar3.Buttons(3).Enabled = True

Toolbar3.Buttons(4).Enabled = False

Toolbar3.Buttons(5).Enabled = True 

With rs3

txtName3 = .Fields("Name")

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 58/103

txtAddress3 = .Fields("Address")

txtAge3 = .Fields("Age")

cmdGender3 = .Fields("Gender")txtNationality3 = .Fields("Nationality")

lblDateReserved3 = .Fields("DateReserved")

lblDateIn3 = .Fields("DateIn")RStatus = .Fields("Status")

End With

End If If RStatus = "Out" Then

Toolbar3.Buttons(1).Enabled = False

Toolbar3.Buttons(2).Enabled = False

Toolbar3.Buttons(3).Enabled = FalseToolbar3.Buttons(4).Enabled = True

Toolbar3.Buttons(5).Enabled = False

With rs3

txtName3 = .Fields("Name")txtAddress3 = .Fields("Address")

txtAge3 = .Fields("Age")cmdGender3 = .Fields("Gender")

txtNationality3 = .Fields("Nationality")

lblDateReserved3 = .Fields("DateReserved")

lblDateIn3 = .Fields("DateIn")lblDateOut3 = .Fields("DateOut")

lblDaysIncurred3 = .Fields("DaysIncurred")

lblCharge3 = .Fields("Charge")End With

End If 

Timer3.Enabled = Falsers3.Close

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

'Deals with transection of information related with Room No: 1 , from form to Database

and vice versa.

Set rsR = New ADODB.RecordsetrsR.Open "select * from Rates where Type='StandardSingle'", con1, adOpenDynamic,

adLockOptimistic

Select Case Button.Index

'***** Reserve *****

Case 1If txtName1 = "" Or _ 

txtAddress1 = "" Or _ 

txtAge1 = "" Or _ 

txtNationality1 = "" Then

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 59/103

MsgBox "Please fill in the form properly", vbInformation, "Form Error"

txtName1.SetFocus

Exit SubElse

lblDateReserved1 = Format(Date, "mmmm dd, yyyy")

Set rs1 = New ADODB.Recordsetrs1.Open "select * from Status where RoomNumber=1", con1, adOpenDynamic,

adLockOptimistic

With rs1.Fields("Name") = txtName1

.Fields("Address") = txtAddress1

.Fields("Age") = txtAge1

.Fields("Nationality") = txtNationality1

.Fields("DateReserved") = lblDateReserved1

.Fields("Gender") = cmdGender1

.Fields("Status") = "Reserved"

.Fields("DateIn") = "".Fields("DateOut") = ""

.Fields("I") = Format(Date, "y")

.Fields("Charge") = "0.0"

.Fields("DaysIncurred") = ""

.Update

.CloseEnd With

Set rs1 = New ADODB.Recordset

rs1.Open "select * from Status where RoomNumber=1", con1, adOpenDynamic,adLockOptimistic

rs1.Close

Timer1.Enabled = TruefrmRooms.Show

End If 

 '***** Check In *****

Case 2

If txtName1 = "" Or _ 

txtAddress1 = "" Or _ txtAge1 = "" Or _ 

txtNationality1 = "" Then

MsgBox "Please fill in the form properly", vbInformation, "Form Error"txtName1.SetFocus

Exit Sub

ElselblDateIn1 = Format(Date, "mmmm dd, yyyy")

Set rs1 = New ADODB.Recordset

rs1.Open "select * from Status where RoomNumber=1", con1,

adOpenDynamic, adLockOptimistic

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 60/103

With rs1

.Fields("Name") = txtName1

.Fields("Address") = txtAddress1

.Fields("Age") = txtAge1

.Fields("Nationality") = txtNationality1

.Fields("DateReserved") = lblDateReserved1.Fields("Gender") = cmdGender1

If .Fields("Status") = "Reserved" Then

Else.Fields("I") = Format(Date, "y")

End If 

.Fields("Status") = "Using"

.Fields("DateIn") = lblDateIn1

.Fields("DateOut") = ""

.Fields("Charge") = "0.0"

.Fields("DaysIncurred") = ""

.Update.Close

End WithSet rs1 = New ADODB.Recordset

rs1.Open "select * from Status where RoomNumber=1", con1,

adOpenDynamic, adLockOptimistic

rs1.CloseTimer1.Enabled = True

frmRooms.Show

End If  

'***** Check Out *****

Case 3lblDateOut1 = Format(Date, "mmmm dd, yyyy")

ODate = Format(Date, "y")

Set rs1 = New ADODB.Recordsetrs1.Open "select * from Status where RoomNumber=1", con1, adOpenDynamic,

adLockOptimistic

With rs1

DI = .Fields("I")End With

Charge = ODate - DI + 1

 With rsR 

rSS = .Fields("PerDay")

End With 

lblDaysIncurred1 = Charge

Charge = Charge * rSS

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 61/103

lblCharge1 = Charge

With rs1

.MoveLast

.Fields("Name") = txtName1

.Fields("Address") = txtAddress1

.Fields("Age") = txtAge1.Fields("Gender") = cmdGender1

.Fields("Nationality") = txtNationality1

.Fields("DateReserved") = lblDateReserved1

.Fields("DateIn") = lblDateIn1

.Fields("DateOut") = lblDateOut1

.Fields("DaysIncurred") = lblDaysIncurred1

.Fields("Charge") = Charge

.Fields("Status") = "Out"

.Update

End With

rs1.CloseSet rsCR = New ADODB.Recordset

rsCR.Open "select * from CustomerRecord", con1, adOpenDynamic,adLockOptimistic

With rsCR 

If .EOF = False Then

.MoveLastEnd If 

.AddNew

.Fields("RoomNUmber") = "1"

.Fields("RoomType") = "Standard [Single]"

.Fields("Name") = txtName1

.Fields("Address") = txtAddress1

.Fields("Age") = txtAge1

.Fields("Gender") = cmdGender1

.Fields("Nationality") = txtNationality1

.Fields("DateReserved") = lblDateReserved1

.Fields("DateIn") = lblDateIn1

.Fields("DateOut") = lblDateOut1

.Fields("DaysIncurred") = lblDaysIncurred1

.Fields("RatePerDay") = rSS

.Fields("Charge") = Charge

.UpdateEnd With

rsCR.Close

Timer1.Enabled = TruefrmRooms.Show

cmdGbill1.Enabled = True

'***** New *****

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 62/103

Case 4

frRoom1.Enabled = True

Toolbar1.Buttons(1).Enabled = TrueToolbar1.Buttons(2).Enabled = True

Toolbar1.Buttons(4).Enabled = False

Toolbar1.Buttons(5).Enabled = FalsetxtName1.SetFocus

 

Set rs1 = New ADODB.Recordsetrs1.Open "select * from Status where RoomNumber=1", con1, adOpenDynamic,

adLockOptimistic

With rs1

If .Fields("name") <> "" Then.Fields("Name") = ""

.Fields("Address") = ""

.Fields("Age") = ""

.Fields("Gender") = "".Fields("Nationality") = ""

.Fields("DateReserved") = ""

.Fields("DateIn") = ""

.Fields("DateOut") = ""

.Fields("DaysIncurred") = ""

.Fields("Charge") = "0.0"

.Fields("I") = ""

.Fields("Status") = "Using"

.Update 

txtName1 = .Fields("Name")

txtAddress1 = .Fields("Address")txtAge1 = .Fields("Age")

cmdGender1 = .Fields("Gender")

txtNationality1 = .Fields("Nationality")lblDateReserved1 = .Fields("DateReserved")

lblDateIn1 = .Fields("DateIn")

lblDateOut1 = .Fields("DateOut")

lblDaysIncurred1 = ""lblCharge1 = .Fields("Charge")

End If 

End Withrs1.Close

cmdGbill1.Enabled = False

 

'****** Cancel *****

Case 5

 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 63/103

Set rs1 = New ADODB.Recordset

rs1.Open "select * from Status where RoomNumber=1", con1, adOpenDynamic,

adLockOptimisticWith rs1

.Fields("Name") = ""

.Fields("Address") = "".Fields("Age") = ""

.Fields("Gender") = ""

.Fields("Nationality") = ""

.Fields("DateReserved") = ""

.Fields("DateIn") = ""

.Fields("I") = ""

.Fields("Status") = "Available"

.Fields("DaysIncurred") = ""

.Fields("DateOut") = ""

.Fields("Charge") = ""

.Update.Close

End WithSet rs1 = New ADODB.Recordset

rs1.Open "select * from Status where RoomNumber=1", con1, adOpenDynamic,

adLockOptimistic

With rs1txtName1 = .Fields("Name")

txtAddress1 = .Fields("Address")

txtAge1 = .Fields("Age")cmdGender1 = .Fields("Gender")

txtNationality1 = .Fields("Nationality")

lblDateReserved1 = .Fields("DateReserved")lblDateIn1 = .Fields("DateIn")

lblDateOut1 = .Fields("DateOut")

lblDaysIncurred1 = .Fields("DaysIncurred")lblCharge1 = .Fields("Charge")

End With

rs1.Close

Timer1.Enabled = TruefrmRooms.Show

 

'***** Exit *****

Case 6Unload Me

End Select

rsR.Close

End Sub

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 64/103

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)

'Deals with transection of information related with Room No: 2 , from form to Databaseand vice versa.

Set rsR = New ADODB.Recordset

rsR.Open "select * from Rates where Type='StandardSingle'", con1, adOpenDynamic,adLockOptimistic

Select Case Button.Index'***** Reserve *****

Case 1

If txtName2 = "" Or _ 

txtAddress2 = "" Or _ txtAge2 = "" Or _ 

txtNationality2 = "" Then

MsgBox "Please fill in the form properly", vbInformation, "Form Error"

txtName2.SetFocusExit Sub

ElselblDateReserved2 = Format(Date, "mmmm dd, yyyy")

Set rs2 = New ADODB.Recordset

rs2.Open "select * from Status where RoomNumber=2", con1, adOpenDynamic,

adLockOptimisticWith rs2

.Fields("Name") = txtName2

.Fields("Address") = txtAddress2

.Fields("Age") = txtAge2

.Fields("Nationality") = txtNationality2

.Fields("DateReserved") = lblDateReserved2

.Fields("Gender") = cmdGender2

.Fields("Status") = "Reserved"

.Fields("DateIn") = ""

.Fields("DateOut") = ""

.Fields("I") = Format(Date, "y")

.Fields("Charge") = "0.0"

.Fields("DaysIncurred") = ""

.Update

.Close

End WithSet rs2 = New ADODB.Recordset

rs2.Open "select * from Status where RoomNumber=2", con1, adOpenDynamic,

adLockOptimisticrs2.Close

Timer2.Enabled = True

frmRooms.Show

End If 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 65/103

 

'***** Check In *****

Case 2If txtName2 = "" Or _ 

txtAddress2 = "" Or _ 

txtAge2 = "" Or _ txtNationality2 = "" Then

MsgBox "Please fill in the form properly", vbInformation, "Form Error"

txtName2.SetFocusExit Sub

Else

lblDateIn2 = Format(Date, "mmmm dd, yyyy")

Set rs2 = New ADODB.Recordsetrs2.Open "select * from Status where RoomNumber=2", con1,

adOpenDynamic, adLockOptimistic

With rs2

.Fields("Name") = txtName2.Fields("Address") = txtAddress2

.Fields("Age") = txtAge2

.Fields("Nationality") = txtNationality2

.Fields("DateReserved") = lblDateReserved2

.Fields("Gender") = cmdGender2

If .Fields("Status") = "Reserved" ThenElse

.Fields("I") = Format(Date, "y")

End If .Fields("Status") = "Using"

.Fields("DateIn") = lblDateIn2

.Fields("DateOut") = ""

.Fields("Charge") = "0.0"

.Fields("DaysIncurred") = ""

.Update

.Close

End With

Set rs2 = New ADODB.Recordset

rs2.Open "select * from Status where RoomNumber=2", con1,adOpenDynamic, adLockOptimistic

rs2.Close

Timer2.Enabled = TruefrmRooms.Show

End If 

 '***** Check Out *****

Case 3

lblDateOut2 = Format(Date, "mmmm dd, yyyy")

ODate = Format(Date, "y")

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 66/103

Set rs2 = New ADODB.Recordset

rs2.Open "select * from Status where RoomNumber=2", con1, adOpenDynamic,

adLockOptimisticWith rs2

DI = .Fields("I")

End WithCharge = ODate - DI + 1

 

With rsR rSS = .Fields("PerDay")

End With

 

lblDaysIncurred2 = ChargeCharge = Charge * rSS

lblCharge2 = Charge

With rs2.MoveLast

.Fields("Name") = txtName2

.Fields("Address") = txtAddress2

.Fields("Age") = txtAge2

.Fields("Gender") = cmdGender2

.Fields("Nationality") = txtNationality2

.Fields("DateReserved") = lblDateReserved2

.Fields("DateIn") = lblDateIn2

.Fields("DateOut") = lblDateOut2

.Fields("DaysIncurred") = lblDaysIncurred2

.Fields("Charge") = Charge

.Fields("Status") = "Ou t"

.Update

End With

rs2.CloseSet rsCR = New ADODB.Recordset

rsCR.Open "select * from CustomerRecord", con1, adOpenDynamic,

adLockOptimistic

With rsCR If .EOF = False Then

.MoveLast

End If .AddNew

.Fields("RoomNUmber") = "2"

.Fields("RoomType") = "Standard [Single]"

.Fields("Name") = txtName2

.Fields("Address") = txtAddress2

.Fields("Age") = txtAge2

.Fields("Gender") = cmdGender2

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 67/103

.Fields("Nationality") = txtNationality2

.Fields("DateReserved") = lblDateReserved2

.Fields("DateIn") = lblDateIn2

.Fields("DateOut") = lblDateOut2

.Fields("DaysIncurred") = lblDaysIncurred2

.Fields("RatePerDay") = rSS.Fields("Charge") = Charge

.Update

End WithrsCR.Close

Timer2.Enabled = True

frmRooms.Show

cmdGbill2.Enabled = True

'***** New *****

Case 4

frRoom2.Enabled = TrueToolbar2.Buttons(1).Enabled = True

Toolbar2.Buttons(2).Enabled = TrueToolbar2.Buttons(4).Enabled = False

Toolbar2.Buttons(5).Enabled = False

txtName2.SetFocus

 Set rs2 = New ADODB.Recordset

rs2.Open "select * from Status where RoomNumber=2", con1, adOpenDynamic,

adLockOptimisticWith rs2

If .Fields("name") <> "" Then

.Fields("Name") = ""

.Fields("Address") = ""

.Fields("Age") = ""

.Fields("Gender") = ""

.Fields("Nationality") = ""

.Fields("DateReserved") = ""

.Fields("DateIn") = ""

.Fields("DateOut") = ""

.Fields("DaysIncurred") = ""

.Fields("Charge") = "0.0"

.Fields("I") = ""

.Fields("Status") = "Using"

.Update

 txtName2 = .Fields("Name")

txtAddress2 = .Fields("Address")

txtAge2 = .Fields("Age")

cmdGender2 = .Fields("Gender")

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 68/103

txtNationality2 = .Fields("Nationality")

lblDateReserved2 = .Fields("DateReserved")

lblDateIn2 = .Fields("DateIn")lblDateOut2 = .Fields("DateOut")

lblDaysIncurred2 = ""

lblCharge2 = .Fields("Charge")End If 

End With

rs2.ClosecmdGbill2.Enabled = False

 

'****** Cancel *****Case 5

 

Set rs2 = New ADODB.Recordset

rs2.Open "select * from Status where RoomNumber=2", con1, adOpenDynamic,adLockOptimistic

With rs2.Fields("Name") = ""

.Fields("Address") = ""

.Fields("Age") = ""

.Fields("Gender") = ""

.Fields("Nationality") = ""

.Fields("DateReserved") = ""

.Fields("DateIn") = ""

.Fields("I") = ""

.Fields("Status") = "Available"

.Fields("DaysIncurred") = ""

.Fields("DateOut") = ""

.Fields("Charge") = ""

.Update

.Close

End With

 

Set rs2 = New ADODB.Recordsetrs2.Open "select * from Status where RoomNumber=2", con1, adOpenDynamic,

adLockOptimistic

With rs2txtName2 = .Fields("Name")

txtAddress2 = .Fields("Address")

txtAge2 = .Fields("Age")cmdGender2 = .Fields("Gender")

txtNationality2 = .Fields("Nationality")

lblDateReserved2 = .Fields("DateReserved")

lblDateIn2 = .Fields("DateIn")

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 69/103

lblDateOut2 = .Fields("DateOut")

lblDaysIncurred2 = .Fields("DaysIncurred")

lblCharge2 = .Fields("Charge")End With

rs2.Close

Timer2.Enabled = TruefrmRooms.Show

 

'***** Exit *****

Case 6

Unload MeEnd Select

rsR.Close

End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)

'Deals with transection of information related with Room No: 3 , from form to Databaseand vice versa.

Set rsR = New ADODB.Recordset

rsR.Open "select * from Rates where Type='StandardSingle'", con1, adOpenDynamic,

adLockOptimistic

Select Case Button.Index

'***** Reserve *****Case 1

If txtName3 = "" Or _ 

txtAddress3 = "" Or _ txtAge3 = "" Or _ 

txtNationality3 = "" Then

MsgBox "Please fill in the form properly", vbInformation, "Form Error"txtName3.SetFocus

Exit Sub

Else

lblDateReserved3 = Format(Date, "mmmm dd, yyyy")Set rs3 = New ADODB.Recordset

rs3.Open "select * from Status where RoomNumber=3", con1, adOpenDynamic,

adLockOptimisticWith rs3

.Fields("Name") = txtName3

.Fields("Address") = txtAddress3

.Fields("Age") = txtAge3

.Fields("Nationality") = txtNationality3

.Fields("DateReserved") = lblDateReserved3

.Fields("Gender") = cmdGender3

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 70/103

.Fields("Status") = "Reserved"

.Fields("DateIn") = ""

.Fields("DateOut") = ""

.Fields("I") = Format(Date, "y")

.Fields("Charge") = "0.0"

.Fields("DaysIncurred") = "".Update

.Close

End WithSet rs3 = New ADODB.Recordset

rs3.Open "select * from Status where RoomNumber=3", con1, adOpenDynamic,

adLockOptimistic

rs3.CloseTimer3.Enabled = True

frmRooms.Show

End If 

 '***** Check In *****

Case 2If txtName3 = "" Or _ 

txtAddress3 = "" Or _ 

txtAge3 = "" Or _ 

txtNationality3 = "" ThenMsgBox "Please fill in the form properly", vbInformation, "Form Error"

txtName3.SetFocus

Exit SubElse

lblDateIn3 = Format(Date, "mmmm dd, yyyy")

Set rs3 = New ADODB.Recordsetrs3.Open "select * from Status where RoomNumber=3", con1,

adOpenDynamic, adLockOptimistic

With rs3.Fields("Name") = txtName3

.Fields("Address") = txtAddress3

.Fields("Age") = txtAge3

.Fields("Nationality") = txtNationality3

.Fields("DateReserved") = lblDateReserved3

.Fields("Gender") = cmdGender3

If .Fields("Status") = "Reserved" ThenElse

.Fields("I") = Format(Date, "y")

End If .Fields("Status") = "Using"

.Fields("DateIn") = lblDateIn3

.Fields("DateOut") = ""

.Fields("Charge") = "0.0"

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 71/103

.Fields("DaysIncurred") = ""

.Update

.CloseEnd With

Set rs3 = New ADODB.Recordset

rs3.Open "select * from Status where RoomNumber=3", con1,adOpenDynamic, adLockOptimistic

rs3.Close

Timer3.Enabled = TruefrmRooms.Show

End If 

 

'***** Check Out *****Case 3

lblDateOut3 = Format(Date, "mmmm dd, yyyy")

ODate = Format(Date, "y")

Set rs3 = New ADODB.Recordsetrs3.Open "select * from Status where RoomNumber=3", con1, adOpenDynamic,

adLockOptimisticWith rs3

DI = .Fields("I")

End With

Charge = ODate - DI + 1 

With rsR 

rSS = .Fields("PerDay")End With

 

lblDaysIncurred3 = ChargeCharge = Charge * rSS

lblCharge3 = ChargeWith rs3

.MoveLast

.Fields("Name") = txtName3

.Fields("Address") = txtAddress3

.Fields("Age") = txtAge3

.Fields("Gender") = cmdGender3

.Fields("Nationality") = txtNationality3

.Fields("DateReserved") = lblDateReserved3

.Fields("DateIn") = lblDateIn3

.Fields("DateOut") = lblDateOut3

.Fields("DaysIncurred") = lblDaysIncurred3

.Fields("Charge") = Charge

.Fields("Status") = "Out"

.Update

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 72/103

End With

rs3.Close

Set rsCR = New ADODB.RecordsetrsCR.Open "select * from CustomerRecord", con1, adOpenDynamic,

adLockOptimistic

With rsCR If .EOF = False Then

.MoveLast

End If .AddNew

.Fields("RoomNUmber") = "3"

.Fields("RoomType") = "Standard [Single]"

.Fields("Name") = txtName3

.Fields("Address") = txtAddress3

.Fields("Age") = txtAge3

.Fields("Gender") = cmdGender3

.Fields("Nationality") = txtNationality3.Fields("DateReserved") = lblDateReserved3

.Fields("DateIn") = lblDateIn3

.Fields("DateOut") = lblDateOut3

.Fields("DaysIncurred") = lblDaysIncurred3

.Fields("RatePerDay") = rSS

.Fields("Charge") = Charge

.Update

End With

rsCR.CloseTimer3.Enabled = True

frmRooms.Show

cmdGbill3.Enabled = True

'***** New *****

Case 4frRoom3.Enabled = True

Toolbar3.Buttons(1).Enabled = True

Toolbar3.Buttons(2).Enabled = True

Toolbar3.Buttons(4).Enabled = FalseToolbar3.Buttons(5).Enabled = False

txtName3.SetFocus

 Set rs3 = New ADODB.Recordset

rs3.Open "select * from Status where RoomNumber=3", con1, adOpenDynamic,

adLockOptimisticWith rs3

If .Fields("name") <> "" Then

.Fields("Name") = ""

.Fields("Address") = ""

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 73/103

.Fields("Age") = ""

.Fields("Gender") = ""

.Fields("Nationality") = ""

.Fields("DateReserved") = ""

.Fields("DateIn") = ""

.Fields("DateOut") = "".Fields("DaysIncurred") = ""

.Fields("Charge") = "0.0"

.Fields("I") = ""

.Fields("Status") = "Using"

.Update

 

txtName3 = .Fields("Name")txtAddress3 = .Fields("Address")

txtAge3 = .Fields("Age")

cmdGender3 = .Fields("Gender")

txtNationality3 = .Fields("Nationality")lblDateReserved3 = .Fields("DateReserved")

lblDateIn3 = .Fields("DateIn")lblDateOut3 = .Fields("DateOut")

lblDaysIncurred3 = ""

lblCharge3 = .Fields("Charge")

End If End With

rs3.Close

cmdGbill3.Enabled = False 

'****** Cancel *****Case 5

 

Set rs3 = New ADODB.Recordsetrs3.Open "select * from Status where RoomNumber=3", con1, adOpenDynamic,

adLockOptimistic

With rs3

.Fields("Name") = ""

.Fields("Address") = ""

.Fields("Age") = ""

.Fields("Gender") = ""

.Fields("Nationality") = ""

.Fields("DateReserved") = ""

.Fields("DateIn") = ""

.Fields("I") = ""

.Fields("Status") = "Available"

.Fields("DaysIncurred") = ""

.Fields("DateOut") = ""

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 74/103

.Fields("Charge") = ""

.Update

.CloseEnd With

 

Set rs3 = New ADODB.Recordsetrs3.Open "select * from Status where RoomNumber=3", con1, adOpenDynamic,

adLockOptimistic

With rs3txtName3 = .Fields("Name")

txtAddress3 = .Fields("Address")

txtAge3 = .Fields("Age")

cmdGender3 = .Fields("Gender")txtNationality3 = .Fields("Nationality")

lblDateReserved3 = .Fields("DateReserved")

lblDateIn3 = .Fields("DateIn")

lblDateOut3 = .Fields("DateOut")lblDaysIncurred3 = .Fields("DaysIncurred")

lblCharge3 = .Fields("Charge")End With

rs3.Close

Timer3.Enabled = True

frmRooms.Show 

'***** Exit *****

Case 6

Unload MeEnd Select

rsR.Close

End Sub

'-------Controls of the Form are Vallidated---------

Private Sub txtAge1_KeyPress(KeyAscii As Integer)If KeyAscii < 48 Or KeyAscii > 57 Then

If KeyAscii <> 8 Then

KeyAscii = 0End If 

End If 

End Sub

Private Sub txtAge2_KeyPress(KeyAscii As Integer)

If KeyAscii < 48 Or KeyAscii > 57 Then

If KeyAscii <> 8 Then

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 75/103

KeyAscii = 0

End If 

End If End Sub

Private Sub txtAge3_KeyPress(KeyAscii As Integer)If KeyAscii < 48 Or KeyAscii > 57 Then

If KeyAscii <> 8 Then

KeyAscii = 0End If 

End If 

End Sub

Private Sub txtName1_KeyPress(KeyAscii As Integer)

If KeyAscii < 65 Or KeyAscii > 90 Then

If KeyAscii < 97 Or KeyAscii > 122 Then

If KeyAscii <> 8 And KeyAscii <> 32 ThenKeyAscii = 0

End If End If 

End If 

End Sub

Private Sub txtName2_KeyPress(KeyAscii As Integer)

If KeyAscii < 65 Or KeyAscii > 90 Then

If KeyAscii < 97 Or KeyAscii > 122 ThenIf KeyAscii <> 8 And KeyAscii <> 32 Then

KeyAscii = 0

End If End If 

End If 

End Sub

Private Sub txtName3_KeyPress(KeyAscii As Integer)

If KeyAscii < 65 Or KeyAscii > 90 Then

If KeyAscii < 97 Or KeyAscii > 122 ThenIf KeyAscii <> 8 And KeyAscii <> 32 Then

KeyAscii = 0

End If End If 

End If 

End Sub

Private Sub txtNationality1_KeyPress(KeyAscii As Integer)

If KeyAscii < 65 Or KeyAscii > 90 Then

If KeyAscii < 97 Or KeyAscii > 122 Then

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 76/103

If KeyAscii <> 8 And KeyAscii <> 32 Then

KeyAscii = 0

End If End If 

End If 

End Sub

Private Sub txtNationality2_KeyPress(KeyAscii As Integer)

If KeyAscii < 65 Or KeyAscii > 90 ThenIf KeyAscii < 97 Or KeyAscii > 122 Then

If KeyAscii <> 8 And KeyAscii <> 32 Then

KeyAscii = 0

End If End If 

End If 

End Sub

Private Sub txtNationality3_KeyPress(KeyAscii As Integer)

If KeyAscii < 65 Or KeyAscii > 90 ThenIf KeyAscii < 97 Or KeyAscii > 122 Then

If KeyAscii <> 8 And KeyAscii <> 32 Then

KeyAscii = 0

End If End If 

End If 

End Sub

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 77/103

Administrator Utility Wizard Form :

'====================================================='Program Name : frmAdministrator.frm

'Description : Deals with task to be done by Administrator or the User of the System.

'Developed By : Vivekanand Bidri

'Date :'Issue/Version : 1.0

'=====================================================

Private Sub cmdAddnew_Click()

frSearchEngine.Enabled = False

frDatas.Enabled = TruecmdAddnew.Enabled = False

cmdDelete.Enabled = False

cmdSave.Enabled = TruetxtSearchEngine = ""

txtUsername = ""

txtPassword = ""

txtConfirm = ""txtUsername.SetFocus

End Sub

Private Sub cmdDelete_Click()

If txtUsername = "" Then

MsgBox "No current record to delete!", vbCritical, "Delete Error"Exit Sub

Else

With Data2.Recordset

.Index = "seeker"

.Seek "=", txtUsername

End With

If Data2.Recordset.NoMatch = False ThenIf MsgBox("You are about to delete " & txtUsername & " in the list. are you sure?",

vbOKCancel + vbInformation, "Confirm Delete") = vbOK Then

Data2.Recordset.Delete

DBGrid1.RefreshElse

Exit Sub

End If End If 

End If 

cmdRefresh_Click End Sub

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 78/103

Private Sub cmdFDUpdate_Click()

If txtFD <> 0 ThenWith Data1.Recordset

.Index = "seeker"

.Seek "=", "FamilyDouble"End With

If Data1.Recordset.NoMatch = False Then

Data1.Recordset.EditWith Data1.Recordset

.Fields("PerDay") = txtFD

End With

Data1.Recordset.UpdateEnd If 

txtFD = ""

Timer1.Enabled = True

frmRooms.Timer1.Enabled = TrueElse

MsgBox "Invalid Entry!", vbCritical, "Update Error"txtFD = ""

txtFD.SetFocus

Exit Sub

End If End Sub

Private Sub cmdFTUpdate_Click()If txtFT <> 0 Then

With Data1.Recordset

.Index = "seeker"

.Seek "=", "FamilyTriple"

End With

If Data1.Recordset.NoMatch = False ThenData1.Recordset.Edit

With Data1.Recordset

.Fields("PerDay") = txtFT

End WithData1.Recordset.Update

End If 

txtFT = ""Timer1.Enabled = True

frmRooms.Timer1.Enabled = True

ElseMsgBox "Invalid Entry!", vbCritical, "Update Error"

txtFT = ""

txtFT.SetFocus

Exit Sub

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 79/103

End If 

End Sub

Private Sub cmdRefresh_Click()

txtSearchEngine = ""

txtPassword = ""txtUsername = ""

txtConfirm = ""

cmdAddnew.Enabled = TruecmdDelete.Enabled = True

cmdSave.Enabled = False

frSearchEngine.Enabled = True

frDatas.Enabled = FalsetxtSearchEngine.SetFocus

DBGrid1.Refresh

End Sub

Private Sub cmdSave_Click()

If txtUsername = "" Or txtPassword = "" Or txtConfirm = "" ThenMsgBox "Please fill in the boxes properly!", vbCritical, "Save Error"

txtUsername.SetFocus

Exit Sub

ElseWith Data2.Recordset

.Index = "seeker"

.Seek "=", txtUsernameEnd With

If Data2.Recordset.NoMatch = True Then

If txtConfirm = txtPassword ThenData2.Recordset.AddNew

With Data2.Recordset

.Fields("Username") = txtUsername

.Fields("Password") = txtPassword

End With

Data2.Recordset.Update

Data2.RefreshDBGrid1.Refresh

Else

MsgBox "Confirmed password does not match your password!", vbCritical, "SaveError"

txtConfirm = ""

txtConfirm.SetFocusExit Sub

End If 

Else

MsgBox "Username already exist!", vbCritical, "Save Error"

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 80/103

txtUsername = ""

txtUsername.SetFocus

Exit SubEnd If 

End If 

cmdRefresh_Click End Sub

Private Sub cmdSDUpdate_Click()If txtSD <> 0 Then

With Data1.Recordset

.Index = "seeker"

.Seek "=", "StandardDouble"End With

If Data1.Recordset.NoMatch = False Then

Data1.Recordset.Edit

With Data1.Recordset.Fields("PerDay") = txtSD

End WithData1.Recordset.Update

End If 

txtSD = ""

Timer1.Enabled = TruefrmRooms.Timer1.Enabled = True

Else

MsgBox "Invalid Entry!", vbCritical, "Update Error"txtSD = ""

txtSD.SetFocus

Exit SubEnd If 

DBGrid1.Refresh

End Sub

Private Sub cmdSSUpdate_Click()

If txtSS <> 0 Then

With Data1.Recordset.Index = "seeker"

.Seek "=", "StandardSingle"

End WithIf Data1.Recordset.NoMatch = False Then

Data1.Recordset.Edit

With Data1.Recordset.Fields("PerDay") = txtSS

End With

Data1.Recordset.Update

End If 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 81/103

txtSS = ""

Timer1.Enabled = True

frmRooms.Timer1.Enabled = TrueElse

MsgBox "Invalid Entry!", vbCritical, "Update Error"

txtSS = ""txtSS.SetFocus

Exit Sub

End If End Sub

Private Sub cmdVDUpdate_Click()If txtVD <> 0 Then

With Data1.Recordset

.Index = "seeker"

.Seek "=", "VIPDouble"End With

If Data1.Recordset.NoMatch = False ThenData1.Recordset.Edit

With Data1.Recordset

.Fields("PerDay") = txtVD

End WithData1.Recordset.Update

End If 

txtVD = ""Timer1.Enabled = True

frmRooms.Timer1.Enabled = True

ElseMsgBox "Invalid Entry!", vbCritical, "Update Error"

txtVD = ""

txtVD.SetFocusExit Sub

End If 

End Sub

Private Sub cmdVSUpdate_Click()

If txtVS <> 0 Then

With Data1.Recordset.Index = "seeker"

.Seek "=", "VIPSingle"

End WithIf Data1.Recordset.NoMatch = False Then

Data1.Recordset.Edit

With Data1.Recordset

.Fields("PerDay") = txtVS

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 82/103

End With

Data1.Recordset.Update

End If txtVS = ""

Timer1.Enabled = True

frmRooms.Timer1.Enabled = TrueElse

MsgBox "Invalid Entry!", vbCritical, "Update Error"

txtVS = ""txtVS.SetFocus

Exit Sub

End If 

End Sub

Private Sub Command1_Click()

frRoomRates.Visible = False

End Sub

Private Sub Command2_Click()frSecurity.Visible = False

End Sub

Private Sub DBGrid1_Click()Timer2.Enabled = True

End Sub

Private Sub Form_Load()

Data1.DatabaseName = App.Path + "\" + "HR.mdb"

Data1.RecordSource = "Rates"Data2.DatabaseName = App.Path + "\" + "HR.mdb"

Data2.RecordSource = "Users"

If adm = 1 ThenfrSecurity.Visible = True

frRoomRates.Visible = False

End If 

If adm = 2 ThenfrSecurity.Visible = False

frRoomRates.Visible = True

End If End Sub

Private Sub mExit_Click()Unload Me

End Sub

Private Sub mRoom_Click()

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 83/103

frSecurity.Visible = False

frRoomRates.Visible = True

End Sub

Private Sub mSystemSec_Click()

frSecurity.Visible = TruefrRoomRates.Visible = False

End Sub

Private Sub Timer1_Timer()

With Data1.Recordset

.Index = "seeker"

.Seek "=", "StandardSingle"End With

If Data1.Recordset.NoMatch = False Then

With Data1.Recordset

txtSSO = .Fields("PerDay")End With

End If With Data1.Recordset

.Index = "seeker"

.Seek "=", "StandardDouble"

End WithIf Data1.Recordset.NoMatch = False Then

With Data1.Recordset

txtSDO = .Fields("PerDay")End With

End If 

With Data1.Recordset.Index = "seeker"

.Seek "=", "VIPSingle"

End WithIf Data1.Recordset.NoMatch = False Then

With Data1.Recordset

txtVSO = .Fields("PerDay")

End WithEnd If 

With Data1.Recordset

.Index = "seeker"

.Seek "=", "VIPDouble"

End With

If Data1.Recordset.NoMatch = False ThenWith Data1.Recordset

txtVDO = .Fields("PerDay")

End With

End If 

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 84/103

With Data1.Recordset

.Index = "seeker"

.Seek "=", "FamilyDouble"End With

If Data1.Recordset.NoMatch = False Then

With Data1.RecordsettxtFDO = .Fields("PerDay")

End With

End If With Data1.Recordset

.Index = "seeker"

.Seek "=", "FamilyTriple"

End WithIf Data1.Recordset.NoMatch = False Then

With Data1.Recordset

txtFTO = .Fields("PerDay")

End WithEnd If 

Timer1.Enabled = FalseEnd Sub

Private Sub Timer2_Timer()

On Error GoTo error_2User = Data2.Recordset.Fields("Username")

txtSearchEngine = User 

error_2:Timer2.Enabled = False

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

Select Case Button.Index

Case 1frRoomRates.Visible = False

frSecurity.Visible = True

Case 2

frRoomRates.Visible = TruefrSecurity.Visible = False

Case 3

Unload MeEnd Select

End Sub

Private Sub txtConfirm_LostFocus()

If txtConfirm <> txtPassword Then

MsgBox "Please conform the password", vbOKOnly + vbCritical, "Error"

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 85/103

cmdUpdate.Enabled = False

End If 

End Sub

Private Sub txtFD_Change()

If IsNumeric(txtFD) = True ThencmdFDUpdate.Enabled = True

Else

cmdFDUpdate.Enabled = FalseEnd If 

End Sub

Private Sub txtFT_Change()If IsNumeric(txtFT) = True Then

cmdFTUpdate.Enabled = True

Else

cmdFTUpdate.Enabled = FalseEnd If 

End Sub

Private Sub txtSD_Change()

If IsNumeric(txtSD) = True Then

cmdSDUpdate.Enabled = TrueElse

cmdSDUpdate.Enabled = False

End If End Sub

Private Sub txtSearchEngine_Change()With Data2.Recordset

.Index = "seeker"

.Seek ">=", txtSearchEngineEnd With

On Error GoTo error_1

With Data2.Recordset

txtUsername = .Fields("Username")txtPassword = .Fields("Password")

End With

error_1:End Sub

Private Sub txtSS_Change()If IsNumeric(txtSS) = True Then

cmdSSUpdate.Enabled = True

Else

cmdSSUpdate.Enabled = False

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 86/103

End If 

End Sub

Private Sub txtVD_Change()

If IsNumeric(txtVD) = True Then

cmdVDUpdate.Enabled = TrueElse

cmdVDUpdate.Enabled = False

End If End Sub

Private Sub txtVS_Change()

If IsNumeric(txtVS) = True ThencmdVSUpdate.Enabled = True

Else

cmdVSUpdate.Enabled = False

End If End Sub

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 87/103

Run Time Section

1) Splash Form

2) Login Form

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 88/103

3) MDI Form

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 89/103

4) Standard Single Room Form

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 90/103

5) Room Status Form

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 91/103

6) Clients Master List Form

7) Administrator Utility Wizard Form

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 92/103

9) About Form

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 93/103

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

7♦ ♦ ♦ ♦

ReportsIn This Chapter

1) Reports

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 94/103

Client Master List Report :

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 95/103

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 96/103

Room Rates Report :

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 97/103

Bill Report :

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 98/103

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

8♦ ♦ ♦ ♦

Conclusio

nIn This Chapter

1) Conclusion

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 99/103

CONCLUSION :

The “HOTEL RESERVATION MANAGEMENT SYSTEM” is done using VB as

the Front end and access as the backend. We are trying to keep the record of 

automatically.

The present system is worked manually that means they keep the records in

Registers. This required manpower. It was time consuming and money mattered. But due

to Proposed System they can maintain their records automatically.

Now, using this atomized system will reduce the work load and also wastage of 

 precious time and money.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 100/103

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

9♦ ♦ ♦ ♦

Future

EnhancementIn This Chapter

1) Future Enhancement

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 101/103

FUTURE ENHANCEMENT:

1). In future new utilities will be added to the software if required.

2). With time software will be made more consistent and integrated.

3). User Interface (U.I) will be made more user friendly and attractive.

4). Concept of finding Yearly Income, Profit etc will be added.

HOTEL RESERVATION MANAGEMENT SYSTEM

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 102/103

 

HOTEL RESERVATION MANAGEMENT SYSTEM

C H A P T E R 

10♦ ♦ ♦ ♦

BibliographyIn This Chapter

1) Bibliography

8/8/2019 Hotel Reservation Dctm

http://slidepdf.com/reader/full/hotel-reservation-dctm 103/103

BibliographyREFERENCES:- 

MASTERING VISUAL BASIC

BLACKBOOK VISUAL BASIC

COMPLETE REFERENCE VISUAL BASIC

PROGRAMING IN VISUAL BASIC 6.0

WEB REFENCE:-

 www.google.com

www.vbcity.com

INTERNET REFERENCE:-

  MSDN LIBRARY