117
Hotel Management System 1 Hotel Management System Group 3 Fatima Al-Ghannam 200600561 Fatima Al-Tuhaifa 200700818 Advisor Mr. Mohammad Zikaria Prepared for: ASSE 4311 Assessment 3 Dr. Loay Al-Zubaidi

Hotel Management System

Embed Size (px)

DESCRIPTION

Computer Science, Senior Project, this senior project is about hotel reservation system, we have used ASP and VB language and the data based on Oracle.

Citation preview

Page 1: Hotel Management System

Hotel Management System 1

Hotel Management System

Group 3Fatima Al-Ghannam 200600561Fatima Al-Tuhaifa 200700818

AdvisorMr. Mohammad Zikaria

Prepared for: ASSE 4311

Assessment 3 Dr. Loay Al-Zubaidi

June 20, 2011

Page 2: Hotel Management System

Hotel Management System 2

Abstract

The project aims to build a system for managing the reservation of hotel. This system has a front-end by

using ASP.net with VB and it has a back-end of database which will be built with Oracle by using Oracle 10g and

dreamcoder for oracle. The system will be able to add, delete and update the room, guest detail, and transaction.

This system will find a solution for recording guest detail, searching for specific guest or available room in easy

way; also it will find solution for calculating the bill automatically. The procedure of hotel reservation has been

analyzed by logging into booking web site for hotel; such as, holiday inn’s web site and booking.com. Also; we

installed Hotel booking system, which has been downloaded from http://www.hotelsystems.co.uk/, for more clear

understanding of hotel reservation system. The ASP.net and VB are a new knowledge that we are going to gain

during our working in this project.

Keywords: hotel reservation system, booking, database of hotel.

Page 3: Hotel Management System

Hotel Management System 3

Contents

Part I Introduction ……………………………………………………………………………………... 8

1. Introduction ....................................................................................................................................82. Literature review ............................................................................................................................ 8 3. Proposed project ........................................................................................................................... 11

a. Objective ...................................................................................................................... 11b. Benefits .........................................................................................................................11c. Preliminary Requirements Analysis .............................................................................11d. Technical Requirements-Feasibility .............................................................................12 e. Scope ............................................................................................................................12f. Visibility Plane .............................................................................................................12g. Suggested Deliverables ................................................................................................13h. Technical Deliverables .................................................................................................13

Part II Use Cases ……………………………………………………………………………………..... 16

1. Reception Use Cases .....................................................................................................................16

a. Search Available Room ................................................................................................16 b. Booking Detail ..............................................................................................................17 c. Booking Confirmation ..................................................................................................18d. Delete Guest..................................................................................................................18 e. Change Guest Properties ..............................................................................................19 f. Customer Searcher ........................................................................................................20g. Reminder Email..............................................................................................................21

2. Administrator Use Cases .................................................................................................................21 a. Login Administrator.......................................................................................................21b. Logout Administrator ....................................................................................................21 c. Add Room .....................................................................................................................22 d. Delete Room...................................................................................................................23 e. Change Room Properties................................................................................................24 f. View Financial Report ...................................................................................................25

3. Use Cases Diagram...........................................................................................................................26

Part III Software Requirements Specifications (SRS) …………………………………………………………..29

1. Definitions, Acronyms, and Abbreviations......................................................................................292. Overview..........................................................................................................................................293. The Overall Description...................................................................................................................294. Product Perspective..........................................................................................................................295. Hardware Interfaces ........................................................................................................................30

Page 4: Hotel Management System

Hotel Management System 4

6. Software Interfaces..........................................................................................................................307. Product Functions............................................................................................................................308. User Characteristics ........................................................................................................................30 9. Apportioning of Requirements........................................................................................................3110. Specific Requirement.......................................................................................................................32 11. External Interface ............................................................................................................................3212. User Interface...................................................................................................................................32 13. Communication Inter face ...............................................................................................................3314. Functional Requirement ..................................................................................................................33 15. Noun Functional Requirement.........................................................................................................3516. Performance Requirement ...............................................................................................................3517. Logical Database Requirement ........................................................................................................3518. Design Constraint.............................................................................................................................3619. Standards complain..........................................................................................................................3620. Reliability.........................................................................................................................................3621. Availability.......................................................................................................................................3622. Security.............................................................................................................................................3623. Maintainability..................................................................................................................................36 24. Portability..........................................................................................................................................37

Part IV Task Analysis ……………………………………………………………………………………..38

1. System Rules......................................................................................................................................382. Subtasks.............................................................................................................................................38 3. Hierarchical Task Decomposition ........................................................................................................41

Part V Interface ……………………………………………………………………………………………..45

1. Search .................................................................................................................................................45 2. Booking...............................................................................................................................................48 3. Paying..................................................................................................................................................514. Guest Detail.........................................................................................................................................51 5. Log in...................................................................................................................................................55

Part VI Challenges …………………………………………………………………………………………...57

Part VII Conclusion…………………………………………………………………………………………...61

Part VIII Appendix A ………………………………………………………………………………………...62

Part IX References……………………………………………………………………………………………90

Page 5: Hotel Management System

Hotel Management System 5

Figures

Use Cases

Figure 1: Tables

Figure 2: ER

Figure 3: Reception

Figure 4: Edities

Figure 5: Payment

Figure6: Reminder Email

Figure7: Administration

Hierarchical Task Decomposition

Figure 8: Search for available room

Figure 9: Reservation

Figure 10: Paying

Figure 11: Setting

Interface

Figure 12: Search and Update Form

Figure 13: Checking inserted date

Figure 14: Checking date

Figure 15: Notifying The User That the BookinNo is Empty

Figure 16: Search Result

Figure 17: Calendar

Figure 18: Reservation Form

Figure 19: Credit Card Form

Figure 20: Missing Field Message

Figure 21: Invalid Email

Figure 22: Payment Form

Figure 23: Booking Detail in the Payment page

Figure 24: Guest Setting Form

Figure 25: Finding information about specific guest

Page 6: Hotel Management System

Hotel Management System 6

Figure 26: Finding all Guests' information by clicking the all button

Figure 27: Confirmation Message

Figure 28: Login Form

Figure 29: Log in Error Message

Figure 30: Login

Page 7: Hotel Management System

Hotel Management System 7

Tables

Table 1: Hotel Management User Interface Screens

Page 8: Hotel Management System

Hotel Management System 8

Part I

1.1 - Introduction

The following proposed system aims to develop web application for facilitating reservation process at hotel.

The system provide the reception an easy way for searching on rooms, listing off rooms, inserting the client

information, getting details about specific client, making a reservation for rooms and doing payment process. This

system will be built by two students of Prince Mohammed Bin Fahed University. They are Fatimah Al Tuhaifa

with ID 200700818 and Fatimah Al Ghannam with ID 200600561

The project consist of two main parts: building solution for data base for storing and representing metadata

in easy way, building a reception’s interface that allows the reception for inserting, deleting, updating, modifying

and representing of metadata.

1.2- Literature review

Louw,D,(2006, may 10). Description with UML for a Hotel Reservation System. Retrieved from

http://www.liacs.nl/assets/Bachelorscripties/2006-08JanneLouw.pdf. Developed a hotel management system that

can be used online. This system allows the guests to do their booking online by them self. Some of tasks that the

system can do are providing a query for arriving date and the length of staying, providing the number of On rooms,

view all available rooms and provides the user the ability to choose one or more of them, recording kind of guests

and how many going to be in the single room, providing the cost of booking, asking the users if they want

additional service; such as, diner or breakfast, storing the guests details; like, name, address and telephone, asking

the user for confirmation, final confirmation views with the detail of booking and the guests can review or cancel

the booking.

For more understanding to the system the author provided some figures with explanation. The first figure

shows the relationship between the end user and the webserver and how the users interface start and the application

Page 9: Hotel Management System

Hotel Management System 9

is done step by step. The second figure shows the relationship between the user and the screen. The screen transfer

HTML codes to interface and when the user interact with it some process are done then the screen shows another

pages. While the third figure shows how each page is related to each other.

The user can go to the next page by three ways. The first one is the user after inserting his/her information

goes through pages in sequence way. The second way by navigation and this way provide the user the ability to go

to the pervious pages or to the login page. The final one is one the user insert unaccepted the page will keep the

recent page.

This article is almost a UML designing. ASP.net is one of the suggested tools for building this system. This

system common with our system in with some of reservation process; such as, storing the customer information

and choosing the payment method. Also, this system used ASP.net as our system but it differs in the kind of user,

this system is used online by the guest while our system is used locally by the employee of the hotel [3].

Fernandez,E & Yuan, X,(1999). An Analysis Pattern for Reservation and Use of Reusable Entities. PloP

1999 conference, Retrieved from

