Sie sind auf Seite 1von 103

ONLINE FOOD MANAGEMENT

SRIKANTA MAHALIK
ROLL NO:14MCA/16

UNDER THE GUIDANCE OF


MRS. SANJIBANI SUDHA PATTANAYAK
Project Guide,OUAT,Bhubaneswar

Department of Computer Science And Application,


Centre For Post Graduate Studies
Orissa University of Agriculture And Technology
Bhubaneswar-751003
ONLINE FOOD MANAGEMENT

Thesis submitted in partial fulfillment of the requirement for the degree


of
MASTER IN COMPUTER APPLICATION
BY
SRIKANTA MAHALIK
ROLL NO:14MCA/16

UNDER THE GUIDANCE OF


MRS. SANJIBANI SUDHA PATTANAYAK
Project Guide,OUAT,Bhubaneswar

Department of Computer Science And Application,


Centre For Post Graduate Studies
Orissa University of Agriculture And Technology
Bhubaneswar-751003
Orissa University of Agriculture and Technology Center for Post Graduate
Studies Department of Computer Science And Application

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_______________________

External Examiner ________________________


(Name & Designation)
*Name and Designation of Advisory Committee members and External Examiner
should be mentioned.
ACKNOWLEDGEMENT

I sincerely express my deep sense of gratitude to my guide , Mrs. Sanjibani Sudha


Pattanayak, Asst. Professor, for having guided me and helped me immensely in designing
the project.

It is indeed my great pleasure to acknowledge my deep indebtedness to Mr. Abhimanyu


Dash, H.O.D,CSA dept. for having given me this wonderful opportunity to do this project
on Online food Ordering system.

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

Chapter 2. System Study

 Existing System
 Problems in Existing System
 Solution To The Problem
 Proposed System

Chapter 3. System Analysis

Preliminary Investigation

Feasibility Study

Request Approval

Chapter 4. System Specification

Hardware Specification

Software Specification

Chapter 5. Document Designing

Data Flow Diagram


Entity Relationship Diagram

Database Design

Chapter 6. Coding

Chapter 7. Testing

Chapter 8. Screen Layouts

Chapter 9. Implementation

Chapter 10. Conclusion

Chapter 11. Bibliography


Chapter-1

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

1. Admin Management Module:

This module consists manages the information of owner and accountant who act
as admin for the company. It includes the following pages:-

o New Admin Registration


o Change Password
o Item Details
o FoodType
o Food Details Entry
o Food Details
o Order Details
o Accept / Reject Order
o Send Update To User

2. User Management Module:

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.

Purpose of the System:-

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.

Advantages Of Proposed System:

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”.

System analysis is a process by which we attribute process or goals to a human


activity, determine how well those purpose are being achieved and specify the
requirements of the various tools and techniques that are to be used within the system if
the system performances are to be achieved.

SRS Document:-

The document was prepared keeping the project to be developed in view.The


document specifies the general procedure that has been followed by me, while the system
was studied and developed. The general document was provided by the organisation as a
reference guide to understand my responsibilities in developing the system, with respect
to the requirements that have been pin pointed to get the exact structure of the system as
stated by the actual client.The system as stated by my project guide the actual standards of
the specification were desired by conducting a series of interviews and questionnaires. The
collected information was organized to form the specification document and then was
modeled to suite the standards of the system as intended.
WATERFALL OR CLASSICAL LIFE CYCLE MODEL OF THE PROJECT

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:-

A key part of feasibility analysis is gathering information about the present


system.The analyst must know what information to gather,where to find it,how to
collect it,and what to make of it. The proper use of tools for gathering information is
the key to successful analysis.

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:-

Requirement analysis, Preliminary Investigation, Information gathering to


cover in 2 weeks. Since we were not aware of some tools like sql server we had kept
three weeks to understand the knot and bolts of these tools. 12 weeks for designing
and coding the system under development,1week for testing and implementation and
the rest two reserve weeks.

Feasibility Report

Feasibility is an important phase in the software development process it enables the


developers to have an assessment of the product being developed. It refers to the feasibility
study of the product in terms of outcomes of the product, operational use and technical
support required for implementing it. Feasibility study should be performed
on the basis of various criteria and parameters.

 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:

 Operating System : Windows


 Technology : .net
 Web Technologies : Html, JavaScript, CSS
 IDE : Visual Stuio 2013
 Web Server : IIS
 Database : SqlServer
Chapter-5

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.

DATA FLOW DIAGRAM :-


Data Flow Diagram is a diagrammatic representation of data
movement through a system – manual or automated – from inputs to outputs through
processing. The data flow diagrams help in the analysis of the flow of data through a system
and thus help in identifying the system requirements.

