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

PROJECT REPORT ON

ONLINE FOOD ORDERING PORTAL

SUBMITTED TO
UNIVERSITY OF MUMBAI

SUBMITTED BY
ABNISH S. SINGH

GUIDED BY
PROF. BINITA THAKKAR

T.Y. B. Sc. (INFORMATION TECHNOLOGY)


YEAR 2013-2014

LATE SHRI VISHNU VAMAN THAKUR CHARITABLE


TRUSTS
BHASKAR WAMAN THAKUR COLLEGE OF SCIENCE
YASHWANT KESHAV COLLEGE OF COMMERCE
VIDYADAYANAND PATIL COLLEGE OF ARTS
VIRAR (W), TAL. VASAI, DIST. THANE 40103

Late Shri Vishnu Waman Thakur Charitable Trusts


Bhaskar Waman Thakur College of Science,
Yashwant Keshav Patil College of Commerce,
Vidya Dayanand Patil College of Arts.
Virar (W).

CERTIFICATE
This is to certify that project done
on____________________________________by
Mr./Ms _____________________ Seat no.______
in partial fulfillment of B.Sc IT degree
(SEM VI) examination had not been submitted
for any other examination and does not form
any other course undergone by the guide.

_____________

_____________

______________

Project Guide

Examiner

Head of Dept.

Date:

Date:

Date:

COLLEGE SEAL:

Acknowledgment
This is the project I started, as a part of my course curriculum and
it gives me great pleasure to present the report of this project work
conducted towards the fulfillment of the Online Food Ordering Portal
project assigned to me by Mr. CS Sethi, GM of Neelam-e-Punjab.
As per the guidelines laid down by Mumbai University, I take this
opportunity to thank all those who have made the effort in the success of
this project.
I am also grateful to our respected Prof. Mrs. Sampada Deshmukh,
head of B.Sc.(I.T.) department, for the corporation and spirit he laid me. I
would like to thank all the professors and my colleagues who helped me
to complete this project.
I give my special thanks to Prof. Binita Thakkar, who for me had
been source of motivation and encouragement to me. Also at the same
time I thank her for the invaluable guidance she provided me in the
completion of my project work within a given stipulated time.
I give my special thanks to Mr. Monty (Admin of Restaurant) and
his employees for giving me very precious information and there valuable
time to complete this project.
Finally, it gives me a great pleasure in expressing my sincere and
heartfelt thanks to all my friends, and my family members who have
assisted me in this project by various means.

Abnish S. Singh

Index
Sr.No
1
1.1
1.2
2
2.1
2.2
2.3
2.4
3
3.1
3.2
3.3
4
4.1
4.2
5
5.1
5.2
5.3
6
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
7
8
9
10
11
12
13

Topic
Introduction
Organizational Profile
Introduction To Project
System Study And Analysis
Existing System
Limitations Of Existing System
Proposed System
Benefits Of Proposed System
Planning Phase
Feasibility Study
Milestones
Fact Finding Techniques
Front-Back end
Need For ASP.NET and SQL Server-2008
Proposed system will include
System Design and Development
Gantt Chart
ERD
Event table
UML Design
Use case diagram
Class Diagram
Sequence Diagram
State Chart Diagram
Activity Diagram
Database Design
Menu Tree
CRUD Table
System Coding Convention
Screen Layouts/ Coding
Test Cases
Reports Screen Layouts/Source Code
Future Enhancement
Conclusion
Bibliography

Page No
1
2
3
4
5
6
7
8
9
10
12
13
15
16
18
19
20
21
22
23
24
25
26
27
28
29
31
32
33
36
61
64
68
70
72

INTRODUCTION

1|Page

Organization Profile

Neelam-e-Punjab, the tradition of excellence and making each a meal a


gourmets delight it all began with a dream of Shri Raghubir Singh Chabra who
was founder of Neelam-e-Punjab group of restaurants started his journey since
1976 to create a group of restaurants with great style, ambience and grandeur

It has always been our prime concern to retain the authenticity of various
cuisines, using selective herbs and spices not only for the aroma but also for their
digestive and nutritional values as well.

2|Page