http://hillside.net/plop/plop99/proceedings/Fernandez2/reservAnalysisPattern3.PDF.An Analysis Pattern for

Reservation and Use of Reusable Entities is an article that focuses on the pattern for making a reservation for hotel.

This article is written by Fernandez and Yuan. First it goes through the problem then solution, requirements and

consequences. The article is supported with some diagrams that make the understanding more clear.

The problem occurs when the user needs to reserve a hotel room or vehicle for that the system needs a table

for hotel rooms and vehicle. In order to avoid duplicate reservation for same room or vehicle the system needs a

table for available rooms and vehicle. Also, the user may needs to review the reservation so the system has a table

for reservation.

In the solution part the article first discussed the use case for requirements. The first use case is making

reservation, in this case the user make research for available demand by using date. When the demand which is

Page 10: Hotel Management System

Hotel Management System 10

room or vehicle is available the user can do reservation. The second use case is use a reserved entity. In this case

when the usage of reservation is done, the room or vehicle is recorded as available again. The third use case is

modifying the reservation. The fourth use case is cancelling the reservation.

This system can be used for other reservation like seats for flight. Also, this system can record the history

of reservation. This system is similar to our system in making reservation and history but differs in environment.

This system is an online system and the guest is the one who is responsible for reservation while our system is

local system and the reception is the one who is responsible of reservation [1].

Lauesen, S, (2003), Task Descriptions as Functional Requirements, I E E E C o m p u t e r S o c i e t y,

Retrieved from http://www.itu.dk/~slauesen/Papers/IEEEtasks.pdf . The author wrote a paper to describe the

functional requirement for hotels and hospitals. Theses functional requirements indicate what the system shall do,

data requirements indicate what it shall store, and quality requirements indicate how quickly or how easily it shall

perform. This article focuses on functional requirements, which usually describe a system's input, output, and the

relationship between the two.

The article has 3Unified Modelling Language use case diagram between the receptionist and the hotel

system. The first UML deals only with the computer system's actions; the second a use case that specifies separate

human and computer actions; and the last is a task descriptions, which do not separate human and computer

actions. These UML diagram helps us to understand the functional requirements a hotel management system.

Also the article include figures, each figure describe subtasks. The first figure is a task descriptions for a

hotel's reception work area. The second figure is a tasks and support description of hotel check-in. The last figure

describe high-level tasks for innovation and business process redesign.

This system is similar to our system in the solutions that going to be provide to the user. Such as finding a

room for guest, and receive service [2].

Page 11: Hotel Management System

Hotel Management System 11

http://owl.english.purdue.edu/owl/resource/560/01/ . This web site provides us with the way of writing a proposal

or essay with APA style.

1.3- Proposed Project

1.3.1 Objectives

Developing hotel reservation system solution.

1.3.2 Benefits:

1.3.2.1 The system will have history about reservation and guest so that can be called whenever they are needed

which helps in checking any mistake.

1.3.2.2 Making the reservation easier.

1.3.2.3 Finding the available room in short time.

1.3.3 A Preliminary Requirements Analysis:

1.3.3.1) Database :

i) To store reservation detail.

ii) To store guest detail.

iii) To store payment detail.

iv) To store rooms information.

1.3.3.2) Web Interface:

a) Reception Side:

i) Allow the reception to modify, add or delete reservation.

ii) Allow the reception to modify, add or delete guest detail.

iii) Allow the reception to provide the guest with the payment detail.

iv) Display list of on and off rooms.

v) Search about specific guest.

Page 12: Hotel Management System

Hotel Management System 12

vi) Display detail about reservation.

1.3.4 Technical Requirements-Feasibility:

1.3.4.1) Database: the data will be hosted on an Oracle database. Our group will build the tables and their

requirements as needed for controlling the system.

1.3.4.2) Web: our group will develop the web application with Visual Studio 2008 using asp.net and Visual

basic.

1.3.5 Scope:

The system provide the employee who works in the reception the ability to do reservation for the hotel

guests; by searching for available rooms, inserting the guest information, making the reservation and the payment

process. This system is build using a database that will be hosted an Oracle database and a web interface using the

Visual Studio 2008 ASP.net. In this project there are one model: The reservation model accept the guest details,

rooms details, card details and date on check in and checkout. Also, deals with the hotel rooms by adding and

removing rooms.

1.3.6 Visibility Plan :

Internal – The group will meet weekly on Sunday and Tuesday morning from 8:00 am to 12:00 pm and with Mr.

Mohammad Zikria on Wednesday morning from 9:00 am to 10:00 am to discuss progress and problems. Meeting

minutes will be kept track of and sent to all members of the Group for reference. Any additional communication

will be done via email or through other collaboration tools such as document sharing. In addition, the source code

will be stored at all members PCs, a repository for the project. All source code will be documented carefully before

being submitted to the repository. The progress of the principal activities and major milestones will be closely

monitored and compared with the schedule. During the regular meetings, progress will be compared to our chart,

which will be drafted after the completion of the requirements study when the tasks are identified and assigned.

Page 13: Hotel Management System

Hotel Management System 13

1.3.7 Suggested Deliverables:

1.3.7.1) Requirements Analysis – a document and a presentation to go over the formal requirements of

the project, both functional and non-functional. This deliverable ensures that the Group is

working on a system that closely matches to the wishes of the Client.

1.3.7.2) Design Document – a document and a presentation to go over the design of the system. This is

the Group’s opportunity to go over how the project is to be implemented to the Client.

1.3.7.3) Source Code – a document, presentation along with the source code of the final completed

project. This final deliverable wraps up and concludes the project.

1.3.8 Technical Deliverables:

1.3.8.1) A database with tables that going to support the system. These tables will be used to store the

information that are needed for reservation and payment; such as, guests detail, rooms detail,

reservation date and employees, who do the reservation, detail.

1.3.8.2) A reception interface to add, delete and modify for reservations, guests, rooms, employees and

payments. Searching for specific guest and reservation

Page 14: Hotel Management System

Hotel Management System 14

The relationships between the tables:

1. The relationship between Customers to Transaction is one to many.2. The relationship between Identify Customer to Customers is one to one. 3. The relationship between Room Category to Booking Detail is one to many.4. The relationship between Booking to Booking Details is one to one.5. The relationship between CredCard to Pyment is one to one.6. The relationship between Employees to Transaction is one to many.7. The relationship between Transaction Details to Transaction is one to one.8. The relationship between Transactions Details to Room Statues is one to many.9. The relationship between Room Status to Room Category is one to one.10. The relationship between Pyment to Transaction is one to one.11. The relationship between Payment to Payment Modes is one to one.

Figure 1: Tables

Page 15: Hotel Management System

Hotel Management System 15

Figure 2

Page 16: Hotel Management System

Hotel Management System 16

Part II Use Cases

2.1 Reception Use Cases

2.1.1 Search available room

Goal: Reception search for available room.

Actors:

Reception

System

Preconditions:

The reception must insert the check-in and check-out date.

Triggers:

The reception clicks the button " Search "

Basic Scenario :

1. The reception specify the check-in and check-out date.

2. The reception add room type.

3. Reception clicks on the button " Search ".

4. The system will show the available rooms with their type on the determined dates.

5. The reception choose the rooms the customer prefer depends on the floor number and the view and clicks

the button "Booking"

6. System will take the reception to the booking details page.

Page 17: Hotel Management System

Hotel Management System 17

Post conditions: The reception searched for the available rooms.

2.1.2 Booking Details

Goal: Insert the booking details.

Actors:

Reception

System

Preconditions:

The reception must be done with the room search.

Triggers: Reception click on the button " Save"

Basic Scenario:

1. Check-in date, check-out date and the first six rooms that have been chosen will upper automatically.

2. The reception fill the Guest Details " First and last name, Address, e-mail, telephone number and finally the

guest identification number" .

3. Then the reception must fill the guest credit card information " Credit card number, credit card holder

name, and the credit card expire date".

4. Then the reception clicks on "Save" to save all the information in the database.

5. The system will check the information before saving it in case the reception forget to insert any of the

important information.

Post condition: The reception have completed the booking details.

Page 18: Hotel Management System

Hotel Management System 18

2.1.3 Payment

Goal : Reception Confirms the room booking.

Actor:

Reception

System

Preconditions: Reception must be done with the room search and the booking details.

Triggers: Reception clicks button "Confirm"

Basic Scenario:

1. The booking details will upper on a table automatically.

2. There will be a booking number so the reception can do motivation for the booking on the future.

3. The reception will specify the payment date and the mood " Cash, check, or credit card"

4. The credit card number and the total cost will upper automatically on the page.

5. After completing all the payment details the reception clicks on confirm.

Post Condition: The room booking will be confirmed.