NOTATIONS:-

This symbol represents the Entity .

This symbol represents the Process .


This symbol represents the One way data flow.

This symbol represents the Two way data flow.

This symbol represents the Data store .

Rules For Constructing Data Flow Diagram:-

Squares, circles and files must bear names.


Decomposed data flow squares and circles can have same names.
Choose meaningful names for data flow.
Draw all data flows around the outside of the diagram

SAILENT FEATURES OF DFD:-


o The DFD shows flow of data, not of control loops and decision are
controlled considerations do not appear on a DFD.
o The DFD does not indicate the time factor involved in any process whether
the dataflows take place daily, weekly, monthly or yearly.
o The sequence of events is not brought out on the DFD

Context Free Diagram:-

A DFD may consist of a number of levels. The top-level diagram is called


a Context Free Diagram, which consists of one single process.
View Order
User

Serve Food
Receive Email
View Food
Add Ratings
Order Food

OFM
Receive Order
CONTEXT DIAGRAM :

View Ratings

Upload Food Details


Level-0 :
Upload DBoy Details

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.

This symbol represents the Entity.

This symbol represents the Relationship set.

This symbol represents the Attributes.


E-R Diagram :
USECASE DIAGRAM FOR ADMIN:
USECASE DIAGRAM OF USER:
DATABASE DESIGN :-
The integrated collection of data is usually referred to as database. The records for different
entities are stored in database. The database contains information about particular system/
about the enterprise. The data storage, retrieval and maintenance are carried out by the
database management.
The details of each table including the structure, data type and different constraints (i.e.
Primary key and foreign key) are as follows:
Chapter-6

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.

World-Class Tool Support:


The ASP.NET framework is complemented by a rich toolbox and designer in the
Visual Studio integrated development environment. WYSIWYG editing, drag-and-drop
server controls, and automatic deployment are just a few of the features this powerful
tool provides.

Power and Flexibility:


Because ASP.NET is based on the common language runtime, the power and
flexibility of that entire platform is available to web application developers. The .NET
framework class library, Messaging and Data Access solutions are all seamlessly accessible
from the Web. ASP.NET is also language-independent, so you can choose the language that
best applies to your application or partition your application across many languages.
Further common language runtime interoperability guarantees that your existing
investment in COM-based development is preserved when migrating to ASP.NET.

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.

Scalability and Availability:


ASP.NET has been designed with scalability in mind, with features specifically
tailored to improve performance in clustered and multiprocessor environments. Further,
processes are closely monitored and managed by the ASP.NET runtime, so that if one
misbehaves(leaks, deadlocks), a new process can be created in its place, which helps to keep
your application constantly available to handle requests.

Customizability and Extensibility:


ASP.NET delivers a well-factored architecture that allows developers to “plug-in”
their code at the appropriate level. In fact, it is possible to extend or replace any
subcomponent of the ASP.NET runtime with your own custom-written component.
Implementing custom authentication or state services has been easier.

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.

ADO.NET is not an upgrade to complete redesign. At the core of ADO.NET is a set


of libraries that are designed to communicate with a variety of back-end data stores. The
ADO.NET libraries are part of the System. Data namespace and encompass a variety of
additional libraries that enable data source connection, query submission, and processing
results. One of the goals of the redesign of ADO.NET was to provide a hierarchical,
disconnected data cache that works offline and online. The design of ADO.NET is based on
XML and enables ADO.NET to bridge the gap between the traditional database access and
XML development. Developers are able to work with both XML data and database data
using a common set of data interfaces as shown in figure below.
BACKEND TOOL:
SQL SERVER 2013:
Microsoft SQL Server 2013 is a full-featured relational database management system
(RDBMS) that offers a variety of administrative tools to ease the burdens of database
development, maintenance and administration. . In this article, we'll cover five of the more
frequently used tools.SQL Server management studio , SQL Server Configuration Manager,
SQL Server Profiler ,Database Engine Tuning Advisor,Data Transformation Services and
Books Online. Let’s take look at some of its special features :

Client components of sql server 2013:


➢ Connectivity Components:
Installs components for communication between clients and servers, and
network libraries for DB-Library, ODBC, and OLE DB.

➢ 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.

SQL Server Configuration Manager:


SQL Server Configuration Manager provides basic configuration management for SQL
Server services, server protocols, client protocols, and client aliases.

SQL Server Profiler:


SQL Server Profiler provides a graphical user interface for monitoring an instance of the
Database Engine or an instance of Analysis Services.

Database Engine Tuning Advisor:

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;

