Online Unused Food

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

Online Unused Food Donation

Introduction:
This unused food donation project aims to donate food which is
not used or remaining. The food can be donated for further
utilization by a needy person. This food donation system helps the
user to donate unused or and remaining food to NGO. In this food
donation system, there are three entities namely, Admin, NGO
and Member. Admin will login and manage members by deleting
and blocking the users providing improper or waste food. Admin
also has authority to approve the appointment requested by
NGO. Admin has monthly report of food which has been donated.
NGO can register and login using credentials. They can raise a
request of appointment which is furthermore approved and
scheduled by admin. NGO manages the stock which helps to
maintain a record of the available food. In case of security NGO
can also change their password. Members can register and login
using credentials. They can donate food by providing food details
and raising request, further it will be approved by an admin, they
will schedule the donating date. Members can also check their
previous data of food transactions.
Purpose:

When there are special occasions, the unused food usually gets
wasted because where the food to be supplied people will not be
aware. These days NGO’S are doing a great work by supplying to the
needy, provided they get the information regarding the food, which
is getting wasted.

In our propose system we are registered with Food donors and


NGO’s in a same application. Registered food donors will add the
information about an unused food in this application. At the same
time the NGO’s will get the information about unused food.The
Ngo’s will distribute the unused food to the needy at the right time.
Existing system

When there are special occasions, the unused food usually gets wasted. This is due to
the lack of awareness about where the unused food has to be supplied. In this aspect, theNon-
Governmental Organizations (NGOs) are doing a great work by supplying food to the needy,
provided they get the information regarding the unused food. Due to lack of communication
between the people and NGOs, the needy are not getting food at right time. Sometimes
although NGOsdo get the food at right time but they are unable reach the needy people as
they are unaware of where the food has to be delivered.

2.Objectives

 Donors request will receive easily.


 Needy person will get the food in time.
 Donor selected NGO’s will get the information through Email .
 User friendly

3. FEASIBILITY STUDY

Feasibility Study is the test of the system proposal according to its workability,
impact on the current system, ability to meet the needs of the current users and
effective use of the resources.
Its main objective is not to solve the problem, but to acquire its scope. It
focuses on following:

a) Meet user requirements


b) Best utilization of available resources
c) Develop a cost effective system

Develop a technically feasible system


There are three aspects in the feasibility study:
a) Technical Feasibility
b) Economical Feasibility
c) Operational Feasibility

Technical Feasibility:
Issues to be studied are, whether the work for the project will be done with
current equipment, existing S/W technology and available personnel? If the
new technology is required, then what is the likelihood that it can be
developed?
This LGI software is technically feasible. The primary technical requirement
includes the availability of Windows 2000 or higher version of operating
systems installed in the network. SQL Server is also required which was
already installed. To develop programs VB.NET 8.0 was required which was
also available. Reliability, access power and data security was also available.
Thus, through all the ends technical feasibility was met.
.

Economical Feasibility:

Issues to be studied are, whether the new system is cost effective or not? The
benefits in the form of reduced cost?
This LGI software is economically feasible. As the hardware was installed
from quite beginning, the cost on project of hardware is low. Similarly, the
software loaded for this project was used for many other applications. The
software cost was under budget. As student trainees were developing the
application, there were no major personnel costs associated. Moreover, the
technical requirements were already available so there was no further
expenditure for buying software packages.

Operational Feasibility:
Issues to be studied are, is there sufficient support for management and
users? Is the current method acceptable to users? Will the proposed system
cause any harm?
This LGI software is operationally feasible. This application provides the
necessary information to the user such as how to enter the information regarding
different operations performed on the database. The application was planned in
such a way that no prior knowledge was required to go through the various
operations. The user just needed to have the basic knowledge of computers.

4.TECHNICAL REQUIREMENTS
Hardware Requirements:
Processor : Core2duo
RAM : 512MB – 1GB
Hard Disk Space: 20GB

Software Requirements:
OS and Language: Win 7

Reason of Use :
Simple and reliable
IDE: Visual Studio 2010

Database: SQL SERVER

Operating system reason of use


An operating system has three main functions:
(1) Manage the computer's resources, such as the central processing unit,
memory, disk drives, and printers,
(2) Establish a user interface, and
(3) Execute and provide services for applications software.
Programming Language
Reason of Use
C# could theoretically be compiled to machine code, but in real life, it's
always used in combination with the .NET framework. Therefore, applications
written in C#, requires the .NET framework to be installed on the computer
running the application. While the .NET framework makes it possible to use a
wide range of languages, C# is sometimes referred to as THE .NET language,
perhaps because it was designed together with the framework.

C# is an Object Oriented language and does not offer global variables or


functions. Everything is wrapped in classes, even simple types like int and
string, which inherits from the System. Object class.

