Professional Documents
Culture Documents
PROJECT Documents
PROJECT Documents
SRIKANTA MAHALIK
ROLL NO:14MCA/16
CERTIFICATE I
This is to certify that the project report entitled “ Online Food Ordering System”
submitted in partial fulfilment of the requirements for the award of the degree of Master of
Computer science to the Orissa University of Agriculture and Technology is a faithful record of
bonafide and original research work carried out by Srikanta mahalik under
my guidance and supervision. No part of this Project has been submitted for any other
degree or diploma.It is further certified that the assistance and help received by him/her
from various sources during the course of investigation has been duly acknowledged.
Advisor
Mrs. Sanjibani Sudha Pattanayk
Asst Professor CSA Department
Orissa University of Agriculture and Technology Center for Post Graduate
Studies Department of Computer Science And Application
CERTIFICATE II
This is to certify that the project report entitled “ Online Food Ordering System”
submitted by Srikanta Mahalik to the Orissa University of Agriculture and Technology,
Bhubaneswar in partial fulfilment of the requirements for the degree of Master of Computer
Science has been approved/disapproved by the students’ advisory committee and the
external examiner.
Advisory Committee
Chairman _______________________
Member 1_______________________
Member 2_______________________
I also express my sincere thanks to other teachers, my parents and friends, without whose
motivation, encouragement, support and sacrifice, my project would not have been
completed.
CONTENTS
Chapter 1. Introduction
o An Overview Of The Project
o Objective of The Project
o Modules of The Project
o About the Website
Existing System
Problems in Existing System
Solution To The Problem
Proposed System
Preliminary Investigation
Feasibility Study
Request Approval
Hardware Specification
Software Specification
Database Design
Chapter 6. Coding
Chapter 7. Testing
Chapter 9. Implementation
INTRODUCTION
MODULES OF THE PROJECT :-
The system after careful analysis has been identified to be presented with the
following modules.
1. Admin Management
2. User Management
This module consists manages the information of owner and accountant who act
as admin for the company. It includes the following pages:-
It includes:-
o New User Registration
o View Food
o Place Order
o Add Ratings
o View Order
o Log_Out
Chapter-2
SYSTEM STUDY
EXISTING SYSTEM :-
In existing system for giving any orders users should visit hotels or restaurants to know about food items and them
give order and pay advance. In this method time and manual work is required. Maintaining critical information in
the files and manuals is full of risk and a tedious process.
To debug the existing system, remove procedures those cause data redundancy,
make navigational sequence proper. To provide information about products on different
level and also to allow users to book their products online.
Proposed System:-
This online application enables the end users to register online, select the food
from the e-menu card, read the E-menu card and order food online. By just selecting the
food that the user want to have. The results after selecting the food from the E-menu card
will directly appear in the screen near the Chef who is going to cook the food for you. By
using this application the work of the Waiter is reduced and we can also say that the work is
nullified. The benefit of this is that if there is rush in the Restaurant then there will be
chances that the waiters will be unavailable and the users can directly order the food to the
chef online by using this application. The user will be given a username and a password to
login.
o The system provides reservation facilities to the user only by entering some
information through internet.
o Through the website a user can easily book the products because this site dealings
with several companies and dealers having various information i.e detailed
product description, prices and many more.
o Each product is associated with price & description.On the same time user can
select any product.
Chapter-3
SYSTEM ANALYSIS
Analysis is the focus of system developing and is the stage when system designers have
to work at two levels of definition regarding the study of situational issues and possible
solutions in terms of ”what to do” and “how to do”.
SRS Document:-
Preliminary
investigation
Determination of
system requirements
System Design
System
development
System testing
Implementation
and evaluation
Preliminary Investigation:-
The initial investigation has the objective of determining the validity of the user’s
request for a candidate system and whether a feasibility study should be conducted.
The objectives of the problem posed by the user must be understood within the
framework of the organisation’s plan.I had investigated from the concerned authority about
the project.
1. Information Gathering:-
2. System Planning:-
Planning for information systems has a time horizon and a focus dimension. The
time horizon dimension specifies the time range of the plan,where as the focus
dimensions relates whether the primary concern is strategic, managerial or
operational. The system,i.e. the project that I was assigned was required to complete
within 20 weeks.Within that time what we planned is as follows:-
Feasibility Report
Operational Feasibility:-
It refers to the feasibility of the product to be operational. Some products may work
very well at the design and implementation but many fail in the real time environment. The
users are acquainted with windows environment, so there is necessity of trained them only
to use the new system. In the existing system all the transactions are carried out manually
which are time consuming. With the use of computerized system selection of the batch is easier
and time saving. This is online system, which saves lots of operational time.
Technical Feasibility:-
It is seen that the system can be developed with the current equipment, with the
existing software technology and with the available personnel. It can be developed with
c# .net and ASP .net technology . SQL Server is used as backend. To develop the software,
we need a browser like Internet Explorer. All these are available at the development center.
Hence the system is technically feasible.
Request Approval
Hence the investigation is able to fulfill every type of requirement testes. Project
has been approved finally for development by the company personnel.
Chapter-4
SYSTEM
SPECIFICATION
Hardware Requirement:
Hardware - Pentium
Speed - 1.1 GHz
RAM - 1GB
Hard Disk - 20 GB
Floppy Drive - 1.44 MB
Key Board - Standard Windows Keyboard
Mouse - Two or Three Button Mouse
Monitor - SVGA
Software Requirements:
DOCUMENT
DESIGNING
• The entire system is projected with a physical diagram which specifics the actual
storage parameters that are physically necessary for any database to be stored on to
the disk. The overall systems existential idea is derived from this diagram.
• The relation upon the system is structure through a conceptual ER-Diagram, which
not only specifics the existential entities but also the standard relations through
which the system exists and the cardinalities that are necessary for the system state
to continue.
• The content level DFD is provided to have an idea of the functional inputs and
outputs that are achieved through the system. The system depicts the input and
output standards at the high level of the systems existence.
NOTATIONS:-
Serve Food
Receive Email
View Food
Add Ratings
Order Food
OFM
Receive Order
CONTEXT DIAGRAM :
View Ratings
Admin
Send Mail
Serve Order
LEVEL – 1 :
ENTITY RELATIONSHIP DIAGRAM :-
The Entity Relationship(ER) data model is based on a
perception of a real world that consists of a real world that consists of a set of objects
called ENTITY/ENTITIES., and of relationships among these objects. There are the three
basic notations that ER data model employs: Entity Set, Relationship Set and Attributes.
CODING
FRONTEND TOOL :
.NET:
.NET is a set of common services, which can be used from number of language
and have the following specialities:
These services are executed in the form of intermediate code that is independent of the
underlying architecture.
The operate in runtime(Common Language runtime), which manages resources and
monitors application execution.
The .NET framework is a multi-language environment for building, deploying and running
Web services and applications.
C#.NET :
C# is a graceful language. C# .NET is a powerful, exciting, easy-to-use
programming language.
In most ways, the development tools for Visual Basic .NET and C# .NET are the same, but
they differ greatly when it comes to events. In VB, the auto-generation of event scaffolding
is done using the Objects and Procedures drop-down lists in the Code Editor.
In contrast, C# has its own interface for auto-generating event scaffolding, which is accessed
via the Properties window. To open this interface, click the lightning bolt icon (the lightning
bolt means an event, get it?) on the Properties window toolbar.
Every executable file you create in C# .NET contains a namespace with the
same name as your project, although you can change this default name.
The class is the basic unit, or blueprint, for object construction in C# .NET. All objects in C#
and everything is an object, including variables, types, forms, and so on-are based on classes
and their members. The members of an object correspond to the members of the class upon
which it is based.
ASP.NET:
ASP.NET is a programming framework built on the common language
runtime that can be used on a server to build powerful Web applications. ASP.NET is a
programming framework built on the common language runtime that can be used on a
server to build powerful Web applications. ASP.NET offers several important advantages
over previous Web development models:
Enhanced Performance:
ASP.NET is compiled common language runtime code running on the server.
Unlike its interpreted predecessors, ASP.NET can take advantage of early binding, just-in-
time compilation, native optimization, and caching services right out of the box. This
amounts to dramatically better performance before you ever write a line of code.
Simplicity:
ASP.NET makes it easy to perform common tasks, from simple form submission
and client authentication to deployment and site configuration. For example- the
ASP.NET page framework allows you to build user interfaces that cleanly separate
application logic from presentation code and to handle events in a simple, forms
processing model.
Manageability:
ASP.NET employs a text-based, hierarchical configuration system, which simplifies
applying settings to your server environment and Web applications. Because configuration
information is stored as plain text, new settings may be applied without the aid of local
administrator tools. This “zero local administration” philosophy extends to deploying
ASP.NET Framework applications as well. An ASP.NET Framework application is deployed
to a server by copying the necessary files to the server. No server restart is required, even to
deploy or replace running compiled code.
Security:
With built in Windows authentication and peer-application configuration,
you can be assured that your applications are secure.
ADO.NET
ADO.NET is a collection of classes that expose methods and attributes used
to manage communication between an application and a data source.
➢ Management tools:
SQL Server Management Studio:
SQL Server Management Studio (SSMS), new in Microsoft SQL Server 2013, is an integrated
environment for accessing, configuring, managing, administering, and developing all
components of SQL Server. SSMS combines the features of Enterprise Manager, Query
Analyzer, and Analysis Manager, included in previous releases of SQL Server, into a single
environment that provides SQL Server access to developers and administrators of all skill
levels.
Database Engine Tuning Advisor helps create optimal sets of indexes, indexed views, and
partitions.
Data Transformation Services (DTS) provide an extremely flexible method for importing
and exporting data between a Microsoft SQL Server installation and a largvariety of other
formats. The most commonly used DTS application is the "Import aExport Data" wizard
found in the SQL Server program group.
Admin Master :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
if(Session["adminid"]!=null)
{
lbladmin.Text = "hello," + Session["adminid"].ToString();
}
}
AdminOrderView :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class Admin_AdminOrderView : System.Web.UI.Page
{
OrderClassBL OCBL = new OrderClassBL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadGrid();
}
}
}
DELIVERYBOY DETAILS:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Drawing;
using System.Diagnostics;
Response.Redirect("../DefaultAdmin.aspx");
}
else
{
if (!IsPostBack)
{
LoadDataToUpdate();
}
}
DBDBL.Gender = rdoGender.SelectedValue.ToString();
DBDBL.Email = txtEmail.Text;
DBDBL.Age = Convert.ToInt32(txtAge.Text);
if (flbImage.HasFile == true)
{
string ext = Path.GetExtension(flbImage.PostedFile.FileName);
if (ext.ToLower() == ".png" || ext.ToLower() == ".jpg" || ext.ToLower()
== ".jpeg" || ext.ToLower() == ".ico")
{
flbImage.PostedFile.SaveAs(Server.MapPath("~/images/") +
flbImage.FileName);
DBDBL.Image = "~/images/" + flbImage.FileName;
}
else
{
Response.Write("<script>alert('choose a file')</script>");
}
}
DBDBL.ContactNo =txtContactNo.Text;
DBDBL.Country = txtCountry.Text;
DBDBL.State = txtState.Text;
DBDBL.City = txtCity.Text;
DBDBL.Pin = Convert.ToInt32(txtPin.Text);
DBDBL.Adharno = Convert.ToInt32(txtAdharno.Text);
DBDBL.BikeNo = txtBikeno.Text;
DBDBL.LienceNo = txtLicenceNo.Text;
DBDBL.Status = rdoStatus.SelectedValue.ToString();
DBDBL.InsetDeliveryBoyDetail();
Cancel();
lblmsz.Visible = true;
}
else
{
DBDBL.DeliveryBoyDetailsId = int.Parse(Request.QueryString["id"].ToString());
DBDBL.Name = txtName.Text;
DBDBL.Gender = rdoGender.SelectedValue.ToString();
DBDBL.Email = txtEmail.Text;
DBDBL.Age = Convert.ToInt32(txtAge.Text);
if (flbImage.HasFile == true)
{
string ext = Path.GetExtension(flbImage.PostedFile.FileName);
if (ext.ToLower() == ".png" || ext.ToLower() == ".jpg" || ext.ToLower()
== ".jpeg" || ext.ToLower() == ".ico")
{
flbImage.PostedFile.SaveAs(Server.MapPath("~/images/") +
flbImage.FileName);
DBDBL.Image = "~/images/" + flbImage.FileName;
}
else
{
Response.Write("<script>alert('choose a file')</script>");
}
}
else
{
DBDBL.Image = ViewState["image1"].ToString();
}
DBDBL.ContactNo =txtContactNo.Text;
DBDBL.Country = txtCountry.Text;
DBDBL.State = txtState.Text;
DBDBL.City = txtCity.Text;
DBDBL.Pin = Convert.ToInt32(txtPin.Text);
DBDBL.Adharno = Convert.ToInt32(txtAdharno.Text);
DBDBL.BikeNo = txtBikeno.Text;
DBDBL.LienceNo = txtLicenceNo.Text;
DBDBL.Status = rdoStatus.SelectedValue.ToString();
DBDBL.UpdateDeliveryBoyDetails();
lblmsz.Visible = true;
}
}
protected void btncancel_Click(object sender, EventArgs e)
{
Cancel();
}
public void Cancel()
{
txtName.Text = "";
txtEmail.Text = "";
txtAge.Text = "";
txtContactNo.Text = "";
txtCountry.Text = "";
txtState.Text = "";
txtCity.Text = "";
txtPin.Text = "";
txtAdharno.Text = "";
txtBikeno.Text = "";
txtLicenceNo.Text = "";
lblmsz.Visible = false;
}
private void LoadDataToUpdate()
{
if (Request.QueryString["id"] != null)
{
DBDBL.DeliveryBoyDetailsId = int.Parse(Request.QueryString["id"].ToString());
DataSet ds = DBDBL.FetchByIdDeliveryBoyDetails();
txtName.Text = ds.Tables[0].Rows[0].ItemArray[1].ToString();
rdoGender.ClearSelection();
rdoGender.Items.FindByText(ds.Tables[0].Rows[0].ItemArray[2].ToString()).Selected = true;
txtEmail.Text = ds.Tables[0].Rows[0].ItemArray[3].ToString();
txtAge.Text = ds.Tables[0].Rows[0].ItemArray[4].ToString();
Image1.ImageUrl = ds.Tables[0].Rows[0].ItemArray[5].ToString();
ViewState["image1"] = ds.Tables[0].Rows[0].ItemArray[5].ToString();
txtContactNo.Text = ds.Tables[0].Rows[0].ItemArray[6].ToString();
txtCountry.Text = ds.Tables[0].Rows[0].ItemArray[7].ToString();
txtState.Text = ds.Tables[0].Rows[0].ItemArray[8].ToString();
txtCity.Text = ds.Tables[0].Rows[0].ItemArray[9].ToString();
txtPin.Text = ds.Tables[0].Rows[0].ItemArray[10].ToString();
txtAdharno.Text = ds.Tables[0].Rows[0].ItemArray[11].ToString();
txtBikeno.Text = ds.Tables[0].Rows[0].ItemArray[12].ToString();
txtLicenceNo.Text = ds.Tables[0].Rows[0].ItemArray[13].ToString();
rdoStatus.ClearSelection();
rdoStatus.Items.FindByText(ds.Tables[0].Rows[0].ItemArray[14].ToString()).Selected =
true;
btnsubmit.Text = "Update";
}
}
}
FOODDETAILS ENTRY:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Drawing;
using System.Diagnostics;
Response.Redirect("../DefaultAdmin.aspx");
}
else
{
if (!IsPostBack == true)
{
LoadShift();
LoadType();
LoadDataToUpdate();
}
}
}
private void LoadShift()
{
DataSet ds = SEBL.GetShiftEntry();
ddlShiftEntry.DataSource = ds.Tables[0];
ddlShiftEntry.DataTextField = "Menu_Name";
ddlShiftEntry.DataValueField = "ShiftId";
ddlShiftEntry.DataBind();
ddlShiftEntry.Items.Insert(0, new ListItem("select", "-1"));
}
FDEBL.Type = ddlType.SelectedItem.Text;
FDEBL.Typeid = ddlType.SelectedValue.ToString();
FDEBL.RecipeName = txtRecipeName.Text;
if (flbImage.HasFile == true)
{
string ext = Path.GetExtension(flbImage.PostedFile.FileName);
if (ext.ToLower() == ".png" || ext.ToLower() == ".jpg" || ext.ToLower()
== ".jpeg" || ext.ToLower() == ".ico")
{
flbImage.PostedFile.SaveAs(Server.MapPath("~/images/") +
flbImage.FileName);
FDEBL.Image = "~/images/" + flbImage.FileName;
}
else
{
Response.Write("<script>alert('choose a file')</script>");
}
}
FDEBL.UnitPrice = txtUnitPrice.Text;
FDEBL.FoodDetails = txtFoodDetails.Text;
FDEBL.Category = rdoStatus.SelectedValue.ToString();
FDEBL.InsetFoodDetailEntry();
Cancel();
lblmsz.Visible = true;
}
else
{
FDEBL.FoodDetailsId = int.Parse(Request.QueryString["id"].ToString());
FDEBL.Shift = ddlShiftEntry.SelectedItem.Text;
FDEBL.Shiftid = ddlShiftEntry.SelectedValue.ToString();
FDEBL.Type = ddlType.SelectedItem.Text;
FDEBL.Typeid = ddlType.SelectedValue.ToString();
FDEBL.RecipeName = txtRecipeName.Text;
if (flbImage.HasFile == true)
{
string ext = Path.GetExtension(flbImage.PostedFile.FileName);
if (ext.ToLower() == ".png" || ext.ToLower() == ".jpg" || ext.ToLower()
== ".jpeg" || ext.ToLower() == ".ico")
{
flbImage.PostedFile.SaveAs(Server.MapPath("~/images/") +
flbImage.FileName);
FDEBL.Image = "~/images/" + flbImage.FileName;
}
else
{
Response.Write("<script>alert('choose a file')</script>");
}
}
else
{
FDEBL.Image = ViewState["image1"].ToString();
}
FDEBL.UnitPrice = txtUnitPrice.Text;
FDEBL.FoodDetails = txtFoodDetails.Text;
FDEBL.Category = rdoStatus.SelectedValue.ToString();
FDEBL.UpdateFoodDetailEntry();
lblmsz.Visible = true;
}
}
public void Cancel()
{
ddlShiftEntry.SelectedValue = "-1";
ddlType.SelectedValue = "-1";
txtRecipeName.Text = "";
txtUnitPrice.Text = "";
txtFoodDetails.Text = "";
}
protected void btncancel_Click(object sender, EventArgs e)
{
Cancel();
}
private void LoadDataToUpdate()
{
if (Request.QueryString["id"] != null)
{
FDEBL.FoodDetailsId = int.Parse(Request.QueryString["id"].ToString());
DataSet ds = FDEBL.FetchByIdFoodDetailEntry();
ddlShiftEntry.SelectedValue = ds.Tables[0].Rows[0].ItemArray[2].ToString();
ddlType.SelectedValue = ds.Tables[0].Rows[0].ItemArray[4].ToString();
ViewState["image1"] = ds.Tables[0].Rows[0].ItemArray[6].ToString();
txtRecipeName.Text = ds.Tables[0].Rows[0].ItemArray[5].ToString();
txtUnitPrice.Text = ds.Tables[0].Rows[0].ItemArray[7].ToString();
txtFoodDetails.Text = ds.Tables[0].Rows[0].ItemArray[8].ToString();
rdoStatus.ClearSelection();
btnsubmit.Text = "Update";
}
}
}
FOODTYPE ENTRY:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
if (!IsPostBack)
{
LoadDataToUpdate();
}
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (btnsubmit.Text == "Submit")
{
FTBL.TypeName = txtTypeName.Text;
FTBL.Status = rdoStatus.SelectedValue.ToString();
string msz = FTBL.InsertFoodType();
Response.Write("<scripi>alert('" + msz + "')</script>");
lblmsz.Visible = true;
Cancel();
}
else
{
FTBL.TypeId = int.Parse(Request.QueryString["id"].ToString());
FTBL.TypeName = txtTypeName.Text;
FTBL.Status = rdoStatus.SelectedValue.ToString();
string msz = FTBL.UpdateFoodType();
Response.Write("<scripi>alert('" + msz + "')</script>");
lblmsz.Visible = true;
}
}
protected void btncancel_Click(object sender, EventArgs e)
{
Cancel();
lblmsz.Visible = false;
}
public void Cancel()
{
txtTypeName.Text = "";
}
private void LoadDataToUpdate()
{
if (Request.QueryString["id"] != null)
{
FTBL.TypeId = int.Parse(Request.QueryString["id"].ToString());
DataSet ds = FTBL.GetFoodType();
txtTypeName.Text = ds.Tables[0].Rows[0].ItemArray[1].ToString();
rdoStatus.ClearSelection();
rdoStatus.Items.FindByText(ds.Tables[0].Rows[0].ItemArray[2].ToString()).Selected = true;
btnsubmit.Text = "Update";
}
}
ORDER DETAILS:
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.Net.Mail;
using System.Net;
using System.Collections.Specialized;
lblproductname.Text = ds.Tables[0].Rows[0].ItemArray[0].ToString();
lbluserid.Text = ds.Tables[0].Rows[0].ItemArray[8].ToString();
lblprice.Text = ds.Tables[0].Rows[0].ItemArray[3].ToString();
lbladdress.Text = ds.Tables[0].Rows[0].ItemArray[11].ToString();
lblqnt.Text = ds.Tables[0].Rows[0].ItemArray[4].ToString();
Label1.Text = ds.Tables[0].Rows[0].ItemArray[2].ToString();
lbltotalprice.Text = ds.Tables[0].Rows[0].ItemArray[5].ToString();
lblPaymentMode.Text = ds.Tables[0].Rows[0].ItemArray[9].ToString();
Labelusername.Text = ds.Tables[0].Rows[0].ItemArray[10].ToString();
lblstate.Text = ds.Tables[0].Rows[0].ItemArray[12].ToString();
lblcity.Text = ds.Tables[0].Rows[0].ItemArray[13].ToString();
lblphone.Text = ds.Tables[0].Rows[0].ItemArray[15].ToString();
}
}
}
catch (Exception exception)
{
Response.Write(exception);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
}
catch (Exception exception)
{
Response.Write(exception);
}
}
}
===========================================================================
ORDER REQUEST:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
SearchBox :
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;
public partial class Admin_SearchBox : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (inputFirstname.Value.Trim() != "")
{
SqlParameter param = new SqlParameter
("@userid", inputFirstname.Value);
cmd.Parameters.Add(param);
}
if (inputLastname.Value.Trim() != "")
{
SqlParameter param = new SqlParameter
("@guestname", inputLastname.Value);
cmd.Parameters.Add(param);
}
con.Open();
SqlDataReader rdr = cmd.ExecuteReader();
gvSearchResults.DataSource = rdr;
gvSearchResults.DataBind();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class Admin_ViewDeliveryBoyDetails : System.Web.UI.Page
{
DeliveryBoyDetailsBL DBDB = new DeliveryBoyDetailsBL();
protected void Page_Load(object sender, EventArgs e)
{
LoadDeliveryBoyDetails();
}
private void LoadDeliveryBoyDetails()
{
DataSet ds = DBDB.GetDeliveryBoyDetails();
gvDeliveryBoyDetails.DataSource = ds.Tables[0];
gvDeliveryBoyDetails.DataBind();
}
protected void gvDeliveryBoyDetails_RowDeleting(object sender,
GridViewDeleteEventArgs e)
{
DBDB.DeliveryBoyDetailsId =
int.Parse(gvDeliveryBoyDetails.Rows[e.RowIndex].Cells[1].Text);
string msg = DBDB.DeleteDeliveryBoyDetailsEntry();
Response.Write("<script>alert('" + msg + "')</script>");
LoadDeliveryBoyDetails();
}
protected void gvDeliveryBoyDetails_SelectedIndexChanging(object sender,
GridViewSelectEventArgs e)
{
Response.Redirect("DeliveryBoyDetailEntry.aspx?id=" +
gvDeliveryBoyDetails.Rows[e.NewSelectedIndex].Cells[1].Text);
}
protected void gvDeliveryBoyDetails_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
View FoodDetails :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class ViewFoodDetailsEntry : System.Web.UI.Page
{
FoodDetailsEntryBL FDEBL = new FoodDetailsEntryBL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
LoadFoodDetails();
}
User
User_Login :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class User_UserLogin : System.Web.UI.Page
{
UserBL ubl = new UserBL();
}
protected void btnlogin_Click(object sender, EventArgs e)
{
ubl.emailid = txtemail.Text.Trim();
ubl.password = txtpassword.Text.Trim();
captcha1.ValidateCaptcha(TextBox1.Text.Trim());
if (captcha1.UserValidated)
{
if (ubl.CheckLogin())
{
//ubl.emailid = txtemail.Text.Trim();
DataSet ds = ubl.fetchByEmail();
Session["uid"] = ds.Tables[0].Rows[0].ItemArray[0].ToString();
Session["email"] = ds.Tables[0].Rows[0].ItemArray[2].ToString();
Session["username"] = ds.Tables[0].Rows[0].ItemArray[1].ToString();
//Response.Redirect(Request.RawUrl);
Response.Redirect("MenuView.aspx");
}
else
{
Response.Write("<script>alert('Login Failed !!!')</script>");
txtemail.Text = "";
txtpassword.Text = "";
TextBox1.Text = "";
}
}
}
}
User Registration :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;
using System.Net;
using System.Collections.Specialized;
}
protected void btnreg_Click(object sender, EventArgs e)
{
captcha1.ValidateCaptcha(TextBox1.Text.Trim());
if (captcha1.UserValidated)
{
ubl.username = txtusername.Text;
ubl.emailid = txtemail.Text.Trim();
ubl.password = txtpassword.Text.Trim();
ubl.phone = txtph.Text.Trim();
ubl.address = txtadd.Text.Trim();
ubl.city = txtcity.Text.Trim();
ubl.state = txtstate.Text.Trim();
ubl.pin = txtpin.Text.Trim();
string msg = ubl.InsertUser();
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new
System.Net.NetworkCredential("vikashmalik6262@gmail.com", "Srikanta@6262");
smtp.EnableSsl = true;
MailMessage msg1 = new MailMessage();
msg1.Subject = "Hello " + txtusername.Text + " Thanks for Register at
Lebistro";
msg1.Body = "Hi, Thanks For Your Registration at Le-Bistro, We will Provide
You The Latest Update. Thanks";
string toaddress = txtemail.Text;
msg1.To.Add(toaddress);
string fromaddress = "Lebistro <vikashmalik6262@gmail.com>";
msg1.From = new MailAddress(fromaddress);
try
{
smtp.Send(msg1);
}
catch (Exception exception)
{
Response.Write(exception);
}
Response.Write("<script>alert('" + msg + "')</script>");
//Response.Redirect("../User/UserLogin.aspx");
Cancel();
}
else
{
Response.Write("<script>alert('Enter Valid Captcha')</script>");
}
}
Forgot Password :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Net.Mail;
using System.Net;
password = ds.Tables[0].Rows[0]["password"].ToString();
sendpassword(password);
txtemail.Text = "";
Response.Write("<script>alert('Password Send To Ur Mail_Id...')</script>");
}
else
{
Response.Write("<script>alert('Your Email Is Not Registered.')</script>");
con.Close();
}
private void sendpassword(String password)
{
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new System.Net.NetworkCredential("vikashmalik6262@gmail.com",
"Srikanta@6262");
smtp.EnableSsl = true;
MailMessage msg = new MailMessage();
msg.Subject = "Forgot Password ( Le-Bistro )";
msg.Body = "Your Password is " + password + "\n\n\nThanks & Regards\n le-
Bistro";
string toaddress = txtemail.Text;
msg.To.Add(toaddress);
string fromaddress = "Le-Bistro <vikashmalik6262@gmail.com>";
msg.From = new MailAddress(fromaddress);
try
{
smtp.Send(msg);
}
catch (Exception exception)
{
Response.Write(exception);
}
}
Menu View :
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;
}
lblname.Visible = true;
lblname.Text = "hi, " + Session["username"].ToString();
}
else
{
Response.Redirect("UserLogin.aspx");
}
}
private void LoadGrid()
{
DataSet ds = FDEBL.GetFoodDetailEntry();
DataList1.DataSource = ds.Tables[0];
DataList1.DataBind();
}
DataSet ds = FDEBL.GetFoodDetailEntry();
DataList1.DataSource = ds.Tables[0];
DataList1.DataBind();
}
if (inputFirstname.Text != "")
{
SqlParameter param = new SqlParameter
("@RecipeName", inputFirstname.Text);
cmd.Parameters.Add(param);
inputFirstname.Text = "";
}
con.Open();
SqlDataReader rdr = cmd.ExecuteReader();
DataList1.DataSource = rdr;
DataList1.DataBind();
}
}
Order Request :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class User_MyOrderRequestPage : System.Web.UI.Page
{
OrderClassBL OCBL = new OrderClassBL();
divimp.Visible = false;
}
}
}
}
totaldiscount += Discountprice;
totalItems += product;
number1 = totaldiscount *(0.03m);
number2 = totaldiscount + (number1*2);
if (e.Row.RowType == DataControlRowType.Footer)
{
lbltotalproduct.Text = totalItems.ToString();
lblgrandtotal.Text = totaldiscount.ToString();
lblsgst.Text=number1.ToString();
lblcgst.Text = number1.ToString();
lblgtotal.Text = number2.ToString();
}
}
protected void gvCart_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
DataTable dt = (DataTable)Session["Cart"];
DataRow dr = dt.Rows[e.RowIndex];
dr.Delete();
BindGrid();
Response.Redirect(Request.RawUrl);
}
protected void btncheck_Click(object sender, EventArgs e)
{
if (Session["uid"] != null)
{
pnl.Visible = true;
btncheck.Visible = false;
}
else
{
Response.Write("<script>alert('Please Login to Continue')</script>");
Response.Redirect("UserLogin.aspx");
}
}
}
if (Session["uid"] != null)
{
OCBL.userid = Session["uid"].ToString();
}
decimal gtotal = Convert.ToDecimal(totalprice) +
Convert.ToDecimal(totalprice*(0.06));
OCBL.quantity = quantity;
OCBL.productname = productName;
OCBL.price = price;
OCBL.totalprice = gtotal.ToString();
OCBL.paymentmode = rblpayment.SelectedItem.Text;
OCBL.guestname = txtname.Text.Trim();
OCBL.address = txtemail.Text;
OCBL.state = txtstate.Text;
OCBL.city = txtcity.Text;
OCBL.pin = txtpin.Text;
OCBL.phone = txtphone.Text;
OCBL.ordertime = DateTime.Now.ToString();
OCBL.orderstatus = "Waiting to Respond";
My Order :
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;
public partial class User_MyOrders : System.Web.UI.Page
{
OrderClassBL ODBL=new OrderClassBL();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["username"] != null)
{
if (!IsPostBack)
{
LoadData();
//Panel1.Visible = false;
Session.Remove("Cart");
}
}
else
{
Response.Redirect("UserLogin.aspx");
}
}
gvOrderDetails.DataSource = ds.Tables[0];
gvOrderDetails.DataBind();
Cart :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
imgfood.ImageUrl = ds.Tables[0].Rows[0].ItemArray[6].ToString();
lbltype.Text = ds.Tables[0].Rows[0].ItemArray[3].ToString();
lblprice.Text = ds.Tables[0].Rows[0].ItemArray[7].ToString();
lbldescription.Text = ds.Tables[0].Rows[0].ItemArray[8].ToString();
}
else
{
Panel1.Visible = false;
}
}
dt.Columns.Add(num);
dt.Columns.Add(fid);
dt.Columns.Add(Food_img);
dt.Columns.Add(Food_name);
dt.Columns.Add(Price);
dt.Columns.Add(Qty);
dt.Columns.Add(TotalPrice);
if (Request.QueryString["fid"] != null)
{
if (Session["Cart"] == null)
{
DataRow dr = dt.NewRow();
dr["fid"] = Request.QueryString["fid"].ToString();
dr["Food_img"] = imgfood.ImageUrl.ToString();
dr["Food_name"] = lblFoodName.Text;
//dr["company"] = lblcompany.Text;
dr["Price"] = lblprice.Text;
dr["Qty"] = ddlqnt.SelectedItem.Text;
//dr["color"] = lblcolor.Text;
//dr["size"] = lblsize.Text;
int Totalprices = Convert.ToInt16(ddlqnt.SelectedItem.Text) *
Convert.ToInt16(lblprice.Text);
dr["TotalPrice"] = Totalprices.ToString();
dt.Rows.Add(dr);
Session["Cart"] = dt;
// Request.Cookies["CC"] = dt;
show = "show";
//Response.Redirect("MyOrderRequestPage.aspx?pid=" +
Request.QueryString["fid"]);
}
else
{
checkdesignid();
if (availabledesignid == true)
{
Response.Write("Designid " + Request.QueryString["id"] + " " +
availabledesignid);
updatequantity();
}
else
{
DataRow dr = dt.NewRow();
show = "show";
availabledesignid = false;
}
}
}
}
}
//Response.Redirect("~/ViewProduct.aspx?pid=" + Request.QueryString["pid"]);
App_Code
Admin Login :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
/// <summary>
/// Summary description for AdminLogin
/// </summary>
public class AdminLoginBL : ConnectionClass
{
public string adminid { get; set; }
public string password { get; set; }
public bool CheckLogin()
{
SqlParameter[] p = new SqlParameter[2];
p[0] = new SqlParameter("@adminid", this.adminid);
p[1] = new SqlParameter("@password", this.password);
int x = Convert.ToInt32(SqlHelperDL.ExecuteScalar(con,
System.Data.CommandType.StoredProcedure, "usp_AdminLogin", p).ToString());
if (x > 0)
return true;
else
return false;
}
public string InsertAdmin()
{
SqlParameter[] p = new SqlParameter[2];
p[0] = new SqlParameter("@adminid", this.adminid);
p[1] = new SqlParameter("@password", this.password);
DeliveryBoyBL :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
/// <summary>
/// Summary description for DeliveryBoyDetailsBL
/// </summary>
public class DeliveryBoyDetailsBL:ConnectionClass
{
public int DeliveryBoyDetailsId { get; set; }
public string Name { get; set; }
public string Gender { get; set; }
public string Email { get; set; }
public int Age { get; set; }
public string Image { get; set; }
public string ContactNo { get; set; }
public string Country { get; set; }
public string State { get; set; }
public string City { get; set; }
public int Pin { get; set; }
public int Adharno { get; set; }
public string BikeNo { get; set; }
public string LienceNo { get; set; }
public string Status { get; set; }
public string InsetDeliveryBoyDetail()
{
SqlParameter[] p = new SqlParameter[14];
p[0] = new SqlParameter("@Name", this.Name);
p[1] = new SqlParameter("@Gender", this.Gender);
p[2] = new SqlParameter("@Email", this.Email);
p[3] = new SqlParameter("@Age", this.Age);
p[4] = new SqlParameter("@Image", this.Image);
p[5] = new SqlParameter("@ContactNo", this.ContactNo);
p[6] = new SqlParameter("@Country", this.Country);
p[7] = new SqlParameter("@State", this.State);
p[8] = new SqlParameter("@City", this.City);
p[9] = new SqlParameter("@Pin", this.Pin);
p[10] = new SqlParameter("@Adharno", this.Adharno);
p[11] = new SqlParameter("@BikeNo", this.BikeNo);
p[12] = new SqlParameter("@LicenceNo", this.LienceNo);
p[13] = new SqlParameter("@Status", this.Status);
int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,
"usp_Insert_DeliveryDetailMaster", p);
if (x > 0)
{
return "saved";
}
else
{
return "failed";
}
}
public string DeleteDeliveryBoyDetailsEntry()
{
SqlParameter[] p = new SqlParameter[1];
{
p[0] = new SqlParameter("@DeliveryBoyId", this.DeliveryBoyDetailsId);
}
public DataSet GetFoodDetailEntry()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMaster");
return ds;
}
OrderClassBL :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
/// <summary>
/// Summary description for OrderClassBL
/// </summary>
public class OrderClassBL:ConnectionClass
{
public string orderid { get; set; }
public string productid { get; set; }
public string productname { get; set; }
public string quantity { get; set; }
public string price { get; set; }
public string totalprice { get; set; }
public string ordertime { get; set; }
public string orderstatus { get; set; }
public string userid { get; set; }
public string paymentmode { get; set; }
public string guestname { get; set; }
public string address { get; set; }
public string state { get; set; }
public string city { get; set; }
public string pin { get; set; }
public string phone { get; set; }
public string deliveryboyname { get; set; }
public string deliveryboynumber { get; set; }
SqlHelperDL :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
/// <summary>
/// Summary description for SqlHelperDL
/// </summary>
public class SqlHelperDL
{
static SqlConnection cn;
static SqlCommand cm;
//kamal 8-01-2019
public static int ExecuteNonQuery(string con,CommandType ct,string
spname,SqlParameter[] p)
{
cn = new SqlConnection(con);
cn.Open();
cm = new SqlCommand(spname, cn);
cm.CommandType = ct;
cm.Parameters.AddRange(p);
int x = cm.ExecuteNonQuery();
if (x > 0)
return 1;
else
return 0;
}
UserBL :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
/// <summary>
/// Summary description for UserBL
/// </summary>
public class UserBL : ConnectionClass
{
public string userid { get; set; }
public string username { get; set; }
public string emailid { get; set; }
public string phone{ get; set; }
public string address { get; set; }
public string city { get; set; }
public string state { get; set; }
public string pin { get; set; }
Admin Login :
CREATE TABLE [dbo].[AdminLogin](
[slno] [int] IDENTITY(1,1) NOT NULL,
[adminid] [varchar](50) NOT NULL,
[password] [varchar](50) NOT NULL,
CONSTRAINT [PK_AdminLogin] PRIMARY KEY CLUSTERED
(
[slno] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
DeliveryBoyDetails:
CREATE TABLE [dbo].[DeliveryDetailsMaster](
[DeliveryBoyId] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](20) NULL,
[Gender] [varchar](20) NULL,
[Email] [varchar](50) NULL,
[Age] [varchar](20) NULL,
[Image] [varchar](max) NULL,
[ContactNo] [varchar](20) NULL,
[Country] [varchar](20) NULL,
[State] [varchar](20) NULL,
[City] [varchar](20) NULL,
[Pin] [int] NOT NULL,
[AdharNo] [int] NULL,
[BikeNo] [varchar](20) NULL,
[LicenceNo] [int] NULL,
[Status] [varchar](20) NULL,
CONSTRAINT [PK_DeliveryDetailsMaster] PRIMARY KEY CLUSTERED
(
[DeliveryBoyId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
FoodDetailsEntry :
CREATE TABLE [dbo].[FoodDetailsEntryMaster](
[FoodDetailsId] [int] IDENTITY(1,1) NOT NULL,
[Shift] [varchar](20) NULL,
[ShiftId] [varchar](20) NULL,
[Type] [varchar](20) NULL,
[TypeId] [int] NULL,
[RecipeName] [varchar](20) NULL,
[Image] [varchar](max) NULL,
[UnitPrice] [varchar](20) NULL,
[FoodDetails] [varchar](200) NULL,
[Category] [varchar](20) NULL,
CONSTRAINT [PK_FoodDetailsEntryMaster] PRIMARY KEY CLUSTERED
(
[FoodDetailsId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
FoodType :
CREATE TABLE [dbo].[FoodTypeMaster](
[TypeId] [int] IDENTITY(1,1) NOT NULL,
[TypeName] [varchar](20) NULL,
[Status] [varchar](20) NULL,
CONSTRAINT [PK_FoodTypeMaster] PRIMARY KEY CLUSTERED
(
[TypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
OrderMaster :
CREATE TABLE [dbo].[OrderMaster](
[orderid] [nvarchar](50) NOT NULL,
[productid] [nvarchar](50) NULL,
[productname] [nvarchar](max) NULL,
[quantity] [nvarchar](50) NULL,
[price] [nvarchar](50) NULL,
[totalprice] [nvarchar](50) NULL,
[ordertime] [nvarchar](50) NULL,
[orderstatus] [nvarchar](50) NULL,
[userid] [nvarchar](50) NULL,
[paymentmode] [nvarchar](50) NULL,
[guestname] [nvarchar](50) NULL,
[address] [nvarchar](500) NULL,
[state] [nvarchar](50) NULL,
[city] [nvarchar](50) NULL,
[pin] [nvarchar](50) NULL,
[phone] [nvarchar](50) NULL,
[deliveryboyname] [nvarchar](50) NULL,
[deliveryboynumber] [nvarchar](50) NULL,
[deliveryboystatus] [nvarchar](50) NULL,
[ratings] [nvarchar](50) NULL,
[userstatus] [nvarchar](50) NULL,
CONSTRAINT [PK_OrderMaster] PRIMARY KEY CLUSTERED
(
[orderid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
MenuTypeMaster :
CREATE TABLE [dbo].[ShiftTypeMaster](
[ShiftId] [int] IDENTITY(1,1) NOT NULL,
[Menu_Name] [varchar](20) NULL,
[Status] [varchar](20) NULL,
CONSTRAINT [PK_ShiftTypeMaster] PRIMARY KEY CLUSTERED
(
[ShiftId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
UserRegistrationMaster :
CREATE TABLE [dbo].[UserRegistrationMaster](
[userid] [nvarchar](50) NOT NULL,
[username] [nvarchar](50) NULL,
[emailid] [nvarchar](50) NULL,
[phone] [nvarchar](50) NULL,
[password] [nvarchar](50) NULL,
[address] [nvarchar](50) NULL,
[city] [nvarchar](50) NULL,
[state] [nvarchar](50) NULL,
[pin] [nvarchar](50) NULL,
[status] [nvarchar](50) NULL,
CONSTRAINT [PK_UserRegistrationMaster] PRIMARY KEY CLUSTERED
(
[userid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
USE [OFM]
GO
=================================================
CREATE proc [dbo].[usp_AdminLogin]
(
@adminid varchar(50),
@password varchar(50)
)
as
begin
select count (*) from AdminLogin where adminid=@adminid and password=@password
end
GO
==========================================================================
create procedure [dbo].[usp_Delete_DeliveryBoy]
(
@DeliveryBoyId int
)
as
begin
delete from DeliveryDetailsMaster where DeliveryBoyId=@DeliveryBoyId
end
GO
======================================================================
create procedure [dbo].[usp_Delete_EventTypeMaster]
(
@EventId int
)
as
begin
delete from EventTypeMaster where EventId=@EventId
end
GO
==========================================================================
CREATE procedure [dbo].[usp_Delete_FoodDetailEntry]
(
@FoodDetailsId int
)
as
begin
delete from FoodDetailsEntryMaster where FoodDetailsId=@FoodDetailsId
end
GO
==============================================================================
create procedure [dbo].[usp_Delete_FoodType]
(
@TypeId int
)
as
begin
delete from FoodTypeMaster where TypeId=@TypeId
end
GO
===============================================================
create procedure [dbo].[usp_Delete_ShiftEntry]
(
@ShiftId int
)
as
begin
delete from ShiftTypeMaster where ShiftId=@ShiftId
end
GO
========================================================================
create proc [dbo].[usp_Fetch_By_Id_DeliveryDetailsMaster]
(
@DeliveryBoyId int
)
as
begin
select * from DeliveryDetailsMaster where DeliveryBoyId=@DeliveryBoyId
end
GO
=====================================================================
create proc [dbo].[usp_Fetch_By_Id_EventTypeMaster]
(
@EventId int
)
as
begin
select * from EventTypeMaster where EventId=@EventId
end
GO
===================================================================
create proc [dbo].[usp_Fetch_By_Id_FoodDetailsEntryMaster]
(
@FoodTypeEntryId int
)
as
begin
select * from FoodDetailsEntryMaster where FoodTypeEntryId=@FoodTypeEntryId
end
GO
=================================================================
create proc [dbo].[usp_Fetch_By_Id_FoodTypeMaster]
(
@TypeId int
)
as
begin
select * from FoodTypeMaster where TypeId=@TypeId
end
GO
=============================================================================
create proc [dbo].[usp_Fetch_By_Id_ShiftTypeMaster]
(
@ShiftTypeId int
)
as
begin
select * from ShiftTypeMaster where ShiftId=@ShiftTypeId
end
GO
================================================================================
CREATE proc [dbo].[usp_Fetch_DeliveryBoyDetails]
as
begin
Select * from DeliveryDetailsMaster
end
GO
============================================================
CREATE proc [dbo].[usp_Fetch_EventType]
as
begin
Select * from EventTypeMaster
end
GO
==========================================================
create procedure [dbo].[usp_Fetch_FoodDetailEntryMaster]
as
begin
select * from FoodDetailsEntryMaster
end
GO
=====================================
create proc [dbo].[usp_Fetch_FoodTypeMaster]
as
begin
Select * from FoodTypeMaster
end
GO
================================================
create procedure [dbo].[usp_Fetch_ShiftEntry]
as
begin
select * from ShiftTypeMaster
end
GO
===================================================
create proc [dbo].[usp_Insert_AdminLogin]
(
@adminid varchar(50),
@password varchar(50)
)
as
begin
insert into
AdminLogin
(
adminid,
password
)
values
(
@adminid,
@password
)
end
GO
==============================
Create proc [dbo].[usp_Insert_DeliveryDetailMaster]
(
@Name varchar(20),
@Gender varchar(20),
@Email varchar(50),
@Age varchar(20),
@Image varchar(max),
@ContactNo int,
@Country varchar(20),
@State varchar(20),
@City varchar(20),
@pin int,
@AdharNo int,
@BikeNo varchar(20),
@LicenceNo varchar(20),
@Status varchar(20)
)
as
begin
insert into
DeliveryDetailsMaster
(
Name,
Gender,
Email,
Age,
Image,
ContactNo,
Country,
State,
City,
Pin,
AdharNo,
BikeNo,
LicenceNo,
Status
)
values
(
@Name,
@Gender,
@Email,
@Age,
@Image,
@ContactNo,
@Country,
@State,
@City,
@pin,
@AdharNo,
@BikeNo,
@LicenceNo,
@Status
)
end
GO
=====================================
CREATE proc [dbo].[usp_Insert_EventTypeMaster]
(
@EventName varchar(20),
@Description varchar(200),
@Status varchar(20),
@Quatation varchar(20)
)
as
begin
insert into
EventTypeMaster
(
EventName,
Description,
Status,
Quotation
)
values
(
@EventName,
@Description,
@Status,
@Quatation
)
end
GO
====================================================
create proc [dbo].[usp_Insert_FoodDetailEntryMaster]
(
@Shift varchar(20),
@Type varchar(200),
@RecipeName varchar(20),
@Image varchar(max),
@UnitPrice varchar(20),
@FoodDetails varchar(200),
@Status varchar(20)
)
as
begin
insert into
FoodDetailsEntryMaster
(
Shift,
Type,
RecipeName,
Image,
UnitPrice,
FoodDetails,
Status
)
values
(
@Shift,
@Type,
@RecipeName,
@Image,
@UnitPrice,
@FoodDetails,
@Status
)
end
GO
==========================================================
create proc [dbo].[usp_Insert_FoodTypeMaster]
(
@TypeName varchar(200),
@Status varchar(20)
)
as
begin
insert into
FoodTypeMaster
(
TypeName,
Status
)
values
(
@TypeName,
@Status
)
end
GO
===================================================
create proc [dbo].[usp_Insert_ShiftTypeMaster]
(
@ShiftName varchar(20),
@Timing varchar(20),
@Details varchar(200),
@Status varchar(20)
)
as
begin
insert into
ShiftTypeMaster
(
ShiftName,
Timing,
Details,
Status
)
values
(
@ShiftName,
@Timing,
@Details,
@Status
)
end
GO
=================================================================
create proc [dbo].[usp_update_DeliveryBoyDetails]
(
@DeliveryBoyId int,
@Name varchar(20),
@Gender varchar(20),
@Email varchar(20),
@Age int,
@Image varchar(MAX),
@ContactNo int,
@Country varchar(20),
@State varchar(20),
@City varchar(20),
@Pin int,
@AdharNo int,
@Status varchar(20)
)
as
begin
Update DeliveryBoyDetails set
Name=@Name,
Gender=@Gender,
Email=@Email,
age=@Age,
Image=@Image,
ContactNo=@ContactNo ,
Country=@Country ,
State=@State ,
City=@City ,
pin=@Pin ,
AdharNo=@AdharNo ,
Status=@Status
Where DeliveryBoyId=@DeliveryBoyId
end
GO
=======================================================================
create proc [dbo].[usp_update_EventType]
(
@EventId int,
@EventName varchar(20),
@Description varchar(200),
@Status varchar(20),
@Quotation varchar(MAX)
)
as
begin
Update EventTypeMaster set
EventName=@EventName,
Description=@Description,
Status=@Status,
Quotation=@Quotation
Where EventId=@EventId
end
GO
=============================================
create proc [dbo].[usp_update_FoodDetails]
(
@FoodDetailsId int,
@Shift varchar(20),
@Type varchar(20),
@RecipeName varchar(20),
@Image varchar(MAX),
@UnitPrice int,
@FoodDetails varchar(MAX),
@Status varchar(20)
)
as
begin
Update FoodDetailsEntryMaster set
Shift=@Shift,
Type=@Type,
RecipeName=@RecipeName,
Image=@Image,
UnitPrice=@UnitPrice,
FoodDetails=@FoodDetails,
Status=@Status
Where FoodDetailsId=@FoodDetailsId
end
GO
==========================================================
create proc [dbo].[usp_update_FoodTypeMaster]
(
@TypeId int,
@TypeName nvarchar(50),
@Status nvarchar(50)
)
as
begin
Update FoodTypeMaster set
TypeName=@TypeName,
Status=@Status
Where TypeId=@TypeId
end
GO
CREATE proc [dbo].[usp_update_ShiftType]
(
@ShiftTypeId int,
@ShiftName varchar(20),
@Timing varchar(20),
@Details varchar(200),
@Status varchar(20)
)
as
begin
update ShiftTypeMaster set
ShiftName=@ShiftName,
Timing=@Timing,
Details=@Details,
Status=@Status
where ShiftId=@ShiftTypeId
end
GO
CREATE TABLE [dbo].[AdminLogin](
[slno] [int] IDENTITY(1,1) NOT NULL,
[adminid] [varchar](50) NULL,
[password] [varchar](50) NULL,
CONSTRAINT [PK_AdminLogin] PRIMARY KEY CLUSTERED
(
[slno] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
CREATE TABLE [dbo].[DeliveryDetailsMaster](
[DeliveryBoyId] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](20) NULL,
[Gender] [varchar](20) NULL,
[Email] [varchar](50) NULL,
[Age] [varchar](20) NULL,
[Image] [varchar](max) NULL,
[ContactNo] [int] NULL,
[Country] [varchar](20) NULL,
[State] [varchar](20) NULL,
[City] [varchar](20) NULL,
[Pin] [int] NULL,
[AdharNo] [int] NULL,
[BikeNo] [varchar](20) NULL,
[LicenceNo] [int] NULL,
[Status] [varchar](20) NULL,
CONSTRAINT [PK_DeliveryDetailsMaster] PRIMARY KEY CLUSTERED
(
[DeliveryBoyId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
===========================================================================
/****** Object: Table [dbo].[EventTypeMaster] Script Date: 2/4/2019 4:13:33 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[EventTypeMaster](
[EventId] [int] IDENTITY(1,1) NOT NULL,
[EventName] [varchar](20) NULL,
[Description] [varchar](200) NULL,
[Status] [varchar](20) NULL,
[Quotation] [varchar](max) NULL,
CONSTRAINT [PK_EventTypeMaster] PRIMARY KEY CLUSTERED
(
[EventId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[FoodDetailsEntryMaster] Script Date: 2/4/2019 4:13:33 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FoodDetailsEntryMaster](
[FoodDetailsId] [int] IDENTITY(1,1) NOT NULL,
[Shift] [varchar](20) NULL,
[Type] [varchar](20) NULL,
[RecipeName] [varchar](20) NULL,
[Image] [varchar](max) NULL,
[UnitPrice] [varchar](20) NULL,
[FoodDetails] [varchar](200) NULL,
[Status] [varchar](20) NULL,
CONSTRAINT [PK_FoodDetailsEntryMaster] PRIMARY KEY CLUSTERED
(
[FoodDetailsId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[FoodTypeMaster] Script Date: 2/4/2019 4:13:33 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[FoodTypeMaster](
[TypeId] [int] IDENTITY(1,1) NOT NULL,
[TypeName] [varchar](20) NULL,
[Status] [varchar](20) NULL,
CONSTRAINT [PK_FoodTypeMaster] PRIMARY KEY CLUSTERED
(
[TypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[ShiftTypeMaster] Script Date: 2/4/2019 4:13:33 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ShiftTypeMaster](
[ShiftId] [int] IDENTITY(1,1) NOT NULL,
[ShiftName] [varchar](20) NULL,
[Timing] [varchar](20) NULL,
[Details] [varchar](200) NULL,
[Status] [varchar](20) NULL,
CONSTRAINT [PK_ShiftTypeMaster] PRIMARY KEY CLUSTERED
(
[ShiftId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
=============================================================================
Chapter-7
TESTING
Testing
SYSTEM TESTING:
System testing is an expensive but critical process that takes as much as 50% of the
budget for program development. It can be defined as the process of executing a
program with the explicit intention of finding errors i.e. making the program fail. A
successful test is one that finds error. In the context of our system following testing
strategies are use to find out errors.
Testing Strategies
Code Testing:
The code testing examines the logic of the program, by testing every path of the program. A
path is a specific combination of conditions that is handled by the program in this system
each path of the program is tested using a number of message boxes and a number of
appropriate test data for each path.
Unit Testing:
Individual components are tested to ensure that they operate correctly. A bottom-
up unit strategy is followed for this system. Well-designed driver programs are
used in this approach.
Integration Testing:
Integration Testing is a systematic technique for constructing the program structure
while at the same time conducting tests to uncover errors associated with interfacing.
The objective is to take unit tested components and build a program structure that has
been dictated by design. Taking the big bang approach to integration is a lazy strategy
that is doomed to failure. Integration testing should be conducted incrementally.
System Testing:
System testing is actually a series of different tests whose primary purpose is to
fully exercise the computer-based system. There is some System test, which are
worthwhile for software-based system. Under System testing Recovery Testing,
Security Testing, Stress Testing and Performance Testing are conducted to validate
software once it has been incorporated into a larger system.
Testing with Dummy Data:
This test was done with wrong data, validating them and making the system fail
forcefully, and the system finally is found bug free.
Test Report :
Test case No. -1 Test case name: Verify the Login page for User
Input set Expected output Actual output Remark/ Comment/ action
taken
A valid login name: Successfully Successfully logged Pass
StevenSrikant@gmail.c
om logged in In
...
Test case No. -2 Test case name: Verify the login page for User(Phone no.)
Input set Expected output Actual output Remark/ Comment/ action
taken
A valid Ph.No. Successfully Successfully Pass
9478544525 inserted inserted
Invalid Ph.No. Fail to insert Fail to insert Pass
1452
Error.(Phone number validation)
Fail to insert Successfully inserted ValidationExpression="^([7-9]
Invalid Ph.No. {1})([0-9]{9})$"
145252
Test case name: Verify the page for
Test case No. -3 User Registration using username
Input set Expected output Actual output Remark/ Comment/ action
taken
A valid user name: Successfully Successfully logged Pass
Dibyashree sahoo logged in In
in RequiredField Validator
...
Test case name: Verify the page for UserRegistration using
Test case No. -4 Phone no.
Input set Expected output Actual output Remark/ Comment/ action
taken
A valid Ph.No. Successfully Successfully Pass
9478544525 inserted inserted
Invalid Ph.No. Fail to insert Fail to insert Pass
1452
Error.(Phone number validation)
Fail to insert Successfully inserted ValidationExpression="^([7-9]
Invalid Ph.No. {1})([0-9]{9})$"
145252
Test case name: Verify the page for
Test case No. -5 user Registration using Email
Input set Expected output Actual output Remark/ Comment/ action
taken
A valid Email: Successfully Successfully logged Pass
StevenSrikant@gmail.c logged in In
om
Invalid Email : Fail to login Fail to login Pass
Srikanta@gmail
Invalid Email : Fail to login
Srikanta@gmail Successfully logged Error. (Email validation)
ValidationExpression="\w+([-
+.']\w+)*@\w+([-.]\w+)*\.\w+
in ([-.]\w+)*"
...
Test case No. -6 Test case name: Verify the page for User Registraion using pin
Input set Expected output Actual output Remark/ Comment/ action
taken
A valid Pin.No. Successfully Successfully Pass
758002 inserted inserted
Invalid Pin.No. Fail to insert Fail to insert Pass
5246
Error.(Pin number validation)
Fail to insert Successfully inserted ValidationExpression="^([7-9]
Invalid Ph.No. {1})([0-9]{9})$"
8586
Test case name: Verify the password
Test case No. -7 for user Registration
Input set Expected output Actual output Remark/ Comment/ action
taken
A correct
password:123456 Successfully Successfully logged Pass
logged in In
...
Test case No. -8 Test case name: Verify the Captcha For User Registraion
Input set Expected output Actual output Remark/ Comment/ action
taken
A correct captcha code: Successfully Successfully Pass
758002 registered. registered.
Incorrect captcha code: Fail to register Fail to insert Pass
5246
Incorrect captcha code: Fail to register Successfully Error.(Captcha validation)
8586 registered. Download Ms Captcha
Test case No. -9 Test case name: Verify the page for Sending mail to user
Input set Expected output Actual output Remark/ Comment/ action
taken
A valid Email: Successfully Successfully sent. Pass
StevenSrikant@gmail.c Sent.
om
Invalid EMail : Fail to send Fail to send Pass
Srikanta@gmail
Invalid Email : Fail to send
Srikanta@gmail Successfully sent Error. (Email validation)
And Allow Email setting to
acces low secure app
...
Test case No. -10 Test case name: Verify the cart validation
Input set Expected output Actual output Remark/ Comment/ action
taken
Details of one food item
Pass
: Chicken pakoda,1 Successfully Successfully
added added
Details of two food item Only One item Only One item
:Chicken pakoda,1 added added Pass
Chilli chicken,1
Details of two food item
:Chicken pakoda,1 Chilli Two items added Only one item added Error.(Cart validation)
chicken,1 Add a for loop in a code file
Chapter-8
SCREENLAYOUTS
Chapter-9
IMPLEMENTATION
SYSTEM IMPLEMENTATION:
Implementation is the stage of the project when the theoretical design turned into a
working system. At this stage the main workload, the up heal and the major impact on the
existing practices shift to user department. If the implementation stage is not carefully
planned and controlled, it can cause chaos. Thus it can be considered to be the most crucial
stage in achieving a new successful system and in giving the users confidence that the users
confidence that the new system will work and be effective.
Requirements keep changing with time so the implementation of this project may
change with time hence implementation is an ongoing process, which may change in future.
Maintenance
The site is online, it will inevitably need to be updated to keep your content fresh.
Sometimes it’s a simple change, like changing a date or adding an event or you may want to
add a new section or functionality to your site involving page-wise modification.
Chapter-10
CONCLUSION