public partial class AdminMaster : System.Web.UI.MasterPage


{
protected void Page_Load(object sender, EventArgs e)
{

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();
}

private void LoadGrid()


{
DataSet ds = OCBL.fetchOrder();
gvAdminOrder.DataSource = ds.Tables[0];
gvAdminOrder.DataBind();
}
protected void btnback_Click(object sender, EventArgs e)
{
}
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs
e)
{
}
protected void gvFoodDetailEntry_SelectedIndexChanging1(object sender,
GridViewSelectEventArgs e)
{
}
protected void gvFoodDetailEntry_RowDeleting1(object sender, GridViewDeleteEventArgs
e)
{

}
}

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;

public partial class DeliveryBoyDetailEntry : System.Web.UI.Page


{
DeliveryBoyDetailsBL DBDBL = new DeliveryBoyDetailsBL();

protected void Page_Load(object sender, EventArgs e)


{
if (Session["adminid"] == null)
{

Response.Redirect("../DefaultAdmin.aspx");

}
else
{

if (!IsPostBack)
{
LoadDataToUpdate();
}
}

protected void btnsubmit_Click(object sender, EventArgs e)


{
if (btnsubmit.Text == "Submit")
{
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>");
}
}
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;

public partial class FoodDetailsEntry : System.Web.UI.Page


{
FoodDetailsEntryBL FDEBL = new FoodDetailsEntryBL();
ShiftEntryBL SEBL = new ShiftEntryBL();
FoodTypeBL FTBL = new FoodTypeBL();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["adminid"] == null)
{

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"));
}

private void LoadType()


{
DataSet ds = FTBL.GetFoodType();
ddlType.DataSource = ds.Tables[0];
ddlType.DataTextField = "TypeName";
ddlType.DataValueField = "TypeId";
ddlType.DataBind();
ddlType.Items.Insert(0, new ListItem("select", "-1"));
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (btnsubmit.Text == "Submit")
{
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>");
}
}

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;

public partial class FoodTypeEntry : System.Web.UI.Page


{
FoodTypeBL FTBL = new FoodTypeBL();
AdminMaster adms = new AdminMaster();

protected void Page_Load(object sender, EventArgs e)


{
if (Session["adminid"] == null)
{
Response.Redirect("../DefaultAdmin.aspx");
}
else
{

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;

public partial class Admin_OrderPrintOut : System.Web.UI.Page


{
OrderClassBL OCBL = new OrderClassBL();
DeliveryBoyDetailsBL DBBL=new DeliveryBoyDetailsBL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadForm();
LoadDeviveryBoyDetails();
txtnumbder.Visible = false;
}
}
private void LoadDeviveryBoyDetails()
{
DataSet ds = DBBL.GetDeliveryBoyDetails();
ddlDeviveryBoy.DataSource = ds.Tables[0];
ddlDeviveryBoy.DataTextField = "Name";
ddlDeviveryBoy.DataValueField = "DeliveryBoyId";
ddlDeviveryBoy.DataBind();
ddlDeviveryBoy.Items.Insert(0, new ListItem("Yet to assign deliveryboy", "-1"));
}

private void LoadForm()


{
if (Request.QueryString["fid"] != null)
{
OCBL.orderid = Request.QueryString["fid"].ToString();
DataSet ds = OCBL.FetchByIdOrder();

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();
}
}

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)


{
OCBL.orderid = Request.QueryString["fid"].ToString();
OCBL.orderstatus = DropDownList1.Text;
OCBL.deliveryboyname = ddlDeviveryBoy.SelectedItem.ToString();
OCBL.deliveryboynumber = txtnumbder.Text;
string msg = OCBL.UpdateOrder();
Response.Write("<script>alert('" + msg + "')</script>");
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
DBBL.DeliveryBoyDetailsId = Convert.ToInt16(ddlDeviveryBoy.SelectedValue);
DataSet ds = DBBL.FetchByIdDeliveryBoyDetails();
txtnumbder.Text = ds.Tables[0].Rows[0].ItemArray[6].ToString();
txtnumbder.ReadOnly = true;
txtnumbder.Visible = true;

protected void Button2_Click(object sender, EventArgs e)


{
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 " + Labelusername.Text + " Thanks for ordering food online
on Le-bistro";
msg1.Body = " Hi " + Labelusername.Text + " Your order has been " +
DropDownList1.Text + " With us.Our Deliveryboy : " +
ddlDeviveryBoy.SelectedItem.ToString()+
" , Contact no : " + txtnumbder.Text + " will deliver Your Order ASAP. Your
Order ID : " + lblproductname.Text + ", Total Price : " + lbltotalprice.Text ;

string toaddress = lbladdress.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);
}
}
protected void Button3_Click(object sender, EventArgs e)
{

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 " + Labelusername.Text + " Your order from Le-Bistro
has been delivered ";
msg1.Body = " Hi " + Labelusername.Text + " Your order no : " +
lblproductname.Text + " has been delivered.If not received then contact with us." ;

string toaddress = lbladdress.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);
}
}
}