IDE
Reason of Use
Microsoft Visual Studio is an integrated development environment (IDE)
from Microsoft. It is used to develop computer programs for Microsoft Windows, as
well as web sites, web apps, web services and mobile apps. Visual Studio uses
Microsoft software development platforms such as Windows API, Windows
Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It
can produce both native code and managed code.
Visual Studio includes a code editor supporting IntelliSense (the code
completion component) as well as code refactoring. The integrated debugger works
both as a source-level debugger and a machine-level debugger. Other built-in
tools include a code profiler, forms designer for building GUI applications, web
designer, class designer, and database schema designer. It accepts plug-ins that
enhance the functionality at almost every level—including adding support
for source control systems (like Subversion) and adding new toolsets like editors
and visual designers for domain-specific languages or toolsets for other aspects of
the software development lifecycle (like the Team Foundation Server client: Team
Explorer).

Data Base
Reason of use
Database reason of use
Microsoft SQL Server is a relational database management system developed
by Microsoft. As a database server, it is a software product with the primary function of
storing and retrieving data as requested by other software applications—which may
run either on the same computer or on another computer across a network
(including the Internet).
Advantages of Sql Serve
1. It will help to avoid data duplication and reduced data redundancy.
2. Greater data integrity and independence from applications programs.
3. You can control the security like you can setup the permission on different
levels where only specified users can add, update or delete the data.
4. The cost of data entry, storage, and retrieval is drastically reduced.
5. Data can be validated based on the business rules.
6. If the data in database is growing faster than modification of data easy.
7. Facilitated development of new applications program.
8. Logging and tracking of user actions can be easily done using database.
9. Reduced updating errors and increased consistency
10.Data format of data can be easily changed.

11.Data can be access easily using query language and multiple peoples can edit
the data simultaneously.
12.Due to backup and recovery options database can survive in crashes without
corrupting the data.

Web Server reason of use


A web server’s main purpose is to store web site files and broadcast them
over the internet for you site visitor’s to see. In essence, a web server is
simply a powerful computer that stores and transmits data via the internet.
When someone visits a web page on your site their browser communicates
with your web server, sending and receiving information that ultimately
dictates what appears on the visitor’s computer screen. Thus, the main
purpose

5.SYSTEM ANALYSIS:
System analysis is a very important stage in software development. The
analysis needs to be complete and all the requirements for the user must be
clearly understood. To do this, the concept of “Successive Refinement” is
applied, where by the analyst can successively concentrate on the entire system
and then on the details of each component. This done in two phase that are
given as follows.

a) Preliminary Investigation:
A request to receive assistance from information system can be made for many
reasons, but in case a manager, employee or system specialist initiates the
request. When the request is made, the first system activity preliminary
investigation begins.
a) Request Clarification
b) Feasibility Study
c) Request Approval
Preliminary investigation is an overall scene of the system with context but no
detail. This helps the analyst to decide whether to go in for new system or
whether the existing system can be modified to accommodate the changes. In
this phase no solutions are found or suggested.
With respect to the current system the preliminary investigation was done to
investigate the reasons for the requirement of the new system. Some of them
are specified below.

b) Detailed Analysis:
Once the preliminary investigation is completed and the approval from both the
parties has been obtained, the detailed analysis of the system is carried out. The
existing system is studied in maximum possible detail. The potential of the
current system is gauged with respect to its performance. The users need to be
ready with all the potential problems with current system and also with the
expectations from the new system.
Analysis is done in a structured manner and all the information with respect to
the system is included in the study. Structured analysis can describe as the
application of certain protocols and using certain tools to generate a system
specification report that is easily understood by the intended users of the
system.

Literature Survey
The paper “Food donation portal” [4], which was published in 2015 summaries in brief the
evolution of food donation activities and offers a medium that connects donors with NGOs.
An idea for a food donation network is presented and impact on society through this medium
is mentioned. The disadvantage in this paper is that there is no GPS service available. That
means the system does not allow the organization or charity to find the nearest donor
available in the area and they have to manually find the donors.

The paper ‘Helping Hands’ [5], published in 2016, a new internet-based application that
provides a platform for donating old stuff and leftover food to all needy people/organizations.
It provides information about the motivation to come up with such an application, thereby
describing the existing donation system and how the proposed product works for the
betterment of society.The disadvantage of this project is that there is no dashboard available
that is, at the end of the month the system don’ t get all the records that how much is donated
or received by the receiver

The paper “Food donations using a forecasting-simulation model’[4], published in 2016,