2.1.4 Delete Guest

Goal: Delete a guest form the system.

Actors:

Reception

System

Page 19: Hotel Management System

Hotel Management System 19

Preconditions: Reception must be able to access the system via a web browser.

Triggers: Reception clicks button "Delete Guest"

Basic Scenario:

1. Reception clicks button to initiate the delete process.

2. System prompts the Administrator to select a guest by searching using the guest identification or viewing a list

of guests.

3. System display guest information.

4. System confirms deletion of selected guest.

5. System displays home page.

Post conditions: A guest has been deleted within the system.

2.1.5 Change Guest Information

Goal: Alter properties such as telephone number or email of the guest.

Actors:

Reception

System

Preconditions: Reception must be able to access the system via a web browser.

Triggers: Reception clicks button "Change Guest Properties"

Basic Scenario:

1. Reception clicks the button to initiate change guest properties process.

Page 20: Hotel Management System

Hotel Management System 20

2. System prompts the Administrator to a guest by searching using the guest identification or viewing a list of

guest.

3. System displays the guest properties.

4. System alters the guest properties.

5. System displays the home page.

Post conditions: A room has been altered within the system.

2.1.6 Customer Search

Goal: Modify or delete a customer information.

Preconditions: The customer information should be on the database.

Triggers:

The reception searches for customer by his ID or view all the customers list.

Basic Scenario:

1. After the reception search's for a customer his information will upper on the page "First and last name,

address, telephone number, and his email".

2. There are two options either to modify the customer information or to delete the customer.

Post Condition: The customer details will be modified or deleted.

Page 21: Hotel Management System

Hotel Management System 21

2.1.7 Remainder Email

Goal: Send a reminder email to the guest two date before the check in date.

Preconditions: Reception must be able to access the system via a web browser, Booking details must be on the

database.

Triggers: Reception clicks button "Reminder Email".

Basic Scenario:

1. The Reception clicks to view a list with the entire guest who will check in after 2 days.

2. The Reception clicks "Send" to send a remainder email to each guest.

2.2 Administrator Use Cases

2.2.1 Login Administrator

Goal: To login to an Administrator account with the system.

Actors:

Administrator

System

Preconditions: Administrator account must already be registered.

Triggers: Administrator clicks button to "Login"

Basic Scenario:

1. Administrator clicks button to initiate process.

2. System prompts the Administrator for User name and password.

Page 22: Hotel Management System

Hotel Management System 22

3. System verifies information.

4. System display rooms details home page to Administrator.

Post Conditions: The administrator is logged into the system.

2.2.2 Logout Administrator

Goal: Logout the Administrator account on the system.

Actors:

Administrator

System

Preconditions: Administrator must be logged-in on the system.

Triggers: Administrator clicks button "Logout"

Basic Scenario:

1. Administrator clicks button to initiate logout process.

2. System displays home page.

Post Conditions: The Administrator is logged out of the system.

2.2.3 Add Room

Goal: Add new room to the system.

Actors:

Administrator

System

Page 23: Hotel Management System

Hotel Management System 23

Preconditions: Administrator must be able to access the system via a web browser.

Triggers: Administrator clicks button to "Add Room"

Basic Scenario:

1. Administrator clicks the button to initiate Add room process.

2. System prompts the Administrator to fill out Room number, view, and type.

3. System validates new room information.

4. System creates a new room.

5. System displays account home page to Administrator.

Post conditions: A new room is created within the system.

2.2.4 Delete Room

Goal: Delete a room form the system.

Actors:

Administrator

System

Preconditions: Administrator must be able to access the system via a web browser.

Triggers: Administrator clicks button "Remove Room"

Basic Scenario:

1. Administrator clicks button to initiate the remove process.

2. System prompts the Administrator to select a room by searching using the room number or viewing a list of

rooms.

Page 24: Hotel Management System

Hotel Management System 24

3. System display room information.

4. System confirms deletion of selected room.

5. System displays account home page to administrator.

Post conditions: A room has been deleted within the system.

2.2.5 Change Room Properties

Goal: Alter properties such as view or type of the room.

Actors:

Administrator

System

Preconditions: Administrator must be able to access the system via a web browser.

Triggers: Administrator clicks button "Change room Properties"

Basic Scenario:

1. Administrator clicks the button to initiate change room properties process.

2. System prompts the Administrator to select a room by searching using the room number or viewing a list of

rooms.

3. System displays the room properties.

4. System alters the room properties.

5. System displays the account home page to Administrator.

Post conditions: A room has been altered within the system.

Page 25: Hotel Management System

Hotel Management System 25

2.2.6 View Financial Report

Goal: View a financial report for specific time.

Actors:

Administrator

System

Preconditions: Administrator must be able to access the system via a web browser.

Triggers: Administrator clicks button " Report".

Basic Scenario:

1. System prompts the Administrator to select two dates.

2. System will display the revenue for that specific time.

Page 26: Hotel Management System

Hotel Management System 26

2.3 Use Cases Diagrams

2.3.1 Reception Uses Cases Diagrams:

Figure 3: Reception

Figure 4: Edities

Page 27: Hotel Management System

Hotel Management System 27

Figure 5: Payment

Figure 6: Reminder Email

Page 28: Hotel Management System

Hotel Management System 28

2.3.2 Administration UseCase Diagram:

Figure 7: Administration

Page 29: Hotel Management System

Hotel Management System 29

Part III Software Requirements Specifications

The following subsections of the Software Requirements Specifications (SRS) document provide an overview of

the entire SRS.

3.1 Definitions, Acronyms, and Abbreviations.

SRS – Software Requirements Specification

HMS – Hotel Management System

Subjective satisfaction – The overall satisfaction of the system

End users – The people who will be actually using the system

3.2 Overview

The SRS is organized into two main sections. The first is The Overall Description and the second is the

Specific Requirements. The Overall Description will describe the requirements of the HMS from a general

high level perspective. The Specific Requirements section will describe in detail the requirements of the

system.

3.3 The Overall Description

Describes the general factors that affect the product and its requirements. This section does not state specific

requirements. Instead it provides a background for those requirements, which are defined in section 3, and makes

them easier to understand.

3.4 Product Perspective

The HMS is an independent stand–alone system. It is totally self contained.

Page 30: Hotel Management System

Hotel Management System 30

3.5 Hardware Interfaces

The HMS will be placed on PC’s throughout the hotel.

3.6 Software Interfaces

All databases for the HMS will be configured using Oracle 10g. These databases include hotel rooms and

customers information. These can be modified by the end users. The room database will include the room

numbers and if they are vacant or occupied. The customers' information database will contain all the information

of the customer such as first name, last name, phone number, credit card number, confirmation number, check in

date, check out date and time…etc.

3.7 Product Functions

Reservation and Booking System

Allow the reception to modify, add or delete reservation.

Allow the reception to modify, add or delete guest detail.

Allow the reception to provide the guest with the payment detail.

Display list of on and off rooms.

Search about specific guest.

Display detail about reservation.

General Management Services and Automated Tasks System

Allow the administrator to modify, add or delete the room.

View a daily, weekly and monthly report.

3.8 User Characteristics

Educational level of HMS computer software – Low

Experience of HMS software – None

Page 31: Hotel Management System

Hotel Management System 31

Technical Expertise – Little

3.9 Apportioning of Requirements

The audio and visual alerts will be deferred because of low importance at this time.

Page 32: Hotel Management System

Hotel Management System 32

3.10Specific Requirements

This section contains all the software requirements at a level of detail, that when combined with the system context

diagram, use cases, and use case descriptions, is sufficient to enable designers to design a system to satisfy those

requirements, and testers to test that the system satisfies those requirements.

3.10.1 External Interfaces

The Hotel Management System will use the standard input/output devices for a personal computer. This includes

the following:

Keyboard

Mouse

3.10.2 User Interfaces

The User Interface Screens are described in table 1.

Table 2: Hotel Management User Interface Screens

Screen Name Description

Login Log into the system as Administration

Reservation Retrieve button, update/save reservation, cancel reservation,

modify reservation, , accept payment type/credit card

Hotel Payment Accept payment for room.

Customer Record Delete or update customer records

Administer Rooms Add, modify and delete rooms.

Reports Select, view

Page 33: Hotel Management System

Hotel Management System 33

3.10.3 Software Interfaces

The system shall interface with an Oracle.

3.10.4 Hardware Interfaces

The system shall run on a Microsoft Visual Basic (ASP.net).

3.10.5 Communication Interfaces

The system shall be a standalone product that does not require any communication interfaces.

3.11 Functional Requirements

Functional requirements define the fundamental actions that system must perform.

The functional requirements for the system are divided into two main categories, Reservation/Booking, and

Management. For further details, refer to the use cases.

