You are on page 1of 179

RESTAURANT MANAGEMENT

SYSTEM
By

WONG XIAO YEN

SCHOOL OF ARTS AND SCIENCE


TUNKU ABDUL RAHMAN COLLEGE
KUALA LUMPUR
ACADEMIC YEAR
20010/2011

Project Title

Restaurant Management System


By
WONG XIAO YEN

Supervisor: CHIN CHAI LIM

A project report submitted to the School of Arts and Science


in partial fulfillment of the requirement for the
Bachelor of Science, Campbell University, U.S.A,
And
Advanced Diploma in Science.

Division of Computer Science


School of Arts and Science
Tunku Abdul Rahman College
Kuala Lumpur
20010/2011

Final Year Project

ii

Restaurant Management System

Declaration

Declaration
The project submitted herewith is a result of my own efforts in totality and in every
aspects of the project works. All information that has been obtained from other
sources had been fully acknowledged. I understand that any plagiarism, cheating or
collusion or any sorts constitutes a breach of College rules and regulations and would
be subjected to disciplinary actions.

__________________________
Students Name: Wong Xiao Yen
Programme : Advances Diploma in Business Information System Year 2

Final Year Project

iii

Restaurant Management System

Abstract

Abstract
The main purpose of carrying this project is partial fulfilment of the Bachelor of
Science Degree (Campbell University, U.S.A.) and Advanced Diploma in Business
Information System. This project is required to submitted as a Final Year project in
order to graduate.
This project is about Restaurant Management System. This is frond-end system.
The front-end system is used by customer and staff. Customer and staff can be login
to update their personal information through this web site. They also are able to make
order for take away and delivery. Besides that, member also is able to make reserve
table and meal on specific date and time. Furthermore, they can make the payment
online without needed to travel to counter to make payment. This system also allow
administrator to manage table, staff, member, reservation, delivery order

and

delivery to customer.
This scope of the project covers Maintenances modules, Payment modules, Platform
Design modules, Meal order modules, Reservation modules, and Report modules.
The project of methodology is used UML (Unified Model Language) to design the
System such as use case diagram, sequence diagram and activity diagram. The
system flow and the actor are being drawn to understand how the system works does
and who the actors that interact with the system are. Besides that, Visual Studio 2010,
MySQL, C # and asp.net programming language, Adobe Flash, Microsoft Office that
are used as development phases of the project. Besides that, there are various phase
of development used when develop this project. We have gone through the every
stage of the software life cycle, such as system planning, requirements, analysis,
design and implementation.
In developing in this web application, team work and communication was important
for a project team to complete the whole system. Brainstorming with team member
may get better idea and improvement for the system.

Final Year Project

iv

Restaurant Management System

Acknowledgement

Acknowledgement
I would like to express my sincere gratitude to project supervisor, Ms. Chin Chai Lim,
for her guidance, constant support and encouragement throughout the completion of
this final year project. I would also like to convey my appreciation to Ms. Chin to her
advice, knowledge and time to guide me throughout this final year project. Without
the help and guidance from Ms. Chin Chai Lim, I would not able to complete this
project successfully.
A warm thank is extended to Tan Yoke Yen for sharing her resources, opinions,
knowledge, experience and skills in programming and development methodology, so
generously. I would also like to personally thank my family, friends in TAR College
and my fellow course-mates who have one way or another extended their assistance in
completing this project.
Last, but not least, I wishes to acknowledge the unwavering support shown by Ms
Chin, and my project moderator, Ms Chan Kwai Mui.

Final Year Project

vi

Restaurant Management System

Table of Contents

Table of Contents
Declaration.............................................................................................................................. iii
Abstract .................................................................................................................................... iv
Acknowledgement ................................................................................................................... vi
1. System Planning ................................................................................................................ 1
1.1 Introduction .......................................................................................................................... 2
1.2Project Aims and Objectives ................................................................................................. 2
1.3 Company Background .......................................................................................................... 4
1.4 Project Scope ........................................................................................................................ 7
1.5 ProjectTeam .......................................................................................................................... 7
1.6 Project Schedule ................................................................................................................. 10
1.7 Outline of approach/Methodology Used ............................................................................. 11
1.8 Chapter Summary ............................................................................................................... 11

2. Requirements Analysis ................................................................................................... 12


2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9

Introduction ....................................................................................................................... 13
Fact Gathering..................................................................................................................... 13
Fact Recording .................................................................................................................... 14
Development Environment ................................................................................................. 14
Operation Environment....................................................................................................... 14
System Architecture ............................................................................................................ 15
Functional Requirement ...................................................................................................... 16
Non-Functional Requirement ............................................................................................. 23
Chapter Summary ............................................................................................................... 24

3. System Design .................................................................................................................. 25


3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
3.10

Introduction......................................................................................................................... 26
Use Case Diagram .............................................................................................................. 26
Use Case Description .......................................................................................................... 31
Activity Diagram ................................................................................................................ 38
Sequence Diagram .............................................................................................................. 49
Entity Relationship Diagram .............................................................................................. 57
Data Dictionary ................................................................................................................... 58
User Interface Design ......................................................................................................... 64
Normalization .........................................................................................................................
Chapter Summary ............................................................................................................... 88

4. Programming ................................................................................................................... 89
4.1
4.2
4.3
4.2

Introduction......................................................................................................................... 90
Programming Language Used............................................................................................. 90
Sample of Programming Code ............................................................................................ 91
Chapter Summary ............................................................................................................. 139

5. Software Testing ............................................................................................................ 130


5.1
5.2
5.3

Introduction....................................................................................................................... 131
Validation and Verification .............................................................................................. 131
Test Plan ........................................................................................................................... 136

Final Year Project

vii

Restaurant Management System


5.4

Table of Contents

Chapter Summary ............................................................................................................. 148

6. Conclusion ...................................................................................................................... 140


6.1
6.2
6.3
6.4
6.5
6.6
6.7

Introduction....................................................................................................................... 142
Evaluation of Project ........................................................................................................ 141
Suggestion for Furture Improvement ................................................................................ 122
Evaluation Against The Project Objectives ..................................................................... 143
Linking With Seminar ...................................................................................................... 144
Personal Reflection ........................................................................................................... 145
Chater Summary ............................................................................................................... 145

7. References ...................................................................................................................... 146


8. Appendices ..................................................................................................................... 147
9. User Guide ..................................................................................................................... 148

Final Year Project

viii

Restaurant Management System

Chapter 1 : System Planning

Chapter 1
System Planning

Final Year Project

Restaurant Management System

1.

Chapter 1 : System Planning

System Planning
1.1

Introduction

This chapter will discuss about the aims and objectives of this project. Then it will
followed by a brief description of the company background and the organization chart
of the restaurant. Furthermore, this chapter also includes the project scope that will be
carried out with the description of each module. Lastly, the project schedules with a
Gantt chart are shown.

1.2

Project Aims and Objectives

The main purpose of this project is to provide an ease and convenience online order
meal and make table and meal reservation to the member. Firstly, the system can be
benefit to customer. The system allow customer to make meal delivery, take away
and reservation using computers by viewing the available table on specific date and
time without spent traveling cost going to the restaurant and spent a lot of time and
for the waiting time of meal order or the reservation.
Besides that, the project objective is to provide convenient, tangible and intangible
benefits to organisation.
Tangible Benefits to Organisation
The system can be help organisation by achieving quicker processing and
turnaround of document or transaction. For example, in current system, they may
use calculator to total up items of food order, it is need some time to make calculation,
in contrast, and the system will do it automatically.
The system can help restaurant in capturing stock availability management, so
eliminate staffs job to keep record of the stock availability. And then the systems
able to analysis how much the stock of raw material are spoil and fresh. The spoil
raw material of food will be as capturing lost on money management. So the decision
maker can make decision to adjust when to restock of raw material, reduce money lost
potential.

Final Year Project

Restaurant Management System

Chapter 1 : System Planning

Intangible Benefits to Organisation


The restaurant is using off line system, if a customer want to make reservation after
they work from their company, the restaurant may close, so the customer cannot
contact to restaurant and may change another restaurant. In this case, the restaurant
lost a lot of customer, because inconvenient to them. So in this new system
development could provide 24 hours and Seven day per week services, customer
can make reservation anytime and anywhere. Since the service become well, it could
increase customer satisfaction, improve restaurant reputation and reduce error
happen. For example, the staffs make a wrong record of customer address accidently,
so wrong delivery foods to customer.

Final Year Project

Restaurant Management System

1.3

Chapter 1 : System Planning

Company Background

Nature of business : The TwinsYens Restaurant, at No 13, jalan 2/28 Wangsa Maju,
Kuala Lumpur, Malaysia , was opened in 2008. The restaurant is opened by two
sisters. In this few years, they have a good business because they were supported by
college student and those stay in Wangsa Maju. Today, the restaurant has expanded
the business and increase the staff until 50 employees, they are Financial Manager,
Purchasing and Quality Assurance Manager, Operation Manager, Training Manager,
Marketing Manager, Front End Director, Kitchen Manager, Shipment Manager, one
receptionist, one bar tender, ten waitress, one head of cook, three assistant cook, and
the others under different manager.
Products and services: TwinsYens restaurant of main customers is Malaysian. In
Malaysia, people like different kind of food, such as Westerns foods, Chineses foods,
Malays foods, Thailands Foods, Italian foods and healthier food. In better words to
say, the restaurant provides services and products are focusing on different level and
different kind of consumer. Meals are generally served and eaten on premises, but
also offer take-out and food delivery services. In the morning, TwinsYens restaurant
prepares variety flavour breakfast and coffee or tea to the rushing business man and
student. After 12.00 pm, the restaurant will prepare service and foods delight. In
additional, the stage, stage lights, and dressing rooms are complete for customer
having some events, or sing song on the stage. the restaurant help customer to hold a
special events, such as free birthday cake and sing a birthday song, farewell party, and
others celebration services with limited person. In a special day, the restaurant may
promote season menu or specialty item to its menu.
Business environment:
The restaurant is double level premise. Inside the restaurant, at the first level include a
bar for bar tender and receptionist use, one kitchen, and 20 different size of set of
tables. At the second level of restaurant, has a balcony which was decorated with
plants, you also can view outside from balcony, if see far a bit, Twin-tower building is
over there, and the place 25 unit of difference size of set of tables. Outside of
restaurant has well-lit parking will be available. The front and back of restaurants
premise are others restaurant and other business operation. Walking 20 minutes will

Final Year Project

Restaurant Management System

Chapter 1 : System Planning

reach TwinsYens restaurant from LRT station. No market nearest. But have many
company and one TARC and UTAR college nearest to restaurant.
Size of operation
50 employees, they are

Financial Manager, Purchasing and Quality Assurance

Manager, Operation Manager, Training Manager, Marketing Manager, Front End


Director, Kitchen Manager, Shipment Manager, one receptionist, one bar tender, ten
waitress, one head of cook, three assistant cook, and the others under different
manager.

Vision
TwinsYens Restaurant aims to the best of restaurant in Kuala Lumpur, especially to
serve people who are busy.

Final Year Project

Restaurant Management System

Chapter 1 : System Planning

Organisation structure :

Figure 1.1 : Organization Chart for TwinsYens Restaurant Management System

Current System Used


TwinsYens Restaurant currently is using the traditional system and fully offline system.
Customer needed go to restaurant to make table reservation or phone call to the restaurant
make meal order, delivery and table reservation. Besides that, administrator still using
manual system such as using cashier machine to print the payment, has a staff book to
record staff information, record delivery information on paper, checking table reservation
and customer take order by ticking a small piece of paper. After ticking the order, the
waitress will ensure one more time again to customer, and then will pass one copy to
receptionist and another one will pass to kitchen. If the customer wants to order food for
delivery, they must go through the process to provide personal information every time.

Final Year Project

Restaurant Management System

1.4

Chapter 1 : System Planning

Project Scope

Restaurant Management System

Restaurant Management System

Online
Ordering
Subsystem

Online Table
Reservation
Subsystem

SMS Customer

Online Payment
Subsystem
Platform
Party Design
Subsystem

Maintenance
Subsystem

Online Customer

Order Detail

Feedback /Survey

Subsystem

Subsystem

Redeem free
gift
Subsystem

Report
Subsystem

1.4.1 Maintain Module


This module is used for administrator to maintain the data such as to add, update or
delete the working staff information, menu information, price of item, member
information, table information and description of food.

1.4.2 Online Table Reservation Module


This module is for member reserve table and meal on specific date and time through
online.

1.4.3 Online Payment Module


This module use for calculate the total expenses in restaurant. The payment
calculation will base on customer order meal with delivery, take away or reservation.
The payment calculation will be included government tax and service charge only if
customer makes order meal with take away and reservation, however, the RM 5 of
transport fees also included if customer make order with delivery. Payment Method, it
has two types, if the payment is pay by credit card then the payment will need

Final Year Project

Restaurant Management System

Chapter 1 : System Planning

customer pay deposit with 70 % of total amount of charge. If customer pay by cash,
the customer is not required to pay deposit first, unless meet the restaurant staff.

1.4.4 Report Module


This module is help manager to generate report such as sale report, feedback report,
reservation reports, and delivery report. All reports are useful for different level of
organization.

1.4.5 Online Ordering Module


This module can be access by staff and customer. Staffs access it for walk in customer
to order food or cancel food had been ordered. Customer can register as member then
direct make order process step by step through the internet. User can use search
function which is included in this module for easy to find their favorite items.

1.4.6 SMS Customer Order Detail Module


This module is used by staff to send message to inform customer. The staff sends the
order information and time to take the meal ordered after the customer makes order.

1.4.7 Platform Party Design Module


This module is allowing customer to design their party after make reservation.

1.4.8 Online Feedback Module


This module is used for that customer to evaluate restaurant performance, such as
food and drinks, customer service and staff behavior. The purpose is help restaurants
organization to improve product and service that base on customer preference.

1.4.9 Redeem Free Grift Module


This module is used for that customer to use their point to exchange the gift of
restaurant provided.

Final Year Project

Restaurant Management System

1.5

Chapter 1 : System Planning

Project Team
Module
1

Responsible by

i. Platform Design Online Payment

Wong Xiao Yen

ii. Table Reservation


2

i. SMS Integration

Tan Yoke Yen

ii. Google map


iii. Delivery
iv. Redemption
v. Online Customer
vi. Feedback
vii. Online Ordering
3

Maintenance:
i . Customer, Staff, Table

Wong Xiao Yen

ii . Meal , Meal Category

Tan Yoke Yen

9. Report :
i.

Annual Sale Report

ii. Daily Member Payment Report

Wong Xiao Yen

iii. Daily Reservation Report

Wong Xiao Yen

iv. Monthly Sales Report

Tan Yoke Yen

v. Top 5 Monthly Report

Tan Yoke Yen

vi. Feedback Report

Tan Yoke Yen

vii. Rating Report

Tan Yoke Yen

Final Year Project

Wong Xiao Yen

Restaurant Management System

1.6

Chapter 1 : System Planning

Project Schedule

Final Year Project

10

Restaurant Management System

1.7

Chapter 1 : System Planning

Outline of approach/Methodology Used