Introduction to project
Online Food Ordering Portal is web application made for one of the
restaurant in Vasai named Neelam-e-Punjab.

This application contains a web page for the customer. By this webpage
customer can place the order online.

This system mainly consists of transaction the system to open selection is


given on the login screen itself. Login name and password is verified in the
selected system and then user allowed to use the system.

Transaction IncludedD
The transaction included here is Add New User, Order details, Manage
Menu, Search User, Invoice Details and Customer Details.
It provides integration of all above processes along with the automatic
updates as per the transaction.
Reports are generated for each of the above processes to get the output

3|Page

System Study
&
Analysis

4|Page

Existing System
The current System of a restaurant is very ancient and need to be replaced as
restaurant' business is expanding. One of the biggest disadvantages of the current
system is that lacking of the online ordering system each time a customer need to
call the restaurant and then he can booked his order.
1. Current System is working manually.
2. The customers are area centric.
3. Information regarding Customer name, Addresses & their requirements are
needed to be entered into a registered.
All the existing system is traditional and lack of use of technology, therefore the
process is very time consuming and lengthy as paper work is there. This was
creating a problem in maintaining data records stored at the end like profit and
loss, a total expansion etc.

5|Page

Limitation of Existing System


1.
2.
3.
4.

Maintain multiple registers become difficult.


Business is not on the web which was biggest Disadvantages.
To keep track of customers information is much more difficult.
It is difficult to find a particular customers order from the whole
Stock.
5. It is very difficult to know how many orders are given by a particular
customer.
6. Not good communication between the different branches so there is
lacking of coordination between them.
7. There exists a communication gap between staff, customer, agent and
management.

6|Page

Proposed System
Statement of Need
Errors caused due to manual processing of data must be reduced.
Security features like username Password authentication must be enforced
to prevent unauthorized access.
Logical and technical errors must be found.
Facility to easily search a specific record must be enforced.
The system must be user-friendly.
A system should provide the interactive interface to the customer and the
interface is more information about the collection to the Customer.
Help in reducing the file work.

Statement of System Capabilities


Security features username and password authentication is implemented.
An appropriate database tables are maintained to record and store validated
information.
Facility to search a particular record is implemented.
Report generation is implemented.

7|Page

Benefits of Proposed System


System Benefits
This system has been developed to be simple and user-friendly. Hence, even a nontechnical user can use the system effectively and without any difficulty. Other
benefits are as follows:

The system is a GUI and hence user-friendly.


It is upgradeable. Hence further enhancements to the system are possible.
The system is capable of generating the necessary reports.
The system maintains speed and accuracy.
It solves all problems encountered in the previous manually handled system.

It takes care of database security by restricting unauthorized access to the system.

8|Page

Planning Phase

9|Page

Feasibility Study
The feasibility study is undertaken to determine the possibility of either improving
the present system or developing a completely new system it help to obtain an
overview of the problem and get an idea whether a feasible solution exist.
This project has been tested in the following areas of feasibility
Operational Feasibility
Technical Feasibility
Economic Feasibility

1. Operational Feasibility
The current system is manual thus processing large amount of data become a
cumbersome activity. Reports that are generated are difficult to prepare
manually and are also error prone. Since the user finds difficulty operating a
manual system, they have personally come forward and given their ideas
regarding what sort of computer system are expected. The organization has
evaluated organizational and cultural issues to identify potential risk for the new
system. And has come to conclusion that the new computerized system presents
no risk they might prevent effective use of the new system.
The system is designed in such a way that it is easy to operate.
The system does not involve any complex operations.
It handles only simple data oriented functions.
It is aimed at giving an easy way to generate reports.

10 | P a g e

2. Technical Feasibility
Generally, new system brings new technology into an organization. The
proposed system requires technology and equipment, which can be obtained.
The operating system has the technical capacity to hold the data required to use
the proposed system. Moreover the maintenance system has a lot of scope of
being expanded and developed to generate even more valuable and better
reports. The present equipment technology assures technical guarantee of
accuracy, reliability and ease of access.
Also software used to build the system is simple enough in their usage
and functionality.
To operate this system only a web browser is needed. The system is
platform independent and browser independent and supports all kinds of
web browsers like Internet Explorer, Mozilla Firefox, etc.
The system can be expanded if so decided.
This system is technically more secure.