1. Reservation/Booking

1.1. The system shall record reservations.

1.2. The system shall record the customer’s first name.

1.3. The system shall record the customer’s last name.

1.4. The system shall record the mobile number.

1.5. The system shall record the room number.

1.6. The system shall display the default room rate.

1.7. The system shall record the customer’s email.

1.8. The system shall generate a unique confirmation number for each reservation.

1.9. The system shall automatically show the customers that have reservation after two days and send a

reminder email to them

1.10. The system shall record the expected check-in date.

Page 34: Hotel Management System

Hotel Management System 34

1.11. The system shall record the expected checkout date.

1.12. The system shall allow reservations to be modified without having to reenter all the customer

information.

2. Management

2.1. The system shall allow for the addition of rooms.

2.2. The system shall allow for the deletion of rooms.

2.3. The system shall allow for the modification of rooms.

Page 35: Hotel Management System

Hotel Management System 35

3.12 Nonfunctional Requirements

Functional requirements define the needs in terms of performance, logical database requirements, design

constraints, standards compliance, reliability, availability, security, maintainability, and portability.

3.12.1 Performance Requirements

Performance requirements define acceptable response times for system functionality.

The load time for user interface screens shall take no longer than two seconds.

The log in information shall be verified within five seconds.

Queries shall return results within five seconds.

3.12.2 Logical Database Requirements

The logical database requirements include the retention of the following data elements.

Booking/Reservation System

Customer first name

Customer last name

Customer address

Customer phone number

Assigned room

Default room rate

Credit card number

Confirmation number

Expected check-in date

Expected check-out date

Payment type

Page 36: Hotel Management System

Hotel Management System 36

3.12.3 Design Constraints

The Hotel Management System shall be a stand-alone system running in a Windows environment. The system

shall be developed using Oracle and ASP.net.

3.12.4 Standards Compliance

There shall be consistency in variable names within the system. The graphical user interface shall have a

consistent look and feel.

3.12.5 Reliability

Specify the factors required to establish the required reliability of the software system at time of delivery.

3.12.6 Availability

The system shall be available during normal hotel operating hours.

3.12.7 Security

Customer Service Representative will have access to the Reservation/Booking. Managers will be able to log in to

the Hotel Management System and will have access to the Management subsystem.

3.12.8 Maintainability

The Hotel Management System is being developed in ASP.net. Visual studio is one of the products that are used

for building the system. This product is chose because it provides the user developers a compelling development

environment for Windows and. NET platforms. This product helps in building Windows application, console

application, Windows service, Windows mobile applications, ASP.NET application and ASP.NET web services

with C++, C#, VB or J#. Also, you can add additional tools that help in building interface in easy way. For the end

user, the ASP and VB is used in developing Hotel Management System. Also, it helps in creating Crystal report

and connection with the database by using ODB. The other product that has been chosen is Oracle Database 10g

Page 37: Hotel Management System

Hotel Management System 37

Express Edition. It has been chosen for the background of the system. As it can build the tables and quires in easy

way and connected with the end user in effective way. 

3.12.9 Portability

The Hotel Management System shall run in any Microsoft Windows environment.

Page 38: Hotel Management System

Hotel Management System 38

Part IV Task Analysis

Hotel management system has two use cases. First one is the administrator and the second one is the reception side.

The administrator has the permission to use all task in the system but for the rooms setting he/she has to log into

the system with successful user and password. The reception primarily concerned with siven tasks: searching

available room, doing reservation to the available room, doing the process for paying or canceling the booking,

doing the setting for guests and credit card, finding out information about specific booking and sending a reminder

to the guests before check-in day.

4.1 System Rules

1. The reception can use the system without authentication. But his/her use is limited.

2. The reception cannot insert the Room setting.

3. The admin needs to log in to use the Room setting.

4. The check in data has to be bigger or equal to the current date.

5. The check in data has to be smaller than the check out date.

6. The required text box has to be filled.

7. The Booking ID, Booking Detail ID and Payment ID will be inserted automatically by using automatically

increment.

4.2 Subtasks

searching is almost a small system that is used as a sub system in the hotel management system to find

available room. In order to do this, the reception must know the check in day, check out day, may

choose the type of view or the type of room. Then the reception submits this information to the system

and the system will find out the available room according to this information. And the system will

generate a list of available room that meet these information. After that the reception can choose the

Page 39: Hotel Management System

Hotel Management System 39

wanted room to do a new reservation or to do update for old reservation. For the update process the

reception will need the booking number.

To do a reservation to the available rooms, the reception needs the names of the required rooms. Fill

the information about the guest and credit card’s information. Then the reception can submit the

required detail for reservation or go back to the home page without doing the reservation. After the

reservation is done, the system will show the reservation's detail.

The process for paying can be done after the reservation immediately or before doing the checkout day.

In order to do the paying, the reception needs to know which booking he/she going to do the paying

for. So this process needs the booking number, payment information; such as, mode of payment, if it is

cash or by credit card the payment process needs the date of payment and the total cost.

As some information of the guest or credit card exposed to be changed, the reception needs the guest

ID or the Credit Card ID and he/she needs to the new information to do the update according the

change.

Some times the hotel needs to know information about specific booking, for that the system provides

the user with ability to find this required information. In this case, the reception needs the booking ID.

For sending a reminder to the guest, the system has a button called reminder. When the reception clicks

this button, the system will check all the check in days and it will send a reminder to guests whose

check in day after two or one days.

Page 40: Hotel Management System

Hotel Management System 40

For doing the setting for hotel rooms and it is category, user needs to be admin and needs to log into

the system before doing the setting for the rooms. In this setting the user can delete, update and add

room. For deleting the user needs the room’s ID. For updating the user needs the room’s ID and

inserting the new detail. For adding the, if the user want to add new room needs to know the ID for the

category and to insert new ID for the new room. If the user wants to add new category, needs to insert

new ID, room’s floor, room’s category, room’s price.

Page 41: Hotel Management System

Hotel Management System 41

4.3 Hierarchical Task Decomposition

Figure 8: Search for available room

Page 42: Hotel Management System

Hotel Management System 42

Figure 9: Reservation

Page 43: Hotel Management System

Hotel Management System 43

Figure 10: Paying

Page 44: Hotel Management System

Hotel Management System 44

Figure 11: Setting

Page 45: Hotel Management System

Hotel Management System 45

Part V Interface

5.1 Search

this task is needed to make finding out the available rooms easier. During the searching the system needs to ensure

that there is no conflict in the chosen room. The system has to ensure that the wanted room in the specific time is

not assigned to other guest in that time. Because the guest may demand specific room’s features; such as, the type

of the room or the view of the room, the system provide the user with the ability of choosing the type of view and

the type of the room. After the criteria of the search are determined, the system connects with the database to find

out the rooms that concerned with these required features.

Figure 12: Search and Update Form

Page 46: Hotel Management System

Hotel Management System 46

If the user insert a date that is past or the check out date is earlier than the check in date the system will pop up a

message box to notify the user about the mistake that has been done.

Figure 13: Checking inserted date

Figure 14: Checking date

If the user clicks Detail, Modify or Pay button without inserting the Booking ID, he/ she will receive a message

that said you have to enter a Booking ID.

Page 47: Hotel Management System

Hotel Management System 47

Figure 15: Notifying The User That the BookinNo is Empty

If the search is done successfully, the system generates a list of available rooms in grid view with check box. This

check box enables the user to choose the room from the grid view. After checking the box, the user can do a new

reservation or can do an update to old reservation. The system has a text box for inserting a booking number which

is needed to find the old reservation from the database and does the change.

Figure 16: Search Result

Page 48: Hotel Management System

Hotel Management System 48

As the system aims to make the process in hotel management easy to the end user, the two text boxes which are

used to insert the check in date and check out date are provided with calendar extender. So, whenever the user

clicks on these two text boxes, a calendar will show up. The user can choose date from it and it will be written

automatically in the text box.  

Figure 17: Calendar

5. 2 Booking

After the submission of booking is clicked, the system will forward to booking page with keeping the ID of the

rooms and category that has been chosen by using the session. Then the booking page will load the session in the

text boxes. In addition to that, the guest detail will be needed to fill other text boxes. Some of this information is

mandatory; such as, first name, last name, ID and email. The first name and last name are mandatory to help the

reception to ensure who reserve the specific room. ID helps in making the delete or the update for the guest detail.

On the other hand, the email is important for sending the remainder to the user.

Page 49: Hotel Management System

Hotel Management System 49

Figure 18: Reservation Form

Also, this page has a required for inserting the credit card information which has three requirements. One for credit

card‘s ID, the second one for holder’s name and the third one for expired date. As the credit card’s ID is important

in doing cancel or updating to the credit card this field is mandatory.