===========================================================================
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;

public partial class Admin_OrderRequest : System.Web.UI.Page


{
OrderClassBL OCBL = new OrderClassBL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
LoadGrid();
}
}
private void LoadGrid()
{
DataSet ds = OCBL.fetchOrder();
gvAdminOrder.DataSource = ds.Tables[0];
gvAdminOrder.DataBind();
}
protected void btnback_Click(object sender, EventArgs e)
{
}
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs
e)
{
}

protected void gvAdminOrder_SelectedIndexChanging1(object sender,


GridViewSelectEventArgs e)
{
Response.Redirect("OrderDetails.aspx?fid=" +
gvAdminOrder.Rows[e.NewSelectedIndex].Cells[1].Text);
}

protected void gvFoodDetailEntry_RowDeleting1(object sender, GridViewDeleteEventArgs


e)
{
}
}

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)
{

protected void btnSearch_Click(object sender, EventArgs e)


{
string connectionStr = ConfigurationManager
.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(connectionStr))
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "spSearchEmployees";
cmd.CommandType = CommandType.StoredProcedure;

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();
}
}
}

View 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;
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();
}

private void LoadFoodDetails()


{
DataSet ds = FDEBL.GetFoodDetailEntry();
gvFoodDetailEntry.DataSource = ds.Tables[0];
gvFoodDetailEntry.DataBind();
}
protected void gvFoodDetailEntry_SelectedIndexChanging1(object sender,
GridViewSelectEventArgs e)
{
Response.Redirect("FoodDetailsEntry.aspx?id=" +
gvFoodDetailEntry.Rows[e.NewSelectedIndex].Cells[1].Text);
}
protected void gvFoodDetailEntry_RowDeleting1(object sender, GridViewDeleteEventArgs
e)
{
FDEBL.FoodDetailsId =
int.Parse(gvFoodDetailEntry.Rows[e.RowIndex].Cells[1].Text);
string msg = FDEBL.DeleteFoodDetailEntry();
Response.Write("<script>alert('" + msg + "')</script>");
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 Page_Load(object sender, EventArgs e)


{

}
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;

public partial class User_UserRegistration : System.Web.UI.Page


{
UserBL ubl = new UserBL();
protected void Page_Load(object sender, EventArgs e)
{

}
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>");
}
}

public void Cancel()


{
txtusername.Text = "";
txtemail.Text = "";
txtpassword.Text = "";
txtpasswordcompare.Text = "";
TextBox1.Text = "";
txtph.Text = "";
txtadd.Text = "";
txtcity.Text = "";
txtstate.Text = "";
txtpin.Text = "";
}
}

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;

public partial class User_ForgotPassword : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

protected void btnlogin_Click(object sender, EventArgs e)


{
String password;
String mycon = "Data Source=DESKTOP-CUB1MJD; Initial Catalog=OFM; Integrated
Security=True";
String myquery = "Select * from UserRegistrationMaster where emailid='" +
txtemail.Text + "'";
SqlConnection con = new SqlConnection(mycon);
SqlCommand cmd = new SqlCommand();
cmd.CommandText = myquery;
cmd.Connection = con;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
//Label3.Text = "Data Found";

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;

public partial class User_MenuView : System.Web.UI.Page


{
FoodDetailsEntryBL FDEBL = new FoodDetailsEntryBL();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["username"] != null)
{
if (!IsPostBack)
{
LoadGrid();

}
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();
}

protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)


{
if (e.CommandName == "addcart")
{
Response.Redirect("ViewMyCart.aspx?fid=" + e.CommandArgument.ToString());
}
}

protected void submit_Click(object sender, EventArgs e)


{

DataSet ds = FDEBL.GetFoodDetailEntry();
DataList1.DataSource = ds.Tables[0];
DataList1.DataBind();
}

protected void btnSearch_Click(object sender, EventArgs e)


{
string connectionStr = ConfigurationManager
.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(connectionStr))
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = "SearchProduct";
cmd.CommandType = CommandType.StoredProcedure;

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();

protected void Page_Load(object sender, EventArgs e)


{
if (Session["Cart"] != null)
{
if (!Page.IsPostBack)
BindGrid();

divimp.Visible = false;

}
}