presents a methodology to estimate donations for non-profit hunger relief organizations.
These organizations are committed to alleviating hunger around the world and depend mainly
on the benevolence of donors to achieve their goals. However, the quantity and frequency of
donations they receive varies considerably over time which presents a challenge in their fight
to end hunger. A simulation model is developed to determine the expected quantity of food
donations received per month in a multiwarehouse distribution network. The simulation
model is based on a state-space model for exponential smoothing. A numerical study is
performed using data from a non-profit hunger relief organization. The results show that good
estimation accuracies can be achieved with this approach. Furthermore, non-profit hunger
relief organizations can use the approach discussed in this paper to predict donations for
proactive planning.

The Paper ‘Smartphone Based Waste Food Supply Chain For Aurangabad City Using GIS
Location Based And Google Web Services’ [5], published in 2014, describes the client-server
GIS and Smartphone application for the hunger free city. At the client side App provide
facility to donate International Journal of Recent Trends in Engineering & Research
(IJRTER) Volume 04, Issue 03; March- 2018 [ISSN: 2455-1457] @IJRTER-2018, All Rights
Reserved 683 food to the charity for the help of hungry people. Donors enter basic
information like latitude and long quantity of waste food and type of waste along with value
and contact number. Charities can pick up that waste food and deliver food to hungers.
Completion of registration will placed onto server database where charities can store the
entries of donor in table format and shows the optimal path between donor locations to
nearest charity along with direction. So wastage food can easily deliver to hungry people
within a time.

The paper ‘Development of a Sustainable Food Supply Chain by Post Harvest Program’ [6]
introduces The Post-Harvest Project (PHP), which is a group of committed technology and
capital partners dedicated to delivering technological solutions to food waste in the supply
chain. Of the many technological solutions being pursued by PHP, an innovative food
preservation technology called Nano ICE is described in detail. An effort is underway in
Ghana to build a series of small community food process plants based on improved cold
storage on fishing boats and on-shore facilities for preserving fish, which in an important
source of protein. The aim of PHP's effort in Ghana is to engage local communities to feed
people and create opportunities and improve health through good nutrition.

6.Modules

In our application there are 3 types of users

1. Admin
2. NGO’s
3. Donor

1. Admin:
 Admin will login to the application, and add the NGO’s which want to help a
needy person.
 Admin will maintain the NGO’s Data.
 Admin can view / manage Donors.
 Admin will come to know which donor has given food to which NGO’s.
 Admin also come to know that which food was given to needy from NGOs.

2. NGO’s:
 NGO's will be added by the admin
 NGO’s will get the password through mail for first time.
 After login NGO’s Will getting the request from donor.
 NGO’s will attend the donor request and give that food to needy person.

3. Donors:
 Donors will register to this application by them self.
 After registration donors will login to the application and
they will select the NGO’s to donate the food in NGO’s list.
 Donors will get the record of food donation.
(To verify the User we will send the OTP to their mail).

7.SYSTEM DESIGN
 The goal of the design phase is to transform the requirements specified in
the document into a structure that is suitable for implementing in some
programming languages.
 In this phase we followed object oriented design approach.
 In this technical of various objects that occur in the problem domain and
solution domain are first identified and then the different relationships
exist among those objects are identified.

8.STANDARD TECHNOLOGIES INCLUDED


ASP.NET is a unified Web development model that includes the services
necessary for you to build enterprise-class Web applications with a minimum of
coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET
applications you have access to classes in the .NET Framework. You can code
your applications in any language compatible with the common language
runtime (CLR), including Microsoft Visual Basic and C#. These languages
enable you to develop ASP.NET applications that benefit from the common
language runtime, type safety, inheritance, and so on.
ASP.NET and PHP Web applications.

Data Flow and Entity Relationship Diagrams

Data Flow Diagram


The dataflow analysis is a study of how and what data flows through the system. It is done
with the help of Data Flow Diagram (DFD), which depicts the entities involved in the
system, data input by the entities, processes the input data undergoes and data store where
data is stored.
Data flow diagrams should be developed in a ‘top-down’ process. They show a functional
perspective where each transformation represents a single function or process. They show
the entire sequence of actions that take place from input being processed to the
corresponding output of the system.
Following are the notations used in data flow diagram:

Notation Meaning

Process

Data Store

External Entity

Data flow
Level: Context Level (0)

Online Food
Admin
Donation

NGOs

Donor

1st-Level:

Login
Admin TblAdmin

TblDonor
Donor

Ngos TblNGos

2nd Level DFD:


Add NGos
Admin TBlngos

View Donors

Tbldonor

DonationDeatils
Tbldonation

Register

Donors View Ngolist

Add Food deatils

View Ngo Deatils

NGOs

View Food Deatils


ER Diagram:
Name

NGOid
Mobno.

1 N
Add TblNgos
Admin Email

1 Address

View donor View


N
Donid
FullName donorid
Address

Mob Donor 1 Add N