When the user fills all mandatory information, has two choices, one is to click the save button which will transfer

the page to booking’s details page. And the second one is to click the exit button which will transfer the current

page to the home page which is the search page.

Page 50: Hotel Management System

Hotel Management System 50

Figure 19: Credit Card Form

For preventing the user to do a reservation when there is any field of the mandatory is empty, when the save button

is clicked the system will check if any of the mandatory field is empty or not. If one of them field is empty, the

system will not do the booking and it will pop up a message box that notifies the user about the empty field.

Figure 20: Missing Field Message

Page 51: Hotel Management System

Hotel Management System 51

Because the user could insert Invalid e mail address, the system is provided with the checker that going to check if

the email address is written correct or not. The checker will check if the email address has a @ character and if it

has a dot (.) character. If the written email is unveiled, a message will be written that tells the user that the email is

Invalid.

Figure 21: Invalid Email

5.3 Paying

after the reservation are done, the user can transfer to the home page or can transfer to the paying page. In the

paying page, session is used to provide the page with grid view of the guest detail who want to do payment and

his/her reservation’s detail. Also, this page has a text box for booking detail, which will be field automatically by

the session value, also, it has a text boxes for total cost, payment date and credit card. In addition to that, it has drop

down list for payment mode. The total cost calculates and field automatically.  

Page 52: Hotel Management System

Hotel Management System 52

Figure 22:

Payment Form

Figure 23: Booking Detail in the Payment page

5.4 Guest Detail

the reception can get all information about specific guest. He/ she can know the guest's first name, last name,

telephone, email, address, his/her reservation room and payment statue by inserting a booking number and clicking

on detail button. Also, the web site has a text boxes for enabling the reception to do update or delete the guest’s

detail.

Page 53: Hotel Management System

Hotel Management System 53

Figure 24:

Guest Setting Form

Figure 25: Finding information about specific guest

Page 54: Hotel Management System

Hotel Management System 54

Figure 26: Finding all Guests' information by clicking the all button

When the delete button is clicked message will show up to ask the user if he/she is sure that he/she want to delete,

if he/she clicks Yes the delete will be done. But if he/she clicks No, nothing will be happen.

Figure 27: Confirmation Message

5.5 Log in

the administrator who is responsible for doing rooms setting. but before doing the room setting the administrator

Page 55: Hotel Management System

Hotel Management System 55

has to log in. the system has a authentication for the administrator when he/she log in will be in the home page but

if he/she try to use the room setting page without log in the system will transfer him/her to the log in page.

Figure 28: Login Form

If the administrator inserts wrong username or password the system will notify the user by the mistake.

Figure 29: Log in Error Message

If the login is done successfully, the web page will transfer to the home page or to application that wanted to use

Page 56: Hotel Management System

Hotel Management System 56

before login. If the page transfer to the home page, the home page will has the name of the username and the log

out.

Figure 30: Login

Report

The web site has two different types for financial report. One views the financial report for one day. And the other

is viewing financial report for specific period of time.

Page 57: Hotel Management System

Hotel Management System 57

Reminder

The web site will send an email to the guests before there check in date by two days.

Page 58: Hotel Management System

Hotel Management System 58

Part VI Challenges

The real difficulty was that we do not know how to start with a language that we do not know anything about. We

did not know if we need to write the codes or to drags things, what are the properties and features of this language.

What functions and keywords that can help in this project; such as, in printing a table of the wanted date, taking the

value from the text box and uses it in functions, taking a single value from the data base(end back) and uses it in

the interface (end front).

The first challenge that we faced is how to deal with ASP.net and what we shall use with a Visual Basic or a C#.

we did a search for finding a solution to this, and most of the website shows how to write a ASP codes and Visual

Basic or C# codes without saying where we have to write and because Dr. Ammar talked with us in data base

theory about web developer with Visual basic, we try to search this software and we find that we can use a Visual

Studio that has a web site developer with ASP. But until that time we do not know where we can use the VB codes

or the C# code and with keeping search and trying we find where to put the VB or C# codes.

After that we keep searching about VB and C# to decide which support language we are going to choose. We have

tried some codes with VB and C# and the first one that worked with us which is the VB we have depended it.

The most important step is how to connect the web with the data base (Oracle). We found the following way:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\ MymdbFile.mdb;User ID=Admin;Jet OLEDB:Database

Password=You'rePassword;

Page 59: Hotel Management System

Hotel Management System 59

Most of the web site used this which is for Microsoft Access while our project is Oracle data base. For that, we

search for a compatible provider with Oracle. We have tried this providers OraOLEDB.Oracle and SQLOLEDB

but the solution was OraOLEDB.Oracle.1 but even with this we got an error and we found the solution that we

have to add a reference in config page. YouTube showed as how to add this reference which is a

System.Data.OracleClinet.

Most big challenge is the date. We need the date for inserting check in date and check out date to find the available

room. And the problem was when we insert the date by using the calendar extender, the date is inserted as

mm/dd/yyyy, while the Oracle accepts it as yyyy/mm/dd. the first solution came to our mind to do conversion to

the text box’s value from string to date. We have used this following code