3. Economic Feasibility
The Economic Feasibility of the system is mainly concerned with its financial
aspects. It determines whether the investment that goes into the implementation of
the project is recoverable or not. The Cost Benefit Analysis is a commonly used
method in evaluating the effectiveness of the system.
The cost of developing this system currently includes the minimum software
cost to develop and run the system.
The most of the software used in the system development is freely
available on the Web.

11 | P a g e

Milestones
Sr.
No

Phase

Duration
(Days)

Start date

Finish
date

Planning phase

25

16/12/13

10/01/13

1.1

Defining Problem

16/12/13

24/12/13

1.2

Confirm Project
feasibility

25/12/14

01/12/14

1.3

Project schedule

02/01/14

06/01/14

1.4

Staffing project

07/01/14

07/01/14

1.5

Launching project

08/01/14

10/01/14

Analysis phase

30

10/01/14

02/02/14

2.1

Gathering information

10

10/01/14

20/01/14

2.2

Defining system
requirements

21/01/14

25/01/14

2.3

Prioritize requirements

26/01/14

29/01/14

30/01/14

31/01/14

1/02/14

02/02/14

2.4
2.5

Generate and evaluate


alternatives
Review the
documentations

Design phase

35

03/02/14

18/03/14

3.1

Design user interface

15

03/02/13

18/02/14

10

19/02/14

01/03/14

02/03/14

07/03/14

08/03/14

13/03/14

24

14/03/13

16/04/11

10

14/03/14

24/03/14

10

25/03/14

04/04/14

04/04/14

07/04/14

08/04/12

09/04/13

3.2
3.3
3.4
4
4.1
4.2
4.3
4.4

Design application
architecture
Design and integrate
database
Design and integrate
system control
Implementation phase
Construct the software
components
Verify and test the
components
Training and
documentation
Installing software

12 | P a g e

Fact Finding Techniques


Information plays a very important role in any organization. Acquiring valuable
information is essential for developing a new system in an organization. There are
many ways of gathering information. But the following things need to be kept in
mind while gathering information.
No system details are left out.
Problems are correctly identified.
Repetitive work is avoided.
Following are the fact findings techniques:

Observation :
As before developing anything we need to understand the entire system and
for this observation plays important role.
This technique helped in understanding the actual process of Automobiles
system.
While observing the day to day working of the Automobiles system, we
came to know about a lot of things.
It also helps to find out various procedures to be followed, how the records
are maintained, how the follow-ups are taken care of etc.

Record Searching :
This method is used to study all the records which are being maintained
manually.
A proper study of all these records is being done to uncover all the details
regarding the overall working of the system. Registers are maintained by the
sales people.

Interviews :
It is one of the best act which gives qualitative information about the system.
Interviewing the people of the organization helped us to find out their

13 | P a g e

difficulties and requirements which helped us a lot while developing the


system.
With the help of this method we can evaluate the needs of the employees
and the company.
People from different department of the company were interviewed for
collecting information from them.

Questionnaires :
It is one of the best techniques to find out the requirements to be added and
the existing working of the system by providing the questionnaires to all
levels of the organization so that the employees can provide quality answers
to the questions as they get a lot of time to go through the questionnaires
properly and answer them.
To collect and analyze required information following methods were
adopted.

Document Searching:
Various documents were handled during the course of time, their usage and
formats were studied.
The relation with the system, information given was analyzed.
While studying the manual system, various documents like Masters Form,
service form, etc. have been studied to analyze recording in formation in
different logs. Document study also helped in determining inputs and
outputs of the system.

Visits:
Many visits have been made to the office for acquiring various
information as well as documents required for identifying the
inputs and outputs of the system.

14 | P a g e

Frontend
&
Backend

15 | P a g e

NEED FOR ASP.NET AND MY SQL SERVER

ASP.NET is a server-side Web application framework designed for Web


development to produce dynamic Web pages.

Features of ASP.NET:

Excellent tooling: IDE, CI, etc.


Vast array of 3rd party libraries.
Huge amount of documentation available.
Large pool of developers available.
Platform ubiquitous.
Excellent performance.
Excellent specification.

