Beruflich Dokumente
Kultur Dokumente
This is to certify that Bijendra Pratap Singh of Master Of Computer Application from Feroze
Gandhi Institute of Enggineering & Technology, Raebareli, was working on the project
entitled “Online Water Delivery System” in PNP Intech Learning & Research Centre. He was
engaged with us during 15 Jan 2018 to 15 May 2018 for a period of 4 months.
He has done an excellent job during his engagement with the Software Development & Testing
Division of the company. He has completed his project during the training tenure. His performance
has been good and satisfactory.
I would like to take this opportunity to express my appreciation to Bijendra Pratap Singh for his
work and wish him all the very best for his future endeavors.
Regards,
……………………..
___________________
HR-Manager
PNP Intech Learning & Research Center
Lucknow (U.P.)
1
ACKNOWLEDGMENT
I would like to express my deep and sincere gratitude to my supervisor Er. Himanshu
Kashyap (PNP Intech Learning & Research Centre), who gave me his full support and
encouraged me to work in an innovative and challenging project for Educational field. His
wide knowledge and logical thinking gave me right direction all the time.
I am deeply grateful my project coordinator for his help and support provided at every step
of the project.
Last but not the least, I thank to all employees of PNP Intech Learning & Research Centre
2
DECLARATION
This is to certify that the project report entitled “Online Water Delivery System” is done
by me is an authentic work carried out for the partial fulfillment of the requirements for
the award of “Master Of Computer Appliocation” under the guidance of Er. Himanshu
Kashyap. The matter embodied in this project work has not been submitted earlier for
3
ABSTRACT
The main Objective of the project is to develop for the Internet Automation of Online
Water Delivery System for myself. It has an Internet through which all related companies
and distributors can access it easly.
Computerized online water delivery system developed to facilitate the general
administration system to manage the various information and the processes so, that
companies and distributors can access accurate information quickly and easily as and
when required, thereby improving its operational efficiency & effectiveness and show
proper report and alert SMS system and also analysis of market requirements.
4
TABLE OF CONTENT
I. College Certificate
II. Training Certificate
III. Acknowledgment
IV. Declaration
V. Abstract
1. Introduction…………………………………………………………………………..…........7-13
1.1 Overview of Organization
1.2 Modules
1.3 Objectives
1.4 Existing System Description
1.5 Proposed System
1.6 Tools Used
2. Pert and gantt chart……………………………………………………………………….14-15
3. System Analysis…………………………………………………………………...............16-25
3.1 Identification of need
3.2 SDLC Phases
3.2.1 Feasibility Study
3.2.2 Report Approval
3.2.3 System Analysis
3.2.4 System Design
3.2.5 Coding
3.2.6 Testing
3.2.7 Implementation
3.2.8 Maintenance
3.3 Process Description
3.4 Project Model Used
3.5 Data Flow Diagram
4. ER Diagram…………………………………………………………………………………26-27
5. Software RequirementSpecification………….…….……………….………..28
5.1 Hardware Requirement
5.2 Software Requirement
5.3 Support Maintenance
6. System Design Approach……………………………………………………………29-30
6.1 Top-Down Designing
6.2 Bottom –Up Designing
5
6.3 Following Approach
7. Low Level Design………………………………………………………………………………………31
8. Data Modeling………………………………………………………………………..32
8.1 List of Tables
9. Testing…………………………………………………………………………… 32-36
10. Input-Output Forms………………………………………………………………………….…37-69
10.1 Screenshots
10.2 Coding
11. Future Scope……………………………………………………………………………….…70
12. Conclusion……………………………………………..……………………………..70
6
INTRODUCTION
The purpose of the project entitled as “Online Water Delivery System” is to provide a
facility to spread business. Online water delivery management/system is a web based
application which will run on internet. And it works as a global platform for
companies/manufacturers, distributors and retailers/customers. It provides the facility to
companies/manufacturers and distributors to spread their business. This system is also
work for retailers/customers to place their orders with their related distributor. A
companies/manufacturers and a distributors are required to be register on this system to
receive all facilities of system. For retailers/customers, it is optional to be register they can
place their order directly. This system follow a chain like, distributors can approach to
companies and retailers/customers can interact with the distributors.
7
Overview of Organization
8
Modules
The entire project mainly consists of 8 modules, which are
Admin
Login module(Modal)
Register module(Modal)
Profile module
Stock module
Order modue
Product module
Home module
Admin module:
This module has the control to whole system.
It can approve the new members.
It provides a username to approved members to set their password.
All completed and processing orders can see here.
Login module:
Companies/manufacturer, Destributors can login with valid information.
It has two fields, known as UserId and Password.
Register module:
From this modue, companies, distributors and retailers can be register.
It has following fields.
1. Name
2. E-mail
3. Phone
4. Role
5. City
6. Pin
9
Profie module:
This module has all required information for companies and distributors.
The information are-
1. Companies/Distributor Name
2. Distributors/Retailers Requests.
3. Orders
4. Executed Orders
5. Pendin Orders
6. Update Stock
7. Available Stock
Product module:
It shows the products to related vistor with brand and price.
This module shows products with their category and brand.
Categories are-
1. Can
2. Bottle
3. Pouch
Brands-
1. Normal
2. Bisleri
3. Aquafina
4. Other
Stock module:
This module provides the way to companies and distributors to update their stock.
It has following fields for all categories known as can, bottle and pouch.
1. Product Brand
2. Number Of Products
3. Price Per Product
4. Price More Than Fifty
10
5. Price More Than Hundred
Order module:
From this module you can order to click on continue button.
You will have to provide your delivery address here.
PROBLEM DEFINITION
In this section we shall discuss the limitation and drawback of the existing system that
forced us to take up this project. Really that work was very typical to manage the daily
errors free records and adding or removing any node from server. This problem produces a
need to change the existing system. Some of these shortcomings are being discussed below:
Low Functionality
With the existing system, the biggest problem was the low functionality. The
problem faced hampered the work. For small task like adding any new node to
server or deleting a node or keeping daily record we have to appoint minimum two
or three employee.
In the existing system, humans performed all the tasks. As in the human tendency,
error is also a possibility. Therefore, the inputs entered by the person who is
working in the Company, in the registers may not be absolutely foolproof and may
be erroneous. As a result of wrong input, the output reports etc.will also be wrong
which would in turn affect the performance.
Portability Problem
System that existed previously was manual. As a result, the system was less
portable. One has to carry the loads of many registers to take the data from one
place to another. A big problem was that the system was less flexible and if we
11
wanted to calculate yearly or monthly maintenance report or efficiency report, then
it was a big headache
Security-
Security concerns were also one of the motives of the Company for the need of
software. In the registers, the data is not secure as anybody can tamper with the
data written in the registers. While in this software, just a password makes it
absolutely secure from the reach of unauthorized persons.
Data Redundancy
In the case of manual system, the registers are maintained in which, a lot of data is
written.
Processing Speed
Manual Errors
When a number of tough tasks are prepared by the humans like preparation of
reports, performing long calculation then some human error are obvious due to a
number of factors like mental strain, tiredness etc. But as we all know that computer
never get tired irrespective of the amount of work it has to do. So this software can
nullify the probability of manual error that improve the performance.
12
Complexity in Work
PROPOSED SYSTEM
The development of this new system contains the following activities, which try to develop
on-line application by keeping the entire process in the view of database integration
approach.
1) This system provides the easy process to companies, distributors and retailers to
buy and sell the branded and mineral water online.
2) By this system companies and distributors can see their previous and future records
easly.
3) This system tells the status to companies and distributors about their orders that
which order is still in processing and which has completed.
4) Compnies and distributors can login and see their orders which is placed by their
clients.
5) And compnies and distributors can track delivery or check status of delivery.
6) Companies and distributors can see information of their clients.
7) Clients have option to pay by cash on delivery or make payment by online.
8) Clients can give their feedback related to their distributor.
9) Admin has the power to approve the new members and to contact them when
required.
10)Admin can see all activities which is happening on system.
13
Pert & Gantt chart:
Program evaluation and review technique (PERT) and critical path method are two project
scheduling methods that are applied to software development. Both techniques are driven
by information already developed in earlier project planning activities. Gantt charts are a
project control technique that can be used for several purposes, including scheduling,
budgeting and resources planning. A Gantt chart is a bar chart, with each bar is
proportional to the length of time planned for the activity.
The timeline chart of the above task set (Time Frame: 6 months) has been prepared. The
PERT Chart of the software development phase is also prepared and is depicted in figure 1.
It is based on the different modules identified in the software.
14
PERT (Program Evaluation & Review Technique) Chart:
Analysis of
START
Problem
the
Analysis
Financial
Processing
Selection
System
&
Learning
Day 12 – 20
the s/w to
be used
Under -
Database
Page -
Day 40-98
Designing
15
SYSTEM ANALYSIS
Identification of needs:-
Social and economic factor: a wave of social and economic changes often follows in the
wake of the new technology. New opportunities may arise to improve on a production
process or to do something that was not previously possible. Changes in the ways
individuals are organized into groups may then be necessary, and the new groups may
complete for economic resources with established units.
Technological factor: people have never before in a time when the scope of scientific
inquiry was so broad, so when the speed of applying the new technology accounts for many
changes in the organization.
High level decisions and operating processes: in response to technological, socio-
economical factors, top level managers may decide to recognize operations and introduce
new products. To deal with these needs, people commonly seek new modified information
to support the decision. When that happens, then they obtain turn to a computer system for
help the information users and data processing specialist then work together to complete a
series of steps in a system study to produce output results to satisfy information needs.
Feasibility Study: -
Feasibililies study is the second step of the system development lifecycle. Things are
always easy at the beginning in any software process. In fact nothing is infeasible with
unlimited time and resources. But it is not the fact. So, practically we have to do in limited
resources in a restricted time margin. So for the system to be feasible, following points we
have to consider.
16
The feasibility study is conducted to check whether the candidate system is feasible. The
system which is selected to be the best against the criteria is there after designed and
developed. The feasibility study takes in to consideration, the risks involved in the project
development before hand. Therefore in this phase we have to do feasibility study which is
the test of the website according to its work ability, impact on the organization, ability to
meet user need and effective use of resources. We do the feasibility study for website to
analyze the risks, costs and benefits relating to economics, technology and user
organization. There are several types of feasibility depending on the aspect they cover.
Import of these includes:
1. Problem Statement:
To develop a study material which is a web based application which handles inquiry
regarding the different product available on the website. This enhances the working
ability and reduces the required resources and manpower; also give new and
refreshing look to the interface.
2. Technical Feasibility:
The current system is built on user interface environment using SQL SERVER and DOT NET
which will provide a good and enhanced working environment.
Provides a user friendly environment.
Windows OS and DOT NET software are easily available and easy to Interact.
3. Behavioral Feasibility:
During the on site review of the current system the client showed a positive approach
towards the change over. Any further change in the current system will be accepted
smoothly, as this new developing system is based on GUI interface.
4. Alternate Solution:
17
Right now we are implementing this system using SQL SERVER as backend. It can be
structured.
5. Risk Analysis :
Risk identification:
Technical risk: - In this project, the only risk can arise if some change occurs in the
technical requirements of the management. As per the requirement, we have taken
DOT.NET as technology for system development.
Software Tools:-
Technology used :
Server Side : DOT NET
Client Side : Java Script
Layout : HTML,CSS
Database : SQL SERVER
Platform:-
Software Requirement:-
18
Hardware Tools:-
RAM : 2 GB RAM
HDD : 160 GB
Request Approval:-
Request approval is the third phase of system development lifecycle. Request approval is
the phase in which all the requirements which would be provide in the system arestated.
The request approval is a sort of agreement between the client and the company which is
building this software. Both the parties should be mutually agreed on the stated
requirements.
SystemAnalysis:-
System analysis is the phase following the phase of the request approval. In this phase we
tend to analyze the overall system which we have to build. System analysis is the crucial
part in SDLC.
System Design:-
System design means the designing of the system. The System can be done in either of the
following two ways:-
19
Coding:-
Coding is the phase in which a developer codes using any programming languages.
Coding constitutes only 20% of the whole project and which is easier to write. The
coding work is also done in the teams; development of the system is usually done
under the modular programming style, which can be either top-down approachor
bottom-up approach.
Testing:-
Testing is the phase in which thesy stem that has been developed is tested. Testing
comprises ofthe 60% of the overall development of the system. Testing of the system is
important because testing aims to un cover the different errors in the system. There
are various different testing techniques that can be used for the testing of the system.
Implementation:-
Process actually depends on type of a system & various. Opting for suitable conversion
approach is astep implementation. The conversion processes are as follows:-
Parallel Conversion
Direct Conversion Approach
Pilot Conversion Approach
Phase In Conversion Approach
Maintenance: -
Merely developing the system is not important but also maintenance is important. The
company that has built the system provides for some time free of cost maintenance to the
client and after that period it is usually a paid service.
20
Process Description:-
Gantt charts mainly used to allocate resources to activities. The resources allocated to
activities include staff, hardware, and software. Gantt charts (named after its developer
Henry Gantt) are useful for resource planning. A Gantt chart is special type of bar chart
where each bar represents an activity. The bars are drawn along a timeline. The length of
each bar is proportional to the duration of the time planned for the corresponding activity.
Gantt chart is a project scheduling technique. Progress can be represented easily in a Gantt
chart, by coloring each milestone when completed. The project will start in the month of
January and end after 4 months at the beginning of April.
21
PROJECT MODEL USED
Iterative Enhancement Model:-
This model has the same phases as the waterfall model, but with fewer restrictions.
Generally the phases occur in the same order as in the waterfall model, but they may be
conducted in several cycles.
Useable product is released at the end of the each cycle, with each release providing
additional functionality. Customers and developers specify as many requirements as
possible and prepare a SRS document. Developers and customers then prioritize these
requirements. Developers implement the specified requirements in one or more cycles
of design, implementation and test based on the defined priorities.
22
The procedure itself consists of the initialization step, the iteration step, and the
Project Control List. The initialization step creates a base version of the system. The
goal for this initial implementation is to create a product to which the user can react. It
should offer a sampling of the key aspects of the problem and provide a solution that is
simple enough to understand and implement easily. To guide the iteration process, a
project control list is created that contains a record of all tasks that need to be
performed. It includes such items as new features to be implemented and areas of
redesign of the existing solution. The control list is constantly being revised as a result
of the analysis phase.
The iteration involves the redesign and implementation of iteration is to be simple,
straight forward, and modular, supporting redesign at that stage or as a task added to
the project control list. The level of design detail is not dictated by the iterative
approach. In a light-weight iterative project the code may represent the major source
of documentation of the system; however, in a critical iterative project a
formal software design document may be used. The analysis of iteration is based upon
user feedback, and the program analysis facilities available.
PHASES:-
Introduction:-
DFD is anacronym for the word Data Flow Diagram. DFD is pictorial representation of the
system. DFD is agraphical representation of the―flow ‖ of data through the information
system. DFD are also used for the visualization of data processing (structured design).
ADFD provides no information about the timings of the process , or about whether process
will operate in parallel or sequence. DFD is an important technique for modeling system’s
high-level detail by showing how input data is transformed to output results through a
sequence off unctional transformations. DFD reveal relationships among between the
various components in aprogram or system. The strength of DFD lies in the fact that using
few symbols we are able to express program design in an easier manner. ADFD can be used
store present the following:-
24
Process that change the data.
Flow of data within the system.
Data Storage locations.
Uses of DFD:-
The main uses of data flow diagrams are as follows:-
DFD is a methodof choice for representation of showing of information through a system
because of the following reasons:-
DFDs can provide a high level system overview, complete with boundaries and
connections to other system.
DFDs can provide a detailed representation of system components.
0-Level DFD:-
Reg./login Reg./login
Online
COMP/DIST Matrimoni Admin
Accept/ Accept/
Reject al Portal reject
25
ER Diagrams:
26
Product_
OrderId Name Product_
Brand
Address
Role
Mobile Total_Amou
nt
Registeration
has
Yes
Date No
Stock
Id
Register
Proposal
Name
Pin
Email
City
27
SOFTWARE REQUIREMENT SPECIFICATION
The software requirement specification document enlists all necessary requirements for
project development. To derive the requirements we need to have clear and thorough
understanding of the products to be developed. This is prepared after detailed
communications with project team and the customer.
One year free support for rectifying system bugs including front end and beck end will be
provided. During warranty period Software Engineers will be responsible for removing
bugs and improving it. After one year support can be extended @ 20% of the total product
deployment cost.
28
SYSTEM DESIGN APPROACH
The top - down designing approach started with major components of the system. It is a
stepwise refinement which starts from an abstract design, in each steps the design is
refined two or more concrete levels until we reach a level where no – more refinement is
possible or not needed.
Bottom – Up designing:
In bottom – up designing the most basic and primitive components are designed first, and
we proceed to higher level components. We work with layers of abstractions and
abstraction are implemented until the stage is reached where the operations supported by
the layer is complete.
29
Approach we are following:
In this project we are following Mixed Approach i.e. A combination of top – down and
bottom – up. We are developing some of the components using top – down designing
approach (e.g. the WebPages) and the some components in bottom – up designing
approach (e.g. the middle tier classes).
30
Low Level Design
Description: Low Level Design creation is one of the most important activities in the
development of any software product. The low level design document gives the design of
the actual software application. Low level design document is based on High Level Design
document. It defines internal logic of every sub module. A good low level design document
will make the application very easy to develop by the developer. An effective design
document results in very low efforts in developing a Software product.
Each project's low level design document should provide a complete and
detailed specification of the design for the software that will be developed in the project,
including the classes, member and non-member functions, and associations between
classes that are involved.
The low level design document should contain a listing of the declarations of all the classes,
non-member-functions, and class member functions that will be defined during the
subsequent implementation stage, along with the associations between those classes and
any other details of those classes (such as member variables) that are firmly determined by
the low level design stage. The low level design document should also describe the classes,
function signatures, associations, and any other appropriate details, which will be involved
in testing and evaluating the project according to the evaluation plan defined in the
project's requirements document.
31
LIST OF TABLES:
Register
Secrets
Stock
Visitor
Order
TESTING
Testing is the integral part of any System Development Life Cycle insufficient and
interested application tends to crash and result in loss of economic and manpower
investment besides user’s dissatisfaction and downfall of reputation.
“Software Testing can be looked upon as one among much process, an organization
performs, and that provides the last opportunity to correct any flaws in the developed
system. Software Testing includes selecting test data that have more probability of giving
errors.” The first step in System testing is to develop the plan that all aspect of system
.Complements, Correctness, Reliability and Maintainability.
Software is to be tested for the best quality assurance, an assurance that system meets the
specification and requirement for its intended use and performance.
System Testing is the most useful practical process of executing the program with the
implicit intention of finding errors that makes the program fail.
32
Types of Testing:
Black Box (Functional) Testing:
Testing against specification of system or component. Study it by examining its inputs and
related outputs. Key is to devise inputs that have a higher likelihood of causing outputs that
reveal the presence of defects. Use experience and knowledge of domain to identify such
test cases. Failing this a systematic approach may be necessary. Equivalence partitioning is
where the input to a program falls into a number of classes, e.g. positive numbers vs.
negative numbers. Programs normally behave the same way for each member of a class.
Partitions exist for both input and output. Partitions may be discrete or overlap. Invalid
data (i.e. outside the normal partitions) is one or more partitions that should be tested.
Internal System design is not considered in this type of testing. Tests are based on
requirements and functionality.
This type of test case design method focuses on the functional requirements of the
software, ignoring the control structure of the program. Black box testing attempts to find
errors in the following categories:
Interface errors.
Performance errors.
33
independent execution path through the component. All conditional statements tested for
both true and false cases. If a unit has n control statements, there will be up to 2n possible
paths through it. This demonstrates that it is much easier to test small program units than
large ones. Flow graphs are a pictorial representation of the paths of control through a
program (ignoring assignments, procedure calls and I/O statements). Use flow graph to
design test cases that execute each path. Static tools may be used to make this easier in
programs that have a complex branching structure. Tools support. Dynamic program
analysers instrument a program with additional code. Typically this will count how many
times each statement is executed. At end print out report showing which statements have
and have not been executed. Problems with flow graph derived testing:
Data complexity could not take into account.
We cannot test all paths in combination.
In really only possible at unit and module testing stages because beyond that
complexity is too high.
This testing is based on knowledge of the internal logic of an application’s code. Also
known as a Glass Box Testing .Internal software and code working should be known for
this type of testing. Tests are based on coverage of code statements, branches, paths,
conditions.
Unit Testing:
Unit testing concentrates on each unit of the software as implemented in the code. This is
done to check syntax and logical errors in programs. At this stage, the test focuses on each
module individually, assuring that it functions properly as a unit. In our case, we used
extensive white-box testing at the unit testing stage.
A developer and his team typically do the unit testing do the unit testing is done in parallel
with coding; it includes testing each function and procedure.
34
Incremental Integration Testing:
Integration Testing:
Functional Testing:
This type of testing ignores the internal parts and focus on the output is as per
requirement or not .Black box type testing geared to functionality requirements of an
application.
System Testing:
Entire system is tested as per the requirements. Black box type test that is based on overall
requirement specifications covers all combined parts of a system.
End-to-End Testing:
35
Regression Testing:
Testing the application as a whole for the modification in any module or functionality.
Difficult to cover all the system in regression testing so typically automation tools are used
for these testing types.
Acceptance Testing:
Normally this type of testing is done to verify if system meets the customer specified
requirements. User or customers do this testing to determine whether to accept
application.
Performance Testing:
Term often used interchangeably with “stress” and “load” testing, To check whether system
meets performance requirements, Used different performance and load tools to do this.
Alpha Testing:
In house virtual user environment can be created for this type of testing. Testing is done at
the end of development .Still minor design changes may be made as a result of such testing.
Beta Testing:
Testing typically done by end-users or others. This is final testing before releasing
application for commercial purpose.
36
User Screenshots:
Default:
37
Home:
38
39
40
41
42
Products:
43
Order:
44
Stock:
45
Admin:
46
Profile:
47
48
49
50
CODINGS:-
Default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
protected void btn1_Click(object sender, EventArgs e)
{
string v = "";
if (RadioButtonList1.SelectedIndex > -1)
{
if (RadioButtonList1.SelectedIndex == 0)
v = "C";
else if (RadioButtonList1.SelectedIndex == 1)
v = "D";
else if (RadioButtonList1.SelectedIndex == 2)
v = "R";
else if (RadioButtonList1.SelectedIndex == 3)
v = "S";
else
v = "A";
}
else
{
Response.Write("<script>alert('Please select your identy
first!');</script>");
}
}
}
51
Home.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
52
return;
}
else if (v == "D")
{
v = "Company";
query2 = "select Name,City from register where Role='" + v + "' and
Proposal='Approved'";
}
else
{
v = "Distributor";
query2 = "select Name,City from register where Role='" + v + "' and
Proposal='Approved'";
}
dt = db.SelectExecute(query2);
if (dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
v = row["City"].ToString();
cityd.Items.Add(v);
v = row["Name"].ToString();
roled.Items.Add(v);
}
}
else
{
Response.Write("<script>alert('Ah! sorry,your request can not be proccede
now!');</script>");
}
}
}
protected void Register_Click(object sender,EventArgs e)
{
int i,j=0;
string[] pname = new string[] { "cane", "bottle", "pouch" };
string[] bname = new string[] { "Normal", "Bisleri", "Aquafina","Other" };
string querycheck="select * from register where Email='"+email.Text+"' or Name='"
+ name.Text + "'";
53
DataTable dt1 = new DataTable();
dt1 = db.SelectExecute(querycheck);
if (dt1.Rows.Count > 0)
{
Response.Write("<script>alert('You are already register');</script>");
}
else
{
if (lblcaptcha.Text == entercaptcha.Text)
{
string query = "insert into
register(Name,Email,Mobile,Role,City,Pin,Date,Proposal) values('" + name.Text + "','" +
email.Text + "','" + mobilenumber.Text + "','" + role.Text + "','" + rcity.Text + "','" +
pin.Text + "','" + DateTime.Now.ToString() + "','Disapproved/Approved')";
if (db.ExecuteI(query))
{
for(i=0;i<3;i++)
{
j = 0;
for(j=0;j<4;j++)
{
string querystock = "insert into
stock(ProductNmae,Email,ProductBrand) values('" + pname[i] + "','" + email.Text +
"','"+bname[j]+"')";
if (db.ExecuteI(querystock))
{
}
}
}
if (i==3)
{
Response.Write(@"<script language='javaScript'> alert('Registered
successfully!User-Id and Password will be send on your E-mail for further
use!');</script>");
}
else
{
54
Response.Write(@"<script language='javaScript'>
alert('Registration failed!');</script>");
}
}
}
else
{
Response.Write(@"<script language='javaScript'> alert('Invalid
captcha!');</script>");
}
}
}
protected void Login_Click(object sender, EventArgs e)
{
string query1 = "select Visitor from visitor where id='1'";
dt = db.SelectExecute(query1);
if (dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
v1= row["Visitor"].ToString();
}
}
Response.Write(v1);
if (v1 == "S")
{
string query = "select * from secrets where UserId='" + userid.Text + "' and
Password='" + pass.Text + "'";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
Session["userid"] = userid.Text;
Response.Redirect("carrier.aspx");
}
else
{
Response.Write("<script>alert('invalid UserId or Password!')</script>");
55
}
}
else if(v1=="A")
{
string query = "select * from secrets where UserId='" + userid.Text + "' and
Password='" + pass.Text + "'";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
Session["userid"] = userid.Text;
Response.Redirect("admin/mainadmin.aspx");
}
else
{
Response.Write("<script>alert('invalid UserId or Password!')</script>");
}
}
else
{
string query = "select * from secrets where UserId='" + userid.Text + "' and
Password='" + pass.Text + "'";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
Session["userid"] = userid.Text;
Response.Redirect("admin/admin.aspx");
}
else
{
Response.Write("<script>alert('invalid UserId or Password!')</script>");
}
}
}
56
protected void Set_pass(object sender,EventArgs e)
{
string query = "select * from secrets where UserId='" + setuser.Text + "'";
dt = db.SelectExecute(query);
if(dt.Rows.Count>0)
{
string query1 = "update secrets set Password='"+setpass1.Text+"' where
UserId='"+setuser.Text+"'";
if(db.ExecuteI(query1))
{
Response.Write("<script>alert('Password set successfully!');</script>");
}
else
{
}
}
else
{
Response.Write("<script>alert('UserId is incorrect!');</script>");
}
}
protected void City_c(object sender,EventArgs e)
{
roled.Items.Clear();
Response.Write(cityd.SelectedItem.Text);
string query1 = "select Visitor from visitor where id='1'";
dt = db.SelectExecute(query1);
if (dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
v1 = row["Visitor"].ToString();
}
}
Response.Write(v1);
string query = "";
if (v1 == "C")
{
57
btn.Enabled = false;
return;
}
else if (v1 == "D")
{
v1 = "Company";
query = "select Name from register where Role = '" + v1 + "' and Proposal =
'Approved' and City='" + cityd.SelectedItem.Text + "'";
}
else
{
v1 = "Distributor";
query = "select Name,City from register where Role='" + v1 + "' and
Proposal='Approved' and City='"+cityd.SelectedItem.Text+"'";
}
dt = db.SelectExecute(query);
if(dt.Rows.Count>0)
{
foreach (DataRow row in dt.Rows)
{
v = row["Name"].ToString();
roled.Items.Add(v);
}
}
}
protected void ReCap(object sender, EventArgs e)
{
Response.Write("hii");
// lblcaptcha.Text = cp.captcha();
}
protected void filter_SelectedIndexChanged(object sender, EventArgs e)
{
string cane = "", bottle = "", pouch = "";
if(filter.Items[0].Selected)
{
cane = filter.Items[0].Value;
}
if (filter.Items[1].Selected)
{
58
bottle = filter.Items[1].Value;
}
if (filter.Items[2].Selected)
{
pouch = filter.Items[2].Value;
}
roled.Items.Clear();
cityd.Items.Clear();
string query1 = "select Visitor from visitor where id='1'";
dt = db.SelectExecute(query1);
if (dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
v1 = row["Visitor"].ToString();
}
}
Response.Write(v1);
string query = "";
if (v1 == "C")
{
btn.Enabled = false;
return;
}
else if (v1 == "D")
{
v1 = "Company";
}
else
{
v1 = "Distributor";
}
string a="" ,b = "", c = "", d = "", f = "";
if (cane != "")
{
query = "select Email,NumberOfProducts from stock where ProductNmae='cane'";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
59
foreach (DataRow row in dt.Rows)
{
a = row["NumberOfProducts"].ToString();
b = row["Email"].ToString();
if (a !="0")
{
query = "select Name,City,Email from register where Role='" + v1
+ "' and Proposal='Approved' and Email='" + b + "'";
dt1 = db.SelectExecute(query);
if (dt1.Rows.Count > 0)
{
if (f != b)
{
foreach (DataRow row1 in dt1.Rows)
{
c = row1["Name"].ToString();
f = row1["Email"].ToString();
d = row1["City"].ToString();
cityd.Items.Add(d);
roled.Items.Add(c);
}
}
}
}
}
}
}
else if (bottle != "")
{
}
else if (pouch != "")
{
}
else if (cane != "" && bottle != "")
{
}
else if (cane != "" && pouch != "")
60
{
}
else if (bottle != "" && pouch != "")
{
}
else
{
}
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
v = row["Name"].ToString();
roled.Items.Add(v);
}
}
}
}}
61
Product.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
}
}
//Response.Write(id);
Response.Redirect("Product3.aspx?id=" + id);
}
62
}
Stock.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
Response.Write("<script>alert('Command Completed!')</script>");
}
else
{
Response.Write("<script>alert('Failed!')</script>");
}
}
Response.Write("<script>alert('Command Completed!')</script>");
}
else
63
{
Response.Write("<script>alert('Failed!')</script>");
}
}
protected void pupload_Click(object sender, EventArgs e)
{
string query = "update stock set NumberOfProducts = '" + pnop.Text + "' ,
PricePerProduct = '" + pppp.Text + "' , PriceMoreThanFifty = '" + ppmf.Text + "' ,
PriceMoreThanHundred = '" + ppmh.Text + "' , Date = '" + DateTime.Now.ToString() +
"',Image='" + FileUpload3.FileName + "' where Email='" + Session["userid"] + "' and
ProductNmae='pouch' and ProductBrand='" + ppb.Text + "'";
if (db.ExecuteI(query))
{
//FileUpload3.SaveAs(Server.MapPath("~/photos/" + FileUpload3.FileName));
Response.Write("<script>alert('Command Completed!')</script>");
}
else
{
Response.Write("<script>alert('Failed!')</script>");
}
}
}
}
64
Order.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
65
"('"+phn.Text+"','"+Session["role"]+"','"+pname.Text+"','"+pbrand.Text+"','"+nofpt.Text+"
','"+totalp.Text+"','"+address+"','"+DateTime.Now.ToString()+"','"+pprice.Text+"','"+city
.Text+"','processing...')";
if (db.ExecuteI(query))
{
Response.Write("<script>alert('Ordered successfully');</script>");
}
}
else
{
}
}
}
66
Admin.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
}
protected void All_members(object sender, EventArgs e)
{
query = "select * from register";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
}
protected void New_members(object sender, EventArgs e)
{
query = "select * from register where Proposal='Disapproved/Approved'";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
}
protected void All_orders(object sender, EventArgs e)
67
{
query = "select * from orders";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
}
protected void New_orders(object sender, EventArgs e)
{
query = "select * from orders where Orderestatus='processing...'";
dt = db.SelectExecute(query);
if (dt.Rows.Count > 0)
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
}
protected void Logout(object sender,EventArgs e)
{
Session.Abandon();
Response.Redirect("../Default2.aspx");
}
68
Profile.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
}
}
protected void Logout(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("../Default2.aspx");
}
}
69
FUTURE SCOPE
CONCLUSION:
This website can be used by any company and distributor to spread their business.
70
APPENDICS:-
The .NET Framework is a technology that supports building and running the next
generation of apps and XML Web services. The .NET Framework is designed to fulfill the
following objectives:
71
In a multi tier system, such as Windows® DNA, the client application logic is run in two or
more locations.A thin client is run on the user's local computer and is focused on displaying
results to the user.
The business logic is located in server applications running on a server. Thin clients
request functions from the server application, which is itself a multithreaded application
capable of working with many concurrent users. The server application is the one that
opens connections to the database server.
This is a typical scenario for an Internet application. For example, a multithreaded server
application can run on a Microsoft® Internet Information Services (IIS) server and service
thousands of thin clients running on the Internet or an intranet. The server application uses
a pool of connections to communicate with one or more instances of MYSQLSQL. The
instances of MYSQL can be on the same computer as APACHE, or they can be on separate
servers in the network.
In a two-tier client/server system, users run an application on their local computer, known
as a client application, that connects over a network to an instance of MYSQL running on a
server computer. The client application runs both business logic and the code to display
output to the user, so this is sometimes referred to as a thick client.
72
Advantages of SQL SERVER as a Database Server
SQL SERVER is capable of supplying the database services needed by extremely large
systems. Large servers may have thousands of users connected to an instance of SQL
SERVER at the same time. SQL SERVER has full protection for these environments, with
safe guards that prevent problems, such as having multiple users trying to update the same
piece of data at the same time. SQL SERVER also allocates the available resources
effectively, such as memory, network bandwidth, and disk I/O, among the multiple users.
Extremely large Internet sites can partition their data across multiple servers, spreading
the processing load across many computers, and allowing the site to serve thousands of
concurrent users.
Multiple instances of SQL SERVER can be run on a single computer. For example, an
organization that provides database services to many other organizations can run a
separate instance.
BIBLIOGRAPHY
73
74