Tbldontn Date

EmailID
Gender
password
Reason
Address

View

Feedbackid

Message
FeedBack

Date

11 Form Design and Outputs


Home page
Loginpage

Donor_register
Add area

NgO_register
Ngo list

View Ngo List for Donors


12 Implementation and Software source code
I. IMPLEMENTATION
Implementation is the stage where the theoretical design is turned into a working system.
Once the design is complete, most of the major decisions about the system have been made. The
goal of the coding phase is to translate the design of the system into code in a given
programming language. For a given design, the aim in this phase is to implement the design in
the best possible manner.
The coding phase affects both testing and maintenance profoundly. Since the testing and
maintenance costs of software are much higher than the coding cost, the goal of the coding
should be to reduce the testing and maintenance effort. Hence, during coding the focus should
be on developing the programs that are easy to read and understand, neither simply on
developing the programs that are easy to read and understand, nor simply on developing
programs that are easy to write.
a) The Implementation stage consists of Making the necessary changes for the system as desired by
the user.
b) Training the user personal prior to the implementation of two steps shown below as to be carried
out.
c) Testing the developed program with the simple data.
d) Detection and Correction of errors

Software Source Code


Front End
Homepage
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>

<%@ Register Src="~/WebUserControl.ascx" TagPrefix="uc1" TagName="UserMenu" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/CustomStyle.css" rel="stylesheet" />
<style>
video {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
transform: translateX(-50%) translateY(-50%);
background: url('//demosthenes.info/assets/images/polina.jpg') no-repeat;
background-size: cover;
transition: 1s opacity;
}
</style>

</head>
<body>
<form id="form1" runat="server">
<uc1:UserMenu runat="server" ID="UserMenu" />
<video id="bgvid" playsinline autoplay muted loop>

<source src="Vedio/Food_is_precious(480p).mp4" type="video/webm" />


<source src="Vedio/Food_is_precious(480p).mp4" type="video/mp4" />

</video>

</form>
</body>
</html>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>

$('.carousel').carousel({
interval: 2000
});
$('.colmd12').slideDown(3000);
</script>
Login page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login"
%>

<%@ Register Src="~/WebUserControl.ascx" TagPrefix="uc1" TagName="GV" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="css/bootstrap.min.css" rel="stylesheet" />

<style>
body {
background: url('Images/food4.jpg') center center fixed;
background-size: cover;

.form-area {
width: 500px;
height: 450px;
margin: 60px auto 0;
position: relative;
background: rgba(0,0,0,0.4);
text-align: center;
margin-top: 60px;
padding: 35px;
border: 3px solid #fff;
-webkit-border-radius: 70px 0 70px 0;
-moz-border-radius: 70px 0 70px 0;
border-radius: 70px 0 70px 0;
top: 50px;
}

input {
width: 100%;
height: 50px;
border-radius: 15px 0 15px 0;
border: 2px solid #fff;
margin-bottom: 15px;
background-color: transparent;
color: #fff;
}

.form-area p {
text-align: left;
color: #fff;
text-transform: uppercase;
font-weight: bold;
}

.btn1 {
display: inline-block;
height: 40px;
width: 150px;
overflow: hidden;
position: relative;
text-align: center;
background: #c4202b9e !important;
border-radius: 25px;
color: #fff;
text-transform: uppercase;
margin-top: 20px;
cursor: pointer;
}

.btn1 {
text-align: center;
width: 90%;
}

.btn1:hover {
color: yellow;
}
#txt_Email{
color:white;
}
#txt_Password{
color:white;
}
</style>
<title></title>
</head>
<body>
<uc1:GV runat="server" ID="GV" />
<form id="form1" runat="server">
<div class="form-area">
<h2 style="color: white">Login Form</h2>
<p>Emailid</p>
<asp:TextBox AutoCompleteType="Disabled" ID="txt_Email" required
runat="server" />
<p>Password</p>
<asp:TextBox TextMode="Password" ID="txt_Password" required runat="server"
/>
<asp:Button Text="Submit" ID="btnsave" CssClass="btn1 btn btn-primary"
OnClick="btnsave_Click" runat="server" />
<%-- <a href="ForgotPassword.aspx" style="color:white; font-size:medium">Forgot
Password</a>--%>
</div>
</form>
</body>
</html>

Register page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="User_registration.aspx.cs"
Inherits="User_registration" %>

<%@ Register Src="~/WebUserControl.ascx" TagPrefix="uc1" TagName="WebUserControl" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/Custom.css" rel="stylesheet" />
<style>
.btn-primary {
background-color: rgba(255, 0, 0, 0.48);
}