For this project, I use two tier approaches (c #, asp.net ) to apply in the system
development.. The two tier design means that client program (interfaces) as first tier
and database server as second tier. The first tier is client program accesses database
directly, however second tier is used when client program executes application logic
(run SQL program with database).

This approach is used because it is a simple structure, easy to setup and do


maintenance and it consumes lesser time to develop the system.

Besides that,

advantage of this approach is business logic and database is physically close, which
provides higher performance. Mean that the coding run on client side, it will be more
faster response to user. As the result, I apply two tier approaches for this project.

1.8

Chapter Summary

In this chapter, we had face some problems in project scope, defining module of the
system, what module that we need to include and what function and features need to
include in each module.
We use the internet search engine, which is Google search to research the information
which is related to our project as our references such as Domino web site and Mc
Donald web site, TVG (cinema) website, based on those references, we can decide the
main module and function in each module.
Besides that, in project schedule planning, we need to estimate the date that we need
to done our task, but the actual date for the task may have different to planning date,
some tasks may be done earlier than the planning date and some tasks are over the due
date.
Base on the problem of project schedule, we need to have a proper distribution and
arrangement of the task to each project member for ensuring the task can complete on
time. We had a meeting in each week to ensure the progress of members and
brainstorming the problems that we faced.

Final Year Project

11

Restaurant Management System

Chapter 2 : Requirement Analysis

Chapter 2
Requirements Analysis

Final Year Project

12

Restaurant Management System

2.

Chapter 2 : Requirement Analysis

Requirements Analysis
2.1

Introduction

This chapter will include requirement analysis to the project. Requirement analysis is
the process of understanding the customer requirement and expectation from a
proposed system or application. It was including functional requirements, design
requirements and performance requirements.

2.2

Fact Gathering

2.2.1 Research
When I started to develop this project, I had done some online research for restaurant
website in Malaysia. I used Google search engine to search the category of website. I
found that, the entire restaurant website does not provide table reservation, meal
reservation and platform party design service. So I decided to do this system in my
final year project. The system is providing online meal order for delivery, take away
and reservation, so it make easy as possible to customer select more preference
service of restaurant.
2.2.2 Interview
Interview is one of fact-finding method to gather information during the system
analysis phases to develop a system. I have contact my friend who as receptionist in a
Vietnam restaurant, she has experience using restaurant system, so she can provide
more details about the websites needs and knowledge to improve our website.
The following information is the interview question that had been asked.
1. What is the nature of business of your restaurant?
2. What do you think the services that provided by using current system? Are you
satisfying your current system function? If no, what are the current system
problems?
3. What are the functions or services needs for the new system?
4. After implement Restaurant Management System, do you think that it will bring
profit to your restaurant?
Final Year Project

13

Restaurant Management System

2.3

Chapter 2 : Requirement Analysis

Fact Recording

In the system, user can view the webpage and get restaurants product and service
information. Customer must register as a member, and then the customer only can
make meal order, make table reservation, design platform party and provide feedback.
After submit meal order details, the system will calculate the payment and staff will
send message to user. The purpose of message is used to inform customer when the
meal will be delivered or the meal will be done of cook. If customers submit table
reservation with reserve meal together, the system will calculate the payment and
allow customer design the platform party.

2.4

Development Environment
Programming

C#.Net, Asp.net

languages
Databases

MySQL express

Development tools

Microsoft Expression Studio 3, Project vision 2007

Hardware

Printer x 1 unit , Laptop x 1 unit

Software

Visual Studio 2010,

Microsoft Office 2007,

Microsoft Office Project 2007, Microsoft Office


Visio, Adobe Flash
Operating System

2.5

Microsoft Window XP or Microsoft Window 7

Operation Environment
Hardware

Recipe Printer , LCD Monitor


Mobile device , Hand free, Printer

Software

Flash, Internet Explorer, Window XP

DBMS

MySQL express

Final Year Project

14

Restaurant Management System

2.6

Chapter 2 : Requirement Analysis

System Architecture

Final Year Project

15

Restaurant Management System

2.7

Chapter 2 : Requirement Analysis

Functional Requirement

Maintenance

Maintenance
Subsystem

Meal
Maintenance
Module

Customer
Maintenance
Module

Staff
Maintenance
Module

Table
Maintenance
Module

Login and Validation

Login in staff and members module, member login at front-end to consume


restaurants services provided. Staff login at backend make order, check
member order information and check member reservation information only.
Admin login at back-end to do admin process.

User management control, it will automatic detect who login then specify
them using different module.

Validation the input box to make sure user has fill up all the information
properly.

Final Year Project

16

Restaurant Management System

Chapter 2 : Requirement Analysis

Table Maintenance

Table
Maintenance
Add New Table

Edit / Update
Table Details

View Table Details

Delete Table

Feature:
1. Add and Delete Table:

Each table has different table number, place at different

location and different number of seat. This function allow staff to add new table
information if a new table is purchase, otherwise can delete the table information,
once the table is not use.
2. Edit : Staff to modify table details.
3. View Table Details: Keep track table information.

Staff Maintenance

Staff Maintenance
Module

Add New Staff

Edit Staff Details

View Staff Details

Purpose : Maintain employees information.

Feature :

1. Add New Staff: New employees profile include personal details information such
as Name, IC, Address, position, salary and status.
2. Edit Staff Details : Modify staffs profile details. For example, a waitress staff promote to receptionist.
But staff has no authorised to modify own salary and status information.

3. View Staff Details : Keep track staff details.


4. Forgot Password : A staff login forgot their password, then ask their administrator
to login, check their ID and Password and reset the status to allow them login.

Final Year Project

17

Restaurant Management System

Chapter 2 : Requirement Analysis

Customer Maintenance

Customer
Maintenance
Module

Register /
Add

Edit /
Update
Profile

View
Profile

Print

Forgot
Password

Feature:
1. Add :
Record customer information. Such as MemberID, MemberPoints and Gender.
Auto generates member ID number to customer when customer register as new
member. If customer is not a member, he or she must register as member then only
can use restaurants service. The system will automatically store 100 points to
member after customer register as member.
2. Edit : Staff to modify or Member himself or herself to modify their own profile
details. On the other hand, update members points is based on payment module.
From the payment module, the total amount charge as members point calculation
which mean one ringgit as one point For example, total amount is RM 100.00, then
members point 100 will be added into database.
3. View Profile : Keep track whole member profile information.

4. Print : Customer has optional to print profile information.


5. Forgot Password and ID : If customer forgot the password, they may require to
answer some question for checking member password , or member can send email to
admin for help.

Final Year Project

18

Restaurant Management System

Chapter 2 : Requirement Analysis

Table Reservation Module


Table
Reservation
Module

Add
Reservation

Edit
Reservation

Cancel
Reservation

View
Reservation

Print Reservation

Feature:
1.

Add Reservation :

Date Reservation - It is allow customer select which day to reserve table in restaurant. The
date reservation cannot be reserve earlier than today.
Time Reservation - it is allow customer select which time to reserve table in restaurant. The
customer must earlier reach and before time and date reserve, if late, the system will
automatically make table available to others customer.
Table reservation The table can be reserve in non-smoking place and smoking place. They
also can choose how many seat. The system should provide a button or link that allow
member to check what their table reservation detail. Besides that, when starting the
reservation page, member information is already showed, but it must allow member to
modify their name and contact number. In additional, If member only reserve table, then the
system will not include any payment charges and not allow member design party platform.
Meal Reservation - After table reserved, customer will be allowed to make meal reservation.

2.

Cancel the reservation can be cancel by staff through member permission, but the

money is not refundable.


3.

Edit For events included, the reservation cannot be edit by member after the deposit

is paid.
4.

View - Staff can keep track the reservation detail.

5.

Print Customer able to print the reservation detail and payment detail after confirm
reservation. It will provide an reservation ID for proving to restaurant.

Final Year Project

19

Restaurant Management System

Chapter 2 : Requirement Analysis

Platform Design Module

Platform Design
Module
Customize Party
Platform

View Sample Platform

Print Platform

Features :
1.

Customize Platform : Enable customer use the to drag the item by selecting
function such as change color of stage, add baby chair, and add color balls.

2.

View Sample Platform: module that similar look TwinsYens restaurant decoration.

3.

Print Platform: Print the platform design and related details.

Final Year Project

20

Restaurant Management System

Chapter 2 : Requirement Analysis

Payment Module

Payment Module
Print Payment

Add Payment

View Payment

Feature:
Add Payment : Record the payment information. After confirm order and reservation, the
payment will be added.

1.

View Payment :

Display - This function is used to display the total payment calculation after make order.
Display the payment charge must be included government tax 5 %, service charge 10 % of
total amount charge. If payment with delivery must include transport fees of RM 5, no matter
far or near.
Payment Method Enable it has two types, whether the payment is pay by credit card or
cash. If member pay credit card through online, the member must pay 70% of total payment.
Enable user print receipt.
Formula
o GrandTotal = Total Price_of_Item added ;
o TotalGovTax = Grand Total x 0.05;
o TotalServiceCharge = GrandTotal x 0.10;
o TotalAmount = GrandTotal + TotalGovTax + TotalServiceCharge;
o Deposit = (TotalAmount x 70) / 100;
o Balance = TotalAmount Deposit ;

2.

Print receipt the receipt printed that is included tax charges, service charges, delivery
charges, total price of quantity item, total price, subtotal, and date of payment.

Final Year Project

21

Restaurant Management System

Chapter 2 : Requirement Analysis

Report Module
Report Module

Annual sales Report

View Annual Sales Report -

Daily Reservation

Daily Member Payment

Report

Report

The report can be used by financial manager and marketing

manager. This report can be used for determining which time is earn less, and which time can
earn more, so they can do some promotion when business is not frequent.
View Daily Reservation Report - This report is created for supervisor and kitchen manager.
They can use this report to determine how many of meal require to prepare on specific date
and well prepare the table to customer before the customer is coming.
View Daily Member Payment Report This report is created for financial manager. The
purpose is used to view total money is received .

Final Year Project

22

Restaurant Management System

2.8

Chapter 2 : Requirement Analysis

Non-Functional Requirement

2.8.1 Production Requirement

ASP.Net homepage for user where using World Wide Web.

The user interface must be user friendly where using graphic picture to
present information to customer.

System will run logically when user hit some error. Example, not allows enter
a character to numeric field, and would not terminate the system directly when
error message is displayed.

The system should have security function such as provides a protection of the
information to the user, users password should be protected by encrypted it
and if the staff forgot password, need contact admin to reset the password as
security. If the member, need to answer certain question to login.

The system should have accuracy function such as calculation of payment in


system are accurate and consistency, by using professional formula for the
calculation.

The system must be always provide availability function and performance,


such as user can take order or make reservation, the TwinsYens system is
available 24 hour per day and 365 days per year.

The system should provide the best performance function, such as the system
must quicker response process after user click a button and the system is not
easy down.

2.8.2 Organizational Requirement

Standard Requirements the development process must be develop in a


recognize standard, which is ISO 9000.

Implementation Requirements - use asp.net programming language for front


end system, use c sharp .net programming language for back end system.

2.8.3 External Requirement

Legislative Requirement the software that use in the system, all must be
original and obtain the license from the manufacturer.

Ethical Requirement the system must be acceptable for the user and the
general public.

Final Year Project

23

Restaurant Management System

Chapter 2 : Requirement Analysis

2.9 Chapter Summary


In this chapter, we had faced problems when defining the function requirement and
non-functional requirement. Since we had no experience on POS system, we only can
base on assumption on the system those main requirements.
We used the fact gathering to solve our problems. I base on my friends information
to get some idea to develop the restaurant management system. For example, select
item to card, delivery and payment.

Final Year Project

24

Restaurant Management System

Chapter 3 : System Design

Chapter 3
System Design

Final Year Project

25

Restaurant Management System

3.

Chapter 3 : System Design

System Design
3.1

Introduction

After we analyze the requirement of the system, the next is to process system design.
The system design is important because it transform information that ultimately
results in software. With the system design, it can help us to create a design physical
model. In this chapter we will discuss about the database design, sequence diagrams
and the design of system user interface.

3.2

Use Case Diagram

System Overview

Figure 3.2.1 : Restaurant System Overview Use Case Diagram

Final Year Project

26

Restaurant Management System

Chapter 3 : System Design

Maintain Staff

Figure 3.2.2 : Maintain Staff Use Case Diagram


Maintain Member

Figure 3.2.3 : Maintain Member Use Case Diagram

Final Year Project

27

Restaurant Management System

Chapter 3 : System Design

Maintain Table

Figure 3.2.4 : Maintain Table Use Case Diagram


Pay Payment

Figure 3.2.5 : Pay Payment Use Case Diagram

Final Year Project

28

Restaurant Management System

Chapter 3 : System Design

Design Platform Party

Figure 3.2.6 : Design Platform Party Use Case Diagram


Reservation

Figure 3.2.7 : Reservation Use Case Diagram

Final Year Project

29

Restaurant Management System

Chapter 3 : System Design

Generate Report

Figure 3.2.8 : Generate Report Use Case Diagram

Final Year Project

30

Restaurant Management System

3.3

Chapter 3 : System Design

Use Case Description

Maintain Staff Module


Use case name

Maintain Staff

Brief Description

This use case allows staff add, edit and search staff
information.

Actor

Adminsitrator

Main Flow
Actor Action

System Response
1. Display Main Menu

3. Administrator select the Maintain


Staff

4. Display Add New Staff and


Update Staff

Subflows:
S-1 Add New Staff
System auto generate staff ID when form load. Administrator key in new staff
details. System validate key in new staff details. Adminsitrator press save button,
then the system will add member record into database.
S-2 Update Staff
Administrator key in staff ID or username. System varify staff ID or username
status and display staff details. Administrator press edit button and edit details.
Staff press save button, system validate edited details and update staff database.
Alternative flows :
A-1 Step S-1 and S2 : if the data enter is invalid

Display invalid data message

A-2 Step S1 : if the staff position is Administrator

Auto generate staff id , the first character of staff id is A

A-3 Step S1 : if the staff position is Staff

Auto generate staff id , the first character of staff id is S

A-3 Step S1: if the staff does not select Done button option

System will not add new staff data

A-3 Step S2: if the staff does not select Done button option

Final Year Project

System will not update staff data

31

Restaurant Management System

Chapter 3 : System Design

Maintain Member Module


Use case name

Maintain Member

Brief Description

This use case allows member add, edit and search member
information.

Actor

Member

Main Flow
Actor Action

System Response
1. Display Main Menu

2. Member select the register member

3.Display registration form

4. Key in member details


5.Click save button

6. Validate member key in details


7.Display login form

8. Key in Username and password

9. Validate username and password


10. Display member main menu

11. Select View my profile

12. Display member profile details

13. Click edit button


14. Edit member details
15. Select Done button

16. Validate member edited details


17. Update member record

Alternative flows :
A-1 Step 3 : if the username is exist

Display This username has been use by another person

A-2 Step 5 : if the date enter is invalid

Display invalid data message

Cursor will point to the particular field

A-3 Step 15: if the member not select Done button option

Final Year Project

System will not update member data

32

Restaurant Management System

Chapter 3 : System Design

Maintain Table Module


Use case name

Maintain Staff

Brief Description

This use case allows staff add, edit, delete and search table
information.

Actor

Adminsitrator

Main Flow
Actor Action

System Response
1. Display Main Menu

4. Administrator select the Maintain


Table

4. Display Add, Update and Delete


button.

Subflows:
S-1 Add New Table
Administrator key in new table details. Administrator press Done button to
save new table information. The system validate staff key in details and add a
record into table database
S-2 Update Table
Administrator key in table number, press search button. System diplays table
information. Administrator press edit button and edit table information. System
validate input data and update the table information into database.
S-2 Delete Table
Administrator key in table number and press search button, System display table
information. Administrator press delete button. System prompt up a comfrimation
massage are you sure want to delete the table. Administrator were chosen
confirm to delete the table. System will delete the table from database.
Alternative flows :
A-1 Step S-1 and S2 : if the data enter is invalid

Display invalid data message

A-5 Step S-2: if the administrator does not select Done button option

System will not update table data

A-6 Step S-2 if the administrator choose no from prompt up message

Final Year Project

System will not delete the table record

33

Restaurant Management System

Chapter 3 : System Design

Reservation, and Design Platform Party


Reservation, Pay payment and Design Platform

Use case name

Party
Brief Description

This use case enable customer to make a reservation,


inculded table and meal. After reserve table and meal, the
this use case also allow member view payment and pay
payment , andl also design platform party.

Actor

Member

Main Flow
Actor Action

System Response
1. Reservation form

2. Select date and time


3. Click search button

4. Verify the date and time and save


reservation detail into reservation
database.
5.Display table information

6. Select table number and add into


reserved table
7. Click finish button

8. Update reservation detail into


database and display reservation
information.
9. Display back to reserve table
form, continue to reserve meal and
print button.

10. Click continue reserve meal


11. Display reserve meal page
12. Select food category
13. Enter food quantity
14. click order list button

15. Display reserve meal detail


16. Show back to reserve meal
button , confirm delete meal item
button and confirm reserve meal
button.

17. Select comfirm reserve meal


18. System display pay payment
page
19. Key in credit card details and click done
20. Validate credit card details and

Final Year Project

34

Restaurant Management System

Chapter 3 : System Design

print receipt
21. Display back home page button,
and go to design platform party
button
22. Select go to design platform party
button.
23. Display platform design page
24. Customize platform design
25. Select print platform design
26. Prompt up print window
Alternative flows :
A-1 Step S-4: if system have not generate reservation id

System generate reservation id and display it

A-1 Step S-16: if member select confirm delete meal item button

Customer select particular item is require to remove.

System remove the item from data base

System recalculate the total price at bottom of grid view

A-1 Step S-6 and S-16: if member select does not add any item or delete all item

System display back to previous page function of button only

A-1 Step S-20: if member key in wrong data

Final Year Project

System display error message and not save data into database

35

Restaurant Management System

Chapter 3 : System Design

Payment Module
Use case name

Pay Payment

Brief Description

This use case allows member computerized payment (cash)


and e-payment via credit card .

Actor

Member

Main Flow
Actor Action

System Response
1. Display payment form after user
comfirm about meal order with
delivery or take away.
2.Display payment method option,
which are credit card and cash

4. Select payment option and press done


option
6. Validate payment details
7. Save data into database and print
receipt.

Alternative flows :
A-1 Step 4 : if member select payment option is credit card

Display credit card form that require user key in

System calculate deposit user require to pay and balance

System validate user key in credit card details

A-2 Step 4 : if the member select payment option is cash

Display the balance

A-3 Step 1 : if the member select order meal with delivery

System calculate government tax, service charge, transport fees,


total charge

A-4 Step 1: if the member select order meal with take away

Final Year Project

System calculate government tax, service charge and total charge

36

Restaurant Management System

Chapter 3 : System Design

Generate Report
Use case name

Generate Report

Brief Description

This use case allows administrator to generate the customer


annual sales report, daily member payment report, and daily
reservation report

Actor

Member

Main Flow
Actor Action

System Response
1. Display main menu

2. Select report option

2.Display sub menu: annual sales


report, daily member payment
report, and daily reservation report

Subflow:
If the sub menu selected is annual sales report, the S-1: annual sales report
If the sub menu selected is daily member payment report, the S-2: daily member
payment report
If the sub menu selected is a daily reservation report, the S-3: daily reservation
report
Alternative flows :
S-1 Annual sales report
Administrator can view the report to know whole year of sale profit and know
which month is better sales. When administrator clicks the print option, system will
print the report.
S-2 Daily member payment report
Administrator can select specific date to view report, purpose is to know which
member is havent pay payment and the day total payment collect and total
balance is havent collect. . When administrator clicks the print option, system will
print the report.
S-3 Daily reservation report
Administrator can view the report to know what is the table, what is the time,
what is the meal and member detail on specific day. . When administrator clicks
the print option, system will print the report.

Final Year Project

37

Restaurant Management System

3.4

Chapter 3 : System Design

Activity Diagram

Maintain Staff Module

Figure 3.4.1 : Maintain Staff for Update and View Activity Diagram

Final Year Project

38

Restaurant Management System

Chapter 3 : System Design

Figure 3.4.2 : Maintain Staff for Add New Staff Activity Diagram

Final Year Project

39

Restaurant Management System

Chapter 3 : System Design

Maintain Member Module

Figure 3.4.3 : Maintain Member for Add New Member Activity Diagram

Final Year Project

40

Restaurant Management System

Chapter 3 : System Design

Figure 3.4.4 : Maintain Member for Update and View Member Activity Diagram

Final Year Project

41

Restaurant Management System

Chapter 3 : System Design

Maintain Table Module

Figure 3.4.5 : Maintain Table for Add New Table Activity Diagram

Final Year Project

42

Restaurant Management System

Chapter 3 : System Design

Figure 3.4.6 : Maintain Table for Update,View and Delete Table Activity Diagram

Final Year Project

43

Restaurant Management System

Chapter 3 : System Design

Reservation Module

Figure 3.4.7 : Reservation Activity Diagram

Final Year Project

44

Restaurant Management System

Chapter 3 : System Design

Figure 3.4.8 : Reservation Activity Diagram( Cont..)

Final Year Project

45

Restaurant Management System

Chapter 3 : System Design

Pay Payment Module

Figure 3.4.9 : Pay Payment Activity Diagram

Final Year Project

46

Restaurant Management System

Chapter 3 : System Design

Design Platform Party Module

Figure 3.4.10 : Design Platform Party Activity Diagram

Final Year Project

47

Restaurant Management System

Chapter 3 : System Design

Report Module

Figure 3.3.12 : Generate Report Activity Diagram

Final Year Project

48

Restaurant Management System

3.5

Chapter 3 : System Design

Sequence Diagram

Maintain Staff Module

Figure 3.5.1 : Maintain Staff for Add New Staff Sequence Diagram

Figure 3.5.2 : Maintain Staff for Update Staff and View Staff Detail Sequence Diagram

Final Year Project

49

Restaurant Management System

Chapter 3 : System Design

Maintain Member Module

Figure 3.5.3 : Maintain Member for Update Member and View Member Detail Sequence
Diagram

Figure 3.5.4 : Maintain Member for Add NewMember Sequence Diagram

Final Year Project

50

Restaurant Management System

Chapter 3 : System Design

Maintain Table Module

Figure 3.5.5 : Maintain Table for Delete Table Sequence Diagram

Figure 3.5.6 : Maintain Table for Add New Table Sequence Diagram

Final Year Project

51

Restaurant Management System

Chapter 3 : System Design

Figure 3.5.7 : Maintain Table for Update and View Table Sequence Diagram

Final Year Project

52

Restaurant Management System

Chapter 3 : System Design

Reservation Module

Figure 3.5.8 : Reservation for View and Delete Reservation Sequence Diagram

Final Year Project

53

Restaurant Management System

Chapter 3 : System Design

Figure 3.5.9 : Reservation for Add New Reservation Sequence Diagram

Pay Payment Module

Final Year Project

54

Restaurant Management System

Chapter 3 : System Design

Figure 3.5.10 : Reservation module for Add New Payment Sequence Diagram

View Report Module

Figure 3.5.11 : Generate Report Sequence Diagram

Final Year Project

55

Restaurant Management System

Chapter 3 : System Design

Platform Design

Figure 3.5.12 : Design Platform Party Sequence Diagram

Final Year Project

56

Restaurant Management System

3.6

Chapter 3 : System Design

Entity Relationship Diagram

Figure 3.6.1 : Restaurant Management Systems Entity Relationship Diagram

Final Year Project

57

Restaurant Management System

Chapter 3 : System Design

3.7 Data Dictionary


Table Name: Cart
Field Name
CartNo
MealNo
MealName
Qty
Price
Subtotal
MemberID

Data Type
int Identity(1,1)
nvarchar(10)
nvarchar(50)
int
decimal(18,2)
decimal(18,2)
nvarchar(50)

Data Description
Cart Number
Meal Number
Meal Name
Order quantity
Meal Price
Subtotal of Meal
Member ID

Key
PK
FK

Reference

FK

Staff

Meal

Table Name: CreditCardData


Field Name
CCNo
Name
CardType
ExpireDate

Data Type
nvarchar(20)
nvarchar(10)
nvarchar(50)
date

Data Description
Credit Card Number
Card Name
Card Type
Cards Expire Date

Key
PK

Reference

Key
PK

Reference

FK
FK

Staff
Order

Table Name: Delivery


Field Name
DNo
DDate
Receiver
CPhoneNo
DAddress
DTime
Remark
StaffID
OrderNo

Data Type
Int Identity(1,1)
date
nvarchar(30)
nvarchar(12)
nvarchar(50)
time(0)
nvarchar(50)
nvarchar(10)
nvarchar(10)

Data Description
Delivery Number
Delivery Date
Receiver Name
Receiver Phone Number
Delivery Address
Delivery Time
Remark
Staff ID
Order Number

Table Name: Feedback


Field Name
FNo
Subject
Vote
Value
Favorite
Comment

Final Year Project

Data Type
int Identity(1,1)
nvarchar(50)
nvarchar(10)
int
nvarchar(50)
nvarchar(50)

Data Description
Key
Feedback Number
PK
Subject/Criteria
Vote (eg:Excellent, Good)
Values (eg:5,4,3,2,1)
Members Favorite Meal
Feedback Comment

58

Reference

Restaurant Management System

FDate
MemberID

Chapter 3 : System Design

date
nvarchar(10)

Feedbacks Date
Member ID

Data Type
nvarchar(10)
nvarchar(50)
nvarchar(50)
nvarchar(30)
decimal(8,2)
nvarchar(10)

Data Description
Meal Number
Meal Name
Meal Description
Meal Image
Meal Price
Meal Category ID

FK

Member

Table Name: Meal


Field Name
MealNo
MealName
Desp
Image
Price
MealCateID

Key
PK

Reference

FK

MealCategory

Table Name: MealCategory


Field Name
MealCateID
MCName

Data Type
nvarchar(10)
nvarchar(30)

Data Description
Meal Category ID
Meal Category Name

Key
PK

Reference

Table Name: Member


Field Name
MemberID
MCardNo
MIC
MFirstName
MLastName
Gender
MOffice
MExt
MMobile
MHomeNo
MSurburb
MBlock
MLevel
MUnit
MCity
MState
MZip
MEmail

Final Year Project

Data Type
nvarchar(10)
nvarchar(20)
nvarchar(12)
nvarchar(30)
nvarchar(30)
nvarchar(6)
nvarchar(15)
nvarchar(10)
nvarchar(10)
nvarchar(20)
nvarchar(20)
nvarchar(10)
nvarchar(10)
nvarchar(10)
nvarchar(30)
nvarchar(30)
Int
nvarchar(30)

Data Description
Member ID
Member Card Number
Member IC
First Name
Last Name
Gender
Office Number
Member Contact No.
Member Home Tel.
Surburb
Block
Level
Unit
City
State
Zip Code
Member Email

59

Key
PK

Reference

Restaurant Management System

MPoint
EntryDate
MUserName
MPassword
MSecurityQuestion
MSecurityAnswer
MDOB

Int
date
nvarchar(30)
nvarchar(30)
nvarchar(50)
nvarchar(50)
date

Chapter 3 : System Design

Members Point
Entry Date
User Name
Password
Security Question
Security Password
Date of Birth

Table Name: Order


Field Name
OrderNo
TotalAmount
StatusPay
ODate
OTime
DeliveryStatus
CookStatus
MemberID
StaffID

Data Type
nvarchar(10)
decimal(10,2)
nvarchar(6)
date
time(0)
nvarchar(10)
nvarchar(10)
nvarchar(10)
nvarchar(10)

Data Description
Order Number
Total Amount
Payment Status
Order Date
Order Time
Delivery Status
Cook Status
Member ID
Staff ID

Key
PK

Reference

FK
FK

Member
Staff

Table Name: OrderDetail


Field Name
OrderNo
MealNo
Qty
Subtotal

Data Type
nvarchar(10)
nvarchar(10)
int
decimal(8,2)

Data Description
Order Number
Meal Number
Order Quantity
Order Subtotal

Key
PK, FK
PK, FK

Reference
Order
Meal

Key
PK

Reference

FK

Member

Table Name: Rating


Field Name
RatingID
MealNo
RatingValue

Data Type
int IDENTITY(1,1)
nvarchar(10)
int

RateDate
MemberID

date
nvarchar(10)

Data Description
Rating ID
Meal number
Rating
Values(eg:1,2,3,4,5)
Rate Date
Member ID

Table Name: Redeem


Attribute
RNo
RPoint

Final Year Project

Data Type
nvarchar(10)
int

Data Description
Redeem Number
Point

60

Key
PK

Reference

Restaurant Management System

RItem
RImage

nvarchar(30)
nvarchar(30)

Chapter 3 : System Design

Redeem Items
Item Image

Table Name: RedeemItem


Field Name
RINo
MemberCardNo
PointClaim
RIQty
RIDate
BalancePoint
RNo

Data Type
int
nvarchar(50)
int
int
date
int
int

Table Name: Table


Field Name
Data Type
TableNo
nvarchar(5)
Size
int
Zone
Status

nvarchar(20)
nvarchar(20)

Data Description
Key
Redeem Item Number
PK
Member Card Number
Point Require for redeem
Quantity Redemption
Redemption Date
Balance Point
FK

Data Description
Table Number
Number of
seat(eg:2,3,4,8,10)
Zone(eg:non-smoking)
Status Available

Reference

Redeem

Key
PK

Reference

Key
PK
FK
FK

Reference

Key
PK

Reference

FK
FK

Staff
Member

Table Name: ReserTable


Field Name
ReserTableNo
TableNo
ResID

Data Type
int
nvarchar(10)
nvarchar(10)

Data Description
Auto Generate ID
Table Number
Reservation ID

Table Name: Reservation


Field Name
ResID
ResName

Data Type
nvarchar(10)
nvarchar(30)

ResICNo
ResContactNo
ResDate
ResTime
StaffID
MemberID

nvarchar(12)
nvarchar(10)
date
time
nvarchar(10)
nvarchar(10)

Data Description
Reservation ID
People who make
reservation
IC Number
Contact Number
Reservation Date
Reservation Time
Staff ID
Member ID

Table Name: ReserMeal

Final Year Project

61

Restaurant Management System

Field Name
ResID
MealNo
Qty
Subtotal

Chapter 3 : System Design

Data Type
nvarchar(10)
nvarchar(10)
int
decimal(10,2)

Data Description
Reservation ID
Meal Number
Reserve Quantity
Reserve Subtotal

Key
PK, FK
PK, FK

Reference

Key
PK

Reference

FK

ReserMeal

FK

Member

Key
PK

Reference

FK
FK
FK
FK

Order
Member
Reservation
Staff

Table Name: ReserCart


Field Name
RCartNo

Data Type
int IDENTITY(1,1)

MealNo
RQty
Subtotal

nvarchar(10)
int
decimal(10,2)

MemberID

nvarchar(10)

Data Description
Reservation Cart
Number
Meal Number
Quantity Reserve
Meal Subtotal in
reservation
Member ID

Table Name: Payment


Field Name
ReceiptNo
CreditCardNo
MemberCardNo
PMethod
CardType
Date
TotalCharge
ServiceCharge
GovTax
GrandTotal
DeliveryFees
Balance
Deposit
OrderNo
MemberID
ResID
StaffID

Final Year Project

Data Type
int
nvarchar(20)
nvarchar(20)
nvarchar(10)
nvarchar(10)
date
decimal(10,2)
decimal(10,2)
decimal(10,2)
decimal(10,2)
decimal(10,2)
decimal(10,2)
decimal(10,2)
nvarchar(10)
nvarchar(10)
nvarchar(10)
nvarchar(50)

Data Description
Receipt Number
Credit Card Number
Member Card Number
Payment Method
Card Type
Pay Date
Total Charge
Service Charge
Government Tax
Grand Total
Delivery Fees
Balance
Deposit
Order Number
Member ID
Reservation ID
Staff ID

62

Restaurant Management System

Chapter 3 : System Design

Table Name: Staff


Field Name
Data Type
StaffID
nvarchar(10)
FName
nvarchar(20)
LName
nvarchar(20)
SAddress
nvarchar(20)
SCity
nvarchar(20)
SState
nvarchar(20)
Zip
int
ICNo
nvarchar(20)
ContactNo
nvarchar(20)
Gender
nvarchar(6)
Position
nvarchar(10)
Salary
decimal(10,2)
Status
nvarchar(10)
SUserName
nvarchar(20)
SPassword
nvarchar(20)
SEmail
nvarchar(30)
SDOB
date

Data Description
Staff ID
Staff First Name
Staff Last Name
Address
City
State
Zip Code
IC Number
Contact Number
Gender
Position
Salary
Free Status
User Name
Password
Email
Date of Birth

Final Year Project

63

Key
PK

Reference

Restaurant Management System

3.8

Chapter 3 : System Design

User Interface Design

Non-Member Main Page

Figure 3.8.1 Non-Member Main Page

Member Main Page

Figure 3.8.2 Member Main Page

Final Year Project

64

Restaurant Management System

Chapter 3 : System Design

Member Registration

Figure 3.8.3 Member Registration

Final Year Project

65

Restaurant Management System

Chapter 3 : System Design

Member Login

Figure 3.8.4 Member Login

Change Member Password

Figure 3.8.5 Change Member Password

Final Year Project

66

Restaurant Management System

Chapter 3 : System Design

Member Forgot Password

Figure 3.8.6 Member Forgot Password

Final Year Project

67

Restaurant Management System

Chapter 3 : System Design

Member Profile

Figure 3.8.7 Member Profile

Final Year Project

68

Restaurant Management System

Chapter 3 : System Design

Reservation

Figure 3.8.8 Reservation

Final Year Project

69

Restaurant Management System

Chapter 3 : System Design

Check Table Reserved

Figure 3.8.8 Check Table Reserved

Member Reservation Information

Figure 3.8.9 Member Reservation Information

Final Year Project

70

Restaurant Management System

Chapter 3 : System Design

Reservation Meal Menu

Figure 3.8.10 Reservation Meal Menu

Member Meal Reservation Information

Figure 3.8.11 Member Meal Reservation Information

Final Year Project

71

Restaurant Management System

Chapter 3 : System Design

Reservation Payment

Figure 3.8.12 Reservation Payment

Platform Design

Figure 3.8.13 Platform Design

Final Year Project

72

Restaurant Management System

Chapter 3 : System Design

Order Payment with Cash Payment Method

Figure 3.8.13 Order Payment with cash payment method

Final Year Project

73

Restaurant Management System

Chapter 3 : System Design

Order Payment with Credit Card Payment Method

Figure 3.8.14 Order Payment with Credit Card payment method

Final Year Project

74

Restaurant Management System

Chapter 3 : System Design

Reservation Information

Figure 3.8.15 Reservation Information

Final Year Project

75

Restaurant Management System

Chapter 3 : System Design

About Us

Figure 3.8.16 About Us

Final Year Project

76

Restaurant Management System

Chapter 3 : System Design

Staff Main Page

Figure 3.8.17 Staff Main Page

Staff Login

Figure 3.8.18 Staff Login


Final Year Project

77

Restaurant Management System

Chapter 3 : System Design

Staff Registration

Figure 3.8.19 Staff Registration

Final Year Project

78

Restaurant Management System

Chapter 3 : System Design

Check Member Reservation

Figure 3.8.20 Check Member Reservation

Final Year Project

79

Restaurant Management System

Chapter 3 : System Design

Check Member Reservation Detail

Figure 3.8.21 Check Member Reservation Detail

Final Year Project

80

Restaurant Management System

Chapter 3 : System Design

Staff Maintenance

Figure 3.8.22 Staff Maintenance

Final Year Project

81

Restaurant Management System

Chapter 3 : System Design

Member Maintenance

Figure 3.8.23 Member Maintenance

Final Year Project

82

Restaurant Management System

Chapter 3 : System Design

Staff Profile

Figure 3.8.24 Member Maintenance

Final Year Project

83

Restaurant Management System

Chapter 3 : System Design

Table Maintenance

Figure 3.8.25 Table Maintenance

Report Page

Figure 3.8.26 Report Page

Final Year Project

84

Restaurant Management System

Chapter 3 : System Design

Figure 3.8.27 Example of Daily Reservation Report

Final Year Project

85

Restaurant Management System

Chapter 3 : System Design

Figure 3.8.28 Example of Annual Sales Report

Final Year Project

86

Restaurant Management System

Chapter 3 : System Design

Figure 3.8.29 Example of Daily Member Payment Report

Final Year Project

87

Restaurant Management System

3.10

Chapter 3 : System Design

Chapter Summary

The database design is the most important part to develop a system. It is very critical
because it can influence the whole system function and operation. Each data tables, data
fields, data types and relationship of the table must proper implement. Therefore, the
problem will be minimized during the development of the system.
The interface design also important part to develop the system, because poor design will
affect the overall quality of the system. A user interface must be user friendly and
attractive, because it allow user easy understand how the system process. It is possible
save cost and save time from system learning curve.

Final Year Project

88

Restaurant Management System

Chapter 4 : Programming

Chapter 4
Programming

Final Year Project

89

Restaurant Management System

4.

Chapter 4 : Programming

Programming
4.1

Introduction

After the system design, the next step is programming . Programming is the processes of
writing the program instruction that implement the program specification, using a
suitable language. In this chapter will discuss about the programming method used. .

4.2

Programming Language Used

This is the front end application, so C # , Asp.net, JavaScript and Flash Action Script
programming language to code it. C sharp and Asp.net are Microsoft office product.
Asp.net is a web application framework developed. Asp.net mostly use for built
dynamic web site and built on the Common Language Runtime (CLR). On the other
hand, C # is able to provide simplicity of coding and ease of understanding and high
performance. Besides that, JavaScript and Flash Acton Script are scripting language, )
are used to generate a dynamic, interactive, functionality and more responsive web
page or system. Flash is an authoring tools which is including features such as drag
and drop user interface components, make some effects to the object and built in
behaviours that add Action Script.
Action Script is written behind of Flash animation, sound, picture, movie and special
effect applications, and much more. (Prayaga et al, p10, 2007)
JavaScript is a dynamic scripting language that allow website programmer to build
interactivity into static HTML pages. This is done by embedding blocks of JavaScript
code, which can be found anywhere from any Web page. JavaScript is a scripting
language that is created by Netscape Communication and Sun Microsystems.
JavaScript allows web browser to produce dynamic documents and enables
programmers to call routines written in Java, C and C++ (Sutar et al, p134,2008). The
speed of JavaScript run on client sites code function is faster than server when
waiting for server response back. It also advantage to the servers burden, because
reduce demand from client site.