Date.FromOADate(Val(txtStartDate.Text)

The insertion works well with this codes but when we do the comparing between the current date and this

conversion date, it does not work well. After a weeks, we find that we got another problem which is this

conversion converse the date to 1900 year not as the current year. So we try to find another solution; such as,

Date.FromFileTimeUtc(Val(TextEndDate.Text)

and even this has same problem as the first one. After long searching, we found two solutions for this problem.

One is that we can change the format of the date by using the form attribute in the calendar extender. This can be

shown in the following codes

Page 60: Hotel Management System

Hotel Management System 60

<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtStartDate"

runat="server" Format="yyyy/MM/dd" OnClientDateSelectionChanged="checkDate" />

the other solution is putting a commend like date_to inside the insertion the following codes clarify this commend:

INSERT INTO booking (CHECKIN) VALUES (TO_DATE('12/31/2001','YYYY/MM/DD’)

In our project we have chose the first solution which is with calendar extender.

The other challenge is how to transfer form one page to another page without losing  specific value or with transfer

specific value form one page to other page. After searching, we found that Microsoft has several solutions to this

problem and our chose was by using the session.

Session("field88") = txtStartDate.Text

one of the most important challenges is how to generate data from the data base to the interface. (in the grid view).

We did not know exactly what feature in ASB and VB can help us.  With searching we found that we can use the

data set but how we can write the SQL commend.   The solution was by using a variable with type

OleDbCommand.

In our data some field most not is null.  So, when we insert the data from the interface to the data base we must

check if the text box that is going to insert to these field is null or not.   One of the solutions that we have tried is

Page 61: Hotel Management System

Hotel Management System 61

Dim c As Control

For Each c In form1.Controls

If c.Text = String.Empty Then

MsgBox("Please Enter the " & c.Name, MsgBoxStyle.Information, "Note")

c.Focus()

End If

Next

With the above code the web will check all text box even if there is no need  to check.   Also, we have tried these  

 CheckIn.Text <> vbNullString

CheckIn.Text.Length = 0

and the solution was  If TextBox2.Text = "".

For completing our data in data base we have to get some single value from the data base to the inter face.  Then,

applies it in some function or commend to insert it a gain in different field.   For example,   when we want to

calculate the total cost we have to get the price from the data base to the VB.  First we used an ExecuteScalar ();

but it does not work with us. So, we have tried to solve the problem with the data set.  The following codes is the

used solution;

price = myDataSet.Tables("R").Rows(0).Item("Rprice")

Page 62: Hotel Management System

Hotel Management System 62

Part VII

Conclusion

The ability to search about specific information or detail before and after doing hotel reservation or to organize

hotel's room in easy way with customizing customer detail and checking the valid credit card are some purpose to

build system which makes dealing with these requirement possible with easy and fast way. Hotel management

system is built to find suitable solution for reservation and customization of rooms, customers, payments and credit

cards. This system deal with the database as a end back which based on Oracle and its interface based on ASP and

Visual basic. The interface aims to make reservation and using other tools easy to every one without needing to

learn how to use. The Visual basic has the responsibility of checking valid credit card, exist of customer ID ,

finding the available room .

Page 63: Hotel Management System

Hotel Management System 63

Appendix A

CODES

8.1 VB And ASP

8.1.1 The code for the text box: 

 

<asp:TextBox ID="TextBox5" runat="server">

 

8.1.2 Connection between the web and database: 

 

Dim Conn As New OleDbConnection("Provider=OraOLEDB.Oracle.1;Data Source=localhost;User

ID=HR;Password=amanigeama;Unicode=True")

8.1.3 Insertion from the web to the database

Dim Conn As New OleDbConnection("Provider=OraOLEDB.Oracle.1;Data Source=localhost;User

ID=HR;Password=amanigeama;Unicode=True")

Dim MyCmd As New OleDbCommand

Conn.Open()

Dim InsertCommand As New OleDbCommand

Dim CMD As New OleDbCommand

CMD.Connection = Conn

Page 64: Hotel Management System

Hotel Management System 64

CMD.CommandType = CommandType.Text

CMD.CommandText = "SELECT RCID FROM RoomC WHERE RCID = '" & TextBox2.Text & "'"

Dim reader As OleDbDataReader

reader = CMD.ExecuteReader

If reader.Read Then

InsertCommand.Connection = Conn

InsertCommand.CommandType = CommandType.Text

InsertCommand.CommandText = "INSERT INTO RoomS(RID,RCID) VALUES(?,?)"

InsertCommand.Parameters.Clear()

InsertCommand.Parameters.AddWithValue("?", TextBox1.Text)

InsertCommand.Parameters.AddWithValue("?", TextBox2.Text)

InsertCommand.ExecuteNonQuery()

InsertCommand.Dispose()

Conn.Close()

MsgBox(" OK ", MsgBoxStyle.Information)

ElseIf Not reader.Read Then

MsgBox(" The room category not exist in Room Category table ", MsgBoxStyle.Information)

End If

 

 

 

Page 65: Hotel Management System

Hotel Management System 65

8.1.4 Deleting from the database by using the web  

Dim Conn As New OleDbConnection("Provider=OraOLEDB.Oracle.1;Data Source=localhost;User

ID=HR;Password=amanigeama;Unicode=True")

Conn.Open()

Dim DeleteCommand As New OleDbCommand

DeleteCommand.Connection = Conn

Dim CMD As New OleDbCommand

CMD.Connection = Conn

CMD.CommandType = CommandType.Text

CMD.CommandText = "SELECT RID FROM RoomS WHERE RID = '" & TextBox1.Text & "'"

Dim reader As OleDbDataReader

reader = CMD.ExecuteReader

If reader.Read Then

DeleteCommand.CommandType = CommandType.Text

DeleteCommand.CommandText = " DELETE FROM RoomS WHERE RID = ? "

DeleteCommand.Parameters.Clear()

DeleteCommand.Parameters.AddWithValue("?", TextBox1.Text)

DeleteCommand.ExecuteNonQuery()

DeleteCommand.Dispose()

Conn.Close()

MsgBox(" OK ", MsgBoxStyle.Information)

ElseIf Not reader.Read Then

MsgBox(" The room ID does not exist in Rooms Table ", MsgBoxStyle.Information)

Page 66: Hotel Management System

Hotel Management System 66

End If

 

8.1.5 Updating the data

 

Dim Conn As New OleDbConnection("Provider=OraOLEDB.Oracle.1;Data Source=localhost;User

ID=HR;Password=amanigeama;Unicode=True")

Conn.Open()

Dim UpdateCommand As New OleDbCommand

UpdateCommand.Connection = Conn

Dim CMD As New OleDbCommand

CMD.Connection = Conn

CMD.CommandType = CommandType.Text

CMD.CommandText = "SELECT RCID FROM RoomC WHERE RCID = '" & TextBox2.Text & "'"

Dim reader As OleDbDataReader

reader = CMD.ExecuteReader

If reader.Read Then

UpdateCommand.CommandType = CommandType.Text

UpdateCommand.CommandText = "UPDATE RoomS set RCID=? WHERE RID =? "

UpdateCommand.Parameters.Clear()

UpdateCommand.Parameters.AddWithValue("?", TextBox2.Text)

UpdateCommand.Parameters.AddWithValue("?", TextBox1.Text)

UpdateCommand.ExecuteNonQuery()

UpdateCommand.Dispose()

Page 67: Hotel Management System

Hotel Management System 67

Conn.Close()

MsgBox(" OK ", MsgBoxStyle.Information)

ElseIf Not reader.Read Then

MsgBox(" The room category does not exist in Room Category table ", MsgBoxStyle.Information)

End If

 8.1.6 Adding the Calendar Extender

 For Adding calendar extender, the toolkitScriptManager has to be added. Then the colander drags from the Ajax

toolbox:

 

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">

</asp:ToolkitScriptManager>

 <asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>

<asp:CalendarExtender ID="CalendarExtender1" TargetControlID="txtStartDate"

runat="server" Format="yyyy/MM/dd" OnClientDateSelectionChanged="checkDate" />

 

 8.1.7 Transfer value form page to another page

session that is used for saving the value of the text box:

Session("field88") = txtStartDate.Text

Session("field99") = TextEndDate.Text

8.1.8 Search Code

 This following code is for doing the search for the available room:

Dim Conn As New OleDbConnection("Provider=OraOLEDB.Oracle.1;Data Source=localhost;User

ID=HR;Password=amanigeama;Unicode=True")

Page 68: Hotel Management System

Hotel Management System 68

Dim MyCmd As New OleDbCommand

Dim myDataSet As New DataSet

myDataSet.Clear()

Conn.Open()

MyCmd.Connection = Conn

MyCmd.CommandType = CommandType.Text

Dim currentDate As Date

currentDate = System.DateTime.Now

If txtStartDate.Text < TextEndDate.Text Then

If System.DateTime.Now < txtStartDate.Text Or System.DateTime.Now < TextEndDate.Text Then

If DropDownList2.Items(0).Selected = True Then

If DropDownList1.Items(0).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RS.rid NOT IN (SELECT RS.rid FROM RoomC

RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text

& "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(1).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.category = '" &

DropDownList1.Items(1).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM RoomC RC,

BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text & "'

>= BD.CheckOut) AND RS.rid = BD.rid)"

Page 69: Hotel Management System

Hotel Management System 69

ElseIf DropDownList1.Items(2).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.category = '" &

DropDownList1.Items(2).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM RoomC RC,

BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text & "'

>= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(3).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.category = '" &

DropDownList1.Items(3).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM RoomC RC,

BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text & "'

>= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(4).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.category = '" &

DropDownList1.Items(4).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM RoomC RC,

BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text & "'

>= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(5).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.category = '" &

DropDownList1.Items(5).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM RoomC RC,

BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text & "'

>= BD.CheckOut) AND RS.rid = BD.rid)"

Page 70: Hotel Management System

Hotel Management System 70

End If

ElseIf DropDownList2.Items(1).Selected = True Then

If DropDownList1.Items(0).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(1).Value

& "' AND RS.rid NOT IN (SELECT RS.rid FROM RoomC RC, BOOKINGDETAIL BD WHERE ( '" &

txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid =

BD.rid)"

ElseIf DropDownList1.Items(1).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(1).Value

& "'AND RC.category = '" & DropDownList1.Items(1).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(2).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(1).Value

& "' AND RC.category = '" & DropDownList1.Items(2).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(3).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview

FROM RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" &

DropDownList2.Items(1).Value & "' AND RC.category = '" & DropDownList1.Items(3).Value & "' AND RS.rid

Page 71: Hotel Management System

Hotel Management System 71

NOT IN (SELECT RS.rid FROM RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <=

BD.CheckIn AND '" & TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(4).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(1).Value

& "' AND RC.category = '" & DropDownList1.Items(4).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(5).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(1).Value

& "' AND RC.category = '" & DropDownList1.Items(5).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

End If

ElseIf DropDownList2.Items(2).Selected = True Then

If DropDownList1.Items(0).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(2).Value

& "' AND RS.rid NOT IN (SELECT RS.rid FROM RoomC RC, BOOKINGDETAIL BD WHERE ( '" &

txtStartDate.Text & "' <= BD.CheckIn AND '" & TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid =

BD.rid)"

ElseIf DropDownList1.Items(1).Selected = True Then

Page 72: Hotel Management System

Hotel Management System 72

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(2).Value

& "'AND RC.category = '" & DropDownList1.Items(1).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(2).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(2).Value

& "' AND RC.category = '" & DropDownList1.Items(2).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(3).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(2).Value

& "' AND RC.category = '" & DropDownList1.Items(3).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(4).Selected = True Then

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(2).Value

& "' AND RC.category = '" & DropDownList1.Items(4).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

ElseIf DropDownList1.Items(5).Selected = True Then

Page 73: Hotel Management System

Hotel Management System 73

MyCmd.CommandText = "Select RS.rid, RC.RCID, RC.Category, RC.Rprice, RC.RFloor, RC.Rview FROM

RoomC RC , RoomS RS WHERE RC.RCID = RS.RCID AND RC.Rview = '" & DropDownList2.Items(2).Value

& "' AND RC.category = '" & DropDownList1.Items(5).Value & "' AND RS.rid NOT IN (SELECT RS.rid FROM

RoomC RC, BOOKINGDETAIL BD WHERE ( '" & txtStartDate.Text & "' <= BD.CheckIn AND '" &

TextEndDate.Text & "' >= BD.CheckOut) AND RS.rid = BD.rid)"

End If

End If

 

MyCmd.Parameters.Clear()

MyCmd.Parameters.AddWithValue("?", txtStartDate.Text)

MyCmd.Parameters.AddWithValue("?", TextEndDate.Text)

Dim adapter As New OleDb.OleDbDataAdapter(MyCmd.CommandText, Conn)

adapter.Fill(myDataSet, "0")

GridView1.DataSource = myDataSet.Tables("0")

GridView1.DataBind()

Else

MsgBox(" you have chose a previous data")

End If

Else

Page 74: Hotel Management System

Hotel Management System 74

MsgBox(" the checkin data is bigger than the check out date")

End If

Conn.Close()

 

8.1.9  Log in code

 

<asp:LoginView ID="LoginView1" runat="server">

<LoggedInTemplate>

<span class="input">You are logged in. Welcome </span>

<asp:LoginName ID="LoginName1" runat="server" />

</LoggedInTemplate>

<AnonymousTemplate>

You are not logged in. Click the Login link to sign in.

<asp:Button ID="button7" runat="server" onclick="button7_Click"

Text="Reminder" />

</AnonymousTemplate>

</asp:LoginView>

<br />

<asp:LoginStatus ID="LoginStatus1" runat="server" />

8.1.10 Checking exit of the Customer ID Code

Using reader to check if the customer ID is exit or not, before doing insert to the Guest detail.

 Dim CMD As New OleDbCommand

CMD.Connection = Conn

Page 75: Hotel Management System

Hotel Management System 75

CMD.CommandType = CommandType.Text

CMD.CommandText = "SELECT CID FROM CUSTM WHERE CID = '" & TextBox7.Text & "'"

Dim reader As OleDbDataReader

reader = CMD.ExecuteReader

'INSERT INTO THE CUSTOMER TABLE

If Not reader.Read Then

 

'INSERT INTO CUTOMER TABLE

Dim InsertCUST As New OleDbCommand

InsertCUST.Connection = Conn

InsertCUST.CommandType = CommandType.Text

InsertCUST.CommandText = "INSERT INTO CUSTM(CID,CFirstName,CLastName,Address,PhoneNUM,Email)

VALUES(?,?,?,?,?,?)"

InsertCUST.Parameters.Clear()

InsertCUST.Parameters.AddWithValue("?", TextBox7.Text)

InsertCUST.Parameters.AddWithValue("?", TextBox2.Text)

InsertCUST.Parameters.AddWithValue("?", TextBox3.Text)

InsertCUST.Parameters.AddWithValue("?", TextBox4.Text)

InsertCUST.Parameters.AddWithValue("?", TextBox6.Text)

InsertCUST.Parameters.AddWithValue("?", TextBox5.Text)

InsertCUST.ExecuteNonQuery()

Page 76: Hotel Management System

Hotel Management System 76

InsertCUST.Dispose()

End If

reader.Close()

MsgBox(" OK ", MsgBoxStyle.Information)

 

 

8.1.11 Calculating the total cost

Dim day As Int32

Dim chi As Date

Dim cho As Date

Dim price As Int16

 

price = 0

chi = CheckIn.Text

cho = Checkout.Text

day = DateDiff(DateInterval.Day, chi, cho)

Dim RomPrice As New OleDbCommand

RomPrice.Connection = Conn

RomPrice.CommandType = CommandType.Text

RomPrice.CommandText = "SELECT Rprice from RoomC WHERE RCID = '" & TextBox19.Text & "'"

Dim Room As New OleDb.OleDbDataAdapter(RomPrice.CommandText, Conn)

Room.Fill(myDataSet, "R1")

Page 77: Hotel Management System

Hotel Management System 77

price = myDataSet.Tables("R1").Rows(0).Item("Rprice")

price = price * day

myDataSet.Clear()

Page 78: Hotel Management System

Hotel Management System 78

8.2 Database codes

8.2.1 Tables

8.2.1.1 CUSTOMER TALBE

CREATE TABLE CUSTM (

CID VARCHAR(25) NOT NULL,

CFirstName VARCHAR(120) NOT NULL,

CLastName VARCHAR(120) NOT NULL,

Address VARCHAR(255),

GENDER CHAR(2),

PhoneNUM VARCHAR(15),

Email VARCHAR(25) NOT NULL,

-- updata to set a city in this table

CONSTRAINT CUST_ID_PK

PRIMARY KEY ( CID ),

CONSTRAINT CUST_ID_NN

CHECK ( "CID" IS NOT NULL ),

--Foreign Key (IDNUM) REFERENCES IdentityCustomer( IDNUM )

);

ALTER TABLE CUSTM ADD CONSTRAINT CUST_GENDER

CHECK (Gender = 'M' OR Gender = 'F' )

;

Page 79: Hotel Management System

Hotel Management System 79

8.2.1.2 ROOM Category TALBE

CREATE TABLE RoomC (

RCID CHAR(5) NOT NULL,

Category VARCHAR(30),

Rprice NUMBER,

RFloor VARCHAR(15),

Rview VARCHAR(15),

CONSTRAINT ROOM_CATE_ID_PK

PRIMARY KEY ( RCID ),

CONSTRAINT ROOM_CATE_ID_NN

CHECK ( "RCID" IS NOT NULL )

);

8.2.1.3 ROOMs TALBE

CREATE TABLE RoomS (

RID CHAR(6) NOT NULL,

RCID CHAR(5) NOT NULL, -- we have to put 5 here because the R are 5

CONSTRAINT ROOM_STAT_ID_PK

PRIMARY KEY ( RID ),

CONSTRAINT ROOM_STAT_ID_NN

CHECK ( "RID" IS NOT NULL ),

CONSTRAINT ROOM_STAT_CATE_ID_NN

CHECK ( "RCID" IS NOT NULL )

Page 80: Hotel Management System

Hotel Management System 80

);

ALTER TABLE RoomS ADD CONSTRAINT ROOM_STAT_CATE_ID_FN

FOREIGN KEY ( RCID )

REFERENCES RoomC( RCID )

;

8.2.1.4 BOOKING TALBE

CREATE TABLE Booking (

BID VARCHAR(10) NOT NULL,

CheckIn DATE NOT NULL,

CheckOut DATE NOT NULL,

TotalRoom NUMBER,

TotalPrice NUMBER,

CID VARCHAR(20) NOT NULL,

PayStatue VARCHAR(15) DEFAULT 'Not Payed' NOT NULL,

CONSTRAINT B_ID_PK

PRIMARY KEY (BID),

CONSTRAINT B_ID_NN

CHECK ( "BID" IS NOT NULL ),

CONSTRAINT B_CHECKIN_NN

CHECK ( "CheckIn" IS NOT NULL ),

CONSTRAINT B_CheckOut_NN

CHECK ( "CheckOut" IS NOT NULL ),

Page 81: Hotel Management System

Hotel Management System 81

CONSTRAINT B_CID_NN

CHECK ( "CID" IS NOT NULL ),

CONSTRAINT B_PayStatue _NN

CHECK ( "PayStatue" IS NOT NULL )

);

8.2.1.5 BOOKINGDETAIL TALBE

CREATE TABLE BOOKINGDETAIL (

RBID VARCHAR(10) NOT NULL,

BID VARCHAR(10) NOT NULL,

RID CHAR(6) NOT NULL,

RCID CHAR(5) NOT NULL,

CheckIn DATE NOT NULL,

CheckOut DATE NOT NULL,

TotalDays NUMBER,

TotalPrice NUMBER,

CONSTRAINT ROOM_BOOK_ID_PK

PRIMARY KEY ( RBID),

CONSTRAINT ROOM_BOOK_ID_NN

CHECK ("RBID" IS NOT NULL ),

CONSTRAINT BOOK_RooM_ID_NN

CHECK ( "BID" IS NOT NULL ),

CONSTRAINT ROOM_BOOK_RID_NN

Page 82: Hotel Management System

Hotel Management System 82

CHECK ( "RID" IS NOT NULL ),

CONSTRAINT ROOM_CET_BOOK_ID_NN

CHECK ( "RCID" IS NOT NULL )

);

ALTER TABLE BOOKINGDETAIL ADD CONSTRAINT R_BOOING_ID_FN

FOREIGN KEY ( BID )

REFERENCES Booking( BID )

;

ALTER TABLE BOOKINGDETAIL ADD CONSTRAINT R_BOOK_ROOM_FN

FOREIGN KEY ( RID )

REFERENCES RoomS( RID )

;

ALTER TABLE BOOKINGDETAIL ADD CONSTRAINT R_CET_BOOK_ROOM_FN

FOREIGN KEY ( RCID )

REFERENCES RoomC( RCID )

;

8.2.1.6 CreditCard TALBE

CREATE TABLE CreditCard (

CreditCardNo VARCHAR(25) NOT NULL,

CardName VARCHAR(20) NOT NULL,

CardExpir VARCHAR(20) NOT NULL,

CONSTRAINT CREADIT_CARD_ID_PK

PRIMARY KEY (CreditCardNo),

Page 83: Hotel Management System

Hotel Management System 83

CONSTRAINT CREADIT_CARD_ID_NN

CHECK ( CreditCardNo IS NOT NULL ),

CONSTRAINT CREADIT_CardName_NN

CHECK ( CardName IS NOT NULL ),

CONSTRAINT CREADIT_CardExpir_NN

CHECK ( CardExpir IS NOT NULL )

);

8.2.1.7 Payment TALBE

CREATE TABLE Payment (

PaymentID CHAR(7) NOT NULL,

PaymentDate DATE NOT NULL,

TotalPrice NUMBER,

PaymentMode VARCHAR(20) NOT NULL,

BID VARCHAR(10) NOT NULL,

CreditCardNo VARCHAR(25) NOT NULL,

CONSTRAINT PAYMENT_ID_PK

PRIMARY KEY (PaymentID),

CONSTRAINT PAYMENT_ID_NN

CHECK ( PaymentID IS NOT NULL ),

CONSTRAINT PAYMENT_PAY_MOD_NN

CHECK ( "PMID" IS NOT NULL ),

Page 84: Hotel Management System

Hotel Management System 84

CONSTRAINT PAY_CREADIT_CARD_NO_NN

CHECK ( CreditCardNo IS NOT NULL ),

CONSTRAINT PAY_BID_NN

CHECK ( BID IS NOT NULL ),

CONSTRAINT PAY_PaymentDate_NN

CHECK ( PaymentDate IS NOT NULL )

);

ALTER TABLE Pyment ADD CONSTRAINT PAY_BOOKINGID_FN

FOREIGN KEY ( BID )

REFERENCES Booking( BID )

;

ALTER TABLE Pyment ADD CONSTRAINT PAY_CREDIT_NO_FN

FOREIGN KEY ( CreditCardNo )

REFERENCES CreditCard( CreditCardNo )

;

Page 85: Hotel Management System

Hotel Management System 85

8.2.2 Insertion into table

8.2.2.1 Some of insertion into Room category

Insert INTO RoomC ( RCID , Category , Rprice , RFloor , Rview)

VALUES ( 'RC11' , 'Standard Room' , 110 , 'First Floor' , 'Sea')

;

Insert INTO RoomC

VALUES ( 'RC12' , 'Superior Room' , 130 , 'First Floor' , 'Sea' )

;

Insert INTO RoomC

VALUES ( 'RC13' , 'Standard Room' , 100 , 'First Floor' , 'PMU' )

;

Insert INTO RoomC

VALUES ( 'RC14' , 'Superior Room' , 120 , 'First Floor' , 'PMU' )

;

Insert INTO RoomC

VALUES ( 'RC21' , 'Standard Room' , 120 , 'Secon Floor' , 'Sea' )

;

Insert INTO RoomC

Page 86: Hotel Management System

Hotel Management System 86

VALUES ( 'RC22' , 'Standard Room' , 110 , 'Secon Floor' , 'PMU' )

;

Insert INTO RoomC

VALUES ( 'RC23' , 'Superior Room' , 130 , 'Secon Floor' , 'Sea' )

;

Insert INTO RoomC

VALUES ( 'RC24' , 'Superior Room' , 120 , 'Secon Floor' , 'PMU' )

;

Insert INTO RoomC

VALUES ( 'RC25' , 'Deluxe Room' , 150 , 'Secon Floor' , 'Sea' )

;

Insert INTO RoomC

VALUES ( 'RC26' , 'Deluxe Room' , 140 , 'Secon Floor' , 'PMU' )

Page 87: Hotel Management System

Hotel Management System 87

8.2.2.2 Some of insertion into RoomS

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R111' , 'RC11' )

;

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R110' , 'RC12')

;

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R120' , 'RC13')

;

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R130' , 'RC14')

;

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R140' , 'RC14')

;

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R150' , 'RC12');

Page 88: Hotel Management System

Hotel Management System 88

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R160' , 'RC11' );

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R170' , 'RC11')

;

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R180' , 'RC13')

;

Insert INTO RoomS (RID ,RCID)

VALUES ( 'R190' , 'RC12' )

;

Page 89: Hotel Management System

Hotel Management System 89

8.2.3 Trigger

8.2.3.1 Creating Sequence

CREATE SEQUENCE RB_ID

MINVALUE 1

START WITH 1

INCREMENT BY 1

CACHE 333

CREATE SEQUENCE PM_ID

MINVALUE 1

START WITH 1

INCREMENT BY 1

CACHE 333

8.2.3.2 Creating Trigger

create or replace trigger PAYMENT_trigger

before insert on Pyment for each row

begin

if :new.PaymentID is null then

select PM_ID.nextval into :new.PaymentID from dual;

end if;

end;

create or replace trigger B_trigger

Page 90: Hotel Management System

Hotel Management System 90

before insert on Booking for each row

begin

if :new.BID is null then

select B_ID.nextval into :new.BID from dual;

end if;

end;

create or replace trigger BD_trigger

before insert on BOOKINGDETAIL for each row

begin

if :new.RBID is null then

select RB_ID.nextval into :new.RBID from dual;

end if;

end;

create or replace trigger BDID_trigger

before insert on BOOKINGDETAIL for each row

begin

if :new.BID is null then

select B_ID.currval into :new.BID from dual;

end if;

end;

Page 91: Hotel Management System

Hotel Management System 91

Reference

[1] Fernandez,E & Yuan, X,(1999). An Analysis Pattern for Reservation and Use of Reusable Entities. PloP 1999 conference, Retrieved from http://hillside.net/plop/plop99/proceedings/Fernandez2/reservAnalysisPattern3.PDF

http://owl.english.purdue.edu/owl/resource/560/01/

[2] Lauesen, S, (2003), Task Descriptions as Functional Requirements, I E E E C o m p u t e r S o c i e t y, Retrieved from http://www.itu.dk/~slauesen/Papers/IEEEtasks.pdf

[3] Louw,D,(2006, may 10). Description with UML for a Hotel Reservation System. Retrieved from http://www.liacs.nl/assets/Bachelorscripties/2006-08JanneLouw.pdf

http://ajaxcontroltoolkit.codeplex.com/

http://ajaxcontroltoolkit.codeplex.com/releases/view/63654

http://digibib.ehb.be/storage/Sector%20Informatie/Ict%20in%20hotels/A%20study%20of%20hotel%20information%20techno%20applications.pdf

http://forums.techguy.org/software-development/65358-dont-run-function-if-text.html

http://mattberseth.com/blog/2007/05/ajaxnet_example_using_an_updat.html

http://msdn.microsoft.com/en-us/library/aeez5k4f.aspx

http://msdn.microsoft.com/en-us/library/ms171898.aspx

http://www.ajaxcontroltoolkit.com/

http://www.araboug.org/ib/index.php?showtopic=7957&st=30

http://www.arabteam2000-forum.com/index.php?showtopic=115282

http://www.arabteam2000-forum.com/index.php?showtopic=115282

http://www.arabteam2000-forum.com/index.php?showtopic=228117

http://www.arabteam2000-forum.com/index.php?showtopic=240608

http://www.highoncoding.com/Articles/556_Creating_Crystal_Report_with_Multiple_Tables_in_ASP_NET.aspx

http://www.kamath.com/tutorials/tut003_auth.asp

Page 92: Hotel Management System

Hotel Management System 92

http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/Default.aspx

http://www.asp.net/ajaxlibrary/act.ashx

http://www.asp.net/ajaxlibrary/act_Calendar_Simple.ashx

http://www.codeguru.com/csharp/csharp/cs_network/database/article.php/c8477__2/Connecting-to-an-Oracle-Database-Using-ASPNETmdashA-Step-by-Step-Tutorial.htm

http://www.daniweb.com/web-development/aspnet/threads/157540

http://www.dotnetfunda.com/articles/article818-filter-gridview-records-using-ajax-slider-control-.aspx

http://www.dotnetspider.com/forum/166962-Send-mail-using-ASP-NET.aspx

http://www.liacs.nl/assets/Bachelorscripties/2006-08JanneLouw.pdf

http://www.w3schools.com/sql/sql_autoincrement.asp

http://www.yemensoft.net/apages/Aproducts1a_Managment_hotels.asp