Академический Документы
Профессиональный Документы
Культура Документы
By
Ng Song Hui
By
Ng Song Hui
Supervisor: Ms. Chin Chai Lim
Project
ii
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 :
Programme :
Project
iii
Acknowledgement
Abstract
Cafeteria Management System is computer that system that help cafeteria to manage
their cafeteria dairy process, such as order, reservation, redemption and etc. The entire
system consists of back end and front end, which back end was an offline application
and front end was a web site. The offline application allow cafeteria to manage the
cafeteria information and managing the dairy process such as seat admission and
order. And the system allow cafeteria to manage their meal menu and promotion. And
all the updated meal menu and promotion will be show on the web page automatically
upon the completion of updating.
The current cafeteria is currently working by using manual way which means fully
paperwork, which consist a lot of man power and time in managing the record and
dairy process. And human mistake is unavoidable while the workload is increasing.
Therefore they request for the developing of Cafeteria Management System, which
making their dairy process form paperwork into automate system. Cafeteria
Management System other than replace their manual dairy work such as enter order,
make reservation and payment, also including new function such as online reservation
and ordering, online meal and promotion viewing, report generating and reservation
notification.
Project
vi
Acknowledgement
Acknowledgement
I wish to express my sincere gratitude to my project supervisor, Ms Chin Chai Lim,
for her guidance on completing my Final Year Project. I would like to convey my
heartfelt appreciation to Ms Choon Kwai Mui for her contribution on the Project.
I would like to take this chance to thanks my friend and senior which giving me a
hand while Im facing problem on debugging the system, and thanks to their
experience and idea contribution on the logic of code in my system. And also million
thanks to people who providing me resources such as Ajax information and code.
Project
vii
Contents
Cafeteria Management System ...............................................................................................ii
Declaration.............................................................................................................................. iii
Abstract .................................................................................................................................... vi
Acknowledgement ..................................................................................................................vii
1.0 System Planning ................................................................................................................. 1
1.1
1.2
1.3
1.4
1.5
2.2
2.3
2.4
2.5
2.6
2.7
Fact Gathering..................................................................................................................... 10
Background Reading ....................................................................................................................... 11
Interview .......................................................................................................................................... 11
Non-Functional Requirements ............................................................................................ 12
Functional Requirements .................................................................................................... 13
Overview Use Case Diagram .............................................................................................. 15
Detail Use Case Diagram (My Module) ............................................................................. 16
Use Case Specification ....................................................................................................... 19
Activity Diagrams ............................................................................................................... 36
4.0 Programming.................................................................................................................... 84
4.1
4.1.1
4.1.2
4.1.3
4.2
4.2.1
4.2.2
4.2.3
4.3
4.4
4.5
4.6
4.7
4.8
4.8.1
4.8.2
4.8.3
Project
vii
5.2
5.3
5.4
5.5
5.6
5.7
Project
viii
Chapter 1
System Planning
Project
ix
1.1
The system will helps to fasten the respond time when doing daily transaction.
Customers or members enquiries will be responding in an efficient way because the
system can help to keep track of the member record quickly.
The system also can help to save the manpower in maintaining the paperwork, record
that kept in system will save the paper cost, and manpower cost that normally require
more staff to take care of the paper document and using database also save the place
to store the document.
The system make the payment process become easier and faster.
Appointment becomes flexible and easy to maintain. The member can make
appointment by phone call the staff of cafeteria or using the online system making the
appointment for their dinning time and food they need.
Online feedback can let customer to rating for the meal that they eat. The meal rating
also can be a kind of reference when customers make meal ordering. This may help to
improve the sales of the cafeteria.
The system allows the time and set meal arrangement for whole week and makes the
appointment become easier.
The system help the cafeteria to keep track the membership status of the member.
Thus, it helps the cafeteria to increase the income and keep track the popularity of
cafeteria.
Project
1.2
Company Background
As U Like Caf is a cafeteria that located at section 2, Petaling Jaya and provide
different set of breakfast, lunch and dinner. The cafeteria is own by Jimmy and have
over 10 years experience. As U Like Caf provide great range of delicious food
varieties and great atmosphere with dining sensation that suits the modern lifestyle.
As U Like Caf provide meal that fresh and rich with nutritious, we also provide with
various kind of food such as Chinese, Western, Hong Kong and Japanese cuisine. Our
beverage is prepared according to teenagers habit to suit local taste.
Project
1.3
Project Scope
Project
Meal Module
Cafeteria staff able to change their menu information such as price, meal image
and etc, via the offline application and the updated information will be shown at
their web page automatically. And customers are able to view the menu through
the cafeteria web page. And meal order able to make though this module, after
reservation is made in web page.
Promotion Module
Cafeteria can combine existing meal to become promotion. And the information
could add for promotions are same with Meal Module such as price, meal image
and etc. The updated promotion information will be show in web page as well.
Orders are able to make though this module too in web page.
Reservation Module
Cafeteria able to make reservation for customer through the offline application,
and customer able to make reservation online via cafeteria web page after register
as member. And a Reservation Monitoring Interface will be available for cafeteria
side to monitor the upcoming reservation. The Reservation Monitoring Interface
will be refreshing every 10 minutes.
Order Module
Order module allow customer to make meal order after reservation had been
make, and cafeteria side could enter the order into the system after order had been
made by walk-in customer. And the order entered will make the payment process
become easier by directly passing the order information to payment module.
Project
Report Module
The system is able generate order report and reservation report. Order allow
cafeteria to see which meal and promotion is more popular and having the need to
trade in more ingredient, or meal that didnt order by anyone and could proceed to
remove the item from menu. The reservation report would able to tell show the
reservation information, so that cafeteria side could come out with the summary
on which day and what time people would prefer to make reservation.
Project
1.4
Project Schedule
Project
Project
1.5
Microsoft Visual 2010 had been used in developing the system, and Microsoft SQL
2007 had been use for database management of the system, which is build-in database
of Microsoft Visual 2010. Vb.net is used for the offline application development and
c# is adapted on web application development. 3 Tier Object Oriented approaches had
been used on offline application for easier maintenance of the system. And SDLC
method had been use in designing the system requirement and work flow.
Project
Chapter 2
Requirements Analysis
Project
2.1
Fact Gathering
As U Like Caf is currently using the old type of management way, this is though
paper work. Everything is done manually by using paper recording including order,
reservation, payment, staff and member information recording. And thats no personal
web site for cafeteria.
Because everything thing is done by using manual work, which is merely using pen to
record on book or paper, therefore more manpower and time will be consume. And
manual paper-work may cause more mistake compare to automate system method.
And cafeteria staff had to always aware of the order and reservation list, to make sure
every reservation and order will de deliver on time, without the help of auto
notification.
Therefore, a system that able to solve the current problem is require, which mean a
system that able to provide easier information maintenance, order and reservation
management, and also include external function such as report generating.
Project
10
Project
Interviewer:
Interviewee:
Date:
Time:
10.00am 12.00pm
Venue:
11
2.2
Non-Functional Requirements
Product Requirement
Efficiency Requirement
The overall response of the system is satisfies, system will response to user action within
few seconds. The modification of meal and promotion information will be updated
directly on webpage.
Reliability Requirement
Thats no system error so far from system testing, therefore the system is reliable. All
information modified or uploaded by user didnt lead to any conflict or error.
Portability Requirement
The system is able to run on different platform as long as operating system is installed.
Usability Requirement
The system is design as simple as possible without removing any requires function. Every
single function could be complete in one form to avoid user confusion. And every upon
every completion of action, proper message will be shown to inform user.
Organization Requirement
Delivery Requirement
Project
12
External Requirement
Legislative Requirement
The system is developed within the scope of law and regulations. User and staff
information in the system will not disclose to any unrelated person.
Ethical Requirement
The offline application is designing according to the need of cafeteria staff
requirement, and the web application is design in the manner where every general
public user able to adapt, since public user is able to register and make reservation and
order via the web application.
2.3
Functional Requirements
Meal Module
This module allow cafeteria to manage their meal menu, function included edit, delete and
add, by using offline application. Photo is allowed to upload. Updated menu list in the
offline application will update the menu list on the web page as well. And member of
cafeteria is able to view all updated meal menu at their web page.
Promotion Module
This module allow cafeteria to combine the existing meal to become a promotion menu,
function are included edit, delete and add via the offline application. Photo is allowed to
upload. Updated promotion list in the offline application will update the promotion list on
the web page as well. And member of cafeteria is able to view all updated meal menu at
their web page.
Project
13
Order Module
This module allows order to make. Order make is allowed to edit as long as the payment
havent being made. Meal ordering are allowed by member after reservation had been
make online, or by staff after a walk-in customer has choose a table. 20% of deposit of
the subtotal of meal ordered need to be by credit/debit card if the order is make online.
And order information will pass to payment module to generate payment process.
Report Module
This module allows the cafeteria to generate and view report. The reports included are
Order Report and Reservation Report.
Project
14
2.4
Figure 2.1 Over view use case for Cafeteria Management System
Project
15
2.5
Meal Module
Meal Module
ViewMealMenu
Staff
AddMealMenu
Customer
EditMealMenu
Manager
DeleteMealMenu
Promotion Module
Promotion Module
ViewPromotion
Staff
AddPromotion
Customer
EditPromotion
Manager
DeletePromotion
Project
16
Staff
AddOrderMeal
Customer
EditReservation
Manager
ViewReservation
Report Module
Report Module
GenerateCustomerReservationReports
Manager
GenerateMealOrderReports
Project
17
Order Module
Staff
AddMealOrder
<<include>>
Customer
CheckReservationdetails
Manager
EditMealOrder
Seats Admission
Module
AssignTable
Staff
MonitorReservation
Manager
Project
18
2.6
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
19
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
20
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
21
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
22
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
23
Add Promotion
Use Case: Promotion Module
Brief Description: This use case allows cafeterias staff to add new promotion.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
24
Edit Promotion
Use Case: Promotion Module
Brief Description: This use case allows cafeterias staff to edit promotion.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
25
Delete Promotion
Use Case: Promotion Module
Brief Description: This use case allows cafeterias staff to delete promotion.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
26
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
27
System Response
2) Verify the login name and password
3) Redirect to home page
Project
28
System Response
2) Verify the login name and password
3) Redirect to home page
Project
29
Print Report
Use Case: Report Module
Brief Description: This use case allows cafeterias manager to print report.
Actor: Manager
Main flows of event (Main Scenario)
Actor Action
1)Login to the web page
System Response
2) Verify the login name and password
3) Redirect to Main menu
Project
30
Search Order
Use Case: Order Module
Brief Description: This use case allows cafeterias staff to search order.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
31
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
32
System Response
2) Verify the login name and password
3) Redirect to Home Page
Project
33
Edit Order
Use Case: Order Module
Brief Description: This use case allows cafeterias staff to edit order.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
34
Assign Table
Use Case: Seats Admission Module
Brief Description: This use case allows cafeterias staff to assign table to customer.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Monitor Reservation
Use Case: Seats Admission Module
Brief Description: This use case allows cafeterias staff to assign table to customer.
Actor: Staff
Main flows of event (Main Scenario)
Actor Action
1)Login to the system
System Response
2) Verify the login name and password
3) Redirect to Main Menu
Project
35
2.7
Activity Diagrams
System
SelectMenuOption
DisplayMenuOption
SelectAddNewMenu
EnableFieldforNewMenuAdding
EnterNewMenuDetails
PromptForConfirmation
Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button
[Yes]
Project
36
System
SelectMenuOption
DisplayMenuOption
SearchMenuthatneededtoUpdate
DisplaySelectedMenuDetails
DisplaySeletedMenuinEditableMode
Click"Edit"Button
PromptForConfirmation
Editdetails
Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button
[Yes]
Project
37
System
SelectMenuOption
DisplayMenuOption
SearchMenuthatwantedtobeDelete
DisplaySelecetedMenuDetails
PromptForConfirmation
Click"Delete"Button
UpdateDatabase
Select"Yes"or"No"Button
[Yes]
[No]
Project
38
Add Promotion
Staff
System
SelectPromotionOption
DisplayPromotionOption
SelectAddPromotion
EnableFiledforNewPromotionAdding
EnterPromotionDetails
PromptForConfirmation
Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button
[Yes]
Project
39
Edit Promotion
Staff
System
SelectMealMenuOption
DisplayMealMenuOption
SearchMenuthatwantedtobeEdit
DisplaySelectedPromotionDetail
DisplaySeletedPromotioninEditableForm
Click"Edit"Button
PromptForConfirmation
EditSelectedPromotion
Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button
[Yes]
Project
40
Delete Promotion
Staff
System
SelectPromotionOption
DisplayPromotionOption
SerachPromotionthatwantedtobeDelete
DisplaySelectedPromotionDetails
PromptForConfirmation
Click"Delete"Button
UpdateDatabase
Select"Yes"or"No"Button
[Yes]
[No]
Project
41
System
Login
VerifyAuthentication
[LoginFail]
[LoginSuccessfully]
SelectReservationPage
DisplayMemberPage
ChooseAvailableTable&Time
DisplayReservationPage
Click"Reserve"Button
PromptForConfirmation
[No]
Select"Yes"or"No"Button
PromptFor"MealOrder"Selection
[Yes]
[OrderOnSeat]
UpdateDatabase
SelectOrderNoworOrderOnSeat
RedirectMemberto"MealOrder"Page
[OrderNow]
Project
42
System
SelectReservationOption
DisplayReservationOption
EnterReservationDetails
PromptForConfirmation
Click"Save"Button
[No]
Select"Yes"or"No"Button
PromptFor"MealOrder"Selection
[Yes]
SelectOrderNoworOrderOnSeat
[OrderOnSeat]
UpdateDatabase
Redirectto"MealOrder"Form
[OrderNow]
Project
43
System
SelectReservationOption
DisplayReservationOption
DisplayAllReservationinaList
SelectReservationthatneededtoEdit
DisplaySeletedReservationinEditableMode
Click"Edit"Button
PromptForConfirmation
EditSelectedReservation
Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button
[Yes]
Project
44
System
SelectOrderOption
DisplayOrderOption
EnterOrderDetails
PromptForConfirmation
Click"AddOrder"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button
[Yes]
Project
45
System
Login
VerifyAuthentication
[LoginFail]
[LoginSuccessfully]
DisplayHomePage
SelectMealMenuOption
DisplayMealOrderMenu
SelectMealwanttobeOrder
Click"AddtoCartList!"Button
AddSelectedItemintoCartList
Click"ProceedtoOrder"Button
RedirecttoOrderPage
SelectReservationtoboundtocurrentOrder
UpdateDatabase
Click"Confirm"
Project
46
Edit Order
Staff
System
SelectOrderOption
DisplayOrderOption
DisplaySeletedOrderinEditableMode
Click"Edit"Button
PromptForConfirmation
UpdateOrderdetails
Click"Save"Button
UpdateDatabase
[No]
Select"Yes"or"No"Button
[Yes]
Project
47
Chapter 3
System Design
Project
48
3.1
Class Diagram
Class Diagram
CreditCard
Member
Staff
-staff_ID(PK)
-password
-name
-sex
-email
-address
-phone
-DOB
-MaritalStatus
-salary
-position
-ICNo
-status
Table
-Table_ID(PK)
-member_ID(FK)
-order_ID(FK)
-valid
Reservation
-ReservationID(PK)
-member_ID(FK)
-order_ID(FK)
-reserve_seat
-reserve_date
-reserve_time
1..1 *..1
Have
-member_ID(PK)
-password
-name
-sex
-email
-address
-phone
-DOB
-MaritalStatus
-reward_point
-security_question
-security_answer
-phonePlace
-status
1..*
1..1
Have
-CardID(PK)
-expire
-cvcCode
-password
-UserName
1..* 1..1
Have
1..*
-redeem_ID(PK)
-date
-quantity
-time
-memberID
-gift_ID
Have
-Payment_ID(PK)
-order_ID(FK)
1..1
-member_ID(FK) 1..1
Have
-subTotal
-grandTotal
-balance
-time
-date
-order_ID(PK)
-reservation_ID(FK)
-date
-memberID(FK)
-table
OrderDetail
1..*
1..*
Have
-OrderDetail_ID(PK)
-mealID(FK)
-orderID(FK)
-qty
Promotion
Food
-Meal_ID(PK)
-name
-type
-photo
-price
-description
1..1
-Gift_ID(PK)
-name
-description
-quantity
-point_need_walkIn
-point_need_web
-updateDate
-photo
Order
1..*
-MenuID(PK)
-Q1
-Q2
-Q3
-Q4
-Q5
-participant
1..* 1..1
Have
1..1
Payment
Survey
Gift
redemption
-Promotion_ID(PK)
-name
1..*
1..*
-price
Belongs
-description
-date_start
-date_end
-image
1..1
1..1
Have
PromotionDetail
-PromotionDetailID(PK)
-PromotionID(FK)
-MealID(FK)
Project
49
3.2
Database Structure
Credit Card
Field Name
Length
CardID
Data
Type
varchar
expire
image
cvcCode
varchar
50
password
varchar
50
UserName
varchar
Length
Meal_ID
Data
Type
varchar
50
name
varchar
50
type
varchar
50
photo
image
Price
decmial
18,2
description
varchar
MAX
50
Description
For identify the credit/debit card
record.
To store expiry date of credit/debit
card.
To store the cvc code of the
credit/debit card.
To store the password of the
credit/debit card.
To store the user name of the
credit/debit card owner.
PK /FK
PK
-
Food
Field Name
Project
50
Description
PK /FK
PK
Gift
Field Name
Length
Gift_ID
Data
Type
varchar
Description
PK /FK
50
name
varchar
50
description
varchar
MAX
quantity
int
point_need_walkin
int
Point_need_web
int
updateDate
varchar
50
photo
image
Length
order_ID
Data
Type
varchar
50
PK
reservation_ID
varchar
50
FK
date
varchar
50
memberID
varchar
50
table
varchar
50
Length
OrderDetail_ID
Data
Type
varchar
50
PK
mealID
varchar
50
FK
orderID
varchar
50
int
PK
Order
Field Name
Description
PK /FK
FK
FK
OrderDetail
Field Name
qty
Project
51
Description
PK /FK
FK
-
Member
Field Name
Length
member_ID
Data
Type
varchar
50
password
varchar
50
name
varchar
50
sex
varchar
50
varchar
50
address
varchar
MAX
phone
int
DOB
varchar
50
MaritalStatus
varchar
50
reward_point
int
security_question
varchar
MAX
security_answer
varchar
MAX
phonePlace
varchar
50
status
varchar
50
Project
52
Description
PK /FK
PK
-
Payment
Field Name
Length
Payment_ID
Data
Type
varchar
Description
PK /FK
50
PK
order_ID
varchar
50
FK
Member_ID
varchar
50
subTotal
decimal
18,2
grandTotal
decimal
18,2
balance
decimal
18,2
time
varchar
50
date
varchar
50
Length
Promotion_ID
Data
Type
varchar
50
name
varchar
50
price
decimal
18,2
description
varchar
MAX
date_start
varchar
50
date_end
varchar
50
image
image
50
FK
-
Promotion
Field Name
Project
53
Description
PK /FK
PK
PromotionDetail
Field Name
Length
PromotionDetailID
Data
Type
varchar
Description
PK /FK
50
PK
promotionID
varchar
50
FK
MealID
varchar
50
Length
redeem_ID
Data
Type
varchar
50
PK
date
varchar
50
int
time
datetime
memberID
varchar
50
gift_ID
varchar
50
Length
reservationID
Data
Type
varchar
50
PK
member_ID
varchar
50
FK
order_ID
varchar
50
reserve_seat
varchar
50
reserve_date
varchar
50
reserve_time
datetime
FK
redemption
Field Name
quantity
Description
PK /FK
FK
FK
Reservation
Field Name
Project
54
Description
PK /FK
FK
-
Staff
Field Name
Length
staff_ID
Data
Type
varchar
50
password
varchar
50
name
varchar
50
sex
varchar
50
varchar
50
address
varchar
MAX
phone
int
DOB
varchar
50
MaritalStatus
varchar
50
int
18,2
position
varchar
50
ICNo
varchar
50
status
varchar
50
salary
Project
55
Description
PK /FK
PK
Survey
Field Name
Data
Type
varchar
Length
Q1
int
Q2
int
Q3
int
Q4
int
Q5
int
participant
int
Length
table_ID
Data
Type
varchar
50
PK
member_ID
varchar
50
FK
order_ID
varchar
50
int
menuID
50
Description
For identify the survey record.
To store the total rating for question
1.
To store the total rating for question
2.
To store the total rating for question
3.
To store the total rating for question
4.
To store the total rating for question
5.
To store the total participant that
involved in the survey.
PK /FK
PK
-
Survey
Field Name
valid
Project
56
Description
PK /FK
FK
-
3.3
Sequence Diagram
Project
57
Project
58
Project
59
Add Promotion
Project
60
Edit Promotion
Project
61
Delete Promotion
Project
62
Add Reservation
Project
63
Edit Reservation
Project
64
Add Order
Project
65
Edit Order
Project
66
View Report
Project
67
Print Report
Project
68
3.4
User Interface
Offline Application
Log In Page
Project
69
Reservation Form
Project
70
Project
71
Project
72
Order Form
Project
73
Project
74
Web Page
Meal Menu Page
Project
75
Order Page
Project
76
Reservation Page
Project
77
3.5
Chapter 4: Programming
Report Design
Project
78
Chapter 4: Programming
Project
79
Chapter 4: Programming
Project
80
Chapter 4: Programming
Order Report
Yearly Order Report
Project
81
Chapter 4: Programming
Project
82
Chapter 4: Programming
Chapter 4
Programming
Project
83
Chapter 4: Programming
4.0 Programming
This chapter will show the coding part of Cafeteria Management System, and some
explanation on how the logic works.
Project
84
Project
Chapter 4: Programming
85
Chapter 4: Programming
promotionID As String
name As String
price As Double
descript As String
dateStart As String
dateEnd As String
RetrievePhoto As System.IO.MemoryStream
SavePhoto As String
Project
86
Chapter 4: Programming
End Class
Project
87
Chapter 4: Programming
Project
88
4.2
Chapter 4: Programming
Add, edit and delete coding is one three of the most common code used in the system.
The code were basically the same, the only different of these code in different module is
amount of object involve, object name and sql statement. Below is the example code of
each function:
Project
89
Chapter 4: Programming
Catch ex As System.IO.FileNotFoundException
MessageBox.Show("Invalid path for image uploading.", "Error!")
Catch e As Exception
Project
90
Chapter 4: Programming
Project
91
Chapter 4: Programming
Project
92
4.3
Chapter 4: Programming
Auto ID Generation
Below is the code use for auto ID generation. This code will get the last ID in the
particular database, grab the ID number and generate the next ID. If no ID is existed, it
will proceed to generate the 1st ID (number) which is 0001.
Public Shared Function GenerateID() As String
Initialize()
Dim AutoID As String
Dim sequence As Integer
Dim cmd As New SqlCommand("Select Top 1 Meal_ID from Food Order By Meal_ID DESC",
Conn)
Dim adpFood As New SqlDataAdapter(cmd)
Dim dsFood As New DataSet("Food")
Try
adpFood.Fill(dsFood, "Food")
AutoID = dsFood.Tables("Food").Rows(0).Item(0).ToString.Substring(2).Trim
sequence = Convert.ToInt32(AutoID)
sequence = sequence + 1
If sequence.ToString.Length = 1 Then
CurrentID = "ML000" & sequence
ElseIf sequence.ToString.Length = 2 Then
CurrentID = "ML00" & sequence
ElseIf sequence.ToString.Length = 3 Then
CurrentID = "ML0" & sequence
End If
Catch ex As Exception
CurrentID = "ML0001"
Finally
Terminate()
End Try
Return CurrentID
End Function
Project
93
4.4
Chapter 4: Programming
In graphic user interface class, a button will be inserting with browsing code, and the
code with OFD component and paste in a label. With the path available, the data access
code able to covert the image into bit file and store into database. Below is the code used
for image uploading in offline application which is vb.net language.
Graphic User Interface Class
Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnBrowse.Click
OFDmenu.Title = "Get Image"
OFDmenu.Filter = "Bitmap Files|*.bmp|Gif Files|*.gif|JPEG Files|*.jpg"
OFDmenu.DefaultExt = "bmp"
OFDmenu.FilterIndex = 1
OFDmenu.FileName = ""
OFDmenu.ShowDialog()
End Sub
Private Sub OFDmenu_FileOk(ByVal sender As System.Object, ByVal e As
System.ComponentModel.CancelEventArgs) Handles OFDmenu.FileOk
txtImageFile.Text = OFDmenu.FileName
End Sub
Project
94
Chapter 4: Programming
End Using
command.ExecuteNonQuery()
End Sub
Project
95
4.5
Chapter 4: Programming
For some module that involved image in information, image displaying is needed. Below
is the code for abstract image from sql database and display it with picture box
component.
Graphic User Interface Class
Dim ImageFromDB As New Bitmap(aFood.Food_RetrievePhoto)
MenuPictureBox.Image = ImageFromDB
txtPrice.Text = aFood.Food_Price
txtDescription.Text = aFood.Food_Description
Project
96
4.6
Chapter 4: Programming
To display image in c#, ahsx page is needed to play as a role to store temporary image,
because c# only allow image to be show by using image path. Below is the code needed
to retrieve image from sql database into ashx page. And this ashx filed name as
ShowCommon.ashx
<%@ WebHandler Language="C#" Class="ShowImage" %>
using
using
using
using
using
using
System;
System.Configuration;
System.Web;
System.IO;
System.Data;
System.Data.SqlClient;
Project
97
Chapter 4: Programming
try
{
return new MemoryStream((byte[])img);
}
catch
{
return null;
}
finally
{
connection.Close();
}
}
public bool IsReusable
{
get
{
return false;
}
}
After ashx retrieve the image, below is the code needed to display the image in coding
phase.
ImageCommon.ImageUrl = "~/ashxCode/ShowCommon.ashx?name=" + dtrMenu["name"].ToString();
Project
98
4.7
Chapter 4: Programming
Few Ajax techniques are used in the member registration at web page.
Below is the code for auto comment on password strength.
<asp:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="txtPass"
DisplayPosition="RightSide"
StrengthIndicatorType="Text"
PreferredPasswordLength="10"
PrefixText="Strength:"
TextCssClass="TextIndicator_TextBox1"
MinimumNumericCharacters="0"
MinimumSymbolCharacters="0"
RequiresUpperAndLowerCaseCharacters="false"
TextStrengthDescriptions="Very Poor;Weak;Average;Strong;Excellent"
TextStrengthDescriptionStyles="cssClass1;cssClass2;cssClass3;cssClass4;cssClass5
CalculationWeightings="50;15;15;20"
>
</asp:PasswordStrength>
Project
99
4.8
Chapter 4: Programming
Programming Tools
Visual Studio 2010 is used on the development of Cafeteria Management System. .Net
language is the main programming language that will be used in Visual Studio, there
for I chosen this tools for my program development due to .Net language is the major
language I learned in college and also was the language that I most experience with.
Project
100
Chapter 4: Programming
Chapter 5
Software Testing
Project
101
5.1
Type of Testing
5.1.1
Unit Testing
The idea of unit testing is test the system module by module, which means the
developer will only proceeds to develop the other module when a module is complete,
and ensured its free from any error and bug, only proceed to develop the other module.
5.1.2
Integrating Testing
Integrating Testing is the stage where individual modules is combined and test in
group. Which mean the module thats developed individually are combined and test to
make sure a module wont conflict with the other module and able communicate with
each other. This phase is occurs after unit testing and system testing.
5.1.3
System Testing
System testing is the testing of the entire system, which means all modules, to make the
system is free from any error and bug before releasing to user/customer. In this stage,
the developer should make sure the system is system was fulfilling the user requirement
and able run smoothly without any problem.
5.1.4
User Acceptance testing is the testing stage where the system will be demo to the user
and receive feedback from them, to make sure the system is meet the user requirement
and expectation. Any feedback from user in this stage will be accept and make
modification to the system according to user response.
Project
102
5.2
Meal Module
Search
In order to search a menu, ID need to be enter and search. If the no ID is enter when
searching, message as show in the image below will display.
Project
103
Test Action
No Image is Uploaded.
Price can't be 0.
Project
104
Promotion Module
5.3
Promotion Module
Search
In order to search a promotion, ID need to be enter and search. If the no ID is enter
when searching, message as show in the image below will display.
Project
105
Test Action
No Image is Uploaded.
Price can't be 0.
Select date thats lesser then Selected Date can't be lesser then today date.
today date for promotion
starting date.
Select date thats lesser then Selected Date can't be lesser then today date.
today date for promotion
ending date.
Select
same
promotion
date
starting
ending date.
10
Project
106
In promotion form, thats a box at right side for select item for promotion purpose.
And thats validation for meal adding for promotion in that box as well.
If the meal ID field is empty when adding item to promotion, message notification as
shown in the picture below will prompt up.
Project
107
5.4
Order Module
Offline Application
In order form, cafeteria need to key in the customer user in the order form. And thats
some validation in order form, and proper message with notification will be show
beside the field with validation error as show in the image below.
Test Action
Quantity field key in with Quantity filed must not be numeric input
none-numeric sentence
If the ID entered is invalid, message box as shown in the image below will prompt up.
Project
108
In order form, thats an order menu box in left bottom record all the meal thats
already order. And staff would able to edit or remove the order in the menu box.
Therefore thats validation for the particular order menu box as well.
If the order menu box list is empty and user click edit, message box as shown below
prompt up.
If the order menu box list is empty and user click remove, message box as shown
below will prompt up.
In edit mode, if user enters none numeric for meal quantity, message box as shown
below will prompt up.
Project
109
In edit mode, if user left the quantity field empty, message box as shown below will
prompt up.
In Web Page
When customer wanted to order meal via web page, they need to go the meal menu
page, and select wanted meal and add into cart list. When user adding the meal into
cart list, they need to enter the quantity as well. Below show the validation of the
quantity field and
No
Test Action
Message prompt
When the user click remove while the cart list is empty, message box as shown below
will prompt up.
Project
110
5.5
Reservation Module
Offline Application
For field validation, proper message with notification will be show beside the field with
validation error as show in the image below.
Test Action
Date chosen lesser then today Booking Date can't be lesser then today date.
date
Project
111
While user key in invalid member ID, message box as shown below will prompt up.
Web Page
Customer are allowed to make their reservation online as well, thats few validation on
the internet reservation as show in table below.
No
Test Action
Message show
Booking selected is lesser Booking date can't be lesser then today date.
then today date.
Same
date and
Project
112
5.6
Report Module
When user selected report type as reservation report, they need to select the reservation
duration for the report which is starting time and ending time. If the selected ending time
is lesser then starting time, message as below will prompt up,
5.7
In this module, table can keep track the table is occupied by which member, therefore
member ID are allowed to enter to keep track the table, as optional.
If the member ID entered is invalid, message box as shown below will prompt up.
If the user trying to insert member ID with the member ID field left with blank,
message box as shown below will prompt up.
Project
113
Project
114
References
Chapter 6
Conclusion
Project
115
References
6.0 Conclusion
This chapter is an overall conclusion for Cafeteria Management System, by conclude
from it strength and weakness, and also discuss about further improvement that could
enhance to the system.
6.1
6.2
Project Achievement
By Overall, the project achieves all the system requirement and objective, all the
module is run as well as in expectation. But thats a flaw in designing where the
report design for order report doesnt meet supervisor requirement, where the report
information should include the order information such as meal price, meal name and
etc. The information failed to carry due to the failure from displaying information
from 4 different database tables.
6.3
The difficulty on this system developing is programming some function that never
being done before, such as uploading image by using vb.net. When come to coding a
function that never done before, lot of effort and time need to be investing on the
researching. Some other difficult part is figuring the code logic on how to achieve the
function wanted, such as transmitting of huge information from Database Access
Class to Problem Domain Class. And the other issues occurring are combining
module with the other teammate, which may cause system conflict due asynchronous
of information code.
Project
116
6.4
References
6.4.1 Strengths
Error Reduction
By changing from the old processing method, which is record everything manually
by pen and paper, to automate management system, it could reduce the error might
happened by using manual recording. Human get tired and confuse when working
for a wrong period and will cause error, but a system wouldnt useless bug happen
or human mistake when key in information.
Easy Maintenance
When every record is keep by using paper work, mean it require a lot space to store
the record. And it would take long time retrieve information from bunch of paper
work, and its time and man power consuming on maintenance. But automate
management system could finish all the maintenance easily.
Efficiency Improvement
Efficiency of cafeteria could be improve, which mean improve in term of services as
well, by using simple and fast response computer to replace human work.
Security
Only authorized user are able to login into the system, therefore could protect all the
information from disclose. Its more secure compare to paper work recording, people
are able to read information in paper recording as long as able to contact physically
with the record, but system need authorization account.
Convenience
With the existing of web site, users are able to view all the meal offered by the cafeteria,
and also able to make reservation via internet. And the seat admission module help
cafeteria to keep track on every table status in the shop, it ease the staff to assign table
to customer to rush hour.
Project
117
References
6.4.2 Weakness
The design of web page interface is not so satisfied. Some of the page alignment is over
border which is not necessary.
This form takes more time to start up compare to other form, approximate 2-3 second to
start up because it load more information on starting compare to the other form.
6.5
Advance Ajax techniques could be enhanced into the webpage, to improve the
efficiency of the web page. For example, while user viewing promotion and meal
menu at the webpage, it could use Ajax technology to load the selected item image
and information, while the current design is using traditional web method. And the
user interface on webpage could be further improved as well.
6.6
Personal Reflection
I learn a lot upon completing this final year project. Its the 1st assignment that I need
to start from project specification, designing until documentation, which all the
previous are not necessary. It somehow giving me an image on how software is
develops from beginning to the end in the real market. And by debugging some bug
that I had never encountered before is also increasing my programming experience
and self value on programming market.
And by completing this project, I had learned some programming knowledge that
could not obtain from school, such as Image uploading, the use of Ajax technology
and so on. And while facing problem, I had obtain some help from senior which
working in the real programming market. They had provided me some valuable
opinion, and although some of the conversation is not related or help the project, but
their conversation had help me to explore more on IT field by understanding what a
language or technique could really do. For example from their conversation, I
understand that advanced SQL statement could actually execute some function that
need to be complete by using programming language in my level.
Project
118
References
References
ASP.NET AJAX Control Toolkit Tutorial and demo. 2009: Available on
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/
Project
119
User Guide
Appendices
Interview Questions
The following is the list of interview questions will be asking to the interviewee:
1.
2.
3.
4.
What do you think about the services that provided by using current system?
Is it still satisfying the requirement of As U Like Cafs services nowadays?
5.
Does the company facing any problem by using current system? What the
problem facing by using the current system.
6.
Do you think that should develop a new system to overcome the problem that
cause by the current system?
7.
What are the functions or services needs for the new system?
8.
After implement the Cafeteria Management System, do you think that it will
increase efficiency for daily activities?
Project
120
User Guide
User Guide
Installation
Step2. Confirmation box for installation will prompt up, for this step, click install.
Project
121
User Guide
Project
122
User Guide
2. Occupy
Button
3. Order
Button
4. Bill
Button
5. Validate
Button
6. Open
Reservation
Monitor
7. Exit
Button
1. Green color stand for available, and Red color stand for occupied. Seats for each table
are stated on the table.
2. Only enable for available table. Turn the table available status to occupied status.
3. Only enable for occupied table. Redirect to order form for meal ordering for selected
table.
4. Only enable for occupied table. Redirect to payment form for payment process for
selected table.
5. Validate member ID and bound to the selected table.
6. Open reservation monitor table that will display reservation thats up coming in the
next 30minutes. Reservation list will be updated for every 10minutes.
7. Exit from current form.
Project
123
User Guide
1. Reservation ID Field
2. Reserve Seat Field
3. Manual Enter Reserve Seat
4. Reserve Date Field
5. Reserve Time Field
6. Reserve Member Field
7. Reserve
Button
8. Exit
Button
Project
124
User Guide
1. Seat Selection
2. Date Selection
3. Time Selection
4. Reserve Button
5. Reservation List
6. Edit Button
1. Selection for seats for reservation.
2. Selection for date for reservation.
3. Time selection for reservation.
4. Button for reservation confirmation.
5. List of reserved reservation.
6. Edit for the selected reservation.
Project
125
User Guide
1. Order ID Field
2. Date Field
3. Reserved Button
4. Table Field
5. Member Field
6. Menu ID Field
7. Quantity Field
9. Meal ID List
13. Remove
12. Edit Button
Project
126
User Guide
3. Menu List
1. Menu Type
2. Category
7. Name List
6. Quantity Field
8. Quantity List
9. Total List
5. Menu Information
10. Remove
11. Proceed Button
12. Subtotal Field
1. Selection for menu type for viewing.
2. Selection for menu category. (only for common menu)
3. Meal list of selected menu type.
Project
127
User Guide
2. Reservation Information
3. CVC Field
7. Name List
4. Card ID Field
8. Edit Button
5. Password Field
9. Edit Button
6. Edit Button
Project
128
User Guide
Project
129
User Guide
1. Search Field
2. Search Button
3. Browse Button
4. Image Path
5. Menu ID Field
6. Name Field
7. Type Field
8. Price Field
9. Add New Button
10. Edit Button
11. Delete Button
12. Exit Button
Project
130
User Guide
7. Will show the food type of current record. Will enable when add new or edit meal
menu.
8. Will show the price of current record. Will enable when add new or edit meal menu.
9. For adding new meal menu, required field for add new meal menu will enable when
clicked.
10. For editing current meal menu record, required field for add edit meal menu will
enable when clicked.
11. For delete the current meal menu record.
12. Exit from the current form.
13. Will show the description of current record. Will enable when add new or edit meal
menu.
Project
131
User Guide
Promotion Maintenance
1. Search Field
2. Button Search
8. Browse Button
3. Meal ID offer
4. Meal Name
offer
5. Menu ID Field
9. Image Path
6. Add Button
10. ID Field
7. Remove
Button
Project
132
User Guide
5. Field for enter the meal menu ID to list as item in the promotion.
6. Add the entered meal menu ID in field 5 into promotion list.
7. Remove the selected meal menu in meal offer list.
8. Will be enabling when add new or edit promotion. For image browsing purpose.
9. The path of image browsed will be display here.
10. Will show the promotion ID of current record. Will auto generate new ID when
adding new promotion.
11. Will show the name of current record. Will enable when add new or edit promotion
12. Will show the price of current record. Will enable when add new or edit promotion.
13. Will show the promotion starting date of current record. Will enable when add new or
edit promotion
14. Will show the promotion ending date of current record. Will enable when add new or
edit promotion
15. Will show the description of current record. Will enable when add new or edit
promotion.
16. For adding new promotion, required field for add new meal menu will enable when
clicked.
17. For editing current promotion record, required field for add edit meal menu will
enable when clicked.
18. For delete the current promotion record.
19. Exit from the current form.
Project
133
User Guide
Report
1. Report Type
Field
2. Dynamic Date
5. Reservation Time
3. Monthly
4. Yearly
6. View Button
7. Exit Button
Project
134
User Guide
The End
Project
135