/*.css::first-line {
background-color: rgba(255, 0, 188, 0.48);
border-radius: 10px;
/*box-shadow: 4px 7px 11px #EFEFEF;
border-radius: 10px;
}*/
body {
background: url('Images/food2.jpg') no-repeat;
background-size: cover;
}
.panel{
background-color: #37644570;

}
.panel-success{
margin-top:86px !important;
}
.panel-success > .panel-heading {
background-color: #37644570;
}
.panel-success > .panel-heading {
color: white; text-align:center;
}
label{
color:white;
}
</style>
<title></title>
</head>
<body>
<uc1:WebUserControl runat="server" ID="WebUserControl" />
<form id="form1" runat="server">
<div class="container">
<div class="form-horizontal">
<div class="panel panel-success">

<div class="panel panel-heading">


<h2> Register Here</h2>
</div>

<div class="panel panel-body">


<div class=" col-md-offset-3">
<div class="form-group">
<label class="col-md-2">First Name</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtfname"
placeholder="Firstname"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtfname" ID="RequiredFieldValidator3" runat="server"
ErrorMessage="Enter Name" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ValidationExpression="[a-z A-Z]+" ValidationGroup="g1" ControlToValidate="txtfname"
ID="RegularExpressionValidator1" runat="server" ErrorMessage="Enter Only Alphabates"
Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2">Last Name</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtlname"
placeholder="Last Name
"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtlname" ID="RequiredFieldValidator4" runat="server"
ErrorMessage="Enter Name" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ValidationExpression="[a-z A-Z]+" ValidationGroup="g1" ControlToValidate="txtlname"
ID="RegularExpressionValidator4" runat="server" ErrorMessage="Enter Only Alphabates"
Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2">Gender</label>
<div class="col-md-4">
<asp:DropDownList runat="server" ID="ddlgender"
CssClass="form-control ">
<asp:ListItem>Select</asp:ListItem>
<asp:ListItem>Male</asp:ListItem>
<asp:ListItem>FeMale</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ForeColor="Red"
InitialValue="Select" ControlToValidate="ddlgender" ID="RequiredFieldValidator5"
runat="server" ErrorMessage="Select Gender" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>

</div>
</div>
<div class="form-group">
<label class="col-md-2">Email Id</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtemailid"
placeholder="Enter Email Id"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtemailid" ID="RequiredFieldValidator1" runat="server"
ErrorMessage="Enter Email" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="g1"
ControlToValidate="txtemailid" ID="RegularExpressionValidator2" runat="server"
ErrorMessage="Enter Proper Email ID" Display="Dynamic"
ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2">Password</label>
<div class="col-md-4">
<asp:TextBox runat="server" TextMode="Password"
ID="txtpwd" placeholder="Password"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtpwd" ID="RequiredFieldValidator8" runat="server"
ErrorMessage="Enter Email" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<%--<asp:RegularExpressionValidator
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="g1"
ControlToValidate="txtemailid" ID="RegularExpressionValidator5" runat="server"
ErrorMessage="Enter Proper Email ID" Display="Dynamic"
ForeColor="Red"></asp:RegularExpressionValidator>--%>
</div>
</div>
<div class="form-group">
<label class="col-md-2">Mobile Number</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtmbnumber"
placeholder=" Mobile Number"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtmbnumber" ID="RequiredFieldValidator2" runat="server"
ErrorMessage="Enter Mobile Number" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ValidationExpression="^[6789]\d{9}$" ValidationGroup="g1" ControlToValidate="txtmbnumber"
ID="RegularExpressionValidator3" runat="server" ErrorMessage="Enter Only Alphabates"
Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>

<div class="form-group">
<label class="col-md-2">Adress</label>
<div class="col-md-4">
<asp:TextBox runat="server" TextMode="MultiLine"
ID="txtadress" placeholder="Enter Adress"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtadress" ID="RequiredFieldValidator7" runat="server"
ErrorMessage="Enter Address" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>

</div>
</div>
<div class="form-group">
<asp:Button Style="margin-left: 185px;"
ValidationGroup="g1" Text="Submit" CssClass="btn col-md-3 btn-primary" ID="btnlogin"
runat="server" OnClick="btnlogin_Click" />
</div>
</div>
</div>
</div>
</div>
</div>

</form>
</body>
</html>

ADD Ngo
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Add_ngo.aspx.cs"
Inherits="Add_ngo" %>

<%@ Register Src="~/WebUserControl.ascx" TagPrefix="uc1" TagName="WebUserControl" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/Custom.css" rel="stylesheet" />
<style>
.btn-primary {
background-color: rgba(255, 0, 0, 0.48);
}