private void BindGrid()


{
if (Session["Cart"] != null)
{
btncheck.Visible = true;
DataTable dt = (DataTable)Session["Cart"];
gvCart.DataSource = dt;
gvCart.DataBind();
if (dt.Rows.Count <= 0)
{
//butt.Visible = false;
//Totalprice();
}
}
else
{
divimp.Visible = true;

}
}

decimal totaldiscount = 0M;


Decimal number1 = 0m;
Decimal number2 = 0m;
int totalItems = 0;

protected void gvCart_RowDataBound(object sender, GridViewRowEventArgs e)


{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblqty = (Label)e.Row.FindControl("lblqty");
Label lbltotalprice = (Label)e.Row.FindControl("lbltotalprice");

int product = int.Parse(lblqty.Text);


decimal Discountprice = Decimal.Parse(lbltotalprice.Text);

totaldiscount += Discountprice;

totalItems += product;
number1 = totaldiscount *(0.03m);
number2 = totaldiscount + (number1*2);

if (e.Row.RowType == DataControlRowType.Footer)
{

Label lbltotalproduct = (Label)e.Row.FindControl("lbltotalproduct");


Label lblgrandtotal = (Label)e.Row.FindControl("lblgrandtotal");
Label lblsgst = (Label)e.Row.FindControl("lblsgst");
Label lblcgst = (Label)e.Row.FindControl("lblcgst");
Label lblgtotal = (Label)e.Row.FindControl("lblgtotal");

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");
}
}

protected void btnorder_Click(object sender, EventArgs e)


{
DataTable dt = (DataTable)Session["Cart"];
String productName = null;
String price = null;
int totalprice = 0;
String quantity = null;
//String productid = null;
for (int i = 0; i < dt.Rows.Count; i++)
{
//productid += dt.Rows[i]["fid"].ToString() + ",";
productName += dt.Rows[i]["Food_name"].ToString() + "--" + dt.Rows[i]
["Qty"].ToString() + ",";
quantity += Convert.ToInt32(dt.Rows[i]["Qty"]) + ",";
price += dt.Rows[i]["Price"].ToString() + "--";
totalprice += Convert.ToInt32(dt.Rows[i]["TotalPrice"]);

}
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";

string msg = OCBL.InsertOrder();


Response.Write("<script>alert('" + msg + "')</script>");
Response.Redirect("MyOrders.aspx");
Session.Remove("Cart");
}

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");
}
}

private void LoadData()


{
//lbldname.Visible = true;
ODBL.userid = Session["uid"].ToString();
DataSet ds = ODBL.FetchByUserIdOrder();

gvOrderDetails.DataSource = ds.Tables[0];
gvOrderDetails.DataBind();

//DataSet dss = ODBL.FetchByIdOrder();

//lbldname.Text = "Your DeliveryBoy name is... " +


dss.Tables[0].Rows[0].ItemArray[16].ToString();
}
}

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;

public partial class User_ViewProduct : System.Web.UI.Page


{
FoodDetailsEntryBL FDEBL = new FoodDetailsEntryBL();
static Boolean availabledesignid = false;

public static string show = string.Empty;


protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
loaddata();
}

public void loaddata()


{
if (Request.QueryString["fid"] != null)
{
FDEBL.FoodDetailsId = int.Parse(Request.QueryString["fid"].ToString());
DataSet ds = FDEBL.FetchByIdFoodDetailEntry();
lblFoodName.Text = ds.Tables[0].Rows[0].ItemArray[5].ToString();

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;
}
}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)


{
if (!string.IsNullOrEmpty(ddlqnt.SelectedItem.Text))
{
DataTable dt = new DataTable();
if (Session["Cart"] != null)
{
dt = (DataTable)Session["Cart"];
// dt = (DataTable)Request.Cookies["CC"];
}
else
{
DataColumn num = new DataColumn("num");
DataColumn fid = new DataColumn("fid");
DataColumn Food_img = new DataColumn("Food_img");
DataColumn Food_name = new DataColumn("Food_name");

DataColumn Price = new DataColumn("Price");


DataColumn Qty = new DataColumn("Qty");
DataColumn TotalPrice = new DataColumn("TotalPrice");

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();

int coun = dt.Rows.Count + 1;


dr["num"] = coun.ToString();

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();

int coun = dt.Rows.Count + 1;


dr["num"] = coun.ToString();
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";
availabledesignid = false;
}
}
}
}
}
//Response.Redirect("~/ViewProduct.aspx?pid=" + Request.QueryString["pid"]);

private void checkdesignid()