The Advantages of ASP.NET are as follows:

ASP.NET drastically reduces the amount of code required to build large


applications. Java is platform-independent and flexible in nature.
With built-in Windows authentication and per-application configuration,
your applications are safe and secured.
Being language-independent, it allows you to choose the language that best
applies to your application or partition your application across many
languages.
16 | P a g e

A SQL Server database is the most popular type of relational database on the web
today.
This is partly because it is completely free but also very powerful.

What is a SQL Server database capable of?


SQL Server database is capable of storing any type of that you want.
You will use SQL statements to accomplish all of this.
In more technical terms, SQL Server has the following features:

A broad subset of ANSI SQL 99, as well as extensions


Cross-platform support
Stored procedures
Triggers
Cursors
Updatable Views

17 | P a g e

Proposed System will include:

Frontend: ASP.NET with c#


Backend: SQL Server-2008
HARDWARE REQUIREMENT:
A. 80 GB Hard disk
B. 256 MB RAM
C. Operating System:
i. Windows 2000
ii. Windows XP
iii. Windows Vista
iv. Windows 7
SOFTWARE REQUIREMENT:
A) Visual Studio-2010

18 | P a g e

System Design
&
Development

19 | P a g e

Gantt Chart

20 | P a g e

Entity Relationship Diagram

21 | P a g e

Event Table
Sr
No

Event

Trigger

Source

Use case

Response

Destination

Search Menu

Menu is
searching

Customer

Lookup for the menu

Menu Details

Admin

Registration

New
Registratio
n

Customer

Respond to the
customer signup

Signup Form

Admin

Admin can Add


New Items

New Food

Admin

Respond to the
customer about new
food

Details of
Food

Customer

Customer can
provide Feedback

Feedback

Customer

Respond to the
customer about
Feedback

Message of
Feedback

Admin

The customer Add


the items in Cart

Selection
process

Customer

Confirm

Admin can check


order details

Place Order

Admin

Admin checks daily


order placed by the
customer

Checking
order

Admin

The Admin accepts


the order from the
customer

Accept
order

Admin

Admin
Item Added

Placing the order


He/she wants

Order Details

Customer

Checking for the order

Order
Summary

Customer

Accepting the order

Order details

Customer

22 | P a g e

Uml Diagrams

23 | P a g e

Use Case Diagram

24 | P a g e

Class Diagram

25 | P a g e

Sequence Diagram

26 | P a g e

State Chart Diagram

27 | P a g e

Activity Diagram

28 | P a g e

Database Design
Food Details:

Order Details:

29 | P a g e

User Details:

30 | P a g e

Menu Tree

31 | P a g e

Form

Report

Orders

Registration

Menu
Items

DB

Login

Crud Table

C
Login

CR
CRUD

Menu Items

CRUD
R

Registration
Orders

CRD
CRD

R
CRD

Report

CR

32 | P a g e

System Coding
Convention

33 | P a g e

Login
Component Name

Code Name

TextBox1
TextBox2
Label1
Label2
Button1
Button2
Button 3

txtid
txtpassword
lbluser
lblpass
btnlogin
btnReset
lblError

Registration
Component Name

Code Name

TextBox1
TextBox2
Label1
Label2
Label3
Button1

txtName
txtPassword
Lblname
lblpassword
lblResult
btnRegister

Order
Component Name

Code Name

TextBox1
TextBox2
Label1

txtDataOpen1
txtDataOpen2
lblOpenOrder

34 | P a g e

Shop
Component Name

Code Name

Label1
Label2
Button1
Button2

lblResult
lblError
btnOk
btnCancel

Items Add
Component Name

Code Name

Label1
Label2
Label3
Label4
Label5
Label6
Label7
Label8
TextBox1
TextBox2
TextBox3
TextBox4
TextBox5
DropDownList1
TextBox6
Button1
Button2
FileUpload1

lblName
lblType
lblPrice
lblRoast
lblCountry
lblImage
lblReview
lblResult
txtName
txtType
txtPrice
txtRoast
txtCountry
ddImage
txtReview
btnSave
btnUploadImage
FileUpload1