/*.css::first-line {
background-color: rgba(255, 0, 188, 0.48);
border-radius: 10px;
/*box-shadow: 4px 7px 11px #EFEFEF;
border-radius: 10px;
}*/
body {
background: url('Images/food5.jpg') center center no-repeat;
background-size: cover;
}
.panel{
background-color: #e8363b24;

}
.panel-success{
margin-top:20px !important;
}
.panel-success > .panel-heading {
background-color: #e8363b24;
}
.panel-success > .panel-heading {
color: white; text-align:center;
}
label{
color:white;
}
</style>
<title></title>
</head>
<body>
<uc1:WebUserControl runat="server" ID="WebUserControl" />
<form id="form1" runat="server">
<div class="container containers">
<div class="form-horizontal">
<div class="panel panel-success">

<div class="panel panel-heading">


<h2 >Add NGO</h2>
</div>

<div class="panel panel-body">

<div class=" col-md-offset-3">


<div class="form-group">
<label class="col-md-2">NGO's Name</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtngoname"
placeholder="Enter Your NGO's Name
"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtngoname" ID="RequiredFieldValidator3" runat="server"
ErrorMessage="Enter Name" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ValidationExpression="[a-z A-Z]+" ValidationGroup="g1" ControlToValidate="txtngoname"
ID="RegularExpressionValidator1" runat="server" ErrorMessage="Enter Only Alphabates"
Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2">Email Id</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtemailid"
placeholder="Enter Email Id
"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtemailid" ID="RequiredFieldValidator1" runat="server"
ErrorMessage="Enter Email" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="g1"
ControlToValidate="txtemailid" ID="RegularExpressionValidator2" runat="server"
ErrorMessage="Enter Proper Email ID" Display="Dynamic"
ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2">Mobile Number</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtmbnumber"
placeholder="Enter Mobile Number
"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtmbnumber" ID="RequiredFieldValidator2" runat="server"
ErrorMessage="Enter Mobile Number" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ValidationExpression="^[6789]\d{9}$" ValidationGroup="g1" ControlToValidate="txtmbnumber"
ID="RegularExpressionValidator3" runat="server" ErrorMessage="Enter Only Alphabates"
Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2">City Name</label>
<div class="col-md-4">
<asp:DropDownList AutoPostBack="true"
OnSelectedIndexChanged="ddlcity_SelectedIndexChanged" ID="ddlcity" runat="server"
CssClass="form-control"></asp:DropDownList>
<asp:RequiredFieldValidator ForeColor="Red"
InitialValue="Select" ControlToValidate="ddlcity" ID="RequiredFieldValidator5"
runat="server" ErrorMessage="Select City" Display="Dynamic"
ValidationGroup="g1"></asp:RequiredFieldValidator>
</div>
</div>

<div class="form-group">
<label class="col-md-2">Area Name</label>
<div class="col-md-4">
<asp:DropDownList AutoPostBack="true" ID="Ddlarea"
runat="server" CssClass="form-control"></asp:DropDownList>
<asp:RequiredFieldValidator ForeColor="Red"
InitialValue="Select" ControlToValidate="Ddlarea" ID="RequiredFieldValidator6"
runat="server" ErrorMessage="Select Area" Display="Dynamic"
ValidationGroup="g1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2">Adress</label>
<div class="col-md-4">
<asp:TextBox runat="server" TextMode="MultiLine"
ID="txtadress" placeholder="Enter Adress
"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtadress" ID="RequiredFieldValidator7" runat="server"
ErrorMessage="Enter Address" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>

</div>
</div>
<div class="form-group">
<asp:Button Style="margin-left: 185px;"
ValidationGroup="g1" Text="Submit" CssClass="btn col-md-3 btn-primary" ID="btnlogin"
runat="server" OnClick="btnlogin_Click" />
</div>
</div>
</div>

</div>
</div>
</div>
</form>
</body>
</html>
ADD Area
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="add_area.aspx.cs"
Inherits="add_area" %>

<%@ Register Src="~/WebUserControl.ascx" TagPrefix="uc1" TagName="WebUserControl" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/Custom.css" rel="stylesheet" />
<style>
body {
background: url('Images/googlemap.png') no-repeat;
background-size: cover;
}

.btn-primary {
background-color: #28609054;
border-color: #ffffff;
}