{
DataTable dt1;
int designid;
int querydesignid = Convert.ToInt16(Request.QueryString["fid"]);
dt1 = (DataTable)Session["Cart"];
foreach (DataRow row in dt1.Rows)
{
designid = Convert.ToInt16(row["fid"].ToString());
if (designid == querydesignid)
{
availabledesignid = true;
}
}
}
private void updatequantity()
{
DataTable dt1;
int designid;
int querydesignid = Convert.ToInt16(Request.QueryString["fid"]);
dt1 = (DataTable)Session["Cart"];
foreach (DataRow row in dt1.Rows)
{
designid = Convert.ToInt16(row["fid"].ToString());
if (designid == querydesignid)
{
int previousq = Convert.ToInt16(row["Qty"].ToString());
int newq = Convert.ToInt16(ddlqnt.SelectedItem.Text);
int newquantity = previousq + newq;
row["Qty"] = newquantity;
Int64 price = Convert.ToInt64(row["Price"].ToString());
Int64 totalprice = price * newquantity;
row["TotalPrice"] = totalprice;
break;
}
}
Session["Cart"] = dt1;
}

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);

int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,


"usp_Insert_AdminLogin", p);
if (x > 0)
{
return "Admin details saved.... go back to login page";
}
else
{
return "failed";
}
}
}

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);

int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,


"usp_Delete_DeliveryBoy", p);
if (x > 0)
return "Delete Suscessully";
else
return "sorry";
}
}
public DataSet FetchByIdDeliveryBoyDetails()
{
SqlParameter[] p = new SqlParameter[1];
{
p[0] = new SqlParameter("@DeliveryBoyId", this.DeliveryBoyDetailsId);
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_By_Id_DeliveryDetailsMaster", p);
return ds;
}
}

public DataSet GetDeliveryBoyDetails()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_DeliveryBoyDetails");
return ds;
}
public string UpdateDeliveryBoyDetails()
{

SqlParameter[] p = new SqlParameter[15];


p[0] = new SqlParameter("@DeliveryBoyId", this.DeliveryBoyDetailsId);
p[1] = new SqlParameter("@Name", this.Name);
p[2] = new SqlParameter("@Gender", this.Gender);
p[3] = new SqlParameter("@Email", this.Email);
p[4] = new SqlParameter("@Age", this.Age);
p[5] = new SqlParameter("@Image", this.Image);
p[6] = new SqlParameter("@ContactNo", this.ContactNo);
p[7] = new SqlParameter("@Country", this.Country);
p[8] = new SqlParameter("@State", this.State);
p[9] = new SqlParameter("@City", this.City);
p[10] = new SqlParameter("@Pin", this.Pin);
p[11] = new SqlParameter("@Adharno", this.Adharno);
p[12] = new SqlParameter("@BikeNo", this.BikeNo);
p[13] = new SqlParameter("@LicenceNo", this.LienceNo);
p[14] = new SqlParameter("@Status", this.Status);
int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,
"usp_update_DeliveryBoyDetails", p);
if (x > 0)
return "Update Suscessully";
else
return "sorry";
}
}
FoodDetailsEntryBL :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
/// <summary>
/// Summary description for FoodDetailsEntry
/// </summary>
public class FoodDetailsEntryBL:ConnectionClass
{
public int FoodDetailsId { get; set; }
public string Shift { get; set; }
public string Shiftid { get; set; }
public string Type { get; set; }
public string Typeid { get; set; }
public string RecipeName { get; set; }
public string Image { get; set; }
public string UnitPrice { get; set; }
public string FoodDetails { get; set; }
public string Category { get; set; }
public string InsetFoodDetailEntry()
{
SqlParameter[] p=new SqlParameter[9];
p[0]= new SqlParameter("@Shift",this.Shift);
p[1] = new SqlParameter("@ShiftId ", this.Shiftid);
p[2] = new SqlParameter("@Type", this.Type);
p[3] = new SqlParameter("@TypeId", this.Typeid);
p[4] = new SqlParameter("@RecipeName", this.RecipeName);
p[5]= new SqlParameter("@Image",this.Image);
p[6]= new SqlParameter("@UnitPrice",this.UnitPrice);
p[7]= new SqlParameter("@FoodDetails",this.FoodDetails);
p[8] = new SqlParameter("@Category", this.Category);
int x=
SqlHelperDL.ExecuteNonQuery(con,CommandType.StoredProcedure,"usp_Insert_FoodDetailEntryMa
ster",p);
if (x > 0)
{
return "saved";
}
else
{
return "failed";
}

}
public DataSet GetFoodDetailEntry()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMaster");
return ds;
}

public DataSet GetFoodDetailEntry1()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMaster1");
return ds;
}
public DataSet GetFoodDetailEntry2()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMaster2");
return ds;
}