35 | P a g e

Screen Layouts
&
Source Code

36 | P a g e

Login

37 | P a g e

Login
using System;
public partial class Pages_Account_Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnLogin_Click(object sender, EventArgs e)
{
User user = ConnectionClass.LoginUser(txtLogin.Text, txtPassword.Text);
if(user != null)
{
//Store login variables in session
Session["login"] = user.Name;
Session["type"] = user.Type;
Response.Redirect("~/Pages/Home.aspx");
}
else
{
lblError.Text = "Login failed";
}
}
}

38 | P a g e

Admin
using System;
public partial class Pages_Account_Admin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AuthenticateAdministrator();
}
private void AuthenticateAdministrator()
{
if ((string)Session["type"] != "administrator")
{
Response.Redirect("~/Pages/Account/Login.aspx");
}
}
}

39 | P a g e

Food

40 | P a g e

Food
using System;
using System.Collections;
using System.Text;
public partial class Pages_Food : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
FillPage();
}
private void FillPage()
{
ArrayList foodList = new ArrayList();
if(!IsPostBack)
{
foodList = ConnectionClass.GetFoodByType("%");
}
else
{
foodList =
ConnectionClass.GetFoodByType(DropDownList1.SelectedValue);
}
StringBuilder sb = new StringBuilder();
foreach (Food food in foodList)
{
sb.Append(
string.Format(
@"<table class='foodTable'>
<tr>
<th rowspan='6' width='150px'><img runat='server' src='{6}' /></th>
<th width='50px'>Name: </td>
<td>{0}</td>
41 | P a g e

</tr>
<tr>
<th>Type: </th>
<td>{1}</td>
</tr>
<tr>
<th>Price: </th>
<td>{2} $</td>
</tr>
<tr>
<th>Roast: </th>
<td>{3}</td>
</tr>
<tr>
<th>Origin: </th>
<td>{4}</td>
</tr>
<tr>
<td colspan='2'>{5}</td>
</tr>
</table>",
food.Name, food.Type, food.Price, food.Roast, food.Country,
food.Review, food.Image));
lblOuput.Text = sb.ToString();
}
}
protected void DropDownList1_SelectedIndexChanged(object sender,
EventArgs e)
{
FillPage();}}
42 | P a g e

Add Food

43 | P a g e