</style>
<title></title>
</head>
<body>
<uc1:WebUserControl runat="server" ID="WebUserControl" />
<form id="form1" runat="server">
<div class="container containers">
<div class="form-horizontal">
<h1 style="color: white">Add Area</h1>
<hr />
<div class=" col-md-offset-3">
<div class="form-group">
<label class="col-md-2" style="color: white">City Name</label>
<div class="col-md-4">
<asp:DropDownList ID="ddlcity" runat="server" CssClass="form-
control"></asp:DropDownList>
<asp:RequiredFieldValidator ForeColor="Red"
InitialValue="Select" ControlToValidate="ddlcity" ID="RequiredFieldValidator5"
runat="server" ErrorMessage="Select City" Display="Dynamic"
ValidationGroup="g1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label class="col-md-2" style="color: white">Area Name</label>
<div class="col-md-4">
<asp:TextBox runat="server" ID="txtareaname"
placeholder="Enter City Name
"
CssClass="form-control " />
<asp:RequiredFieldValidator ForeColor="Red"
ControlToValidate="txtareaname" ID="RequiredFieldValidator3" runat="server"
ErrorMessage="Enter Area" Display="Dynamic" ValidationGroup="g1">
</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ValidationExpression="[a-z A-
Z]+" ValidationGroup="g1" ControlToValidate="txtareaname"
ID="RegularExpressionValidator1" runat="server" ErrorMessage="Enter Only Alphabates"
Display="Dynamic" ForeColor="Red"></asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group">
<asp:Button ValidationGroup="g1" Text="Submit" CssClass="btn
col-md-3 btn-primary" Style="margin-left: 185px;" ID="btnlogin" runat="server"
OnClick="btnlogin_Click" />
</div>
</div>
</div>
<table class="table table-bordered table-condensed" style="width: 50%;
margin: 0 auto; background: #0e292f8a">
<asp:Repeater ID="rpt" runat="server" OnItemCommand="rpt_ItemCommand">
<HeaderTemplate>
<tr>
<th>Sl.No</th>
<th>City Name</th>
<th>Area Name</th>
<th class="col-md-1 text-center">Delete</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#Container.ItemIndex+1 %></td>
<td><%#Eval("Cityname") %></td>
<td><%#Eval("Area_name") %></td>
<td class="text-center">
<asp:LinkButton ID="lnkDelete" runat="server"
CssClass="btn btn-primary" CommandArgument='<%#Eval("Area_id") %>' CommandName="Delete">
<i class="glyphicon glyphicon-remove"></i>
</asp:LinkButton>
</td>

</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</div>
</form>
</body>
</html>

Select NGO
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Select_Ngo.aspx.cs"
Inherits="Select_Ngo" %>

<%@ Register Src="~/WebUserControl.ascx" TagPrefix="uc1" TagName="WebUserControl" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/CustomCss.css" rel="stylesheet" />
<style>
body {
background: url('Images/food9.png') no-repeat;
background-size: cover;
}
.box {
padding: 20px;
background: #ff0000bd !important;
text-align: center;
color: white;
margin: 20px;
}

</style>
<title></title>
</head>
<body>
<uc1:WebUserControl runat="server" ID="WebUserControl" />
<form id="form1" runat="server">
<div class="container containers">
<h1 style="text-align: center; color:white;">Select Ngo</h1>
<div class="table table-bordered">
<asp:Repeater ID="rptngo" runat="server">
<ItemTemplate>
<div class="col-md-3 box">
<tr>
<div class="form-group">
<td><%#Eval("ngo_name") %></td>
<hr />
</div>
</tr>
<tr>

<label>Mobile:</label>
<td><%#Eval("ngo_mno") %></td>

</tr>
<br />
<tr>

<label>Address:</label>
<td><%#Eval("adress") %></td>

</tr>
<br />
<tr>

<label>Area:</label>
<td><%#Eval("Area_name") %></td>

</tr>
<br />
<tr>

<label>City:</label>
<td><%#Eval("Cityname") %></td>

</tr>
<br />
<td class="text-center">
<a href="food_donate.aspx?ngoid=<%#Eval("ngo_id")
%>&ngoname=<%#Eval("ngo_name")%>" class="btn btn-success"> Donate Food</a>
</td>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</form>
</body>
</html>

Backend(C#)

Select NGO
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;

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


{
string st = "";
mydb db = new mydb();
SqlDataReader dr;
int x;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Fillrpt();
}
}
void Fillrpt()
{

st = @"SELECT tbl_ngo.ngo_name, tbl_ngo.ngo_id, tbl_ngo.ngo_email,


tbl_ngo.ngo_mno, tbl_ngo.CityId, tbl_ngo.Area_id, tbl_ngo.adress, tbl_ngo.otp,
tbl_ngo.status, Tbl_city.Cityname, Tbl_area.Area_name
FROM tbl_ngo INNER JOIN
Tbl_city ON tbl_ngo.CityId = Tbl_city.CityId INNER JOIN
Tbl_area ON tbl_ngo.Area_id = Tbl_area.Area_id where
tbl_ngo.status='Active'";
db.fill_rptr_ret_sqlda(st, rptngo);
}

ADD NGO
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;

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


{
string st = "";
mydb db = new mydb();
SqlDataReader dr;
int x;
string no;
Random rnd = new Random();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{

st = "Select CityId ,Cityname from Tbl_city";


db.fill_drop_with_id(st, ddlcity);
}
}