public DataSet GetFoodDetailEntryIndian()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterIndian");
return ds;
}

public DataSet GetFoodDetailEntryChinese()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterChinese");
return ds;
}
public DataSet GetFoodDetailEntryStarter()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterStarter");
return ds;
}
public DataSet GetFoodDetailEntryStarterNonveg()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterStarterNonveg");
return ds;
}
public DataSet GetFoodDetailEntryStarterVeg()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterStarterVeg");
return ds;
}
public DataSet GetFoodDetailEntryMaincourse()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterMaincourse");
return ds;
}
public DataSet GetFoodDetailEntryMaincourseVeg()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterMaincourseVeg");
return ds;
}
public DataSet GetFoodDetailEntryMaincourseNonveg()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterMaincourseNonveg");
return ds;
}
public DataSet GetFoodDetailEntryDesserts()
{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterDesserts");
return ds;
}

public DataSet GetFoodDetailEntryBread()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterBread");
return ds;
}

public DataSet GetFoodDetailEntryPrice0_100()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryPrice0_100");
return ds;
}

public DataSet GetFoodDetailEntryPrice100_150()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryPrice100_150");
return ds;
}

public DataSet GetFoodDetailEntryPrice150_200()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryPrice150_200");
return ds;
}

public DataSet GetFoodDetailEntryPrice200_300()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryPrice200_300");
return ds;
}

public DataSet GetFoodDetailEntryGalary()


{
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_FoodDetailEntryMasterGalary");
return ds;
}

public string DeleteFoodDetailEntry()


{
SqlParameter[] p = new SqlParameter[1];
{
p[0] = new SqlParameter("@FoodDetailsId", this.FoodDetailsId);

int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,


"usp_Delete_FoodDetailEntry", p);
if (x > 0)
return "Delete Suscessully";
else
return "sorry";
}
}
public DataSet FetchByIdFoodDetailEntry()
{
SqlParameter[] p = new SqlParameter[1];
{
p[0] = new SqlParameter("@FoodTypeEntryId", this.FoodDetailsId);
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_Fetch_By_Id_FoodDetailsEntryMaster", p);
return ds;
}
}
public string UpdateFoodDetailEntry()
{

SqlParameter[] p = new SqlParameter[10];


p[0] = new SqlParameter("@FoodDetailsId", this.FoodDetailsId);
p[1] = new SqlParameter("@Shift", this.Shift);
p[2] = new SqlParameter("@ShiftId ", this.Shiftid);
p[3] = new SqlParameter("@Type", this.Type);
p[4] = new SqlParameter("@TypeId", this.Typeid);
p[5] = new SqlParameter("@RecipeName", this.RecipeName);
p[6] = new SqlParameter("@Image", this.Image);
p[7] = new SqlParameter("@UnitPrice", this.UnitPrice);
p[8] = new SqlParameter("@FoodDetails", this.FoodDetails);
p[9] = new SqlParameter("@Category", this.Category);
int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,
"usp_update_FoodDetails", p);
if (x > 0)
return "Update Suscessully";
else
return "sorry";
}
}

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; }

public string InsertOrder()


{
SqlParameter[] p = new SqlParameter[15];

p[0] = new SqlParameter("@productid", this.productid);


p[1] = new SqlParameter("@productname", this.productname);
p[2] = new SqlParameter("@quantity", this.quantity);
p[3] = new SqlParameter("@price", this.price);
p[4] = new SqlParameter("@totalprice", this.totalprice);
p[5] = new SqlParameter("@ordertime", this.ordertime);
p[6] = new SqlParameter("@orderstatus", this.orderstatus);
p[7] = new SqlParameter("@userid", this.userid);
p[8] = new SqlParameter("@paymentmode", this.paymentmode);
p[9] = new SqlParameter("@guestname", this.guestname);
p[10] = new SqlParameter("@address", this.address);
p[11] = new SqlParameter("@state", this.state);
p[12] = new SqlParameter("@city", this.city);
p[13] = new SqlParameter("@pin", this.pin);
p[14] = new SqlParameter("@phone", this.phone);

int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,


"usp_Insert_OrderMaster", p);
if (x > 0)
return "Your Order Is successfully ";
else
return "failed";
}

public DataSet fetchOrder()


{

DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,


"usp_new_Fetch_OrderMaster");
return ds;
}

public DataSet FetchByIdOrder()