Final Year Project

90

Restaurant Management System

4.3

Chapter 4 : Programming

Sample of Programming Code

4.3.1 Connection Function

This function is easy for me to call out the connection and no need to create the
connection in each form every time.

Final Year Project

91

Restaurant Management System

Chapter 4 : Programming

4.3.2 Auto Generate for ID


This is the example of auto number for Member ID, we using auto number for
ID to avoid the duplicate TD and arrange ID number in database. This method
also use in Reservation ID, Staff ID and Order ID.

Final Year Project

92

Restaurant Management System

Chapter 4 : Programming

4.3.3 Maintenance Module


This system has staff maintenance module, member maintenance module and
table maintenance module.

Below is showing example code of table

maintenance module.
This part of coding is taking from the StaffTableMaintainace.aspx.cs. It show
how Search Table working in the system.

voidButtonSearch()
{
if(btnSearch.Text=="Search")
{
txtSize.Enabled=false;
txtStatus.Enabled=false;
txtTableNo.Enabled=false;
txtTableNo.Enabled=false;
btnDelete.Enabled=true;
//btnCancel.Enabled=true;
btnNew.Enabled=true;
btnSearch.Enabled=true;
btnUpdate.Enabled=true;
//btnSearch.Enabled=true;
Initialize();
ArrayListarrCollect=newArrayList();
SqlDataAdapterdaHotel;
DataSetdsHotel=newDataSet();

stringsqlHotel="Select*from[Table]whereTableNo='"+
txtSearch.Text+"'";
daHotel=newSqlDataAdapter(sqlHotel,con);

daHotel.Fill(dsHotel,"Table");

foreach(DataRowrowindsHotel.Tables[0].Rows)
{
txtTableNo.Text=
dsHotel.Tables["Table"].Rows[0]["TableNo"].ToString();
txtSize.Text=
dsHotel.Tables["Table"].Rows[0]["Size"].ToString();
txtStatus.Text=
dsHotel.Tables["Table"].Rows[0]["Status"].ToString();

ddlZone.DataSource=dsHotel;
ddlZone.DataValueField="TableNo";

ddlZone.DataTextField="Zone";
ddlZone.DataBind();
}
Terminate();

Final Year Project

93

Restaurant Management System

Chapter 4 : Programming

if(btnSearch.Text=="NewSearch")
{

//ddlSearch.Enabled=true;

txtSize.Enabled=false;
txtStatus.Enabled=false;
txtTableNo.Enabled=false;
txtTableNo.Enabled=false;
btnCancel.Enabled=false;
btnNew.Enabled=true;
btnSearch.Enabled=true;
btnUpdate.Enabled=false;
//ddlSearch.Enabled=true;
txtSize.Enabled=false;
btnNew.Text="New";
btnSearch.Text="Search";

txtTableNo.Enabled=false;
ddlZone.Enabled=false;
txtSize.Text="";
txtStatus.Text="";
txtTableNo.Text="";
lblmsg1.Text="";
lblmsg2.Text="";
lblmsg3.Text="";
}

This part of coding is taking from the StaffTableMaintainace.aspx.cs. It show how


Update Table working in the system.
protectedvoidbtnSearch0_Click(objectsender,EventArgse)
{
ButtonUpdate();
}

voidButtonUpdate()
{
if(txtSize.Text=="")
{
txtSize.Focus();lblmsg3.Text="*";
}

else
{

if(btnUpdate.Text=="Done")
{
btnCancel.Enabled=false;
btnNew.Enabled=true;
//btnSearch.Enabled=true;
btnUpdate.Enabled=true;
btnUpdate.Text="Update";
//ddlSearch.Enabled=true;

Final Year Project

94

Restaurant Management System

Chapter 4 : Programming

ddlZone.Enabled=false;
txtSize.Enabled=false;
txtStatus.Enabled=false;
txtTableNo.Enabled=false;

Initialize();

stringstrSQL2="UPDATE[Table]SET[Size]=@Size,
[Zone]=@ZonewhereTableNo='"+txtTableNo.Text+"'";
SqlCommandcmd=newSqlCommand(strSQL2,con);

cmd.Parameters.AddWithValue("@Size",txtSize.Text);
cmd.Parameters.AddWithValue("@Zone",
ddlZone.SelectedItem.Value);

cmd.ExecuteNonQuery();

Terminate();
txtSize.Text="";
txtStatus.Text="";
txtTableNo.Text="";
lblmsg1.Text="";
lblmsg2.Text="";
lblmsg3.Text="";

}
else
{
btnCancel.Enabled=true;
btnNew.Enabled=false;
//btnSearch.Enabled=true;
btnUpdate.Enabled=true;
btnUpdate.Text="Done";
//ddlSearch.Enabled=false;
ddlZone.Enabled=true;
txtSize.Enabled=true;
txtStatus.Enabled=true;
txtTableNo.Enabled=false;
btnDelete.Enabled=false;
}
}
}

This part of coding is taking from the StaffTableMaintainace.cs. It show how Delete
Table working in the system.
protectedvoidPage_Load(objectsender,EventArgse)
{

btnDelete.Attributes.Add("onclick","return
confirm_delete()");

Final Year Project

95

Restaurant Management System

Chapter 4 : Programming

5. protectedvoidbtnDelete_Click1(objectsender,EventArgse)
6. {
7.
8. Initialize();
9.
10. stringstrSQL2="DeleteFrom[Table]WhereTableNo
='"+txtTableNo.Text+"'";
11.
12. SqlCommandcmd=newSqlCommand(strSQL2,con);
13.
14. cmd.ExecuteNonQuery();
15.
16. Terminate();
17.
18.
19. btnCancel.Enabled=true;
20. btnNew.Enabled=false;
21.
22. btnUpdate.Enabled=false;
23. btnSearch.Text="NewSearch";
24. btnDelete.Text="Delete";
25. btnDelete.Enabled=false;
26. btnNew.Enabled=true;
27.
28. ddlZone.Enabled=true;
29. txtSize.Enabled=true;
30. txtStatus.Enabled=false;
31. txtTableNo.Enabled=false;
32. txtSize.Text="";
33. txtStatus.Text="";
34. txtTableNo.Text="";
35.
36. lblmsg1.Text="";
37. lblmsg2.Text="";
38. lblmsg3.Text="";
39.
40. Terminate();
41. lblmsg1.Text="DeleteSucessfully";
42.
43. }

This part of coding is taking from the StaffTableMaintainace.aspx.cs. It show how


Delete Table working with c sharp to prompt up message working in the GUI
system.
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">

<scripttype="text/javascript">
functionwait(){
if(confirm("Areyousureyouwanttodeletethisrecord?")==
true)
returntrue;
elsereturnfalse;
}
</script>

Final Year Project

96

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the StaffTableMaintainace.aspx.cs. It show how


Add Table working in the system.
protectedvoidbtnNew_Click(objectsender,EventArgse)
{
stringstrSQL2="Insertinto[Table](TableNo,Status,Zone,Size)
values(@no,@st,@z,@s)";

if(btnNew.Text=="New")
{

btnCancel.Enabled=true;
btnNew.Enabled=true;

btnUpdate.Enabled=false;
btnNew.Text="Done";
btnDelete.Enabled=false;

ddlZone.Enabled=true;
txtSize.Enabled=true;
txtStatus.Enabled=true;
txtTableNo.Enabled=true;
btnSearch.Text="NewSearch";

txtSize.Text="";
txtStatus.Text="";
txtTableNo.Text="";
lblmsg1.Text="";
lblmsg2.Text="";
lblmsg3.Text="";

else
{

if(txtTableNo.Text=="")
{
txtTableNo.Focus();lblmsg3.Text="*requirefill";
}
elseif(txtSize.Text=="")
{
txtSize.Focus();lblmsg2.Text="*requirefill";
}
elseif(txtSize.Text==""||txtTableNo.Text=="")
{
txtSize.Focus();
lblmsg2.Text="*requirefill";
txtTableNo.Focus();
lblmsg3.Text="*requirefill";
}

else
try
{

Final Year Project

97

Restaurant Management System

Chapter 4 : Programming

Initialize();
SqlCommandcmdSearch2=newSqlCommand(strSQL2,con);
cmdSearch2.Parameters.AddWithValue("@no",txtTableNo.Text);
cmdSearch2.Parameters.AddWithValue("@s",txtSize.Text);
cmdSearch2.Parameters.AddWithValue("@z",
ddlZone.SelectedItem.Value);
cmdSearch2.Parameters.AddWithValue("@st","Available");
cmdSearch2.ExecuteNonQuery();

Terminate();
txtTableNo.Enabled=false;
txtSize.Enabled=false;
btnNew.Text="New";
txtSize.Text="";
txtStatus.Text="";
txtTableNo.Text="";
lblmsg1.Text="Tablerecordisadded";
lblmsg2.Text="";
lblmsg3.Text="";

}
catch(Exceptionex)
{
lblmsg1.Text="Thetableisalreadyexist.";

This part of coding is taking from the StaffTableMaintainace.aspx. Below is GUI


code, by using ASP.net, this show how javascript of delete funtion working with
delete button in the system.
<%@PageLanguage="C#"AutoEventWireup="true"CodeFile=.">
...
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">

<scripttype="text/javascript">
functionwait(){
if(confirm("Areyousureyouwanttodeletethisrecord?")==true)
returntrue;
elsereturnfalse;
}
</script>
...

</head>
<body...>
<asp:ButtonID="btnDelete"runat="server"Text="Delete"
OnClientClick="javascript:returnwait();"OnClick="btnDelete_Click1"/>

Final Year Project

98

Restaurant Management System

Chapter 4 : Programming

4.3.4 Reservation Module


This part of coding is taking from the Reservation.aspx.cs. It show how Function
call working in the system.
5. //Getmemberinformation
6.
7. voidGetMemberInfo()
8. {
9. Initialize();
10. ArrayListarrCollect=newArrayList();
11. SqlDataAdapterdaHotel;
12. DataSetdsHotel=newDataSet();
13.
14. stringsqlHotel="selectMMobile,MIC,MFirstName,MLastName,
GenderfromMemberswhereMemberID='"+theMemberID+"'";
15. daHotel=newSqlDataAdapter(sqlHotel,con);
16.
17. daHotel.Fill(dsHotel,"Member");
18.
19. foreach(DataRowrowindsHotel.Tables[0].Rows)
20. {
21. theMemberMobile=
dsHotel.Tables["Member"].Rows[0]["MMobile"].ToString();
22.
23. theMemberIC=
dsHotel.Tables["Member"].Rows[0]["MIC"].ToString();
24. theFirsName=
dsHotel.Tables["Member"].Rows[0]["MFirstName"].ToString();
25. theLastName=
dsHotel.Tables["Member"].Rows[0]["MLastName"].ToString();
26. theGender=
dsHotel.Tables["Member"].Rows[0]["Gender"].ToString();
27.
28. }
29.
30. }
31.
32. //loadtableinformation,notmattertodaytableisreservedandnot
available
33. voidReloadTableTable()
34. {
35. DateTimeGetToday=
DateTime.Parse(DateTime.Now.ToShortTimeString());
36. SqlConnectionconNwind;
37. SqlCommandcmdSelectEmployees;
38. SqlDataReaderdtrEmployees;
39.
40. stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
41. conNwind=newSqlConnection(connStr);
42. conNwind.Open();
43.
44.
45.
46. cmdSelectEmployees=newSqlCommand("SELECTDISTINCTTableNo,Size,
Zone,Status,{fnCURDATE()}ASExpr1"+
47. "FROM[Table]"+
48. "WHERE(TableNoNOTIN"+

Final Year Project

99

Restaurant Management System

Chapter 4 : Programming

49. "(SELECTTableNo"+
50. "FROMReserTableASReserTable_1"
+
51. "WHERE(ResID='"+lblResID.Text+
"')))AND(TableNoNOTIN"+
52. "(SELECTTable_1.TableNo"+
53. "FROM[Table]ASTable_1INNER
JOIN"+
54. "ReserTableON
Table_1.TableNo=ReserTable.TableNoINNERJOIN"+
55. "ReservationON
ReserTable.ResID=Reservation.ResID"+
56. "WHERE(Reservation.ResDate='"+
txtReserveDate.Text+"')AND(Reservation.ResTime<='"+
ddlHours.SelectedItem.Value+"')))",conNwind);
57.
58. dtrEmployees=cmdSelectEmployees.ExecuteReader();
59.
60.
61. GridView1.DataSourceID=null;
62. GridView1.DataSource=dtrEmployees;
63. GridView1.DataBind();
64.
65.
66. dtrEmployees.Close();
67. conNwind.Close();
68.
69. Session["theRID"]=lblResID.Text;
70. }
71. //loadtableinformation,butnotshowtodaytableisreservedandnot
available
72. voidReloadTableTable
73. voidTodayReservation()
74. {
75.
76. SqlConnectionconNwind;
77. SqlCommandcmdSelectEmployees;
78. SqlDataReaderdtrEmployees;
79.
80. stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
81. conNwind=newSqlConnection(connStr);
82. conNwind.Open();
83.
84.
85.
86. cmdSelectEmployees=newSqlCommand("SELECTDISTINCTTableNo,Size,
Zone,Status,{fnCURDATE()}ASExpr1"+
87. "FROM[Table]"+
88. "WHERE(TableNoNOTIN"+
89. "(SELECTTableNo"+
90. "FROMReserTableASReserTable_1"
+
91. "WHERE(ResID='"+lblResID.Text+
"')))AND(TableNoNOTIN"+
92. "(SELECTTable_1.TableNo"+
93. "FROM[Table]ASTable_1INNER
JOIN"+
94. "ReserTableON
Table_1.TableNo=ReserTable.TableNoINNERJOIN"+
95. "ReservationON

Final Year Project

100

Restaurant Management System

Chapter 4 : Programming

ReserTable.ResID=Reservation.ResID"+
96. "WHERE(Reservation.ResDate='"+
txtReserveDate.Text+"')AND(Reservation.ResTime<='"+
ddlHours.SelectedItem.Value+"')))AND(TableNoNOTIN"+
97. "(SELECTTableNo"+
98. "FROM[Table]ASTable_2"+
99. "WHERE(Status='NotAvailable')AND
({fnNOW()}={fnNOW()})))",conNwind);
100.

101.
dtrEmployees=cmdSelectEmployees.ExecuteReader();
102.

103.

104.
GridView1.DataSourceID=null;
105.
GridView1.DataSource=dtrEmployees;
106.
GridView1.DataBind();
107.

108.

109.
dtrEmployees.Close();
110.
conNwind.Close();
111.

112.
Session["theRID"]=lblResID.Text;

113.
114.
}
115.
//makedecisiontodisplaytableinformation,baseontodayor
otherday
voidReloadTableTable
116.
voidDateValidation()
117.
{
118.
DateTimemydate=Convert.ToDateTime(txtReserveDate.Text);
119.

120.
if(mydate<System.DateTime.Today)
121.
{
122.
Response.Write("Cannotreservetablebeforetoday");
123.
}
124.
elseif(mydate==System.DateTime.Today)
125.

126.
{
127.
if(Zone.Checked==true)
128.
{
129.
if(chkSize.Checked==true)
130.
{
131.
TodayZoneSize();
132.
}
133.
else
134.
{
135.
TodayZone();
136.
}
137.
}
138.
elseif(chkSize.Checked==true)
139.
{
140.
TodaySize();
141.
}
142.

143.
else
144.
{
145.

146.
TodayReservation();
147.

148.
}
149.
}
150.
else
151.
{

Final Year Project

101

Restaurant Management System

Chapter 4 : Programming

152.

153.

154.
if(Zone.Checked==true)
155.

156.
{
157.
if(chkSize.Checked==true)
158.
{
159.
OtherDayZoneSize();
160.

161.
}
162.
else
163.

164.
{
165.
OtherDayZone();
166.
}
167.
}
168.
elseif(chkSize.Checked==true&&Zone.Checked==
false)
169.
{
170.
OtherDaySize();
171.

172.
}
173.

174.
else
175.
{
176.

177.
ReloadTableTable();
178.

179.
}
180.
}
181.

182.

183.
}
184.
//loadtableinformation,baseontodayandzone(locationseat)
185.
voidTodayZone()
{
186.
187.

188.

189.
SqlConnectionconNwind;
190.
SqlCommandcmdSelectEmployees;
191.
SqlDataReaderdtrEmployees;
192.

193.
stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
194.
conNwind=newSqlConnection(connStr);
195.
conNwind.Open();
196.

197.

198.

199.
cmdSelectEmployees=newSqlCommand("SELECTDISTINCT
TableNo,Size,Zone,Status,{fnCURDATE()}ASExpr1"+
200.
"FROM[Table]"+
201.
"WHERE(TableNoNOTIN"+
202.
"(SELECTTableNo"+
203.
"FROMReserTableAS
ReserTable_1"+
204.
"WHERE(ResID='"+
lblResID.Text+"')))AND(TableNoNOTIN"+
205.
"(SELECTTable_1.TableNo"+
206.
"FROM[Table]ASTable_1
INNERJOIN"+

Final Year Project

102

Restaurant Management System

Chapter 4 : Programming

207.
"ReserTable
ONTable_1.TableNo=ReserTable.TableNoINNERJOIN"+
208.
"Reservation
ONReserTable.ResID=Reservation.ResID"+
209.
"WHERE(Reservation.ResDate=
'"+txtReserveDate.Text+"')AND(Reservation.ResTime<='"+
ddlHours.SelectedItem.Value+"')))AND(TableNoNOTIN"+
210.
"(SELECTTableNo"+
211.
"FROM[Table]ASTable_2"
+
212.
"WHERE(Status='Not
Available')AND({fnNOW()}={fnNOW()})))And(Zone='"+
ddlZone.SelectedItem.Value+"')",conNwind);
213.

214.
dtrEmployees=cmdSelectEmployees.ExecuteReader();
215.

216.

217.
GridView1.DataSourceID=null;
GridView1.DataSource=dtrEmployees;
218.
219.
GridView1.DataBind();
220.

221.

222.
dtrEmployees.Close();
223.
conNwind.Close();
224.

225.
Session["theRID"]=lblResID.Text;
226.

227.

228.
}
229.

230.
//loadtableinformation,baseontodaydate,time,zoneandno.
ofpeople
231.
voidReloadTableTable
232.
voidTodayZoneSize()
233.
{
234.

235.
SqlConnectionconNwind;
236.
SqlCommandcmdSelectEmployees;
237.
SqlDataReaderdtrEmployees;
238.

239.
stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
240.
conNwind=newSqlConnection(connStr);
241.
conNwind.Open();
242.

243.

244.

245.
cmdSelectEmployees=newSqlCommand("SELECTDISTINCT
TableNo,Size,Zone,Status,{fnCURDATE()}ASExpr1"+
246.
"FROM[Table]"+
247.
"WHERE(TableNoNOTIN"+
248.
"(SELECTTableNo"+
249.
"FROMReserTableAS
ReserTable_1"+
250.
"WHERE(ResID='"+
lblResID.Text+"')))AND(TableNoNOTIN"+
"(SELECTTable_1.TableNo"+
251.
252.
"FROM[Table]ASTable_1
INNERJOIN"+
253.
"ReserTable
ONTable_1.TableNo=ReserTable.TableNoINNERJOIN"+

Final Year Project

103

Restaurant Management System

Chapter 4 : Programming

254.
"Reservation
ONReserTable.ResID=Reservation.ResID"+
255.
"WHERE(Reservation.ResDate=
'"+txtReserveDate.Text+"')AND(Reservation.ResTime<='"+
ddlHours.SelectedItem.Value+"')))AND(TableNoNOTIN"+
256.
"(SELECTTableNo"+
257.
"FROM[Table]ASTable_2"
+
258.
"WHERE(Status='Not
Available')AND({fnNOW()}={fnNOW()})))And(Zone='"+
ddlZone.SelectedItem.Value+"')AND(Size='"+
ddlSize.SelectedItem.Value+"')",conNwind);
259.

260.
dtrEmployees=cmdSelectEmployees.ExecuteReader();
261.

262.

263.
GridView1.DataSourceID=null;
264.
GridView1.DataSource=dtrEmployees;
265.
GridView1.DataBind();
266.

267.

268.
dtrEmployees.Close();
269.
conNwind.Close();
270.

271.
Session["theRID"]=lblResID.Text;
272.

273.

274.
}
275.
//loadtableinformation,baseontodayno.ofppl
276.
voidReloadTableTable
277.
voidTodaySize()
278.
{
279.
SqlConnectionconNwind;
280.
SqlCommandcmdSelectEmployees;
SqlDataReaderdtrEmployees;
281.
282.

283.
stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
284.
conNwind=newSqlConnection(connStr);
285.
conNwind.Open();
286.

287.

288.

289.
cmdSelectEmployees=newSqlCommand("SELECTDISTINCT
TableNo,Size,Zone,Status,{fnCURDATE()}ASExpr1"+
290.
"FROM[Table]"+
291.
"WHERE(TableNoNOTIN"+
292.
"(SELECTTableNo"+
293.
"FROMReserTableAS
ReserTable_1"+
294.
"WHERE(ResID='"+
lblResID.Text+"')))AND(TableNoNOTIN"+
295.
"(SELECTTable_1.TableNo"+
296.
"FROM[Table]ASTable_1
INNERJOIN"+
297.
"ReserTable
ONTable_1.TableNo=ReserTable.TableNoINNERJOIN"+
298.
"Reservation
ONReserTable.ResID=Reservation.ResID"+
299.
"WHERE(Reservation.ResDate=
'"+txtReserveDate.Text+"')AND(Reservation.ResTime<='"+

Final Year Project

104

Restaurant Management System

Chapter 4 : Programming

ddlHours.SelectedItem.Value+"')))AND(TableNoNOTIN"+
300.
"(SELECTTableNo"+
301.
"FROM[Table]ASTable_2"
+
302.
"WHERE(Status='Not
Available')AND({fnNOW()}={fnNOW()})))And(Size='"+
ddlSize.SelectedItem.Value+"')",conNwind);
303.

304.
dtrEmployees=cmdSelectEmployees.ExecuteReader();
305.

306.

307.
GridView1.DataSourceID=null;
308.
GridView1.DataSource=dtrEmployees;
309.
GridView1.DataBind();
310.

311.

312.
dtrEmployees.Close();
313.
conNwind.Close();
314.

315.
Session["theRID"]=lblResID.Text;
316.

317.

318.

319.
}
320.
//loadtableinformation,butnottoday
voidReloadTableTable
321.
322.
voidOtherDaySize()
323.
{
324.
DateTimeGetToday=
DateTime.Parse(DateTime.Now.ToShortTimeString());
325.
SqlConnectionconNwind;
326.
SqlCommandcmdSelectEmployees;
327.
SqlDataReaderdtrEmployees;
328.

329.
stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
330.
conNwind=newSqlConnection(connStr);
331.
conNwind.Open();
332.

333.

334.

335.
cmdSelectEmployees=newSqlCommand("SELECTDISTINCT
TableNo,Size,Zone,Status,{fnCURDATE()}ASExpr1"+
336.
"FROM[Table]"+
337.
"WHERE(TableNoNOTIN"+
338.
"(SELECTTableNo"+
339.
"FROMReserTableAS
ReserTable_1"+
340.
"WHERE(ResID='"+
lblResID.Text+"')))AND(TableNoNOTIN"+
341.
"(SELECTTable_1.TableNo"+
342.
"FROM[Table]ASTable_1
INNERJOIN"+
343.
"ReserTable
ONTable_1.TableNo=ReserTable.TableNoINNERJOIN"+
344.
"Reservation
ONReserTable.ResID=Reservation.ResID"+
345.
"WHERE(Reservation.ResDate=
'"+txtReserveDate.Text+"')AND(Reservation.ResTime<='"+
ddlHours.SelectedItem.Value+"')))AND(Size='"+
ddlSize.SelectedItem.Text+"')",conNwind);

Final Year Project

105

Restaurant Management System

Chapter 4 : Programming

346.

347.
dtrEmployees=cmdSelectEmployees.ExecuteReader();
348.

349.

350.
GridView1.DataSourceID=null;
351.
GridView1.DataSource=dtrEmployees;
352.
GridView1.DataBind();
353.

354.

355.
dtrEmployees.Close();
356.
conNwind.Close();
357.

358.
Session["theRID"]=lblResID.Text;
359.
}
360.

361.
//loadtableinformationwithspecificdate,timeandtypeof
location
362.
voidOtherDayZone()
363.
{
364.
DateTimeGetToday=
DateTime.Parse(DateTime.Now.ToShortTimeString());
365.
SqlConnectionconNwind;
366.
SqlCommandcmdSelectEmployees;
367.
SqlDataReaderdtrEmployees;
368.

369.
stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
370.
conNwind=newSqlConnection(connStr);
371.
conNwind.Open();
372.

373.

374.

375.
cmdSelectEmployees=newSqlCommand("SELECTDISTINCT
TableNo,Size,Zone,Status,{fnCURDATE()}ASExpr1"+
376.
"FROM[Table]"+
377.
"WHERE(TableNoNOTIN"+
378.
"(SELECTTableNo"+
379.
"FROMReserTableAS
ReserTable_1"+
380.
"WHERE(ResID='"+
lblResID.Text+"')))AND(TableNoNOTIN"+
381.
"(SELECTTable_1.TableNo"+
382.
"FROM[Table]ASTable_1
INNERJOIN"+
383.
"ReserTable
ONTable_1.TableNo=ReserTable.TableNoINNERJOIN"+
384.
"Reservation
ONReserTable.ResID=Reservation.ResID"+
385.
"WHERE(Reservation.ResDate=
'"+txtReserveDate.Text+"')AND(Reservation.ResTime<='"+
ddlHours.SelectedItem.Value+"')))And(Zone='"+
ddlZone.SelectedItem.Value+"')",conNwind);
386.

387.
dtrEmployees=cmdSelectEmployees.ExecuteReader();
388.

389.

390.
GridView1.DataSourceID=null;
391.
GridView1.DataSource=dtrEmployees;
392.
GridView1.DataBind();
393.

394.

Final Year Project

106

Restaurant Management System

Chapter 4 : Programming

395.
dtrEmployees.Close();
396.
conNwind.Close();
397.

398.
Session["theRID"]=lblResID.Text;
399.

400.
}
401.
//loadtableinformationwithspecificdate,time,typeof
locationandnumberofseatd
402.

403.

404.
voidOtherDayZoneSize()
405.
{
406.
DateTimeGetToday=
DateTime.Parse(DateTime.Now.ToShortTimeString());
407.
SqlConnectionconNwind;
408.
SqlCommandcmdSelectEmployees;
409.
SqlDataReaderdtrEmployees;
410.

411.
stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionStr
ing;
412.
conNwind=newSqlConnection(connStr);
413.
conNwind.Open();
414.

415.

416.

417.
cmdSelectEmployees=newSqlCommand("SELECTDISTINCT
TableNo,Size,Zone,Status,{fnCURDATE()}ASExpr1"+
418.
"FROM[Table]"+
419.
"WHERE(TableNoNOTIN"+
420.
"(SELECTTableNo"+
421.
"FROMReserTableAS
ReserTable_1"+
422.
"WHERE(ResID='"+
lblResID.Text+"')))AND(TableNoNOTIN"+
423.
"(SELECTTable_1.TableNo"+
424.
"FROM[Table]ASTable_1
INNERJOIN"+
425.
"ReserTable
ONTable_1.TableNo=ReserTable.TableNoINNERJOIN"+
426.
"Reservation
ONReserTable.ResID=Reservation.ResID"+
427.
"WHERE(Reservation.ResDate=
'"+txtReserveDate.Text+"')AND(Reservation.ResTime<='"+
ddlHours.SelectedItem.Value+"')))And(Zone='"+
ddlZone.SelectedItem.Value+"')AND(Size='"+
ddlSize.SelectedItem.Text+"')",conNwind);
428.

429.
dtrEmployees=cmdSelectEmployees.ExecuteReader();
430.

431.

432.
GridView1.DataSourceID=null;
433.
GridView1.DataSource=dtrEmployees;
434.
GridView1.DataBind();
435.

436.

437.
dtrEmployees.Close();
438.
conNwind.Close();
439.

440.
Session["theRID"]=lblResID.Text;
441.

442.
}

Final Year Project

107

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the Reservation.aspx.cs. It show how Add
Reservation working in the system.
protectedvoidbtnSelectDateTime_Click(objectsender,EventArgse)
{

tbSearchTableResult.Visible=true;

if(lblResID.Text=="")
{

last=GetLastID();
theResID=AutoGeneratedID(last);
lblResID.Text=theResID;
Session["theRID"]=lblResID.Text;
DateValidation();

SqlConnectionconNwind;

stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
conNwind=newSqlConnection(connStr);
conNwind.Open();

stringSql=("InsertIntoReservation(ResID,MemberID)"+
"Values(@rid,@mid)");

using(SqlCommandcmd=newSqlCommand(Sql,conNwind))
{
cmd.Parameters.AddWithValue("@rid",theResID);
cmd.Parameters.AddWithValue("@mid",theMemberID);

cmd.ExecuteNonQuery();

Terminate();
DateValidation();
}
}

else
{

DateValidation();

Final Year Project

108

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the Reservation.aspx.cs. It show how Add
Reserved Table working in the system.

protectedvoidbtnAdd_Click1(objectsender,EventArgse)
{
try
{

stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnectionconNwind;

foreach(GridViewRowrowinGridView1.Rows)
{

CheckBoxcheckbox=(CheckBox)row.FindControl("ckAdd");
{
if(checkbox.Checked)
{
LabellTableNo=
(Label)row.FindControl("lblTableNo");
LabellSize=(Label)row.FindControl("lblSize");
LabellZone=(Label)row.FindControl("lblZone");

{
conNwind=newSqlConnection(connStr);
conNwind.Open();

stringSql6="InsertInto
ReserTable(TableNo,ResID)values(@tno,@rid)";

using(SqlCommanddCmd=newSqlCommand(Sql6,
conNwind))
{

dCmd.Parameters.AddWithValue("@tno",
lTableNo.Text.Trim());
dCmd.Parameters.AddWithValue("@rid",
lblResID.Text);

dCmd.ExecuteNonQuery();
}

conNwind.Close();

. . .

Final Year Project

109

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the Reservation.aspx.cs. It show how


Update Reservation working in the system.
protectedvoidbtnDone_Click(objectsender,EventArgse)
{
stringtheRestype="Online";

StringTODAY=DateTime.Today.ToShortDateString();
StringTOTIME=DateTime.Today.ToShortTimeString();

if(lblResID.Text!="")
{
if(txtContactName.Text=="")
{
lblmsg.Text="*";
lblmsg3.Text="The'*'placethatyourarerequireto
fillup.";

if(txtContact.Text=="")
{
lblmsg.Text="*";
lblmsg3.Text="The'*'placethatyourarerequireto
fillup.";

}
if(txtICNo.Text=="")
{
lblmsg.Text="*";
lblmsg3.Text="The'*'placethatyourarerequireto
fillup.";

}
else

theReserveTime=
DateTime.Parse(ddlHours.SelectedItem.Value);

Initialize();

stringSql="Update[Reservation]Set[ResDate]=@rdate,
[ResTime]=@rtime,[ResName]=@rname,[ResICNo]=@ric,
[ResContactNo]=@rcontact,[ReserType]=@rtype,[SysDateTime]=
@sysdatetime,[Remark]=@rmrkWhereResID='"+lblResID.Text+"'";

using(SqlCommandcmd=newSqlCommand(Sql,con))
{
cmd.Parameters.AddWithValue("@rdate",
txtReserveDate.Text);
cmd.Parameters.AddWithValue("@rtime",theReserveTime);

cmd.Parameters.AddWithValue("@rname",
txtContactName.Text);
cmd.Parameters.AddWithValue("@ric",txtICNo.Text);

cmd.Parameters.AddWithValue("@rtype",theRestype);

Final Year Project

110

Restaurant Management System

Chapter 4 : Programming

cmd.Parameters.AddWithValue("@sysdatetime",
DateTime.Today);
cmd.Parameters.AddWithValue("@rmrk",txtRemark.Text);

cmd.Parameters.AddWithValue("@rcontact",
txtContact.Text);

cmd.ExecuteNonQuery();

Terminate();

Terminate();

Initialize();
stringstrSQL2="InsertIntoPayment(ResID,
MemberID,StaffID,"+
"Date,Time,Balance,Pmethod)Values(@rid,@mid,@sid,
@Date,@time,@balance,@Pmethod)";

SqlCommandcmd1=newSqlCommand(strSQL2,con);//

cmd1.Parameters.AddWithValue("@rid",lblResID.Text);
cmd1.Parameters.AddWithValue("@mid",theMemberID);
cmd1.Parameters.AddWithValue("@sid","");

cmd1.Parameters.AddWithValue("@Date",TODAY);
cmd1.Parameters.AddWithValue("@time",TOTIME);
cmd1.Parameters.AddWithValue("@balance","0");
cmd1.Parameters.AddWithValue("@Pmethod","None");

cmd1.ExecuteNonQuery();

Terminate();

Response.Redirect("Rbasic.aspx");
}
}

This part of coding is taking from the Reservation.aspx.cs. It show how Cancel
Table Reservation working in the system.
protectedvoidbtnCancel_Click(objectsender,EventArgse)
{

System.Threading.Thread.Sleep(5000);
lblmsg.Text="Pleasewait........";
conNwind=newSqlConnection(connStr);
conNwind.Open();

stringSql="DELETEFROMReserTablewhereResID
=@rid";

Final Year Project

111

Restaurant Management System

Chapter 4 : Programming

using(SqlCommanddCmd=newSqlCommand(Sql,
conNwind))
{

dCmd.Parameters.AddWithValue("@rid",
lblResID.Text);

dCmd.ExecuteNonQuery();

conNwind.Close();
conNwind=newSqlConnection(connStr);
conNwind.Open();

stringSql1="DELETEFROMReservationwhereResID
=@rid";
using(SqlCommanddCmd=newSqlCommand(Sql1,
conNwind))
{

dCmd.Parameters.AddWithValue("@rid",
lblResID.Text);

dCmd.ExecuteNonQuery();

conNwind.Close();
DateValidation();

lblmsg.Text="";
//*****Gobacktomainpage******

Response.Redirect("Membermainpage.aspx");
}

This part of coding is taking from the Rbasic.aspx.cs. It show how Delete
Selected Reserve Table Item working in the system.
protectedvoidbtnRemove_Click(objectsender,EventArgse)
{
stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnectionconNwind;

foreach(GridViewRowrowinGridView2.Rows)
{

CheckBoxcheckbox1=(CheckBox)row.FindControl("ckRemove");
{
if(checkbox1.Checked)
{
LabellCartNo=(Label)row.FindControl("lCartNo");

Final Year Project

112

Restaurant Management System

Chapter 4 : Programming

{
conNwind=newSqlConnection(connStr);
conNwind.Open();
//stringSql="DeleteFrom[ReserTable]where
CartID=@tcid";
stringSql="DELETEFROMReserTableWHERE(CartID
=@tcid)";

//stringSql="InsertInto
ReserTable(TableNo,ResID)values(@tno,@rid)";

using(SqlCommanddCmd=newSqlCommand(Sql,
conNwind))
{

dCmd.Parameters.AddWithValue("@tcid",
lCartNo.Text.Trim());

dCmd.ExecuteNonQuery();

conNwind.Close();

Refresh();
}

This part of coding is taking from the ReserveOrderMenu.aspx.cs. It show


how Search Meal working in the system.
SqlConnectionconNwind;
SqlCommandcmdSelectEmployees;
SqlDataReaderdtrEmployees;

stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
conNwind=newSqlConnection(connStr);
conNwind.Open();

cmdSelectEmployees=newSqlCommand("Select*FromMealWhere
MealNameLIKE'%"+txtSearch.Text+"%'",conNwind);
//cmdSelectEmployees=newSqlCommand("Selectcount(mealNo)from
meal,MeaCategorywhereMeaCategory.MCName=@name");

dtrEmployees=cmdSelectEmployees.ExecuteReader();

ListView1.DataSourceID=null;
ListView1.DataSource=dtrEmployees;
ListView1.DataBind();

dtrEmployees.Close();
conNwind.Close();

Final Year Project

113

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the ReserveOrderMenu.aspx.cs. It show


how Add Reserve Meal working in the system.
protectedvoidListView1_SelectedIndexChanging1(objectsender,
ListViewSelectEventArgse)
{
SqlConnectionconNwind;

stringid=ListView1.DataKeys[e.NewSelectedIndex].Value.ToString();
Response.Write(id);

ListViewItemitem=
(ListViewItem)ListView1.Items[e.NewSelectedIndex];

DropDownListddlQty=(DropDownList)item.FindControl("ddlQty");
TextBoxtRemark=(TextBox)item.FindControl("txtRemark");
LabellMealNo=(Label)item.FindControl("lMealNo");
LabellMealName=(Label)item.FindControl("lMealName");
LabellPrice=(Label)item.FindControl("lPrice");

stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
conNwind=newSqlConnection(connStr);
conNwind.Open();
{

stringSql="InsertIntoResCart(RMealNo,RMealName,RQty,
Price,Subtotal,MemberID)values(@mno,@mname,@qty,@price,@sub,@mid)";

using(SqlCommanddCmd=newSqlCommand(Sql,conNwind))
{
dCmd.Parameters.AddWithValue("@mno",lMealNo.Text.Trim());
dCmd.Parameters.AddWithValue("@mname",
lMealName.Text.Trim());
dCmd.Parameters.AddWithValue("@qty",
Convert.ToInt32(ddlQty.Text.Trim()));
dCmd.Parameters.AddWithValue("@price",
Convert.ToDouble(lPrice.Text.Trim()));
tRemark.Text.Trim());
dCmd.Parameters.AddWithValue("@sub",
Convert.ToInt32(ddlQty.Text.Trim())*Convert.ToDouble(lPrice.Text.Trim()));
dCmd.Parameters.AddWithValue("@mid",
Session["MemberID"].ToString());

dCmd.ExecuteNonQuery();
}
}

Response.Write("NewRecordsInsertedSuccessfully.");
conNwind.Close();

Final Year Project

114

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the ReserveOrderMenu.aspx.cs. It show


how Delete Meal Item working in the system.

protectedvoidbtnMultipleRowDelete_Click(objectsender,EventArgse)
{

stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnectionconNwind;

foreach(GridViewRowrowinGridView1.Rows)
{

CheckBoxcheckbox1=(CheckBox)row.FindControl("cbRows");
{
if(checkbox1.Checked)
{
LabellCartNo=(Label)row.FindControl("lblCartNo");

{
conNwind=newSqlConnection(connStr);
conNwind.Open();
";
stringSql="DELETEFROMResCartWHERE(RCartNO=
@tcid)";

using(SqlCommanddCmd=newSqlCommand(Sql,
conNwind))
{

dCmd.Parameters.AddWithValue("@tcid",
lCartNo.Text.Trim());

dCmd.ExecuteNonQuery();

conNwind.Close();

}
}

}
Refresh();
}

Final Year Project

115

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the ReserveOrderMenu.aspx.cs. It show


how Confirm Reserve Meal working in the system.
protectedvoidbtnCheckOut_Click(objectsender,EventArgse)
{
SqlConnectionconNwind5;

stringconnStr=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
conNwind5=newSqlConnection(connStr);
conNwind5.Open();

stringSql2="InsertInto[ReserMeal](ResID,MealNo,Qty,Subtotal,
Remark,MealName,Price)values(@rid,@mno,@qty,@sub,@remark,@mname,
@price)";

using(SqlCommanddCmd=newSqlCommand(Sql2,conNwind5))
{

foreach(GridViewRowrowinGridView1.Rows)
{
LabellMealNo=(Label)row.FindControl("lblMealNo");
LabellMealName=(Label)row.FindControl("lblMealName");
LabellQty=(Label)row.FindControl("lblQty");
LabellPrice=(Label)row.FindControl("lblPrice");
LabellSubtotal=(Label)row.FindControl("lblSubtotal");

Session["ReservationGrantotal"]=lSubtotal.Text.Trim();

dCmd.Parameters.AddWithValue("@rid",lblID.Text);
dCmd.Parameters.AddWithValue("@mno",lMealNo.Text.Trim());
dCmd.Parameters.AddWithValue("@mname",
lMealName.Text.Trim());
dCmd.Parameters.AddWithValue("@qty",lQty.Text.Trim());
dCmd.Parameters.AddWithValue("@price",lPrice.Text.Trim());
dCmd.Parameters.AddWithValue("@sub",lSubtotal.Text.Trim());
dCmd.Parameters.AddWithValue("@remark","");
dCmd.ExecuteNonQuery();
dCmd.Parameters.Clear();
}
}

conNwind5.Close();
SqlConnectionconNwind8;
SqlCommandcmdSelectEmployees8;
stringconnStr8=
ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
conNwind8=newSqlConnection(connStr8);
conNwind8.Open();

cmdSelectEmployees8=newSqlCommand("DeleteFromResCartWhere
MemberID='"+Session["MemberID"]+"'",conNwind8);

cmdSelectEmployees8.ExecuteNonQuery();

GridView1.DataSource=null;
GridView1.DataBind();

conNwind8.Close();
Response.Redirect("ReservationPayment2.aspx");

Final Year Project

116

Restaurant Management System

4.3.5

Chapter 4 : Programming

Payment Module

This part of coding is taking from the ReservationPayment.aspx.cs. It show


how Calculate Payment working in the system.
privatedecimalGovTax=(decimal)0.05;
privatedecimalSvCharge=(decimal)0.10;
privatedecimalTheCalculation;
privatedecimaltotalGovTax,totalServiceCharge;
privatedecimalTotalStatus=(decimal)0.0;
privatedecimalgetPay=(decimal)0.0;
privateSqlConnectioncon=newSqlConnection();
privatedecimaltheSuggestion=(decimal)0.0;
privatedecimalthebalance=(decimal)0.0;
privatedecimaltheDisplayTotal=(decimal)0.0;

protectedvoidPage_Load(objectsender,EventArgse)
{
//getfrompreviouspage
theDisplayTotal=
Convert.ToDecimal(Session["ReservationGrantotal"].ToString());
lblGrandTotal.Text=theDisplayTotal.ToString();
//Session["ReservationGrantotal"]
lblRID.Text=Session["furtherRID"].ToString();
mid=Session["MemberID"].ToString();

if(!IsPostBack)
{

Initialize();

SqlDataAdapterdaHotel;
DataSetdsHotel=newDataSet();

stringsqlHotel="Select*from[Payment]whereResID='"+
lblRID.Text+"'";
daHotel=newSqlDataAdapter(sqlHotel,con);

daHotel.Fill(dsHotel,"Order");

foreach(DataRowrowindsHotel.Tables[0].Rows)
{
strPid=
dsHotel.Tables["Order"].Rows[0]["ReceiptNo"].ToString();

}
}
PaySuggestion();//displaycalculationofpayment

}
voidPaySuggestion()
{
//stringround=TotalSales.ToString("d");
if(lblGrandTotal.Text!="")
{
decimalGetLabelGrandTotal=
decimal.Parse(lblGrandTotal.Text);

Final Year Project

117

Restaurant Management System

Chapter 4 : Programming

totalServiceCharge=GetLabelGrandTotal*SvCharge;
totalGovTax=GetLabelGrandTotal*GovTax;
theSuggestion=(GetLabelGrandTotal*70)/100;
lblDeposit.Text=theSuggestion.ToString("F");
lblGTax.Text=totalGovTax.ToString("F");
lblServiceCharge.Text=totalServiceCharge.ToString("F");
TheCalculation=totalServiceCharge+totalGovTax+
GetLabelGrandTotal;
lblTotalAmt.Text=TheCalculation.ToString("F");
thebalance=TheCalculationtheSuggestion;
lblBalance.Text=thebalance.ToString("F");
stringthenum=lblTotalAmt.Text;
}
else
{
Response.Write("Norecordofmealadded");
}

This part of coding is taking from the ReservationPayment.aspx.cs. It show


how Validate Credit Card and Add Payment working in the system.
protectedvoidbtnCheckOut_Click(objectsender,EventArgse)
{
StringTODAY=DateTime.Today.ToShortDateString();
StringTOTIME=DateTime.Today.ToShortTimeString();
//try
//{

if(txtExpireDate.Text!=""||txtName.Text!=""||
CardNo.Text!="")
{

Initialize();//openconnection

stringthenum=CardNo.Text;

//visaCardValidation
if(ddlCardType.SelectedIndex==0)
{
if(CardNo.Text.Length==13||CardNo.Text.Length==
16)
{
if(thenum.Substring(0,1)=="4")
{
Label14.Text="Valid";

}
else
{
Label14.Text="Invalid";
}
}
else

Final Year Project

118

Restaurant Management System

Chapter 4 : Programming

{
Label14.Text="Invalid";
}

}
//MasterCard
if(ddlCardType.SelectedIndex==1)
{
if(CardNo.Text.Length==16)
{
if(thenum.Substring(0,1)=="5")
{
Label14.Text="Valid";

}
else
{
Label14.Text="Invalid";
}
}
else
{
Label14.Text="Invalid";
}

}
//Americanexpress
if(ddlCardType.SelectedIndex==2)
{
if(CardNo.Text.Length==15)
{
if(thenum.Substring(0,2)=="37")
{
Label14.Text="Valid";

}
else
{
Label14.Text="Invalid";
}
}
else
{
Label14.Text="Invalid";
}
}

stringstrSQL1="Select*fromCreditCarddatawhereCCNO
='"+CardNo.Text+"'";
SqlDataAdapterda1=newSqlDataAdapter(strSQL1,con);

DataSetdsPlayers1=newDataSet();
da1.Fill(dsPlayers1,"Reservation").ToString();
if(dsPlayers1.Tables["Reservation"].Rows.Count>0)

Final Year Project

119

Restaurant Management System

Chapter 4 : Programming

{
strName=
dsPlayers1.Tables["Reservation"].Rows[0]["Name"].ToString();
strCardT=
dsPlayers1.Tables["Reservation"].Rows[0]["CardType"].ToString();
strDate=
dsPlayers1.Tables["Reservation"].Rows[0]["ExpireDate"].ToString();
theCardNO=
dsPlayers1.Tables["Reservation"].Rows[0]["CCNO"].ToString();
}

Terminate();
DateTimedtExpire=Convert.ToDateTime(txtExpireDate.Text);
DateTimedtEpire2=Convert.ToDateTime(strDate);

if(txtName.Text==strName)
{
Label9.Text="Checked";
}
else
{
Label9.Text="Invalid";
}
if(ddlCardType.SelectedItem.Value==strCardT)
{
Label12.Text="Checked";
}
else
{
Label12.Text="Invalid";
}
if(dtExpire==dtEpire2)
{
Label11.Text="Checked";
}
else
{
Label11.Text="Invalid";
}
if(CardNo.Text==theCardNO)
{
Label10.Text="Checked";
}
else
{
Label10.Text="Invalid";
}
if(Label9.Text=="Invalid"||Label10.Text=="Invalid"||
Label11.Text=="Invalid"||Label12.Text=="Invalid")
{
Label13.Text="Sorry,yourcreaditcardisnot
exceptable.";
}

if(Label9.Text=="Checked"&&Label10.Text=="Checked"&&
Label11.Text=="Checked"&&Label12.Text=="Checked")
{

Initialize();
stringstrSQL2="UpdatePaymentSet
[CreditCardNo]=@ccno,[MemberCardNo]=@mcn,[ResID]=@rid,

Final Year Project

120

Restaurant Management System

Chapter 4 : Programming

[MemberID]=@mid,[StaffID]=@sid,[Pmethod]=@pmethod,[TotalCharge]=@tc,
[CardType]=@cardtyp,"+
"[Date]=@date,[Time]=@time,[Deposit]
=@deposit,[Balance]=@balance,[GovTax]=@tax,[ServiceCharge]=@svchrg,
[GrandTotal]=@totalamountwhereResID='"+lblRID.Text+"'";

SqlCommandcmd=newSqlCommand(strSQL2,con);//

cmd.Parameters.AddWithValue("@ccno",CardNo.Text);
cmd.Parameters.AddWithValue("@mcn","CreaditCard");
cmd.Parameters.AddWithValue("@rid",lblRID.Text);

cmd.Parameters.AddWithValue("@mid",mid);
cmd.Parameters.AddWithValue("@sid","");
cmd.Parameters.AddWithValue("@time",
DateTime.Now.TimeOfDay);
decimaldecTotalCharg=
Convert.ToDecimal(lblGrandTotal.Text);
cmd.Parameters.AddWithValue("@pmethod","CreaditCard");
cmd.Parameters.AddWithValue("@tc",decTotalCharg);
cmd.Parameters.AddWithValue("@cardtyp",
ddlCardType.SelectedItem.Value);

cmd.Parameters.AddWithValue("@date",DateTime.Today);

decimaldecDeposit=Convert.ToDecimal(lblDeposit.Text);
cmd.Parameters.AddWithValue("@deposit",decDeposit);
decimaldecBalance=Convert.ToDecimal(lblBalance.Text);
cmd.Parameters.AddWithValue("@balance",decBalance);
decimaldecGtax=Convert.ToDecimal(lblGTax.Text);
cmd.Parameters.AddWithValue("@tax",decGtax);
decimaldecSv=
Convert.ToDecimal(lblServiceCharge.Text);

cmd.Parameters.AddWithValue("@svchrg",decSv);
decimaldecTotal=Convert.ToDecimal(lblTotalAmt.Text);
cmd.Parameters.AddWithValue("@totalamount",decTotal);

cmd.Parameters.AddWithValue("@omthd","Reservation");

cmd.ExecuteNonQuery();

Terminate();
btnCheckOut.Visible=false;
Button1.Visible=true;
Button2.Visible=true;
Label13.Text="Thanks,wishyoucomeagain";
}

Final Year Project

121

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the OPayment.aspx.cs (OrderPayment


page). It show how Order Meal with Delivery Payment Calculation
working in the system.
decimalGetLabelGrandTotal=decimal.Parse(lblGrandTotal.Text);

totalServiceCharge=GetLabelGrandTotal*SvCharge;
totalGovTax=GetLabelGrandTotal*GovTax;

if(lblOrderMethod.Text=="Delivery")
{
lblTransportFees.Text="5.00";
TheCalculation=totalServiceCharge+totalGovTax+
GetLabelGrandTotal+5;
theSuggestion=(TheCalculation*70)/100;
thebalance=TheCalculationtheSuggestion;
lblTotal.Text=TheCalculation.ToString("F");
//caculation

lblBalance.Text=thebalance.ToString("F");

lblDeposit.Text=theSuggestion.ToString("F");
lblGTax.Text=totalGovTax.ToString("F");
lblServiceCharge.Text=
totalServiceCharge.ToString("F");

This part of coding is taking from the OPayment.aspx.cs (OrderPayment


page). It show how Order Meal with Collect by Customer Payment
Calculation working in the system.

lblTransportFees.Text="0.00";
TheCalculation=totalServiceCharge+totalGovTax+
GetLabelGrandTotal;
thebalance=TheCalculationtheSuggestion;
lblTotal.Text=TheCalculation.ToString("F");
//caculation

lblBalance.Text=thebalance.ToString("F");

lblDeposit.Text=theSuggestion.ToString("F");
lblGTax.Text=totalGovTax.ToString("F");
lblServiceCharge.Text=totalServiceCharge.ToString("F");

Final Year Project

122

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the OPayment.aspx.cs (OrderPayment


page). It show how Calculate point base on payment working in the
system.
//declarationpointpurpose
intoriginalPoint;
decimaldecAmount=(decimal)0.0;
stringstrPoint;
intintAddUppoint,intAmount;

Initialize();

SqlDataAdapterdaHotel;
DataSetdsHotel=newDataSet();

stringsqlHotel="select*fromMemberswhere
MemberID='"+Session["MemberID"].ToString()+"'";
daHotel=newSqlDataAdapter(sqlHotel,con);

daHotel.Fill(dsHotel,"Members");

foreach(DataRowrowindsHotel.Tables[0].Rows)
{

strPoint=
dsHotel.Tables["Members"].Rows[0]["MPoint"].ToString();

decAmount=Convert.ToDecimal(lblTotal.Text);
originalPoint=Convert.ToInt32(strPoint);
intAmount=Convert.ToInt32(decAmount);
intAddUppoint=intAmount+originalPoint;
stringstrSQL5="UpdateMembersSet
[MPoint]=@pointwhereMemberID='"+Session["MemberID"].ToString()+
"'";

SqlCommandcmd5=newSqlCommand(strSQL5,con);
//

cmd5.Parameters.AddWithValue("@point",
intAddUppoint);
cmd5.ExecuteNonQuery();

Final Year Project

123

Restaurant Management System

Chapter 4 : Programming

4.3.6 Platform Design


This part of coding is taking from the Stage.fla. It show how customize position of
object working in the system.

on (press) {
startDrag( this, false, 0, 0, 400,400);
}
on (release, releaseOutside)
{
stopDrag();
}

This part of coding is taking from the PlatformDesign.aspx. It show how


Display flash appliction working in the system.
<objecttype="application/xshockwaveflash"
style="width:500px;height:508px;margintop:0px"
class="style7">
<paramname="movie"value="TableOverView.swf"/>
<paramname="allowFullScreen"value="true"/>
<paramname="FlashVars"value="xml=vcastr.xml"/></td>
</tr>
</object>

Final Year Project

124

Restaurant Management System

Chapter 4 : Programming

4.3.7 Print Function


This part of coding is taking from the PrintHelper.cs. It is print function class,
use another form or page to call this function . Below is showing how Print
function working in the system.
5. usingSystem.Data;
6. usingSystem.Configuration;
7. usingSystem.Web;
8. usingSystem.Web.Security;
9. usingSystem.Web.UI;
10. usingSystem.Web.UI.WebControls;
11. usingSystem.Web.UI.WebControls.WebParts;
12. usingSystem.Web.UI.HtmlControls;
13. usingSystem.IO;
14. usingSystem.Text;
15. usingSystem.Web.SessionState;
16. ///<summary>
17. ///SummarydescriptionforPrintHelper
18. ///</summary>
19. publicclassPrintHelper
20. {
21. publicPrintHelper()
22. {
23. }
24. publicstaticvoidPrintWebControl(Controlctrl)
25. {
26. PrintWebControl(ctrl,string.Empty);
27. }
28. publicstaticvoidPrintWebControl(Controlctrl,stringScript)
29. {
30. StringWriterstringWrite=newStringWriter();
31. System.Web.UI.HtmlTextWriterhtmlWrite=new
System.Web.UI.HtmlTextWriter(stringWrite);
32. if(ctrlisWebControl)
33. {
34. Unitw=newUnit(100,UnitType.Percentage);
((WebControl)ctrl).Width=w;
35. }
36. Pagepg=newPage();
37. pg.EnableEventValidation=false;
38. if(Script!=string.Empty)
39. {
40. pg.ClientScript.RegisterStartupScript(pg.GetType(),
"PrintJavaScript",Script);
41. }
42. HtmlFormfrm=newHtmlForm();
43. pg.Controls.Add(frm);
44. frm.Attributes.Add("runat","server");
45. frm.Controls.Add(ctrl);
46. pg.DesignerInitialize();
47. pg.RenderControl(htmlWrite);
48. stringstrHTML=stringWrite.ToString();
49. HttpContext.Current.Response.Clear();
50. HttpContext.Current.Response.Write(strHTML);
51.
HttpContext.Current.Response.Write("<script>window.print();</script
>");
52. HttpContext.Current.Response.End();
53. }

Final Year Project

125

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the Opayment.aspx.cs.Below is showing how


Print button call the print function working in the system.
protectedvoidbtnPrint_Click(objectsender,EventArgse)
{

PrintHelper.PrintWebControl(Tab10);
Session["ctrl"]=Tab10;
ClientScript.RegisterStartupScript(this.GetType(),"onclick","<script
language=javascript>window.open('Print.aspx','PrintMe',
'height=300px,width=300px,scrollbars=1');</script>");

This part of coding is taking from the Print.aspx.cs.Below is showing how Page load
the print function after Opayment form call the print function working in the
system.
protectedvoidPage_Load(objectsender,EventArgse)
{
lbldate.Text=DateTime.Now.ToShortDateString();
Controlctrl=(Control)Session["ctrl"];
PrintHelper.PrintWebControl(ctrl);

This part of coding is taking from the PlatformDesign.aspx.cs.The code is another


method to print page. Below is showing how Print Page working in the system.

btnPrint1.Attributes.Add("onclick","window.print();");

Final Year Project

126

Restaurant Management System

Chapter 4 : Programming

4.3.8 GUI Validation


This part of coding is taking from the Reservation.aspx. It show how Select
Date and Time Validation working in the system.
<%@PageLanguage="C#"AutoEventWireup="true"
CodeFile="Reservation.aspx.cs"
Inherits="NormalReservation"%>

<%@RegisterAssembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"TagPrefix="asp"%>

<!DOCTYPEhtmlPUBLIC"//W3C//DTDXHTML1.0Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1transitional.dtd">

<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title></title>
<scripttype="text/javascript">
functioncheckDate(sender,args){
if(sender._selectedDate<newDate()){
alert("Youcannotselectadayearlierthantoday!");
sender._selectedDate=newDate();
//setthedatebacktothecurrentdate

sender._textbox.set_Value(sender._selectedDate.format(sender._format))
}
}
</script>

<styletype="text/css">
......
...
</style>
</head>

<form>.

<asp:CalendarExtenderID="CalendarExtender1"
OnClientDateSelectionChanged="checkDate"
TargetControlID="txtReserveDate"
PopupButtonID="Image1"
runat="server">

</asp:CalendarExtender>

This part of coding is taking from the Staff Registration.aspx. It show how
Text Field Require Feild validation working in the system.
<asp:TextBoxID="txtPassword"runat="server"TextMode="Password"
AutoPostBack="false"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator4"runat="server"Display="Dynamic"
ControlToValidate="txtPassword"ErrorMessage="Thetextboxcannotbe
empty!"/>

Final Year Project

127

Restaurant Management System

Chapter 4 : Programming

This part of coding is taking from the Staff Registration.aspx. It show how Text
Field Require Key In start with letter working in the system.
<asp:TextBoxID="txtFirstName"runat="server"Height="25px"
Width="309px"></asp:TextBox>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator1"runat="server"
ControlToValidate="txtFirstName"ValidationExpression="^[azAZ].*"
ErrorMessage="Inputmuststartwithaletter"/>

This part of coding is taking from the Staff Registration.aspx. It show how
Email Validation working in the system.
<asp:RegularExpressionValidatorID="emailValidator"runat="server"
Display="Dynamic"
ErrorMessage="Please,entervalidemailaddress.(e.g
twistYen@twistYen.com)"ValidationExpression="^[\w\.\]+@[azAZ09\
]+(\.[azAZ09\]{1,})*(\.[azAZ]{2,3}){1,2}$"
ControlToValidate="txtUMemail">
</asp:RegularExpressionValidator>

This part of coding is taking from the Staff Registration.aspx. It show how
Masked Validation working in the system.
<asp:TextBoxID="txtSalary"runat="server"ValidationGroup="MKE">
</asp:TextBox>
<asp:MaskedEditExtenderid="MaskedEditExtender2"runat="server"
TargetControlID="txtSalary"
Mask="99,999.99"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
MaskType="Number"
InputDirection="RightToLeft"
AcceptNegative="Left"
ErrorTooltipEnabled="True"/>
<asp:MaskedEditValidatorID="MaskedEditValidator1"runat="server"
ControlExtender="MaskedEditExtender2"
ControlToValidate="txtSalary"
IsValidEmpty="False"
MaximumValue="12000"
EmptyValueMessage="Numberisrequired"
InvalidValueMessage="Numberisinvalid"
MaximumValueMessage="Number&gt;12000"
MinimumValueMessage="Number&lt;600"
MinimumValue="600"
Display="Dynamic"
TooltipMessage="Inputanumberfrom600to12000"
EmptyValueBlurredText="*"
InvalidValueBlurredMessage="*"
MaximumValueBlurredMessage="*"
MinimumValueBlurredText="*"
ValidationGroup="MKE"/>
</td>

Final Year Project

128

Restaurant Management System

4.4

Chapter 4 : Programming

Chapter Summary

In programming section, I faced a lot problem when system develops, such as syntax
error, run time error and logic of the programming. I am using Visual Studio 2010 C #.
Net and Asp.net language to develop online restaurant management system. I have most
experience on VB programming language than C sharp, however, I will try to learn and
get solution from web site or try to debug the every line of code for confirming each line
of coding does not have any error.

Final Year Project

129

Restaurant Management System

Chapter 5 : Software Testing

Chapter 5
Software Testing

Final Year Project

130

Restaurant Management System

5.

Chapter 5 : Software Testing

Software Testing
5.1

Introduction

System testing was important to a project, testing is to validate the system whether
meet the requirement of the system. Software testing is used to test the functionality
of each application. Software testing enables to investigate the quality of the system.
Software testing able to verify whether does the system meets the business and
technical requirements has been request in the objective. Software testing can be also
stated as a process to validate and verify the software programs. The software testing
is being carried out by using a testing methodology.

5.2

Validation and Verification

Empty Field Validation

Final Year Project

131

Restaurant Management System

Chapter 5 : Software Testing

The administrator need to enter the all field data before add the new staff record. An
empty field is not allowed before click the register button.
Login Validation

This is the login validation for the front-end system. The system will validate the
Username and Password key in by the member . Unauthorized user is not allow to the
login into the system either Username or password is incorrect.
Email Validation

Final Year Project

132

Restaurant Management System

Chapter 5 : Software Testing

The message is displayed when user key in improper e-mail address, such as @ and
dot com (. Com)
Confirmation Verification

The message box will prompt out for the user to make comfirmation whether want to
delete the table record. If the user selection is Ok, the the system will delete the
record.
Range Validation

Final Year Project

133

Restaurant Management System

Chapter 5 : Software Testing

This is range validation for salary field, the administrator must key in between the
salary between 1800 to 9999, if less than, the system not add new staff record into
database.
Date Validation

This is date validation for selecting date to reserve table The message will prompt up
when the user is to select the date is earlier today.

Password Matching Validation

Final Year Project

134

Restaurant Management System

Chapter 5 : Software Testing

The staff must enter same password on the password field and confirm password
field. If confirm password is not match with the password, the message label will
display.

Credit Card Validation

This is creadit card validation, if user key in improper credit card details, the the
system will display not accept user credit card payment transaction.

Final Year Project

135

Restaurant Management System

5.3

Chapter 5 : Software Testing

Test Plan

Staff and Member Registration Page


No. Test Domain

Test
Data

Expected
Output

Actual
Output

Conclusion

1.

error Successful
An error An
Validate user input : Leave
message
empty field
text box message
display
display
blank

2.

Validate user input : Enter


password not match
different
password

3.

error Successful
Validate user input : Enter less An error An
message
message
number range
than
display
display
epected
value

4.

error Successful
Validate user input : Enter not An error An
message
message
email format
standard
display
format of display
email
address

error Successful
An error An
message
message
display
display

Staff and Member Maintenance Page


No. Test Domain

Test
Data

Expected
Output

Actual
Output

Conclusion

1.

error Successful
An error An
Validate user input : Leave
message
empty field
text box message
display
display
blank

2.

Validate user input : Enter


password not match
different
password

3.

error Successful
Validate user input : Enter less An error An
message
message
number range
than
display
display
epected
value

Final Year Project

136

error Successful
An error An
message
message
display
display

Restaurant Management System

Chapter 5 : Software Testing

Table Reservation Page


No. Test Domain

Test Data

Expected
Output

Actual
Output

Conclusion

1.

Validate user input : Leave


text An error An error Successful
message
empty field
box blank
message
display
display

2.

Validate user input : Select


date
ealier
today

date An error An error Successful


than message
message
display
display

Login Page
No. Test Domain

Test
Data

Expected
Output

Actual
Output

Conclusion

1.

error Successful
An error An
Validate user input : Leave
message
empty field
text box message
display
display
blank

2.

Validate user input : Enter


username
and different
password not match
username
and
password

An error An
error Successful
message
message
display
display

Payment Page
No. Test Domain

Test
Data

Expected
Output

Actual
Output

Conclusion

1.

error Successful
An error An
Validate user input : Leave
message
empty field
text box message
display
display
blank

2.

Validate user input : Enter


credit card details not different
credit
match
card
details

Final Year Project

137

error Successful
An error An
message
message
display
display

Restaurant Management System

Chapter 5 : Software Testing

Maintain Table Page


No. Test Domain

Test
Data

Expected
Output

Actual
Output

Conclusion

1.

error Successful
An
error An
Validate user input : Leave
message
empty field
text box message
display
display
blank

2.

Validate user input : Select


comfirm deletion
delete
option

Final Year Project

138

An
An
Successful
confirmation confirmation
message
message

Restaurant Management System

5.4

Chapter 5 : Software Testing

Chapter Summary
A well design system should able to provide an error free and well function for
the user. If a system has well tested then the system may produce understandable
output, not always terminate during run-time. Through the software testing, every
modules and fields in the system had been tested carefully, otherwise the
adequate message box will present to the user for each input. Though the
message box or message display, the user can understand what the action is
require to be taken by following the instruction of the system.

Final Year Project

139

Restaurant Management System

Chapter 6 : Conclusion

Chapter 6
Conclusion

Final Year Project

140

Restaurant Management System

6.

Chapter 6 : Conclusion

Conclusion
6.1

Introduction
This chapter will conclude about Final Year Project documentation. Evaluation
against project objectives, strengths and weakness and suggestions will be
discussed in this chapter.

6.2

Evaluation of Project
6.2.1 Strengths
Improved Validation and Error Control
With the online Restaurant Management System is developed, the rate of
error from occurring can be prevented. With the function validation,
incorrect format can be reduced.
Improved Security
With the function enabling user to login and logout, user can have a
better security in booking their table, meal, make order as user needs to
enter their personal information such as credit card number,
Identification card number and so on.
Generate Unique Identification Number (ID)
This system provides a function called auto-generate ID, which means
ID such as order ID, Resrvation ID, Member ID, Staff ID and payment
ID are auto-generated. This is to prevent from entering the redundant ID
number.
Increase Efficiency and Effectiness
This system had brought a new improvement to restaurant orgainsation.
This allow customer make delivery and make reservation via online.
This can save customer time for traveling to the restaurant. Another
advantage of this system is customer can always get the latest
information such as which date of table is available and what promotion
is advertised from the restaurant.

Final Year Project

141

Restaurant Management System

Chapter 6 : Conclusion

6.2.2 Limitation
User Interface
The user interface of the system is less attractive, because the application
is very hard to adjust.
Member only able to book table, meal and design platform for
themselves
The website make reservation function only able to member to reserve
the table, reserve meal and design platform.
User add meal function
The add meal function is unable auto add up the quantity of meal item.
Everytime add a same meal item, the meal item will display at next row
of girdview in order list form.

6.3

Suggestion for Future Improvement


User Interface
It can use css (class style sheet) to attract the user.
Member only able to book table, meal and design platform for
themselves
Enable user to reserve table, meal and platform design by staff. I wish
platform design can be store into database such as position of table.
User add meal function
Make the add meal function is able auto add up the quantity of meal item.
Every time add a meal item, the meal item display into same row of
order list if meal item is same.

Final Year Project

142

Restaurant Management System

6.4

Chapter 6 : Conclusion

Evaluation Against The Project objectives

The user interface must be user friendly where using graphic picture to
present information to customer.

System will run logically when user hit some error. Example, not allows enter
a character to numeric field, and would not terminate the system directly when
error message is displayed.

The system should have security function such as provides a protection of the
information to the user, users password should be protected by encrypted it
and if the staff forgot password, need contact admin to reset the password as
security. If the member, need to answer certain question to login.

The system should have accuracy function such as calculation of payment in


system are accurate and consistency, by using professional formula for the
calculation.

The system must be always provide availability function and performance,


such as user can take order or make reservation, the TwinsYens system is
available 24 hour per day and 365 days per year.

The system should provide the best performance function, such as the system
must quicker response process after user click a button and the system is not
easy down.

Final Year Project

143

Restaurant Management System

6.5

Chapter 6 : Conclusion

Linking With Seminar

My seminar project is Flash Action Script versus JavaScript. I recommend flash action
script and java script apply into my FYP (Final Year Project) because both are useful to
develop the system.

Firstly, I used flash action script drag and drop method to apply

into my platform design module.

The most successfully part of action script is

differences objects have own function and specific position to be allocated. For example,
painting object s function is changing the background color of platform, the balloon
only able to drag to top position of stages wall. On the other hand, I also use flash to
design the main page of the system, such as advertisement and slide show.
Secondly, I used java script that apply together with asp.net and c sharp. For example,
table maintenance module, I used javascript to display pop up message for asking user to
confirm deletion then the delete SQL will be perform from c sharp coding when user
response .

Final Year Project

144

Restaurant Management System

6.6

Chapter 6 : Conclusion

Personal Reflection

From the planning stage until the testing stage, it took me one year preparation and
finishing this final year project. During the time doing this project, I am so worry I
affect my partner performance and I unable finish this project.

Wish so many

problem I faced, I try to solve it and go to library to refer more book. I found I have
improved a lot and learned to manage my time.
During develop this system, I faced a lot problem, such as survey how asp.net
connect to flash, install crystal report into Microsoft visual studio 2010 and project
programming. Since I get use to using VB programming to develop a system,
however we use c sharp, scripting language and asp.net in this project, so I have
spent a lot of time to find solution through library, web site and asking my friend. K
With the help and support from my friends, I solve the problem and complete the
project in time. I also would like to thanks my partner, Tan Yoke Yen who is always
motivate me to complete the project. I would like to express my sincere gratitude to
my project supervisor, Ms Chin who is very kind and considerate to me. She was
always giving me opinions and feedback to my project. Thanks to her patient and
kindly to guide me to finish this project.

6.7

Chapter Summary

After completing the system, I had gained a lot of extra knowledge that I did not
learn from college. I am happily to enjoy working with my friends, as we are able to
push each other, brainstorming together and help each other. I am so happy I able to
complete this final year project on time as this will be the last project for me in
college.

Final Year Project

145

Restaurant Management System

7.

References

References

E-Book
Prayaga, Lakshmi; Suri, Hamsa, 2007. Beginning Game Programming with Flash, viewed
2010, <http://books.google.com.my/books?id=ORMINQAACAAJ&dq>
Journal
Sutar, Shashikant, S 2008. Web Design and ASP.Net. Daryaganj, Delhi, IND, p134.

E-Publication
Domino

2010.

Member

Registration,

Viewed

10

October

2010

<

2010

<

http://www.dominos.com.my/frmUserRegistration1.aspx >
Internet.Com,

2010.

Credit

Card

Validation,

Viewed

Feb

http://javascript.internet.com/forms/valcreditcard.html>

Patrickcauley, 2010. Flash-Drag and Drop, Viewed 5 Feb 2010 < http://www.youtube.com
http://javascript.internet.com/forms/valcreditcard.html>

Others
XiaoYen,Wong. Restaurant Management Systems Project Specification, Feb 2010, p1-p21.

Final Year Project

146

Restaurant Management System

8.

Appendices

Appendices

Figure 8.1 : Dominos Member Reigistration Page

Final Year Project

147

Restaurant Management System

9.

User Guide

User Guide
9.1 Member User Guide
9.1.1 Non-Member Main Page

Menu Bar included :


1. Menu Enable user to view TwinsYen s Restaurant Meal Menu
2. Promotion Enable user to view TwinsYen s Restaurant latest promotion
product news
3. Reservation Enable user to view TwinsYen s Restaurant provide reservation
service information
4. Sign Up Enable user register as TwinsYen s Restaurant member
5. Login If you are TwinsYen s Restaurant already, just click login

Final Year Project

148

Restaurant Management System

User Guide

9.1.2 Member Registration

After click sign up option, display registration form. There are require you to fill up
three basic category , included your login information, personal imformation and
delivery information.
Note :
The delivery information is allowed TwinYens Restaurant staff able delivers the
meal to your specific address.

Final Year Project

149

Restaurant Management System

9.1.3

User Guide

Member Login

After you sign up as a member, you can direct go to login page . From here, you are
requiring to key in your username and your password, then click login.
Note :
Remember Me option the system will remember user s username, if you next
time go to this page, you are no need to retype your username..
Forgot Password option - if you do not remember your password, here has option to
allow you find back your password..

Final Year Project

150

Restaurant Management System

9.1.4

User Guide

Member Main Page

If you login successfully, the member main page is look like this.
Menu Bar
Home Back to member main page
Menu Enable user to view TwinsYen s Restaurant Meal Menu and make order.
Promotion Enable user to view TwinsYen s Restaurant latest promotion product
news
Reservation

Reservation Information - Enable user to view TwinsYen s Restaurant


provide reservation service information

Reservation Enable user make reservation.

About Us - Enable user to view TwinsYen s Restaurant background, product and


services.
Others
Logout - sign out from this system

My profile - View your own profile

Contact Us

Feedback give your evaluation to TwinsYen s Restaurant

Final Year Project

151

Restaurant Management System

User Guide

9.1.5 Member Forgot Password

If you click forgot password, this page is displayed. There has 3 step
Step 1 - select what you remember
Step 2 key in what you remember
Step 3 the system will show your security question, and you require to answer it. If
your answer is correct, the system will show your password.

Final Year Project

152

Restaurant Management System

User Guide

9.1.6 Member Profile

You can view your profile by select Others from menu bar select My profile
Your option :
Edit enable member change details
Cancel cancel edit your profile details
Print print your profile
Change password enable you to change your password for login purpose

Final Year Project

153

Restaurant Management System

User Guide

9.1.7 Member Password Change

If you click change password from my profile page, then this page will be
displayed. There have three empty fields where you are require to fill up. The old
password field is requiring you to key in your current password in use. The new
password means fill up the new password to replace previous password in use. The
confirm password means that make sure you are not simply to key in the password.

Your Option :
Done button - confirm to change the password
Clean All empty all the field
Cancel stop continue to change the password

Final Year Project

154

Restaurant Management System

User Guide

9.1.8 Reservation

If you want reserve table from TwinsYen s Restaurant, you can click from menu bar
Reservation --> Reservation.
Date and time - allow you select which date and time to reserve your table
Search button- you can find the table requirem base to date, time, zone ( smoking or nonsmoking) and number of size ( how many seat of table)

Final Year Project

155

Restaurant Management System

User Guide

Check Table Reserved button - allow you to check what table you have selected for the
reservation. Below is example of check table reservation page

Figure 1 : Check Table Reserved page


Add button - allow you to select table and add to your reservation
Finish - if you have satisfy your reservation, then you can click this to see your reservation
detail.

Final Year Project

156

Restaurant Management System

9.1.9

User Guide

MemberReservation Information

After you click finish button from table reservation page, this page is displayed.
Your Option
Back To Reserve Table button go back to table reservation page to add your table
Go To Reserve Meal if you want reserve meal into your reservation
Remove Remove your table item selected
Print Print your reservation information

Final Year Project

157

Restaurant Management System

User Guide

9.1.10 Reservation Meal Menu

From this page, you can select your favourite meal item.
Your Option
Search button - Search your preference choice of meal category

Add button -

Quantity selection -

allow you add your preference meal into order list

allow you selec quatity of meal item

Order List button - allow you to view your meal added details

Final Year Project

158

Restaurant Management System

User Guide

9.1.11 Member Meal Reservation Information

After you press order list button from reservation meal menu page, this page is displayed.
Your Option
Continue Reserve Meal go back to reservation meal menu page for add more quantity of
meal item.
Done go to make payment
Confirm Delete - select your meal item that you want to remove

Final Year Project

159

Restaurant Management System

User Guide

9.1.12 Reservation Payment

After you click Done button from MemberMeal Reservation Information page, this page is
displayed. . Your payment details is display and you require to fill up your credit card details.

You Option :
Done button - click this button after you fill up all the field for make transaction.
Back Home page button - enable you to back home page
Design Platform design -

enable you to design your party platform on TwinsYens

Restaurant.

Final Year Project

160

Restaurant Management System

User Guide

9.1.13 Platform Design

Here you can design your party platform.


Step 1: select the object
Step 2: drag and drop
Step 3 : press print button

Final Year Project

161

Restaurant Management System

User Guide

9.1.14 Order Payment ( order meal payment method )

Final Year Project

162

Restaurant Management System

User Guide

After your add your order meal from Menu -> confirm Order list -> select order
with delivery or order with collect myself -> payment
Your Option
Step 1 : Payment Method selection - enable you select pay by cash or credit card. If
you pay by credit card, then you are require to fill up the credit card details.
Step 2 : Key in credit card details ( if select credit card payment method)
Step 3: Press Done button

Final Year Project

163

Restaurant Management System

User Guide

9.2 Staff User Guide


9.2.1 Staff / Administrator Login Page

After administrator generate a new staff from sign up form, then the new staff has
authorize go to login from this login page . From here, users are requiring to key in
their username and your password,and then click login.
Note :
Remember Me option the system will remember user s username, if you next
time go to this page, you are no need to retype your username..
Forgot Password option - if you do not remember your password, here has option to
allow you find back youre your password..

Final Year Project

164

Restaurant Management System

User Guide

9.2.2 Check Member Reservation

If the customer does not remember their reservation id, then staff can help member
check reservation id, reservation date and reservation time by clicking search button
in this page.

Final Year Project

165

Restaurant Management System

9.2.3

User Guide

Check Member Reservation Detail

If member remember their reservation id, then staff can click serch button to check their
reservation detail, include table reserved, meal reserved, payment status, and member
personal information.
If member want to cancel reservation, then can click the cancel reservation after get the
reservation detail.
Final Year Project

166

Restaurant Management System

9.2.4

User Guide

Staff Profile

Staff can view their own profile by select Others ( menu bar) -> my profile
You can view your profile by select Others from menu bar select My profile
Your option :
Edit enable staff change details
Cancel cancel edit staff profile details
Change password enable you to change your password for login purpose.

Final Year Project

167

Restaurant Management System

User Guide

10. 9.3 Administrator User Guide


9.3.1 Staff Registration

Your Option
Registration button - Administrator can help new staff sign up for using this system,. There
are require you to fill up three basic category , included your login information, personal
imformation and address information.
Cancel - back to home page without add new reservation record.
Print print new staff profiled.

Final Year Project

168

Restaurant Management System

User Guide

9.3.2 Staff Maintenance

Administrator can check staff information and update staff information


Your option :
Edit enable adminstrator change staff details
Cancel cancel edit staff details
Reset enable to reset staff password if the staff forgot the password

Final Year Project

169

Restaurant Management System

User Guide

9.3.3 Member Maintenance

Administrator can check member information and update staff information


Your option :
Edit enable administrator change member details
Cancel cancel edit member details
Print print member profile

Final Year Project

170

Restaurant Management System

User Guide

9.3.4 Table Maintenance

Administrator can check member information and update staff information


Your option :
Edit enable administrator change table details
New - add new table and allow to key in new table information.
Delete - Delete table record
Cancel cancel do s certain function

Final Year Project

171

Restaurant Management System

User Guide

9.3.5 Report

Administrator can select Report from menu bar to create an useful report.

Step 1.: Select the report type


Step 2 : Key in date
Step 3 : Press preview

Note :
You must go to D drive to create a folder, name it as Report before you generate a new
report. Because this action to be taken for storing report purpose.

Final Year Project

172

You might also like