Add Food
using System;
using System.Collections;
using System.IO;
public partial class Pages_Food_Add : System.Web.UI.Page
{
#region Events
protected void Page_Load(object sender, EventArgs e)
{
AuthenticateAdministrator();
string selectedValue = ddlImage.SelectedValue;
ShowImages();
ddlImage.SelectedValue = selectedValue;
}
protected void btnUploadImage_Click(object sender, EventArgs e)
{
try
{
string filename = Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(Server.MapPath("~/Images/Food/") + filename);
lblResult.Text = "Image " + filename + " succesfully uploaded!";
Page_Load(sender, e);
}
catch (Exception)
{
lblResult.Text = "Upload failed!";
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
try
{
string name = txtName.Text;
string type = txtType.Text;
double price = Convert.ToDouble(txtPrice.Text);
price = price / 100;
44 | P a g e

string roast = txtRoast.Text;


string country = txtCountry.Text;
string image = "../Images/Food/" + ddlImage.SelectedValue;
string review = txtReview.Text;
Food food = new Food(name, type, price, roast, country, image, review);
ConnectionClass.AddFood(food);
lblResult.Text = "Upload succesful!";
ClearTextFields();
}
catch (Exception)
{
lblResult.Text = "Upload failed!";
}
}
#endregion
#region Methods
private void ShowImages()
{
//Get all filepaths
string[] images = Directory.GetFiles(Server.MapPath("~/Images/Food/"));
//Get all filenames and add them to an arraylist
ArrayList imageList = new ArrayList();
foreach (string image in images)
{
string imageName = image.Substring(image.LastIndexOf(@"\") + 1);
imageList.Add(imageName);
}
//Set the arrayList as the dropdownview's datasource and refresh
ddlImage.DataSource = imageList;
ddlImage.DataBind();
}
private void ClearTextFields()
{
txtCountry.Text = "";
45 | P a g e

txtName.Text = "";
txtPrice.Text = "";
txtReview.Text = "";
txtRoast.Text = "";
txtType.Text = "";
}
private void AuthenticateAdministrator()
{
if ((string)Session["type"] != "administrator")
{
Response.Redirect("~/Pages/Account/Login.aspx");
}
}
#endregion
}

46 | P a g e

Order Details

47 | P a g e

Order Details
using System;
using System.Collections;
using System.Net;
using System.Net.Mail;
using Entities;
namespace Pages
{
public partial class Pages_OrdersDetailed : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
CheckIfAdministrator();
lblTitle.Text = string.Format("<h2>Client: {0}<br />Date: {1}</h2>",
Request.QueryString["client"], Request.QueryString["date"]);
}
protected void btnShip_Click(object sender, EventArgs e)
{
//Get variables from Url
string client = Request.QueryString["client"];
DateTime date = Convert.ToDateTime(Request.QueryString["date"]);
//Get user info + user's placed orders
User user = ConnectionClass.GetUserDetails(client);
ArrayList orderList = ConnectionClass.GetDetailedOrders(client, date);
//Update database and send confirmation e-mail. Afterwards send user back
to 'Orders' Page
ConnectionClass.UpdateOrders(client, date);
SendEmail(user.Name, user.Email, orderList);
Response.Redirect("~/Pages/Orders.aspx");
}
private void CheckIfAdministrator()
{
if ((string)Session["type"] != "administrator")
48 | P a g e

{
Response.Redirect("~/Pages/Account/Login.aspx");
}
}
private void SendEmail(string client, string email, ArrayList orderList)
{
MailAddress to = new MailAddress(email);
//TODO: Fill in your own e-mail here!
MailAddress from = new MailAddress("your_email@gmail.com");
string body = string.Format(
@"Dear {0},
We are happy to announce that your order placed on {1} has been completed and is
ready for pickup.
Your ordered products:
{2}
You can come collect your order at your earliest convienence.
Kind regards
Abnish", client, Request.QueryString["date"], GenerateOrderedItems(orderList));
MailMessage mail = new MailMessage(from, to);
mail.Body = body;
mail.Subject = "Your order has been prepared";
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
//TODO: Fill in your own e-mail and password here!
smtp.Credentials = new NetworkCredential("your_email@gmail.com",
"yourPassword");
smtp.EnableSsl = true;
smtp.Send(mail);
}
49 | P a g e

private string GenerateOrderedItems(ArrayList orderList)


{
string result = "";
double totalAmount = 0;
foreach (Order order in orderList)
{
result += string.Format(@"
- {0} ({1} )
X {2}
= {3} ",
order.Product, order.Price, order.Amount, (order.Amount *
order.Price));
totalAmount += (order.Amount * order.Price);
}
result += string.Format(@"
Total Amount: {0} ", totalAmount);
return result;
}
}
}

50 | P a g e

Shop

51 | P a g e

Shop
using System;
using System.Collections;
using System.Text;
using System.Web.UI.WebControls;
using Entities;
namespace Pages
{
public partial class Pages_Shop : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
GenerateControls();
}
protected void btnOk_Click(object sender, EventArgs e)
{
Authenticate();
SendOrder();
lblResult.Text = "Your order has been placed, thank you for shopping at
our store";
btnOk.Visible = false;
btnCancel.Visible = false;
}
protected void btnCancel_Click(object sender, EventArgs e)
{
Session["orders"] = null;
btnOk.Visible = false;
btnCancel.Visible = false;
lblResult.Visible = false;
}
protected void btnOrder_Click(object sender, EventArgs e)
{
Authenticate();
52 | P a g e

GenerateReview();
}
//Fill page with dynamic controls showing products in database
private void GenerateControls()
{
//Get all coffeeObjects from database
ArrayList coffeeList = ConnectionClass.GetCoffeeByType("%");
foreach (Coffee coffee in coffeeList)
{
//Create Controls
Panel coffeePanel = new Panel();
Image image = new Image { ImageUrl = coffee.Image, CssClass =
"ProductsImage" };
Literal literal = new Literal { Text = "<br />" };
Literal literal2 = new Literal { Text = "<br />" };
Label lblName = new Label { Text = coffee.Name, CssClass =
"ProductsName" };
Label lblPrice = new Label
{
Text = String.Format("{0:0.00}", coffee.Price + "<br
/>"),
CssClass = "ProductsPrice"
};
TextBox textBox = new TextBox
{
ID = coffee.Id.ToString(),
CssClass = "ProductsTextBox",
Width = 60,
Text = "0"
};
//Add validation so only numbers can be entered into the textfields
RegularExpressionValidator regex = new RegularExpressionValidator
{
ValidationExpression = "^[0-9]*",
ControlToValidate = textBox.ID,
ErrorMessage = "Please enter a number."
};
53 | P a g e

//Add controls to Panels


coffeePanel.Controls.Add(image);
coffeePanel.Controls.Add(literal);
coffeePanel.Controls.Add(lblName);
coffeePanel.Controls.Add(literal2);
coffeePanel.Controls.Add(lblPrice);
coffeePanel.Controls.Add(textBox);
coffeePanel.Controls.Add(regex);
pnlProducts.Controls.Add(coffeePanel);
}
}
//Returns a list of all orders placed in textboxes
private ArrayList GetOrders()
{
//Get list of Textbox objects in ContentPlaceHolder
ContentPlaceHolder cph =
(ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");
ControlFinder<TextBox> cf = new ControlFinder<TextBox>();
cf.FindChildControlsRecursive(cph);
var textBoxList = cf.FoundControls;
//Create orders using data from textfields
ArrayList orderList = new ArrayList();
foreach (TextBox textBox in textBoxList)
{
//Make sure textbox.Text is not null
if (textBox.Text != "")
{
int amountOfOrders = Convert.ToInt32(textBox.Text);
//Generate Order for each textbox which has an order greater than 0
if (amountOfOrders > 0)
{
Coffee coffee =
ConnectionClass.GetCoffeeById(Convert.ToInt32(textBox.ID));
Order order = new Order(
54 | P a g e

Session["login"].ToString(), coffee.Name, amountOfOrders,


coffee.Price, DateTime.Now, false);
//Add order to ArrayList
orderList.Add(order);
}
}
}
return orderList;
}
//Generate HTML table to review Current Order
private void GenerateReview()
{
double totalAmount = 0;
ArrayList orderList = GetOrders();
Session["orders"] = orderList;
StringBuilder sb = new StringBuilder();
sb.Append("<table>");
sb.Append("<h3>Please review your order</h3>");
//Generate a row for each Order
foreach (Order order in orderList)
{
double totalRow = order.Price * order.Amount;
sb.Append(String.Format(@"<tr>
<td width = '50px'>{0} X </td>
<td width = '200px'>{1} ({2})</td>
<td>{3}</td><td></td>
</tr>", order.Amount, order.Product, order.Price,
String.Format("{0:0.00}", totalRow)));
totalAmount = totalAmount + totalRow;
}
//Generate row for Total Amount
sb.Append(String.Format(@"<tr>
<td><b>Total: </b></td>
<td><b>{0} </b></td>
</tr>", totalAmount));
55 | P a g e

sb.Append("</table>");
//Export data and make Controls visible
lblResult.Text = sb.ToString();
lblResult.Visible = true;
btnOk.Visible = true;
btnCancel.Visible = true;
}
//Send order to database
private void SendOrder()
{
ArrayList orderList = (ArrayList)Session["orders"];
ConnectionClass.AddOrders(orderList);
Session["orders"] = null;
}
//Check if user is logged in
private void Authenticate()
{
if (Session["login"] == null)
{
Response.Redirect("~/Pages/Account/Login.aspx");
}
}
}
}

56 | P a g e

57 | P a g e

58 | P a g e

59 | P a g e

60 | P a g e

Test Cases

61 | P a g e

Sr. No.

Form
Name

1.

Login Form

Test Case Test Data

Login ID

Password

Register
User

Name

User Id

Password

State

Test Input
Value

EXP Result

Alphabet,
Digits,

Valid

Admin

Allowed To
Enter Data

Null

Invalid

Characters
Symbols
Digits

Valid

Null

Invalid

Characters

Valid

Abnish

Allowed To
Enter Data

Digits

Invalid

123

Error
Message

Null

Invalid

Digits

Valid

Null

Invalid

Alphabets
Digits

Valid

Abc123

Allowed To
Enter Data

Special
Symbol

Valid

!@#$%^&
*()-+ /*,.

Allowed To
Enter Data

Error
Message

Hgf1233@#
%

Allowed To
Enter Data

Error
Message

Error
Message
1234

Allowed To
Enter Data

Error
Message

62 | P a g e

Mobile No

Email Id

Null

Invalid

Numbers

Valid

Null

Invalid

Alphabets

Invalid

Abcd

Alphabets
Digits
@.

Valid

aabnishh@g
mail.Com

Null

Invalid

Digits

Valid

Null

Invalid

Alphabets

Valid

ABC

Allowed To
Enter Data

Special
Symbols

Invalid

!@#$%^&
*()-+ /*,.
?:;~`

Error
Message

Null

Invalid

Digits
Alphabets

Valid

Error
Message
12345

Allowed To
Enter Data
Error
Message
Not Allowed
To Enter
Data
Allowed To
Enter Data

Error
Message

4.
Upload
New Item

Item Id

Item Name

Item Img

01

Allowed To
Enter Data
Error
Message

Error
Message

001
Abhi

Allowed To
Enter Data

63 | P a g e

Report Screen
Layouts
&
Source Code

64 | P a g e

Crystal Report

65 | P a g e

Crystal Report

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using CrystalDecisions.CrystalReports.Engine;
public partial class Pages_reportpage : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["coffeeConnection"].Co
nnectionString);
SqlCommand cmd = new SqlCommand();
SqlDataAdapter adp = new SqlDataAdapter();
DataTable dt = new DataTable();
ReportDocument rpt = new ReportDocument();
protected void Page_Load(object sender, EventArgs e)
{
generateReports();
}
public void generateReports()
{
try
{
cmd.CommandText = "select * from orders";
cmd.Connection = con;
adp.SelectCommand = cmd;
dt.Clear();
66 | P a g e

adp.Fill(dt);
rpt.Load(Server.MapPath("~/Pages/OrderReport.rpt"));
rpt.SetDataSource(dt);
CrystalReportViewer1.ReportSource = rpt;
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
}
}

67 | P a g e

Future
Enhancement

68 | P a g e

A logical and technical error will be found less in future.


System will be more user friendly as compare to todays system.
System will have more detail information about the different Employees,
consultancy, companies, candidates etc.
It will have easy search to the specific type of Employee.

In the security vision the user name and password authentication is


more secure than todays model.
System will automatically include new Candidates which are newly created
and the user can get the information about it very easily.

69 | P a g e

Conclusion

70 | P a g e

It was great opportunity for us as a student to learn and understand various aspects
associated with project development. I did undergo from various phases of project
development life cycle like analysis, design, coding, implementation, and testing.

The preceding material is a sincere effort from my side to create the ONLINE
FOOD ORDERING PORTAL software as my project work for BSc.I.T project. I
got the idea about the ups and downs taking place during the project development.
I analyzed the problems and solved those problems that were faced in my project.

The project shows the flow of each and every transaction which is being carried
out by the desired user successfully thus giving him the desired result.

71 | P a g e

Bibliography

72 | P a g e

Sites Visited:

www.codeproject.com
www.w3schools.com
www.google.com
www.alltheweb.com

Books:
Software Engineering by Roger S. Pressman (Tata Mc-Graw hill,5th edition)
Data Base Management System by RaghuRamaKrishnan (Tata Mc-Graw
hill,3rd edition)
Unified Modeling Language 2 tool kit by Nons-Erik Eriksson, Magnus
penkee, Brian lyons,Davidfode (2nd Edition)
NET (Core Reference) -by Jeff Prosise
ASP NET in a Nutshell - by G Andrew Duthie
ASP Net by Example - by Steven A. Smith
ASP.NET with C#, Wrogs United Limited
The Unified Modeling Language User Guide by Grady Booch (Pearson education)

73 | P a g e