{
SqlParameter[] p = new SqlParameter[1];
{
p[0] = new SqlParameter("@orderid", this.orderid);
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_FetchById_OrderMaster", p);
return ds;
}
}
public string UpdateOrder()
{

SqlParameter[] p = new SqlParameter[4];


p[0] = new SqlParameter("@orderid", this.orderid);
p[1] = new SqlParameter("@orderstatus", this.orderstatus);
p[2] = new SqlParameter("@deliveryboyname", this.deliveryboyname);
p[3] = new SqlParameter("@deliveryboynumber", this.deliveryboynumber);
int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,
"usp_Update_OrderMaster", p);
if (x > 0)
return "Update Suscessully";
else
return "sorry";
}
public DataSet FetchByUserIdOrder()
{
SqlParameter[] p = new SqlParameter[1];
{
p[0] = new SqlParameter("@userid", this.userid);
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_FetchByUserId_OrderMaster", p);
return ds;
}
}
}

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;
}

public static DataSet ExecuteDataSet(string con, CommandType ct, string spname)


{
SqlConnection cn = new SqlConnection(con);
cn.Open();
SqlCommand cm = new SqlCommand(spname, cn);
cm.CommandType = ct;
SqlDataAdapter da = new SqlDataAdapter(cm.CommandText, cn);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
public static object ExecuteScalar(string con, CommandType ct, string spname,
SqlParameter[] p)
{
SqlConnection cn = new SqlConnection(con);
cn.Open();
SqlCommand cm = new SqlCommand();
cm.CommandText = spname;
cm.Connection = cn;
cm.CommandType = CommandType.StoredProcedure;
cm.Parameters.AddRange(p);
object ob = cm.ExecuteScalar();//predefined
return ob;
}

public static DataSet ExecuteDataSet(string con, CommandType ct, string spname,


SqlParameter[] p)
{
SqlConnection cn = new SqlConnection(con);

SqlDataAdapter da = new SqlDataAdapter(spname, cn);


da.SelectCommand.CommandType = ct;
da.SelectCommand.Parameters.AddRange(p);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
}

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; }

public string password { get; set; }


public bool CheckLogin()
{
SqlParameter[] p = new SqlParameter[2];
p[0] = new SqlParameter("@emailid", this.emailid);
p[1] = new SqlParameter("@password", this.password);

int x = int.Parse(SqlHelperDL.ExecuteScalar(con, CommandType.StoredProcedure,


"usp_Check_UserRegistrationMaster", p).ToString());
if (x > 0)
return true;
else
return false;
}
public string InsertUser()
{
SqlParameter[] p = new SqlParameter[8];

p[0] = new SqlParameter("@username", this.username);


p[1] = new SqlParameter("@emailid", this.emailid);
p[2] = new SqlParameter("@password", this.password);
p[3] = new SqlParameter("@phone", this.phone);
p[4] = new SqlParameter("@address", this.address);
p[5] = new SqlParameter("@city", this.city);
p[6] = new SqlParameter("@state", this.state);
p[7] = new SqlParameter("@pin", this.pin);

int x = SqlHelperDL.ExecuteNonQuery(con, CommandType.StoredProcedure,


"usp_insert_UserRegistrationMaster", p);
if (x > 0)
return "Register Successfully";
else
return "failed";
}
public DataSet fetchByEmail()
{
SqlParameter[] p = new SqlParameter[2];
p[0] = new SqlParameter("@emailid", this.emailid);
p[1] = new SqlParameter("@password", this.password);
DataSet ds = SqlHelperDL.ExecuteDataSet(con, CommandType.StoredProcedure,
"usp_FetchEmail_UserRegistrationMaster", p);
return ds;
}
}
======================================================================

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

Invalid login name : Fail to login Fail to login Pass


Srikanta@gmail

Invalid login name : Fail to login


Srikanta@gmail Successfully logged in Error. (Email validation)
ValidationExpression="\w+([-
+.']\w+)*@\w+([-.]\w+)*\.\w+
([-.]\w+)*"

...
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

Invalid user name : Fail to login Fail to login Pass


Blank
Invalid user name : Fail to login
Blank Successfully logged Error. (validation)

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

Wrong password : Fail to login Fail to login Pass


123wsv
Wrong password : Fail to login
123wsv Successfully logged Error. (password validation)
in RequiredField Validator

...
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.

Implementation involves careful planning, investigation of current system and


constraints on implementation, design of methods to achieve the changeover, training of
staff in the changeover procedures and evaluation of changeover methods. The first task is
the implementation planning i.e. deciding the methods and time scale to be adopted.

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

Das könnte Ihnen auch gefallen