protected void ddlcity_SelectedIndexChanged(object sender, EventArgs e)


{
st = "select Area_id, Area_name,CityId from Tbl_area where CityId='" +
ddlcity.SelectedValue + "'";
db.fill_drop_with_id(st, Ddlarea);
}

protected void btnlogin_Click(object sender, EventArgs e)


{
no = rnd.Next(0, 99999).ToString();
st = "Insert into
tbl_ngo(ngo_name,ngo_email,ngo_mno,CityId,Area_id,adress,otp,status) values";
st += "('" + txtngoname.Text + "','" + txtemailid.Text + "','" + txtmbnumber.Text
+ "','" + ddlcity.SelectedValue + "','" + Ddlarea.SelectedValue + "','" + txtadress.Text
+ "','" + no + "','Active')";
x = db.ExeQuery(st);
if (x > 0)
{
txtngoname.Text = txtemailid.Text = txtmbnumber.Text = txtadress.Text = "";
ddlcity.ClearSelection();
Ddlarea.ClearSelection();

ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('NGO


Name Added');", true);
}
else
{
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Try
Again');", true);
}
}
}

LOGIN PAGE
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 Login : System.Web.UI.Page


{
mydb db = new mydb();
string st = "";

SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{

protected void btnsave_Click(object sender, EventArgs e)


{
if (txt_Email.Text == "[email protected]" && txt_Password.Text == "admin")
{
Session["AdminId"] = "AdminId";
Response.Redirect("Add_ngo.aspx");
}
else
{
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Login
Failed');", true);

}
}
}

13 Testing
testing methods used and using procedure
Testing is a process of executing a program with the indent of finding an error. Testing is a
crucial element of software quality assurance and presents ultimate review of specification,
design and coding.
System Testing is an important phase. Testing represents an interesting anomaly for the software. Thus
a series of testing are performed for the proposed system before the system is ready for user acceptance
testing.
A good test case is one that has a high probability of finding an as undiscovered error. A
successful test is one that uncovers an as undiscovered error.
Testing Objectives:
1. Testing is a process of executing a program with the intent of finding an error

2. A good test case is one that has a probability of finding an as yet undiscovered error

3. A successful test is one that uncovers an undiscovered error

Testing Principles
1. All tests should be traceable to end user requirements
2.Tests should be planned long before testing begins
3. Testing should begin on a small scale and progress towards testing in large
4. Exhaustive testing is not possible
5. To be most effective testing should be conducted by a independent third party

The primary objective for test case design is to derive a set of tests that has the highest
livelihood for uncovering defects in software. To accomplish this objective two different
categories of test case design techniques are used. They are
White box testing.
Black box testing.

White-box testing:
White box testing focus on the program control structure. Test cases are derived to ensure that
all statements in the program have been executed at least once during testing and that all logical
conditions have been executed.

Block-box testing:
Black box testing is designed to validate functional requirements without regard to the internal workings
of a program. Black box testing mainly focuses on the information domain of the software, deriving test
cases by partitioning input and output in a manner that provides through test coverage. Incorrect and
missing functions, interface errors, errors in data structures, error in functional logic are the errors falling
in this category.

Testing strategies:
A strategy for software testing must accommodate low-level tests that are necessary to verify
that all small source code segment has been correctly implemented as well as high-level tests that
validate major system functions against customer requirements.

Testing fundamentals:
Testing is a process of executing program with the intent of finding error. A good test case is one
that has high probability of finding an undiscovered error. If testing is conducted successfully it uncovers
the errors in the software. Testing cannot show the absence of defects, it can only show that software
defects present.

Testing Information flow:


Information flow for testing flows the pattern. Two class of input provided to test the process.
The software configuration includes a software requirements specification, a design specification and
source code.
Test configuration includes test plan and test cases and test tools. Tests are conducted and all the
results are evaluated. That is test results are compared with expected results. When erroneous data are
uncovered, an error is implied and debugging commences.
Unit testing:
Unit testing is essential for the verification of the code produced during the coding phase and
hence the goal is to test the internal logic of the modules. Using the detailed design description as a
guide, important paths are tested to uncover errors with in the boundary of the modules. These tests
were carried out during the programming stage itself. All units of ViennaSQL were successfully tested.

Integration testing:
Integration testing focuses on unit tested modules and build the program structure that is dictated
by the design phase.

System testing:
System testing tests the integration of each module in the system. It also tests to find
discrepancies between the system and it’s original objective, current specification and system
documentation. The primary concern is the compatibility of individual modules. Entire system is
working properly or not will be tested here, and specified path ODBC connection will correct or not, and
giving output or not are tested here these verifications and validations are done by giving input values to
the system and by comparing with expected output. Top-down testing implementing here.

You might also like