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

Project Report

Online Shopping Cart


(Implemented in ASP.Net (Code Behind C#), SQL SERVER 2008)

A PROJECT REPORT SUBMITTED TO INDIRA GANDHI NATIONAL


OPEN UNIVERSITY IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE AWARD OF

BACHELORS IN COMPUTER APPLICATIONS


(BCA)
SUBMITTED BY
JAIMEEN GOPALBHAI AGRAWAL
(BCA-122625863)
UNDER THE GUIDENCE OF
Pujan Patel(B.E.I.T.)

INDIRA GANDHI NATIONAL OPEN


UNIVERSITY

SCHOOL OF COMPUTER AND INFORMATION


SCIENCES
INDIRA GANDHI NATIONAL OPEN UNIVERSITY
MAIDAN GARHI, NEW DELHI 110 068.

2015

ACKNOWLEDGEMENT
I am greatly pleased to take this opportunity to acknowledge the co-operation and
assistance of few people without whom this endeavor would not have been a success.
Firstly, I am indebted to my guide for having shown confidence in me, and giving me an
opportunity to debut in the world of Software Engineering under his aegis. Also, he has been
extremely patient in the initial phase of the work and has given me ample opportunity to learn
and imbibe the rudiments of the subject.
Further, I would like to express my gratitude towards all staff of Company for their cooperation in all required matters. I am greatly thankful to my project partner who has helped me
in completion of this project directly or indirectly.

Date: 25/04/2015
Place: VADODARA

(JAIMEEN GOPALBHAI AGRAWAL)

Index
Sr. No.
1

Topic
Introduction & Objectives of the Project.
Introduction &
Objectives.
Definition

Feasibility Study

Technical Feasibility
Economical Feasibility
Operational Feasibility
Legal Feasibility
Financial Feasibility

Software Engineering Paradigm Applied

Introduction to Software

Software Development Life Cycle

Meaning of Spiral Model

Spiral Model

Analysis

Design

Testing

Implementation

Technology & Operation System


.Net Framework
Framework Architecture
Common Language
Specification
Common Language Runtime
Introduction of Asp.Net
Introduction of Asp.Net(C#)
Introduction of Sql Server
Data Access Layer

Software And Hardware Requirement

Page No.

Specifications
Software
Requirement
Hardware
Requirement

Analysis
Data Flow Diagrams
E-R
Diagrams
System Flow Diagram
Process Logic

Data
Dictionary (Tables)

Screen
Shots

Testcases
Coding

7
8

Coding Efficiency

Coding Optimization

10

Validation Checks

11

Testing
System

Testing

Integratio

n Testing

Unit

Testing

White Box

Testing

Black Box

Testing

Acceptanc

e Testing
12

Implementation & Maintenance


System Security
Security Measures
Cost Estimation

13

Reports

14

Chart And Project Schedule

15

Future Scope of the Project

16

Bibliography

17

Synopsis

1. Introduction
On-Line Shopping System is a web-based project which is made
for remote-shopping or shopping through Internet. As the technology is being
advanced the way of life is changing accordance. Now a days we can place
the order for any thing from our home. There is no need to go the shop of the
things we want. The order can be placed online through Internet. The
payment, the confirmation of purchasing; we can do every thing we want.
Now we can think that how the days have been changed with time. People
had to stand in rows to wait there terms to buy a particular thing from a
popular shop. But what is happening now a days; we can extremely surprise
that those things can be available on the door-step in few hours.
People had to suffer the rush of the market when they went for
shopping. They used to think hundred times to buy any thing having the
sufficient money for shopping. The problem was the rush; the quarrel at the
time of buying the things. But the advancement of technology brought the
new way for shopping. The way of shopping was completely changed with

the coming of Internet Technology. People have to fill a simple form on the
internet to place their order on any popular shop or shopping-mall for the
thing they want to buy. Now they can place their order from the home.
This project entitled On-Line Shopping is an implementation of the above
description. It means, it implements the E-shopping or in other word
shopping through Internet. It lets the user to place their order online for any
article.

3:Objective
Today the internet and its boom have created a new economic scenario that
not only stresses on the classical concept of the product but also on the
modern concept of service. It is this level of service that dictates whether a
commercial venture will succeed or not in the market. To provide a high
accessibility of service we will design the online shopping website, so that
potential customers need not go to a physical shop to buy products or
services.
There are several objective of this websites are following given bellows.

This site is gives all the information about the e-shopping to provide
better service for the customer.

It provides the facility to the customers who want to shop on-line due
to lock of time.

It provides facility to the customer to payment by the cash and cheque


and DD also.

Its providing the full details about the product and related information
about the product like cost, size etc.

With the help of it we can save the time and money also.

It provides the remote shopping by the cash, or DD, or Debit card also.

It provides better security and good delivery service to the customer.

2. Feasibility Study
Feasibility study is a process to check possibilities of system development. It is a method to
check various different requirements and availability of financial & technical resources.
Before starting the process various parameters must be checked like:

Estimated finance is there or not?


The man power to operate the system is there or not?
The man power is trained or not?
All the above conditions must be satisfied to start the project. This is why in depth analysis of
feasibility is carried out.
There are three different ways feasibility can be tested
1) Technical Feasibility
2) Economic Feasibility
3) Operational Feasibility.
4) Financial feasibility
5) Legal feasibility

Technical Feasibility:
It is basically used to see existing computer, hardware and software etc., weather it is sufficient or
additional equipments are required? Minimum System Requirement is such that it can be affordable by
of the user who is having

computer. All the user requires is compatible browser and .net framework installed so our system is
fully technical feasible.

Economic Feasibility:
In Economic feasibility, analysis of the cost of the system is carried out. The system should be
only developed if it is going to give returned the current manual system user can get the price only by
purchasing the newspapers. In addition if he/she wants to see archives of particular equity then he has to
refer to all the old newspapers. For research reports he has to buy another magazine. So Instead of
buying no of magazines user has to just go online and with a single click he can get whatever
information he wants. So our project of online share news passes the test of Economic feasibility.

Operational Feasibility:
Once the system is designed there must be trained and expert operator. If there are not trained they
should give training according to the needs of the system.
From the users perspective our system fully operational feasible as it just requires some
knowledge of computer. Operators only need add daily prices of various equities and there are enough
validations available so operator does not require any special technical knowledge. So our system also
passes the test of operational feasibility.

Legal Feasibility
Determines whether the proposed system conflicts with legal requirements, e.g. a data processing
system must comply with the local Data Protection Acts.

Financial feasibility
In case of a new project, financial viability can be judged on the following parameters:

Total estimated cost of the project

Financing of the project in terms of its capital structure, debt equity ratio and promoter's share
of total cost

Existing investment by the promoter in any other business

Projected cash flow and profitability

Final Conclusion of the Feasibility Study


Finally, from the whole study it can be concluded that the system is technically feasible, initially
if we see then the initial cost is high but by studying economical feasibility with improved level services,
customer may be attracted towards the Star Placement Services and ultimately that is our aim . Other
feasibility aspects are satisfied with considering certain risk factor, which is always present in any
proposed system project.
After completing the feasibility study I described the whole study and presented the report of the
study to the Chief Manager of Starnet Services.
We discussed about dates to start the real specification of the system and the designing days and
further details. We discussed roughly about the model of the actual software system, how it could take
place etc.

3. Software Engineering
Paradigm Applied
Introduction to Software
What is exactly meant by software? I was asked by one of the official of the Starnet
Servicesin the meeting.
Lets first define the term software.
Computer software is the product that software engineers design and build.
It encompasses programs that execute within a computer of any size and architecture,
documents that encompass hard copy and virtual forms, and data that combine numbers and
text but also includes representation of pictorial, video, and audio information.

Software Engineer builds it, and virtually everyone in the industrialized world uses it either
directly or indirectly.

Because it affects nearly every aspect of our lives and has become pervasive in our
commerce, our culture, and our everyday activities.
We build computer software like we build any successful product, by applying a process that
leads to a high quality result that meets the needs of the people who will use the product.
We apply a software engineering approach.
From the point of view of a software engineer; the work product is the programs, documents,
and data that are computer software.
But from the users point of view, the work product is the resultant information that somehow
makes the users world, User privileges better.
Software is both a product and a vehicle for delivering a product.

Software Applications
System Software
System software is a collection of programs written to service other program, e.g.
COMPLIER, EDITORS, AND FILE MANAGEMENT UTILITIES, OS COMPONENTS,
DRIVERS, etc.

Real-Time software
Software that monitors or analyzes or controls real-world events as they occur is called
real time. Elements of real-time software include a data gathering component that collects
and formats information from an external environment, an analysis component that
transforms information as required by the application, a control/output component that
responds to the external environment and a monitoring component that coordinates all other
components so that real response can be maintained.

Business Software
Business information processing is the largest single software application area. Discrete
systems (e.g. PAYROLL, ACCOUNTS RECEIVABLE/PAYABLE, INVENTORY, SMBS)

Engineering and Scientific Software


Engineering and scientific software have been characterized by number crunching
algorithms. Application range from astronomy to volcanology, from automotive stress
analysis to space shuttle orbital dynamics, and from molecular biology to automated
manufacturing.

Embedded software
Intelligent products have become commonplace in nearly every consumer and industrial
market. Embedded software resides in read-only memory and is used to control products and
systems for the consumer and industrial markets, e.g. keypad control for a microwave oven,
so we can say that they can perform very limited and esoteric functions.

Personal computer software


The personal computer software market has burgeoned over the past two decades. Word
processing, spreadsheets, computer graphics, multimedia, entertainment, personal and
business financial applications, external network, and database access are only a few of
hundreds of applications.

Web-based software
The web pages retrieved by a browser are software incorporates executable instructions
(e.g. CGI, HTML, PERL, JAVA, ASP), and data (e.g. hypertext and a variety of visual and
audio formats)

Artificial intelligence software


Artificial intelligence (AI) software makes use of nonnumeric algorithms to solve
complex problems that are not amenable to computation or straightforward analysis. Expert
systems, pattern recognition (image and voice), artificial neural networks, theorem proving,
and game playing are representatives of applications within this category.
This proposed project could be put in the category of BUSINESS APPLICATION
SOFTWARE.

Software Development life cycle


The systems development life cycle (SDLC) is a conceptual model used in project
management that describes the stages involved in an information system development project, from an
initial feasibility study through maintenance of the completed application.
Various SDLC methodologies have been developed to guide the processes involved, including
the waterfall model (which was the original SDLC method); rapid application development (RAD); joint
application development (JAD); the fountain model; the spiral model; build and fix; and synchronize-andstabilize. Frequently, several models are combined into some sort of hybrid methodology. Documentation
is crucial regardless of the type of model chosen or devised for any application, and is usually done in
parallel with the development process. Some methods work better for specific types of projects, but in the

final analysis, the most important factor for the success of a project may be how closely the particular
plan was followed.

Spiral Model
The spiral model, also known as the spiral lifecycle model, is a systems development lifecycle
(SDLC) model used in information technology (IT). This model of development combines the features of
the prototyping model and the waterfall model. The spiral model is favored for large, expensive, and
complicated projects.

Meaning of Spiral Model


A software life-cycle model which supposes incremental development, using the waterfall for
each step, with the aim of managing risk. In the spiral model, developers define and implement feature in
order of decreasing priority.

The steps in the spiral model can be generalized as follows:


The new system requirements are defined in as much detail as possible. This usually involves
interviewing a number of users representing all the external or internal users and other aspects of the
existing system.

SPIRAL MODEL

A preliminary design is created for the new system.

A first prototype of the new system is constructed from the preliminary design. This is usually a
scaled-down system, and represents an approximation of the characteristics of the final product.

A second prototype is evolved by a fourfold procedure: (1) evaluating the first prototype in terms of
its strengths, weaknesses, and risks; (2) defining the requirements of the second prototype; (3) planning
and designing the second prototype; (4) constructing and testing the second prototype.

At the customer's option, the entire project can be aborted if the risk is deemed too great. Risk factors
might involve development cost overruns, operating-cost miscalculation, or any other factor that could, in
the customer's judgment, result in a less-than-satisfactory final product.

System Analysis
The goal of system analysis is to determine where the problem is in an attempt to fix the system.
This step involves breaking down the system in different pieces to analyze the situation, analyzing project
goals, breaking down what needs to be created and attempting to engage users so that definite
requirements can be defined.
Requirements analysis sometimes requires individuals/teams from client as well as service
provider sides to get detailed and accurate requirements; often there has to be a lot of communication to
and from to understand these requirements. Requirement gathering is the most crucial aspect as many
times communication gaps arise in this phase and this leads to validation errors and bugs in the software
program.

Design
In systems design the design functions and operations are described in detail, including screen
layouts, business rules, process diagrams and other documentation. The output of this stage will describe
the new system as a collection of modules or subsystems.
The design stage takes as its initial input the requirements identified in the approved requirements
document. For each requirement, a set of one or more design elements will be produced as a result of
interviews, workshops, and/or prototype efforts.
Design elements describe the desired software features in detail, and generally include functional
hierarchy diagrams, screen layout diagrams, tables of business rules, business process diagrams, pseudo
code, and a complete entity-relationship diagram with a full data dictionary. These design elements are
intended to describe the software in sufficient detail that skilled programmers may develop the software
with minimal additional input design.

Testing
The code is tested at various levels in software testing. Unit, system and user acceptance testings
often performed. This is a grey area as many different opinions exist as to what the stages of testing are
and how much if any iteration occurs. Iteration is not generally part of the waterfall model, but usually
some occur at this stage. In the testing phase, the whole system is tested one by one

Following are the types of testing:


1. White Box Testing
2. Black Box Testing

White Box Testing


White-box testing is a method of testing software that tests internal structures or workings of an
application, as opposed to its functionality (i.e. black-box testing). In white-box testing an internal
perspective of the system, as well as programming skills, are required and used to design test cases. The
tester chooses inputs to exercise paths through the code and determine the appropriate outputs. This is
analogous to testing nodes in a circuit, e.g. in-circuit testing (ICT).

While white-box testing can be applied at the unit, integration and system levels of the software
testing process, it is usually done at the unit level. It can test paths within a unit, paths between units
during integration, and between subsystems during a system level test. Though this method of test design
can uncover many errors or problems, it might not detect unimplemented parts of the specification or
missing requirements.

Black Box testing


Block Box Testing is a method of testing that tests the functionality of an application as opposed
to its internal structures or workings (see white). Specific knowledge of the application's code/internal
structure and programming knowledge in general is not required. Test cases are built around
specifications and requirements, i.e., what the application is supposed to do. It uses external descriptions
of the software, including specifications, requirements, and designs to derive test cases. These tests can be
functional or non-functional, though usually functional. The test designer selects valid and invalid inputs
and determines the correct output. There is no knowledge of the test object's internal structure.

Implementation
In this phase the designs are translated into code. Computer programs are written using a
conventional programming language or an application generator. Programming tools like Compilers,
Interpreters, and Debuggers are used to generate the code. Different high level programming languages
like C, C++, Pascal, and Java are used for coding. With respect to the type of application, the right
programming language is chosen

4.Technology And Operation


System
The .Net Framework
A frame work is commonly thought of as a set of class libraries that aid in the development of
applications. The .net framework is more than just a set of classes. The .net framework is targeted by
compliers using a wide variety of applications. Including everything from small components that run on
handheld devices to large Microsoft ASP.ET application that span web farms, where multiple web serves
act together to improve the performance fault tolerance of a web site. The .NET framework is responsible
for providing a basic platform that these applications can share. This basic platform includes a runtimes
set of services that oversee the execution of applications. A key responsibility of the runtime is to manage
execution so that software written by different programming languages uses classes and other types
safely.
Microsoft .Net Framework Architecture
Microsoft's .NET Framework is comprised of two main components - the Common Language
Runtime (CLR) and the .NET Framework class libraries. The CLR is the real foundation of the .NET
Framework. It is the execution engine for all .NET applications. Every target computer requires the CLR
to successfully run a .NET application that uses the .NET Framework.

The main features of CLR include:


Automatic Memory Management
Thread Management
Code Compilation & Execution
Code Verification

High level of security


Remoting
Structured Exception Handling
Interoperability between Managed and Unmanaged code.
Integration with Microsoft Office System
All .NET applications are compiled into Intermediate Language code (MSIL). When executed on the
CLR, MSIL is converted into native machine code specific to the operating platform. This process is done
by a Just in Time (JIT) compiler. The code executed by the CLR is called as Managed Code. This code is
type safe and thoroughly checked by the CLR before being deployed. The .NET runtime also provides a
facility to incorporate existing COM components and DLL's into a .NET application. Code that is not
controlled by the CLR is called Unmanaged Code.

The .NET Framework is further comprised of Common Type System (CTS) and Common Language
Specification (CLS). The CTS defines the common data types used by .NET programming languages. The
CTS tells you how to represent characters and numbers in a program. The CLS represents the guidelines
defined by for the .NET Framework. These specifications are normally used by the compiler developers
and are available for all languages, which target the .NET Framework.

Net architecture

Common Language Specification


To fully interact with other objects regardless of the language they were implemented in, objects
must expose to callers only those features that are common to all the languages they must interoperate
with. For this reason, the Common Language Specification (CLS), which is a set of basic language
features needed by many applications, has been defined. The CLS rules define a subset of the Common
Type System; that is, all the rules that apply to the common type system apply to the CLS, except where
stricter rules are defined in the CLS. The CLS helps enhance and ensure language interoperability by
defining a set of features that developer can rely on to be available in a wide variety of languages. The
CLS also establishes requirements for CLS compliance; these help you determine whether your managed
code conforms to the CLS and to what extent a given tool supports the development of managed code that
uses CLS features.
If your component uses only CLS features in the API that it exposes to other code (including
derived classes), the component is guaranteed to be accessible from any programming language that
supports the CLS. Components that adhere to the CLS rules and use only the features included in the CLS
are said to be CLS-compliant components.
The CLS was designed to be large enough to include the language constructs that are commonly
needed by developers, yet small enough that most languages are able to support it. In addition, any
language constructs that makes it impossible to rapidly verify the type safety of code was excluded from
the CLS so that all CLS-compliant languages can produce verifiable code if they choose to do so.

Common Language Runtime


The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET
initiative. It is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which
defines an execution environment for program code. The CLR runs a form of byte code called the
Microsoft Intermediate Language (MSIL), Microsoft's implementation of the Common Intermediate
Language.

Developers using the CLR write code in a high level language such as C#. At compile-time, a
.NET compiler converts such code into MSIL (Microsoft Intermediate Language) code. At runtime, the
CLR's just-in-time compiler (JIT compiler) converts the MSIL code into code native to the operating
system. Alternatively, the MSIL code can be compiled to native code in a separate step prior to runtime.
This speeds up all later runs of the software as the MSIL-to-native compilation is no longer necessary.
Although some other implementations of the Common Language Infrastructure run on nonWindows operating systems, the CLR runs on Microsoft Windows operating systems.
The virtual machine aspect of the CLR allows programmers to ignore many details of the specific
CPU that will execute the program. The CLR also provides other important services, including the
following:
Memory management
Thread management
Exception handling
Garbage collection
Security

Introduction to ASP.NET
Although in C# Language, .NET is a powerful but simple language aimed primarily at developers
creating web applications for the Microsoft .NET platform. It inherits many of the best features of C++
but with some of the inconsistencies and anachronisms removed, resulting in cleaner and logical
language. C# also contains a variety of useful new innovations that accelerate application development,
especially when used in conjunction with Microsoft Visual Studio .NET.
The Common Language Runtime provides the services that are needed for executing any
application thats developed with one of the .NET languages. This is possible because all of the .NET
languages compile to a common Intermediate Language. The CLR also provides the common type system

that defines that data types that are used by all the .Net languages. That way, you can use same data types
regardless of what.NET language youre using to develop your application.

Microsoft ASP.NET( C # )
Microsoft ASP.NET( C # ) is one of the most well known languages for the front-end programming. It
provides a Rapid Application Development environment to the developers. It provides supports for the
ODBC (Open Database Connectivity) and RDO data access methods, which can be used as a powerful
development tools. It also supports ActiveX Data Objects (ADO) access methods, which is useful in
creating a web page, and writing DHTML applications. It has such tools that any programmer can have an
attractive screens which he imagines. It is the most widely used languages and is more flexible. Also one
can have the desired properties of the various commands to create textboxs, labels, used in the screens. It
also has the facility to create menu.
Microsoft ASP.NET(C #) is based on Visual Studio.NET that was developed in early 70s. Visual
Studio .Net comes in several varieties including the following:
Microsoft, realizing that ASP does possess some significant shortcomings, developed ASP.net.
ASP.net is a set of components that provide developers with a framework with which to implement
complex functionality. Two of the major improvements of ASP.net over traditional ASP are scalability and
availability. ASP.net is scalable in that it provides state services that can be utilized to manage session
variables across multiple web services in a server farm. Additionally, ASP.net possesses a high
performance process model that can detect application failures and recover from them. We use the
fundamentals of programming with C# using Visual Studio .NET and .NET framework.
The project is the starting point for authoring applications, components &services in Visual
Studio.NET 2008.It eats as a container that manages your source code, data connections & references. A
project is organized as part of a solution, which can contain multiple projects that are independent of each
other. C# project file has .asproj extension whereas solution file has .sln extension.

In order to write code against an external component, your project must first contain a reference
to it. A reference can be made to the following types of component.
(1) .NET class libraries or assemblies
(2) COM components

(3) Other class libraries of projects in the same solution


(4) XML web services

Features of ASP.NET:
(1) Component Infrastructure.
(2) Language Integration.
(3) Internet Interoperation.
(4) Simple Development.
(5) Simple Deployment.
(6) Reliability.
(7) Security

Introduction to Microsoft SQL Server


Microsoft SQL Server enhances the performance, reliability, and scalability provided by earlier
releases of SQL Server by making the processes of developing applications, managing systems, and
replicating data easier than ever.
All of data processing is involved with the operations of storing and retrieving data. A database,
such as Microsoft SQL Server, is designed as the central repository for all the data of an organization. The
crucial nature of data to any organization underlines the importance of the method used to store it and
enable its later retrieval.
Microsoft SQL Server uses features similar to those found in other databases and some features
that are unique. Most of these additional features are made possible by SQL Servers tight integration
with the Windows NT operating system. SQL Server contains the data storage options and the capability
to store and process the same volume of data as a mainframe or minicomputer.

Like most mainframe or minicomputer databases, SQL Server is a Database that has seen an
evolution from its introduction in the mid-1960s until today. Microsofts SQL Server is founded in the
mature and powerful relational model, currently the preferred model for data storage and retrieval.
Unlike mainframe and minicomputer databases, a server database is accessed by users--called
clients--from other computer systems rather than from input/output devices, such asterminals.
Mechanisms must be in place for SQL Server to solve problems that arise from theaccess of data from
perhaps Hundreds of computer systems, each of which can processportions of the database independently
from the data on the server. Within the framework of aclient/server
database, a server database also requires integration with communication components of the server in
order to enable connections with client systems.
SQL server also contains many of the front-end tools of PC databases that traditionallyhavent
been available as part of either mainframe or minicomputer databases. In addition tousing a dialect of
Structured Query Language (SQL), GUI applications can be used for the storage, retrieval, and
administration of the database.

Data Access Layer:


When working with data one option is to embed the data-specific logic directly into the presentation
layer. This may take the form of writing ADO.NET code in the ASP.NET page's code portion or using the
SqlDataSource control from the markup portion. creating a connection to the database, issuing SELECT,
INSERT, UPDATE, and DELETE commands, and so on should be located in the DAL.The presentation
layer should not contain any references to such data access code, but should instead make calls into the
DAL for any and all data requests. I have created data access layer for Fill() and Get() methods. Get is
done by two ways.

GetStory(),which will return information about the success story or user who met by this site.
GetMessage(), which will return information about a message for particular type of membership.

These methods, when invoked, will connect to the database, issue the appropriate query, and return
the results. These methods could simply return a Dataset or Data Reader populated by the database query,
but ideally these results should be returned using strongly-typed objects.

In strongly-typed Data Table, will have each of its columns implemented as properties, resulting in code
that looks like: DataTable .Rows [index].column Name.

Figure illustrates the workflow between the different layers of an application that uses Typed
Datasets.

To retrieve the data to populate the Data Table, I used a Table Adapter class, which functions as
my Data Access Layer. For our story Data Table, the Table Adapter is containing the methods
Getstory(), Getstorybyid(memberid), and so on that I can invoke from the presentation layer. The Data
Tables role is to serve as the strongly-typed objects used to pass data between the layers.
I have a Typed Dataset with a single Data Table (message) and a strongly-typed Data Adapter
class (FmsgTableAdapter,PmsgTableAdpter) with a GetMessage() method.
In my application I have used pattern for inserting, updating, and deleting data, this pattern
involves creating methods that, when invoked, issue an INSERT, UPDATE, or DELETE command to the
database that operates on a single database

record. Such methods are typically passed in a series of scalar values (integers, strings, Booleans, Date
Times, and so on) that correspond to the values to insert, update, or delete.
The patterns use the Table Adapters Insert Command, Update Command, and Delete Command
properties to issue their INSERT, UPDATE, and DELETE commands to the database.

Figure Each Insert, Update, and Delete Request Is Sent to the Database
Immediately.

5.SOFTWARE AND HARDWAREE


REQUIREMENT SPECIFICATIONS

System Implementation
The system was initially implemented in only one computer on trial basis. First, dummy data was
fed & the testing was done. All the validations & constraints in the system were checked & tested for
dummy data so that the system will not give any error in future. It satisfies the needs of the users.
After the successful & smooth running, the system is ready for the final installation or
implementation on other computers.
The system was implemented in parallel to the old system to test whether the system is able to
perform the required task with required accuracy. After near about 15 days the new system was
completely in use.

Hardware and software require


Hardware
Pentium 2.90 Ghz. Or higher microprocessor
320 GB or More Disk Space
4 GB Ram
DVD Driver.

Mouse
Keyboard
Printer

Software
Microsoft Word. (MS Agent), MS-Visio, net Frame works, MS-Sql Server express edition.

Window platform
Any Windows operating system

Details of Hardware and Software used


Details of Hardware Used

Pentium 2.90 Ghz..

320 GB Hard Disk.

4 GB RAM.

Software Used

Application Package used is Microsoft ASP.NET( C # )

Database Package: Microsoft SQL Server 2008.

Othe tools: Microsoft VISIO (UML modeling)

MS-WORD

Window Platform

Operating System: Windows 00 / NT/window XP

6. Analysis
Data Flow Diagram
After the conclusion of interviews of officials and observations from Preliminary Investigation,
Feasibility Study and Software Requirement Specifications was signed. I had to draw the Functional
Specifications from Data Flow Diagram techniques, to start designing the system.

What is a Data Flow Diagram?

Data flow diagrams illustrate how data is processed by a system in terms of

I/O.

Data Flow Diagram Notations

You can use two different types of notations on your data flow diagrams:

Yourdon & Coad or Gane & Sarson.


Process: A process transforms incoming data flow into outgoing data

flow.

: Yourdon & Coad


Process

: Gane & Sarson Process

Data Flow Diagram Layers


Draw data flow diagrams in several nested layers. A single process node

on a high level diagram can be expanded to show a more detailed data flow diagram. Draw
the context diagram

The nesting of data flow layers

Context Diagrams: A context diagram is a top level (also known as Level


0) data flow diagram. It only contains one process node (process 0) that generalizes the DFD.

Data Flow Diagram


DFD at 0 Level:

1 Level DFD:

2 Level DFD:

Entity - Relationship Diagram:-

Process Logic

Process logic is concerned with how the system interact with users and
fulfill there requirements? Being a web based system; user of this
system can easily access this system through Internet. It provides
various functionalities, attracts the user to use it, and makes the user
comfortable to work on it.

Before providing access to the manipulating authorities, it first


demands for user name and password based on user type. If the name
and password entered are correct then one can enter the admin menu
and can change any contents from this place. Note that it also works
as a public website where one can see the information based on the
purpose to access this website. There is no need for authentication
here, because they has to only access the site not change or update
any content and they also cannot change it because they have no
authority to change. Here user finds various menus and sub menus and
can select any one of them as there requirement.

Let I explain the process logic of admin module that


how one can perform the task of administrator. First one has to give
user name and password which should be checked by the system on
the basis of information stored in the database.

SYSTEM FLOW CHART

Data Dictionary

Database is collection of data that can be treated as single unit. ThisSingle or


individual unit is called table. In relational database system Table is
combination of rows and columns which show records and fields
Respectively. After great efforts we determine the main entities, there
attribute and relationship among them. After determining all these entities,
we design the table structure as follows:
Login Table:
S.R
1.

Data Type
Integer

Size
5

Validation

2.

Field Name
S.No (autoincrement)
U_name

Varchar

20

Primary Key

3.

Password

Varchar

20

Data Type
Varchar
Varchar
Date
Varchar
Varchar
Integer
Date
Integer
Varchar

Size
20
20

Data Type

Size

Employee Details Table:


S.R
1.
2.
3.
4.
5.
6.
7.
8.
9.

Field Name
E_Id
E_Name
J_date
Sex
Address
Phone No
DOB
Salary
Specialization

Validation
Primary key

6
50
10
10
20

Category Table:
S.R

Field Name

Validation

1.
2.

Category id
Name

Integer
Varchar

5
20

Primary Key

Sub-Category Table:
S.R
1.
2.

Field Name
Sub-Category id
Name

Data Type
Integer
Varchar

Size
5
20

Category Id

Integer

Validation
Primary Key

Customer Service Table:


S.R
1.

Field Name
First Name

Data type
Varchar

Size
20

2.
3.
4.
5.
6.
7
8
9
10
11

Middle Name
Last Name
Address
Contact_no
Gender
Birth Date
User Name
Password
Question
Answer

Varchar
Varchar
Varchar
Integer
Varchar
Integer
Varchar
Varchar
Varchar
Varchar

20
20
300
12
10
20
20
20
500
1000

Purchase Table:

Validation
Primary
key

S.R
1.
2.
3.
4.
5.
6.

Field Name
Pur_id
ItemName
Rate
Item_category
Quantity
Date

Data type
Varchar
Varchar
Varchar
Varchar
Integer
Datetime

Size
10
300
100
300
5

Validation
Primary key

Data type
Varchar
Varchar
Varchar
dateTime
dateTime
Varchar
Varchar
Varchar
Varchar

Size
10
30
79

Validation
Primary key

Data Type
Varchar
Varchar
Date
Varchar
Varchar
Integer
Integer

Size
20
200

Advertisement Table:
S.R
1.
2.
3.
4.
5.
6.
7.
8.
9.

Field Name
Ad_id
Ad_name
Image
Ad_start_date
ad_end_date
Comp_name
Address
Contact_no
Email

89
78
12
78

Payment Table:
S.R
1.
2.
3.
4.
5.
6.
7.

Field Name
P_id
P_name
P_date
Cust_name
Pay_mode
Cash
DD

Product Tracking Table:

67
50
10
23

Validation
Primary key

S.R
S.R
1
1.
2
2.
3
3.
4.
5.
6.
7.

Field Name
Field Name
State Id
P_id
State Name
Cust_name
Country ID
Delvr_date
Amount
Contact_no
Address
Email

Data Type
Data Type
Varchar
Varchar
Varchar
Varchar
Varchar
Date
Varchar
Varchar
Varchar
Varchar

Size
Size
20
20
20
200
20

Validation
Validation
Primary key
Primary key

67
50
100
56

Country Table:

S.R Field Name


1
Country id
2
Country name
3
Country Alias
State Table:
S.R
1
2
3

Field Name
StateId
StateName
CountryID

Data Type
Varcher
Varchar
Varchar

Size
20
50
50

Validation
Primary key

Data Type
Varchar
Varchar
Varchar

Size
20
20
20

Validation
Primary key

Data Type
Varchar
Varchar
Varchar

Size
20
20
20

Validation
Primary key

City Table:
S.R
1
2
3

Field Name
City Id
City Name
State ID

Screen Shots

Admin
Admin Change Password Form:

Admin Forgot Password Form:

Advertise Form:

Category Master Form:

City Master Form:

Coutry Form:

Employee Form:

Admin Login Form:

ForgotPassword:

Payment Form:

Product Form:

Product Track Form:

Purchase Form:

State Master Form:

SubCategory Form:

User Master Form:

User
Customer Registrition Form:

Change Password Form:

(Password Change Succefully)

(password Does not match)

Forgot Password Form:

User Login Form:

Welcome Page Form:

SubCategory Form:

Product Form:

ProductDetailsForm:

Test Cases Of Admin Side

Test Case

Form Name

StepDetails
1.UserName:

Login

jaimeen

Login Form
2.Password:
Login

Expected Result:
1. If UserNAme and Password Is Incorrect than the User cant Login
into the System.
2. If UserName and Password is Correct than the User will Go on the
Welcome Page
UserName And Password Correct
Test Case
Form Name

Actor Master

Actor Master Form

StepDetails

1.Actor Name

Abhishek

Expected Result:
If a enter

Test Case

Form Name

StepDetails
1.Sub Category Name

Sub Category
Master

Telivison

Sub Category Master Form


2.Category Name

Expected Result:
Test Case
Change Password

Form Name
ChangePasswordForm

Electronics

StepDetails
1. If Current Password
Is Incorrect
2. New Password and
Confirm Password is
Incorrect
3. If all Fields are Correct

Expected Results:
Here Firstly the User has to Login Correctly than Only he/she can
Change Password
1. If Current Password entered does not match than a message is Shown.
2. If after inserting correct userpassword the newpassword and confirm
password should match.
3. If Newpassword and ConfirmPassword both matches than after
clicking on
thePassword will Successfully change

Test Cases OfUser Side

Test Case

Form Name

Register User

Register User Master

StepDetails
1. If in mobile No. field
instead of number
anything else is inserted.
2. If in Dropdown box the
User wanted field is not
there.
3. If all Data are Entered
Correctly.

1. If Mobile No. Field is not entered correctlt than a message will shown as:
2. If in Qualification the required qualification is not there as per the user
Qualification than selected Other option from Dropdown box a textbox is
visible in that he/she can write his/her Qualification.
3. If all fields are inserted than the will be submitted Successfully.
Test Case

Form Name

Forgot Password

ForgotPasswordForm

StepDetails
1. On entering UserName
and Clicking on
Forgorpassword Link.
2. Password Shown if
Emailid and Username
is Correct.

Expected Results:
1. On entering Username and Clicking on Forgot Password Link the User can
get his/her Password.

2. If UserName or Password is not Correct than a Message is Thrown.

7. Coding

Admin-
Admin ChangePassword:
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;
publicpartialclassAdmin_AdminChangePassword : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid ClearData()
{
txtunm.Text = "";
txtcupsw.Text = "";
txtnepsw.Text = "";
}
protectedvoid btnchange_Click(object sender, EventArgs e)
{
try
{
if (txtnepsw.Text == txtrepsw.Text)
{
SqlCommand cmd = newSqlCommand("UpdateChangePsw", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@UserName", SqlDbType.VarChar);
parm.Value = txtunm.Text;
parm.Direction = ParameterDirection.Input;

cmd.Parameters.Add(parm);
parm = newSqlParameter("@Password", SqlDbType.VarChar);
parm.Value = txtcupsw.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ChangePassword", SqlDbType.VarChar);
parm.Value = txtnepsw.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Password SuccessFuly
Changed");
ClearData();
CloseConnection();
}
else
{
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Password Does Not
Match");
}
}
catch (Exception ex)
{
}
}
}

AdminForgot 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.SqlClient;
using System.Data;
using System.Configuration;

publicpartialclassAdmin_AdminForgotPassword : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid clearData()
{
txtunm.Text = "";
txtemail.Text = "";
}
protectedvoid btnsubmit_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = newSqlCommand("ReadForgotPsw", con);
cmd.CommandType = CommandType.StoredProcedure;

SqlParameter parm = newSqlParameter("@UserName", SqlDbType.VarChar);


parm.Value = txtunm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Email", SqlDbType.VarChar);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
lnkpassword.Text = dr["Password"].ToString();
}
}
else
{
lnkpassword.Text = "UserName/ContactNo Wrong";
}
dr.Close();
clearData();
CloseConnection();
}
catch (Exception ex)
{
LeeGunn.Web.UI.MessageBox.MessageBox.Show(ex.Message.ToString());
}
}
}

Advertise:
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;
publicpartialclassAdmin_Advertise : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}

protectedvoid btnsubmit_Click(object sender, EventArgs e)


{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertAd", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@AdvertiseName", SqlDbType.VarChar);
parm.Value = txtadnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Image", SqlDbType.VarChar);
parm.Value = FileUpload1.FileName;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@AdStart", SqlDbType.Date);
parm.Value = txtadsdt.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@AdEnd", SqlDbType.Date);
parm.Value = txtadedt.Text;

parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CompanyName", SqlDbType.VarChar);
parm.Value = txtconm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Address", SqlDbType.VarChar);
parm.Value = txtadd.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ContactNo", SqlDbType.NChar);
parm.Value = txtcnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Email", SqlDbType.VarChar);
parm.Value = txtemail.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);

OpenConnection();
cmd.ExecuteNonQuery();
ClearFields();
cmd.Dispose();
CloseConnection();

}
publicvoid ClearFields()
{
txtadnm.Text = "";
//FileUpload1.FileName ="";
txtadsdt.Text ="";
txtadedt.Text="";
txtconm.Text="";
txtadd.Text="";
txtcnm.Text="";
txtemail.Text = "";
}
}
CategoryMaster:
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;
publicpartialclassAdmin_CategoryMaster : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
BindControl();
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader Dr = cmd.ExecuteReader();
Gridview2.DataSource= Dr;
Gridview2.DataBind();
Dr.Close();
cmd.Dispose();
CloseConnection();

}
publicvoid ClearData()
{
txtcatnm.Text="";
txtcatnm.Focus();
}

protectedvoid Gridview2_RowCommand(object sender,


GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow raw = Gridview2.Rows[index];
if(e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["catid"] = id;
SqlCommand cmd = newSqlCommand("SelectCategory",con);
cmd.CommandType= CommandType.StoredProcedure;
SqlParameter parm= newSqlParameter("@Categoryid",SqlDbType.Int);
parm.Value = id;
parm.Direction= ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr= cmd.ExecuteReader();
while(dr.Read())
{
txtcatnm.Text = dr["CategoryName"].ToString();
}

dr.Close();
cmd.Dispose();
Btnsubmit.Text = "Update";
CloseConnection();

if (e.CommandName == "DeleteButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["Catid"] = id;
SqlCommand cmd = newSqlCommand("DeleteCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CategoryId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
//LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted Successfully");
cmd.Dispose();
BindControl();
ClearData();

CloseConnection();
}
}
protectedvoid Btnsubmit_Click1(object sender, EventArgs e)
{
if (Btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CategoryName", SqlDbType.VarChar);
parm.Value = txtcatnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearData();
cmd.Dispose();
CloseConnection();
else

{
SqlCommand cmd = newSqlCommand("UpdateCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CategoryId", SqlDbType.Int);
parm.Value = ViewState["catid"].ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CategoryName", SqlDbType.VarChar);
parm.Value = txtcatnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
// LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
ClearData();
cmd.Dispose();
CloseConnection();
Btnsubmit.Text = "Submit";
}
}

protectedvoid Gridview2_RowCreated(object sender, GridViewRowEventArgs e)


{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
}

City Master:
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;
publicpartialclassAdmin_CityMaster : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["Shopping"].ToString
());
BindCityName();
BindControl();
}
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadCity", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
GridView1.DataSource = dr;

GridView1.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}
publicvoid ClearData()
{
txtcnm.Text = "";
}

protectedvoid btnsubmit_Click(object sender, EventArgs e)


{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertCity", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CityName", SqlDbType.VarChar);
parm.Value = txtcnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@StateId", SqlDbType.Int);
parm.Value = DropDownList1.SelectedValue ;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearData();
cmd.Dispose();
CloseConnection();
}
else
{
SqlCommand cmd = newSqlCommand("UpdateCity", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@City_Name", SqlDbType.VarChar);
parm.Value = txtcnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@State_Id", SqlDbType.Int);
parm.Value= DropDownList1.Text;

parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
// LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
ClearData();
cmd.Dispose();
CloseConnection();
btnsubmit.Text = "Submit";
}
}

publicvoid BindCityName()
{
SqlCommand cmd = newSqlCommand("ReadCity", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
DropDownList1.DataSource = dr;
DropDownList1.DataTextField = "City_Name";
DropDownList1.DataValueField = "City_Id";
DropDownList1.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}
protectedvoid GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);

GridViewRow raw = GridView1.Rows[index];


if (e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["Cid"] = id;
SqlCommand cmd = newSqlCommand("SelectCity", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@City_Id", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtcnm.Text = dr["City_Name"].ToString();
}

dr.Close();
cmd.Dispose();
btnsubmit.Text = "Update";
CloseConnection();

if (e.CommandName == "DeleteButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["Cid"] = id;
SqlCommand cmd = newSqlCommand("DeleteCity", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@City_Id", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
//LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted Successfully");
cmd.Dispose();
BindControl();
ClearData();
CloseConnection();
}
}

protectedvoid DropDownList1_SelectedIndexChanged(object sender, EventArgs e)


{
}
}

Country Master:
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;

publicpartialclassAdmin_CountryMaster : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
BindControl();
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();

}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadCountry", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader Dr = cmd.ExecuteReader();
GridView1.DataSource = Dr;
GridView1.DataBind();
Dr.Close();
cmd.Dispose();
CloseConnection();

}
publicvoid ClearData()
{
txtcnm.Text = "";
txtcali.Text="";
}

protectedvoid GridView1_RowCreated(object sender, GridViewRowEventArgs e)


{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow raw = GridView1.Rows[index];
if (e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);

ViewState["cid"] = id;
SqlCommand cmd = newSqlCommand("SelectCountry", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CountryId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtcnm.Text = dr["Country_Name"].ToString();
txtcali.Text = dr["Country_Alias"].ToString();
}
dr.Close();
cmd.Dispose();
btnsubmit.Text = "Update";
CloseConnection();
}
if (e.CommandName == "DeleteButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["cid"] = id;
SqlCommand cmd = newSqlCommand("DeleteCountry", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CountryId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
//LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted Successfully");
cmd.Dispose();
BindControl();
ClearData();
CloseConnection();
}
}
protectedvoid btnsubmit_Click(object sender, EventArgs e)
{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertCountry", con);

cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CountryName", SqlDbType.VarChar);
parm.Value = txtcnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CountryAlias", SqlDbType.VarChar);
parm.Value = txtcali.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearData();
cmd.Dispose();
CloseConnection();
else

{
SqlCommand cmd = newSqlCommand("UpdateCountry", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@CountryId", SqlDbType.Int);
parm.Value = ViewState["cid"].ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CountryName", SqlDbType.VarChar);
parm.Value = txtcnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CountryAlias", SqlDbType.VarChar);
parm.Value = txtcali.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
// LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
ClearData();
cmd.Dispose();
CloseConnection();
btnsubmit.Text = "Submit";
}

Employee:
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;
publicpartialclassAdmin_Employee : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)

{
con.Close();
}
con.Open();

}
publicvoid CloseConnection()
{
con.Close();
}
protectedvoid btnsubmit_Click(object sender, EventArgs e)
{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertEmployee", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@EmployeeName", SqlDbType.VarChar);
parm.Value = txtenm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@JoinedDate", SqlDbType.Date);
parm.Value = txtjodt.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Sex", SqlDbType.VarChar);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Address", SqlDbType.VarChar);
parm.Value = txtadd.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PhoneNo", SqlDbType.NChar);
parm.Value = txtphnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@DOB", SqlDbType.Date);
parm.Value = txtdob.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Salary", SqlDbType.Int);
parm.Value = txtsal.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Specialization", SqlDbType.VarChar);

parm.Value = txtspec.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
ClearFields();
cmd.Dispose();
CloseConnection();

}
}
protectedvoid ClearFields()
{
txtenm.Text = "";
txtjodt.Text = "";
DropDownList1.SelectedValue = "";
txtadd.Text = "";
txtphnm.Text = "";
txtdob.Text = "";
txtsal.Text = "";
txtspec.Text = "";
}

protectedvoid btnreset_Click1(object sender, EventArgs e)


{
ClearFields();
}
}

Admin 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.SqlClient;
using System.Data;
using System.Configuration;

publicpartialclassAdmin_Login : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
try
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["Shopping"].ToString
());
OpenConnection();
CloseConnection();
}
catch (Exception ex)
{
lblMessage.Text = ex.Message.ToString();
}
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}

protectedvoid btnlogin_Click(object sender, EventArgs e)


{
try
{
string strg = "select * from UserMaster where UserName='" + TextBox1.Text + "'
and Password='" + TextBox2.Text + "'";
SqlCommand cmd = newSqlCommand(strg, con);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read() == true)
{
Session["UserName"] = btnlogin.Text;
Response.Redirect("WelcomePage.aspx");
}
else
{
lblMessage.Text = "UserName and Password Does Not Match";
}
dr.Close();
cmd.Dispose();
CloseConnection();
}
catch (Exception ex)
{
lblMessage.Text = ex.Message.ToString();
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
}

protectedvoid TextBox1_TextChanged(object sender, EventArgs e)


{
}
protectedvoid LinkButton1_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("AdminForgotPassword.aspx");
}

Payment:
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;
publicpartialclassAdmin_Payment : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadPayment", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader Dr = cmd.ExecuteReader();
GridView1.DataSource = Dr;
GridView1.DataBind();
Dr.Close();
cmd.Dispose();
CloseConnection();

}
publicvoid ClearFields()
{
txtpaynm.Text = "";
txtpaydt.Text = "";
txtcusnm.Text = "";
txtpaymode.Text = "";
txtcash.Text = "";
txtdd.Text = "";
}

protectedvoid btnsubmit_Click(object sender, EventArgs e)


{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertPayment", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@PaymentName", SqlDbType.VarChar);
parm.Value = txtpaynm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PaymentDate", SqlDbType.Date);
parm.Value = txtpaydt.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CustomerName", SqlDbType.VarChar);
parm.Value = txtcash.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PaymentMode", SqlDbType.VarChar);
parm.Value = txtpaymode.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Cash", SqlDbType.Int);
parm.Value = txtcash.Text;
parm.Direction = ParameterDirection.Input;
parm = newSqlParameter("@DD", SqlDbType.Int);
parm.Value = txtdd.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearFields();

LeeGunn.Web.UI.MessageBox.MessageBox.Show("Payment Method Is
Submitted Successfully");
cmd.Dispose();
CloseConnection();
}
else
{
SqlCommand cmd = newSqlCommand("UpdatePayment", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@PaymentId", SqlDbType.Int);
parm.Value = ViewState["pid"].ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PaymentName", SqlDbType.VarChar);
parm.Value = txtpaynm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PaymentDate", SqlDbType.Date);
parm.Value = txtpaydt.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CustomerName", SqlDbType.VarChar);
parm.Value = txtcusnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PaymentMode", SqlDbType.VarChar);
parm.Value = txtpaymode.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Cash", SqlDbType.Int);
parm.Value = txtcash.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@DD", SqlDbType.Int);
parm.Value = txtdd.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearFields();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
cmd.Dispose();
CloseConnection();
btnsubmit.Text = "Submit";

}
}
protectedvoid btncancel_Click(object sender, EventArgs e)
{
ClearFields();
}
protectedvoid GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow raw = GridView1.Rows[index];
if (e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["pid"] = id;
SqlCommand cmd = newSqlCommand("SelectPayment", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@PaymentId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtpaynm.Text = dr["Payment_Name"].ToString();
txtpaydt.Text = dr["Payment_Date"].ToString();
txtcusnm.Text = dr["Customer_Name"].ToString();
txtpaymode.Text = dr["Payment_Mode"].ToString();
txtcash.Text = dr["Cash"].ToString();
txtdd.Text = dr["DD"].ToString();
}

dr.Close();
cmd.Dispose();
btnsubmit.Text = "Update";
CloseConnection();

if (e.CommandName == "DeleteButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["pid"] = id;
SqlCommand cmd = newSqlCommand("deletePayment", con);

cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@PaymentId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted
Successfully");
cmd.Dispose();
BindControl();
ClearFields();
CloseConnection();
}
}
protectedvoid GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
}

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

publicpartialclassAdmin_Product : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadProduct", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader Dr = cmd.ExecuteReader();
GridView2.DataSource = Dr;
GridView2.DataBind();
Dr.Close();
cmd.Dispose();
CloseConnection();
}
publicvoid ClearFields()
{

txtpnm.Text = "";
txtprodis.Text = "";
txtquan.Text = "";
txtpp.Text = "";
}

protectedvoid btnsubmit_Click(object sender, EventArgs e)


{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertProduct", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@ProductName", SqlDbType.VarChar);
parm.Value = txtpnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PImage", SqlDbType.VarChar);
parm.Value = FileUpload1.FileName;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ProDiscription", SqlDbType.VarChar);
parm.Value = txtprodis.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Category", SqlDbType.VarChar);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@SubCategory", SqlDbType.VarChar);
parm.Value = DropDownList2.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Quantity", SqlDbType.Int);
parm.Value = txtquan.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ProductPrice", SqlDbType.Int);
parm.Value = txtpp.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();

cmd.ExecuteNonQuery();
BindControl();

ClearFields();
cmd.Dispose();
CloseConnection();

else

{
SqlCommand cmd = newSqlCommand("UpdateProduct", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@ProductId", SqlDbType.Int);
parm.Value = ViewState["pid"].ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ProductName", SqlDbType.VarChar);
parm.Value = txtpnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@PImage", SqlDbType.VarChar);
parm.Value = FileUpload1.FileName ;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ProDiscription", SqlDbType.VarChar);
parm.Value = txtprodis.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Category", SqlDbType.VarChar);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@SubCategory", SqlDbType.VarChar);
parm.Value = DropDownList2.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Quantity", SqlDbType.Int);
parm.Value = txtquan.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ProductPrice", SqlDbType.Int);
parm.Value = txtpp.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();

LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
ClearFields();
cmd.Dispose();
CloseConnection();
btnsubmit.Text = "Submit";
}
}

protectedvoid btncancel_Click(object sender, EventArgs e)


{
ClearFields();
}
protectedvoid GridView2_RowCommand1(object sender,
GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow raw = GridView2.Rows[index];
if (e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["pid"] = id;
SqlCommand cmd = newSqlCommand("SelectProduct", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@ProductId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtpnm.Text = dr["Product_Name"].ToString();
txtprodis.Text = dr["Pro_Discription"].ToString();
txtquan.Text = dr["Quantity"].ToString();
txtpp.Text = dr["Product_Price"].ToString();
}

dr.Close();
cmd.Dispose();
btnsubmit.Text = "Update";
CloseConnection();

if (e.CommandName == "DeleteButton")
{
int id;

id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["pid"] = id;
SqlCommand cmd = newSqlCommand("deleteProduct", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@ProductId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted
Successfully");
cmd.Dispose();
BindControl();
ClearFields();
CloseConnection();
}

}
protectedvoid GridView2_RowCreated1(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
}

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

publicpartialclassAdmin_Purchase : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadPurchase", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader Dr = cmd.ExecuteReader();
GridView1.DataSource = Dr;
GridView1.DataBind();
Dr.Close();
cmd.Dispose();
CloseConnection();
}
publicvoid ClearFields()

{
txtitem.Text = "";
txtrate.Text = "";
txtquan.Text = "";
txtitemcat.Text = "";
txtdate.Text = "";
}

protectedvoid btnsubmit_Click(object sender, EventArgs e)


{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertPurchase", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@ItemName", SqlDbType.VarChar);
parm.Value = txtitem.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Rate", SqlDbType.VarChar);
parm.Value = txtrate.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ItemCategory", SqlDbType.VarChar);
parm.Value = txtitemcat.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Quantity", SqlDbType.Int);
parm.Value = txtquan.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Date", SqlDbType.Date);
parm.Value = txtdate.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Submited
Successfully");
ClearFields();
cmd.Dispose();
CloseConnection();
}
else

{
SqlCommand cmd = newSqlCommand("UpdatePurchase", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@PurchaseId", SqlDbType.Int);
parm.Value = ViewState["pid"].ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ItemName", SqlDbType.VarChar);
parm.Value = txtitem.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Rate", SqlDbType.VarChar);
parm.Value = txtrate.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ItemCategory", SqlDbType.VarChar);
parm.Value = txtitemcat.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Quantity", SqlDbType.Int);
parm.Value = txtquan.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Date", SqlDbType.Date);
parm.Value = txtdate.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
ClearFields();
cmd.Dispose();
CloseConnection();
btnsubmit.Text = "Submit";
}
}
protectedvoid GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow raw = GridView1.Rows[index];

if (e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["pid"] = id;
SqlCommand cmd = newSqlCommand("SelectPurchase", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@PurchaseId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtitem.Text = dr["ItemName"].ToString();
txtrate.Text = dr["Rate"].ToString();
txtitemcat.Text = dr["Item_Category"].ToString();
txtquan.Text = dr["QUantity"].ToString();
txtdate.Text = dr["Date"].ToString();
}
dr.Close();
cmd.Dispose();
btnsubmit.Text = "Update";
CloseConnection();
}
if (e.CommandName == "DeleteButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["pid"] = id;
SqlCommand cmd = newSqlCommand("DeletePurchase", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@PurchaseId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted
Successfully");
cmd.Dispose();
BindControl();
ClearFields();
CloseConnection();

}
}
protectedvoid GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}

State Master:
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;
publicpartialclassAdmin_StateMaster : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["Shopping"].ToString
());
BindControl();
BindStateName();
}
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();

}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadState", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
GridView2.DataSource = dr;
GridView2.DataBind();

dr.Close();
cmd.Dispose();
CloseConnection();

publicvoid ClearData()
{
txtsnm.Text = "";
}
publicvoid BindStateName()
{
SqlCommand cmd = newSqlCommand("ReadState", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
DropDownList1.DataSource = dr;
DropDownList1.DataTextField = "State_Name";
DropDownList1.DataValueField = "Country_Name";
DropDownList1.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}
protectedvoid GridView2_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid GridView2_RowCommand(object sender,
GridViewCommandEventArgs e)

{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow raw = GridView2.Rows[index];
if (e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["sid"] = id;
SqlCommand cmd = newSqlCommand("SelectState", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@StateId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtsnm.Text = dr["State_Name"].ToString();
DropDownList1.SelectedValue = dr["Country_Name"].ToString();
}
dr.Close();
cmd.Dispose();
btnsubmit.Text = "Update";
CloseConnection();
}
if (e.CommandName == "DeleteButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["sid"] = id;
SqlCommand cmd = newSqlCommand("DeleteState", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@StateId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
//LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted Successfully");
cmd.Dispose();
BindControl();
ClearData();
CloseConnection();

}
}
protectedvoid btnsubmit_Click(object sender, EventArgs e)
{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertState", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@StateName", SqlDbType.VarChar);
parm.Value = txtsnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CountryName", SqlDbType.VarChar);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearData();
cmd.Dispose();
CloseConnection();
}
else

{
SqlCommand cmd = newSqlCommand("UpdateState", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@StateId", SqlDbType.Int);
parm.Value = ViewState["sid"].ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@StateName", SqlDbType.VarChar);
parm.Value = txtsnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CountryName", SqlDbType.VarChar);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearData();

// LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
cmd.Dispose();
CloseConnection();
btnsubmit.Text = "Submit";
}
}
}

SubCategory Master:
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;

publicpartialclassAdmin_SubCategoryMaster : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
BindControl();
BindSubCategoryName();
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}

publicvoid CloseConnection()
{
con.Close();
}
publicvoid BindControl()
{
SqlCommand cmd = newSqlCommand("ReadSubCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader Dr = cmd.ExecuteReader();
GridView1.DataSource = Dr;
GridView1.DataBind();
Dr.Close();
cmd.Dispose();
CloseConnection();

}
publicvoid ClearData()
{
txtsubnm.Text = "";
}
publicvoid BindSubCategoryName()
{
SqlCommand cmd = newSqlCommand("ReadSubCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
DropDownList1.DataSource = dr;
DropDownList1.DataTextField = "SubCategoryName";
DropDownList1.DataValueField = "SubCategoryId";
DropDownList1.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}

protectedvoid btnsubmit_Click(object sender, EventArgs e)


{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertSubCategory", con);
cmd.CommandType = CommandType.StoredProcedure;

SqlParameter parm = newSqlParameter("@SubCategoryName",


SqlDbType.VarChar);
parm.Value = txtsubnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CategoryId", SqlDbType.Int);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
ClearData();
cmd.Dispose();
CloseConnection();
else

{
SqlCommand cmd = newSqlCommand("UpdateSubCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@SubCategoryId", SqlDbType.Int);
parm.Value = ViewState["subid"].ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@SubCategoryName", SqlDbType.VarChar);
parm.Value = txtsubnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@CategoryId", SqlDbType.Int);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
BindControl();
// LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Updated
Successfully");
ClearData();
cmd.Dispose();
CloseConnection();
btnsubmit.Text = "Submit";
}
}
protectedvoid GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)

{
LinkButton lnkEdit = (LinkButton)e.Row.FindControl("lnkEdit");
lnkEdit.CommandArgument = e.Row.RowIndex.ToString();
LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete");
lnkDelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid GridView1_RowCommand(object sender,
GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow raw = GridView1.Rows[index];
if (e.CommandName == "EditButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["subid"] = id;
SqlCommand cmd = newSqlCommand("SelectSubCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@SubCategoryId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
txtsubnm.Text = dr["SubCategoryName"].ToString();
DropDownList1.SelectedValue = dr["CategoryId"].ToString();
}
dr.Close();
cmd.Dispose();
btnsubmit.Text = "Update";
CloseConnection();
}
if (e.CommandName == "DeleteButton")
{
int id;
id = Convert.ToInt32(raw.Cells[2].Text);
ViewState["subid"] = id;
SqlCommand cmd = newSqlCommand("DeleteSubCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@SubCategoryId", SqlDbType.Int);
parm.Value = id;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);

OpenConnection();
cmd.ExecuteNonQuery();
//LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted Successfully");
cmd.Dispose();
BindControl();
ClearData();
CloseConnection();
}
}
protectedvoid GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}

User Master :
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;

publicpartialclassAdmin_UserMaster : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());

}
publicvoid OpenConnection()

{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertUser", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@UserName", SqlDbType.VarChar);
parm.Value = txtunm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Password", SqlDbType.VarChar);
parm.Value = txtpsw.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@UserFullName", SqlDbType.VarChar);
parm.Value = txtufnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Email", SqlDbType.VarChar);
parm.Value = txtemail.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ContactNo", SqlDbType.VarChar);
parm.Value = txtcno.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Address", SqlDbType.VarChar);
parm.Value = txtadd.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Gender", SqlDbType.VarChar);
parm.Value = DropDownList1.SelectedValue; ;
parm.Direction = ParameterDirection.Input;

cmd.Parameters.Add(parm);
parm = newSqlParameter("@Seq_Ques", SqlDbType.VarChar);
parm.Value = DropDownList2.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Answer", SqlDbType.VarChar);
parm.Value = txtans.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);

OpenConnection();
cmd.ExecuteNonQuery();
ClearFields();
cmd.Dispose();
CloseConnection();
}

}
protectedvoid DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protectedvoid Button2_Click(object sender, EventArgs e)
{
ClearFields();
}
protectedvoid ClearFields()
{
txtunm.Text = "";
txtpsw.Text = "";
txtufnm.Text = "";
txtemail.Text = "";
txtcno.Text = "";
txtadd.Text = "";
txtans.Text = "";
}
}

User
CustomerRegisratition:
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;
publicpartialclassUser_CoustomerRegistrition : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
protectedvoid btnsubmit_Click(object sender, EventArgs e)
{
if (btnsubmit.Text == "Submit")
{
SqlCommand cmd = newSqlCommand("InsertCustomer", con);
cmd.CommandType = CommandType.StoredProcedure;

SqlParameter parm = newSqlParameter("@FirstName", SqlDbType.VarChar);


parm.Value = txtfnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@MiddleName", SqlDbType.VarChar);
parm.Value = txtmnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@LastName", SqlDbType.VarChar);
parm.Value = txtlnm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Address", SqlDbType.VarChar);
parm.Value = txtadd.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ContactNo", SqlDbType.VarChar);
parm.Value = txtconm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Gender", SqlDbType.VarChar);
parm.Value = DropDownList1.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@BirthDate", SqlDbType.Date);
parm.Value = txtbd.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@UserName", SqlDbType.VarChar);
parm.Value = txtunm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Password", SqlDbType.VarChar);
parm.Value = txtpsw.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Question", SqlDbType.VarChar);
parm.Value = DropDownList2.SelectedValue;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Answer", SqlDbType.VarChar);
parm.Value = txtans.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);

OpenConnection();
cmd.ExecuteNonQuery();
ClearFields();
cmd.Dispose();
CloseConnection();
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
ClearFields();
}
protectedvoid ClearFields()
{
txtunm.Text = "";
txtpsw.Text = "";
DropDownList2.SelectedValue = "";
txtfnm.Text = "";
txtmnm.Text = "";
txtlnm.Text = "";
DropDownList1.SelectedValue = "";
txtbd.Text = "";
txtconm.Text = "";
txtadd.Text = "";
txtans.Text = "";
}
}

Change Password:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

using
using
using
using

System.Web.UI.WebControls;
System.Data.SqlClient;
System.Data;
System.Configuration;

publicpartialclassUser_ChangePassword : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid ClearData()
{
txtpsw.Text = "";
txtnpsw.Text = "";
txtunm.Text ="";
}

protectedvoid btnchange_Click(object sender, EventArgs e)


{
try
{
if (txtnpsw.Text == txtrepsw.Text)
{
SqlCommand cmd = newSqlCommand("UpdateChangePassword", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@UserName", SqlDbType.VarChar);
parm.Value = txtunm.Text;

parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@Password", SqlDbType.VarChar);
parm.Value = txtpsw.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
cmd.ExecuteNonQuery();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Password SuccessFuly
Changed");
ClearData();
CloseConnection();
}
else
{
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Password Does Not
Match");
}
}
catch (Exception ex)
{
}
}
}

Detail Product Data:


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;
publicpartialclassUser_DetailsData : System.Web.UI.Page
{
publicstaticSqlConnection con;
publicstaticstring strgs3;

protectedvoid Page_Load(object sender, EventArgs e)


{
con =
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionString
s["Shopping"].ToString());
strgs3 = Request.QueryString["Product"].ToString();
SqlCommand cmd = newSqlCommand("ProductDetails", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@ProductId",SqlDbType.Int);
parm.Value = strgs3.ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
DataList1.DataSource = dr;
DataList1.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
protectedvoid DataList1_ItemCommand1(object source,
DataListCommandEventArgs e)
{
if (e.CommandName == "view")
{
Label lblCategory = (Label)e.Item.FindControl("Label");
Response.Redirect("SelectProduct.aspx?Product=" + lblCategory.Text);
}
}
}
Select Product:
using System;
using System.Collections.Generic;
using System.Linq;

using
using
using
using
using

System.Web;
System.Web.UI;
System.Web.UI.WebControls;
System.Data.SqlClient;
System.Data;

publicpartialclassUser_SelectProduct : System.Web.UI.Page
{
publicstaticSqlConnection con;
publicstaticstring strgs2;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionString
s["Shopping"].ToString());
strgs2 = Request.QueryString["SubCategory"].ToString();
SqlCommand cmd = newSqlCommand("ReadProduct", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd = newSqlCommand("SelectProductForSubCategoryWise", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@SubCategoryId", SqlDbType.Int);
parm.Value = strgs2.ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
DataList1.DataSource = dr;
DataList1.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
protectedvoid DataList1_ItemCommand(object source,
DataListCommandEventArgs e)
{

if (e.CommandName == "view")
{
Label lblCategory = (Label)e.Item.FindControl("Label4");
Response.Redirect("DetailsData.aspx?Product=" + lblCategory.Text);
}
}
protectedvoid ViewMore_Click2(object sender, EventArgs e)
{
try
{
SqlCommand cmd = newSqlCommand("ProductDetails", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
dr.Close();
CloseConnection();
}
catch
{
}
}
}
Select SubCategory:
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;
publicpartialclassUser_SelectSubCategory : System.Web.UI.Page
{
publicstaticSqlConnection con;
publicstaticstring strgs1;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionString
s["Shopping"].ToString());
strgs1 = Request.QueryString["Category"].ToString();
SqlCommand cmd = newSqlCommand("ReadSubCategory", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("ReadProduct", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd = newSqlCommand("SelectSubcategoryforcategorywise", con);
cmd.CommandType = CommandType.StoredProcedure;

parm = newSqlParameter("@CategoryId",SqlDbType.Int);
parm.Value = strgs1.ToString();
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
DataList2.DataSource = dr;
DataList2.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}

protectedvoid DataList2_ItemCommand1(object source,


DataListCommandEventArgs e)
{
if (e.CommandName == "view")
{
Label lblCategory = (Label)e.Item.FindControl("lblid");
Response.Redirect("SelectProduct.aspx?SubCategory=" +
lblCategory.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.SqlClient;
using System.Data;
using System.Configuration;

publicpartialclassUser_ForgotPassword : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["shopping"].ToString
());
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
publicvoid clearData()
{
txtunm.Text = "";
txtconm.Text = "";
}
protectedvoid btnsubmit_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = newSqlCommand("ReadForgotPassword", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter parm = newSqlParameter("@UserName", SqlDbType.VarChar);
parm.Value = txtunm.Text;
parm.Direction = ParameterDirection.Input;
cmd.Parameters.Add(parm);
parm = newSqlParameter("@ContactNo", SqlDbType.VarChar);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
lnkpassword.Text = dr["Password"].ToString();
}
}

else
{

lnkpassword.Text = "UserName/ContactNo Wrong";


}
dr.Close();
clearData();
CloseConnection();
}
catch (Exception ex)
{
LeeGunn.Web.UI.MessageBox.MessageBox.Show(ex.Message.ToString());
}
}
}
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.SqlClient;
using System.Data;
using System.Configuration;
publicpartialclassUser_UserLogin : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
try
{
con =
newSqlConnection(ConfigurationManager.ConnectionStrings["Shopping"].ToString
());
OpenConnection();
CloseConnection();
}
catch (Exception ex)
{
lblMessage.Text = ex.Message.ToString();
}
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)

con.Close();
}
con.Open();

publicvoid CloseConnection()
{
con.Close();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
try
{
string strg = "select * from CustomerTable where UserName='" + TextBox1.Text +
"' and Password='" + TextBox2.Text + "'";
SqlCommand cmd = newSqlCommand(strg, con);
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read() == true)
{
Session["UserName"] = Button1.Text;
Response.Redirect("UserWelcome.aspx");
}
else
{
lblMessage.Text = "UserName and Password Does Not Match";
}
dr.Close();
cmd.Dispose();
CloseConnection();
}
catch (Exception ex)
{
lblMessage.Text = ex.Message.ToString();
}
}
protectedvoid LinkButton1_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("ForgotPassword.aspx");
}
}
Welcome 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.SqlClient;
using System.Data;
publicpartialclassUser_UserWelcome : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con =
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionString
s["Shopping"].ToString());
Label1.Text = Session["UserName"].ToString();
SqlCommand cmd = newSqlCommand("ReadCategory",con);
cmd.CommandType = CommandType.StoredProcedure;
// SqlParameter parm = new SqlParameter("ReadSubCategory", con);
//cmd.CommandType = CommandType.StoredProcedure;
OpenConnection();
SqlDataReader dr = cmd.ExecuteReader();
DataList1.DataSource = dr;
DataList1.DataBind();
dr.Close();
cmd.Dispose();
CloseConnection();
}
publicvoid OpenConnection()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
publicvoid CloseConnection()
{
con.Close();
}
protectedvoid DataList1_ItemCommand(object source,
DataListCommandEventArgs e)
{
if (e.CommandName == "view")
{
Label lblCategory = (Label)e.Item.FindControl("lblid");
Response.Redirect("SelectSubCategory.aspx?Category=" +
lblCategory.Text);

}
}

protectedvoid LinkButton1_Click1(object sender, EventArgs e)


{
Session.Abandon();
Response.Redirect("UserLogin.aspx");
}
}

8. Code Efficiency
Efficiency of code is mainly dependent on how intelligently coding is done. There is no
specific technique by which any one can say, this is the efficient code and other one is a bad
one, it all depends on the programmer that how efficiently he uses his intellect. And the other
most important thing is the way one is handling the language; which is used to develop the
code and for that one has to have proper knowledge of language.
But still there are some common techniques and structures; if any one follows that then
his/her code can become quite efficient.
E.g. Variable Naming Conventions, Properly used scope of variable, use of control structure
and looping structure in a easier and a simpler way as much as possible.
To write code in a proper order and sequence, the order and sequence again depends on the
programmer and the situation.

9. Optimization Of code
If coding is done efficiently than it should also be used or done optimistically. i.e. best use of code.
What is the reason behind this optimization?
Optimization means make best or most effective use.
E.g. there is one efficient function or efficient environment oriented language or tool is
available but if optimum use of that function or tool or language makes the whole program
more simpler, effective and user friendly also.
Now, how to optimize? Again it mostly depends on the programmer, that how intelligently he
is doing all those things, still there are some basic rules to make our code optimistic.
First thing is, develop the code which is general i.e. that code cannot be purposefully
developed only by one angle. i.e. only for current system. Programmer must be awake of all
the general usage of that code, at least he/she has to look out onto most of the probabilistic
events or conditions or specifications that can occur. The most usage of any function can also
be cleared prior to making them, then only one can develop the general purpose code which
can be said as optimization of code. So ultimately code must be reusable.
Second is, Modularization i.e. most important thing for optimization. If total code is
distributed in proper modules prior to start of the actual coding then its a better way of
coding. General Module i.e. Standard Module is used.
Third thing is capabilities; utilities and facilities which are provided by language or tool or
environment in which the programmer is developing the code must be properly known.
Active X Control named as EdgeCtl.ocx
The most important thing to use OCX is its Reusability.
MDI is used so, automatically it optimizes the code.
The Optimization goal is achieved by combining the OCX and MDI.

10. Validation Check


1. All text fields that take integers, as inputs will be validated so that only the digits are allowed.
2. All text fields that take inputs as alphanumeric will be validated, so that only alphabets are taken
as parameters for input.
3. All fields that are mapped to Primary key, will be validated so that the data is not stored as
NULL in the required fields.
4. All text fields max length, are set according to the mapped database fields, so that the characters
do not exceed the maximum length.
5. Before storing the data, all fields that take in NULL are store values as NULL.
6. All Date field values are stored as dd-MMM-yyyy format and will be consistent through the
system.
7. All database fields that take in a single value, as flag will content Digit.
8. Primary keys are IDENTITY columns, which makes then Auto-Increment value field.
9. Data Stores in the reference table / column is validated through a Visual Graphical Component
like Combo, ListViews, TreeViews, which makes the Foreign Key Value consistent and sure to
be present in the Parent table.

11. Testing

To examine critically is called Testing. Whatever we have developed whether it is properly


working or how much correctly the development has been done or what are the errors. To answer these
type of questions testing is required.
First of all the project is debugged by method of Traditional breakpoint facility. Debugging means the
process of isolating and correcting the cause of known errors.
Various testing methods are used to test the system.

System Testing
A system is tested for online responses, volume of transactions, stress, and recovery from
failure, and usability. System testing involves two kinds of activities Integration testing and
acceptance testing.

Integration Testing
Bottom up integration is the traditional; strategy used to integrate the components of a
software system into a functioning whole. Bottom-up integration consists of unit testing,
followed by subsystem testing, followed by testing of the entire system. Unit testing has the
goal of discovering errors in the individual modules of the system.

Unit Testing
A program unit is usually small enough that the programmers who developed it can test it in
great detail and certainly in greater detail will be possible when the unit is integrated into an
evolving software product.
There are four categories of tests a programmer will typically perform on a program unit:

1. Functional Tests: specify operating conditions, input values and expected results. For
example the function Numeric written to check whether data is numeric or not the argument
can be passed as null argument.

2. Performance Tests: should be designed to verify response time, execution time,


throughput, primary and secondary memory utilization and traffic rates on data channels and
communications. A query executed takes 5 seconds to display results, is a test for response
time. Execution time is the time taken by CPU to execute a program. Throughput is the rate at
which data gets transferred from one data source to destination. Primary and secondary
memory utilization needs to be optimized. Traffic rates on data channels and communication
link testing are applicable for networks.

3. Stress Tests: are designed to overload a system in various ways. The purpose of test is
to determine the limitations of the system. During multiple query execution the available
memory can be reduced to see whether the program is able to handle the situation.

4. Structural Tests: are concerned with examining the internal processing logic of a
software system. For example, if a function is responsible for tax calculation, the verification
of the logic is a structural test.

To test the code there are two testing methods, which are very popular they mentioned below
1. White box 2. Black Box.

Database Testing
Modern Web Application does much more than present static content objects. In many application
domains, Web Application interface with sophisticated database management system and build dynamic
content object that are created in real time using the data acquired from a database.
Database Testing for Web Application is complicated by a variety of factor.
1) The original client side request for information is rarely presented in the form that can be input to a
database management system.
2) The database may be remote to the server that houses the Web application.
3) RAW data acquired from the database must be transmitted to the Web application Server and properly
formatted for subsequent transmittal to the client.
4) The dynamic content objects must be transmitted to the client in a form that can be displayed to the end
user.

[Layers of interaction]
In figure testing should be ensure that
1. Valid information is passed between the client and server from the interface layer
2. The Web application process script correctly and properly extract or formats user data.

1. Queries are passed to a data management layer that communicates with database access
routines.
2. User data are passed correctly to a server side data transformation function that format
appropriate queries.

Interface Testing
Interface design model is reviewed to ensure that generic quality criteria established for all user
interfaces have been achieved and that application specific interface design issue has been properly
addressed.

Interface testing strategy


The overall strategy for interface testing is to (1) Uncover error related to specific Interface
mechanisms (2) uncover errors in the way the interface implements the semantics of navigation, Web
Application functionality, or content display. to accomplish this strategy, a number of objectives must be
achieved:
Interface futures are tested to ensure that design rules, aesthetics, and related visual content are available
for the user without error. Individual interface mechanisms are tested in a manner that is a logous to unit
testing For example; tests are designed to exercise all forms, client-side scripting, dynamic HTML. Each
interface mechanism is tested within the context of a use-case or NSU for a specific user category the
interface is tested within a variety of environments to ensure that it will be compatible.

Compatibility Testing
Web application must operate within environment that differs from one another. Different
computer, display device, OS, browser and network connection speed can have significant on Web
application operation. Different browser some time produced slightly different results, regardless of the
degree of HTML standardization within the Web application.
The Web Engineering team derives a series of compatibility, validation tests, derived from
existing interface tests, navigation tests, performance tests and security tests.

12. Implementation &


maintenance
After testing system will be implemented at the actual site.
Therefore, implementation team should be provided with a well-defined set of software
requirements, an architectural design specification and a detailed design description.
After that user training schedule will be arranged.
Whole system itself consists HELP MENU and HELP TOIPCS so; no major problem will be
encountered.
After three or four months first actual feedback will be taken.
Form that feedback necessary other tips and points will be discussed.
The maintenance is free for one year from system implementation year, after that it depends on
the management to continue or to discontinue. The maintenance-working schedule will be
discussed after three months evolutions.

System Security Measures


At the back end very powerful security is provide by SQL SERVER 2008.
Without proper username and password no one can enter in the database.
Again if user name and password is correct then that user can do only those operations, which
are granted by the administrator.
On Front end side, security is provided by unique user name and password which is known
by him or administrator no one else knows it.
So, anybody who does not know the password and username cannot use it.
The account creation for new user is done by administrator.
Star Placement Services do not want very high security in this version so, high level security
is not implemented .That will be implemented in the next version.

Cost Estimation
Here, I have roughly rounded the cost estimation:
This is just a rough estimation, so it can be predicted more or less in some cases
than actual estimation.
Total there are 20 forms in the software so designing and coding costing around
10000 Rs. + Reports costing 10000 and + Database 10000 = 50000 Rs.
The cost of Extra Reports, Utilities, and Original software, Hardware are not
estimated and included in the cost estimation.

No
1
2
3
4
5
6
7
8
9

Project Goals
Analysis
Feasibility Study
Soft. Eng. Para.
Requirement Spec
Design
Coding
Validation Checks
Testing
Implementation
&

Starting Date
01-OCT-2014
21-DEC-2014
15-DEC-2014
01-JAN-2015
04-JAN-2015
06-FEB-2015
09-MAR-2015
20-MAR-2015
28-MAR-2015

10

Maintenance
Documentation

Parallel Work done


with

all

Ending Date
20-NOV-2014
15-DEC-2014
30-DEC-2014
03-JAN-2015
04-FEB-2015
08-MAR-2015
19-MAR-2015
27-MAR-2015
28-MAR-2015

the

Schedule

13. Project schedule

14. chart
Pert Chart

Days
50
25
15
2
30
32
10
7
2
2

Feasibility
13%
Analysis
27%
Soft. Par.
8%
Req.
1%

Impl.
6%

Design
16%
Coding
21%

Testing
8%

Val.
2%

15. Scope of future application


Future needs always may arise in every system, because at the time of analysis, we study existing
system and thinking of proposing a system which should contain all the features which makes
system user friendly but during whole SDLC phase many changes may arise in the system which
should be developed for the better use of end-user and thus those new features,. New needs are
defined as future enhancements.

Though the basic requirement is fulfilled, there is a scope for further work that can be done with
existing system to make administrator more power full.

Add mail facility for administrator.

User has own account in which he/she can store all details about previous order.

To make search more powerful.

I am going to add facility like currency converter so any user of other country can know the
price of the products according to their currency.
After deliver the products I will send SMS for conformation to the customers on their mobile
phone.

16. bibliography
Books

ASP.NET(Black Book).
Professional ASP.NET(Wrox Publication).
C# Vijaymukhi.
ASP.NET Complete Reference.
Software engineering Concepts By Roger S.Presman
UML IN A NUTSHELL By Alhir
Fundamentals of Software Engineering By Rajib Mall
SQL Server 2008 (Wrox Publication).

Web Sites
www.google.com
www.dotnetspider.com

17. Synopsis

Project Synopsis
ONLINE SHOPPING CART
(Implemented in ASP.Net (Code Behind C#), SQL SERVER 2005)
A PROJECT SYNOPSIS SUBMITTED TO INDIRA GANDHI NATIONAL OPEN UNIVERSITY IN PARTIAL
FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF

BACHLRS IN COMPUTER APPLICATIONS


(BCA)

SUBMITTED BY
JAIMEEN GOPALBHAI AGRAWAL
(BCA-122625863)

UNDER THE GUIDENCE OF


MR. PUJAN PATEL (BE IT)

INDIRAGANDHINATIONALOPENUNIVERSITY

SCHOOL OF COMPUTER AND INFORMATION SCIENCES


INDIRAGANDHINATIONALOPENUNIVERSITY
MAIDAN GARHI, NEW DELHI 110 068.
2014-15

Index

Contents
1.

Title of Project

2.

Introduction

3.

Objective

4.

Project Category

5.

SRS

6.

System Requirement

7.

System Analysis
Problem Definition
Primary investigation
DFD
E-R Diagram

8.

Modular Description

9.

Data Structure / Table Design

10

Process Logic

11. System Security Measure


12. Future Scope
13. Bibliography

1: TITLE OF THE PROJECT

ONLINE SHOPPING

2: Introduction
On-Line Shopping System is a web-based project which is made
for remote-shopping or shopping through Internet. As the technology is being
advanced the way of life is changing accordance. Now a days we can place
the order for any thing from our home. There is no need to go the shop of the
things we want. The order can be placed online through Internet. The
payment, the confirmation of purchasing; we can do every thing we want.
Now we can think that how the days have been changed with time. People
had to stand in rows to wait there terms to buy a particular thing from a
popular shop. But what is happening now a days; we can extremely surprise
that those things can be available on the door-step in few hours.
People had to suffer the rush of the market when they went for
shopping. They used to think hundred times to buy any thing having the
sufficient money for shopping. The problem was the rush; the quarrel at the
time of buying the things. But the advancement of technology brought the
new way for shopping. The way of shopping was completely changed with
the coming of Internet Technology. People have to fill a simple form on the
internet to place their order on any popular shop or shopping-mall for the
thing they want to buy. Now they can place their order from the home.
This project entitled On-Line Shopping is an implementation of the above
description. It means, it implements the E-shopping or in other word
shopping through Internet. It lets the user to place their order online for any
article.

3:Objective
Today the internet and its boom have created a new economic scenario that
not only stresses on the classical concept of the product but also on the
modern concept of service. It is this level of service that dictates whether a
commercial venture will succeed or not in the market. To provide a high
accessibility of service we will design the online shopping website, so that
potential customers need not go to a physical shop to buy products or
services.
There are several objective of this websites are following given bellows.

This site is gives all the information about the e-shopping to provide
better service for the customer.

It provides the facility to the customers who want to shop on-line due
to lock of time.

It provides facility to the customer to payment by the cash and cheque


and DD also.

Its providing the full details about the product and related information
about the product like cost, size etc.

With the help of it we can save the time and money also.

It provides the remote shopping by the cash, or DD, or Debit card also.

It provides better security and good delivery service to the customer.

4:PROJECT-CATEGORY
Web-Based Application Software with RDBMS:
This System i.e. On-Line Shopping is a web based application software
which perform the activities like Administering, providing information to the
shopping by the remote system or through internet. The nature of this
software to handle a particular task thats why it is the category of
application software.
This project falls under The Category of Internet
Technologies with RDBMS, since the project is mainly for providing on-line
shopping of the different items. This project is utilizing Relational Databases
as back-end. Having on-line services for the interested user it has great
demand in market. As we know that Internet is huge client-server
architecture. The client is a web browser; it is requesting a web based data, a
file, or whatever, from the sever staying anywhere in the world. Server is
nothing the service provider which provides services to the client. It holds
almost all the information that client side wants.
I have uses .Net framework to develop the software. Asp.Net is
rich set programming framework for building web-based application. It offers
amazing support to both developer and administrator.

5:SYSTEM REQUIREMENTS AND SPECIFICATIONS:


Once the system analyst have identified the precise user
requirements

and

analyzed

these

requirements

to

weed

out

inconsistencies, they proceed to write the document called the


Software Requirement Specification (SRS). It is the final output of the
requirements analysis and specification phase.
An SRS document should clearly document the following:
Functional requirements of the system
Non-functional requirements of the system
Constraints of the system
A SRS should have characteristics like concise, unambiguous,
consistent, complete, well structured etc.
SRS

documentation

for

the

findsjobs.com

&

its

Service

Management Program: a) Environmental Characteristics


Hardware: The hardware at the organization is Pentium
500 MHz + computers.
Peripherals: The most common peripheral that is required
for the program is Printer.

People: The users at the organization will be the entry


operators at the Electronic Data Processing (EDP) section or
various office clerks attached with Director, CGM, or GM or
CEO s.

b) Interfaces
Interface

with

devices:

The

website has

just one

peripheral device to deal with that is printer.


Interface with the operating system: The application
will be an executable file and hence there is no need for an
interface with the operating system.
Interface with the Database used: The application being
developed in SQL server so the interface will be the ODBC
driver.
Interface with the user: The application assumes its
users to be novice and has an extremely simple and user
friendly interface.

6:REQUIREMENT SPECIFICATION
Hardware Requirement:Processor

: Pentium Processor Dual Core / I-3 Family

Secondary Storage

: 80 GB HDD

ROM

: 52X CD ROM Drive

Memory

: 2 GB RAM

Network Adapter

: Ethernet Adapter

Modem

: 128kbps Voice Fax Data

Others

: 17" Color Monitor, Printer, Scanner,


: Keyboard, Mouse.

Software Requirement
Platform
Operating System

: Windows
: Windows XP / 7 / 8 Professional

Framework

: ASP.NET Framework 2.0

Front-End Tool

: ASP.Net with C#, AJAX

Back- End Tool

: SQL Server 2008

Editing Tool

: Microsoft FrontPage 2000

Scripting Tool

: Java script, XML (style Sheet (.xsl))

REASON FOR OPTING ASP.NET WITH C# AS FRONT-END


.Net Framework is of the most prevailed framework to develop the web
based application. This is the outcome of Microsoft which was developed for
competing java in the world market. It supports many programming
languages like C++, C#, Visual Basic, XML etc.
I have used ASP.Net with C# to develop this software due to following
reasons:

It is Very easy to use ASP.net to develop web-based application


because of its user-friendly functionalities.

C# is the language that uses both CUI and GUI Interfaces thus more
flexibility.

Auto-generated and More Powerful IDE.

Common to use Server; every language uses Internet Information


Server

REASON TO OPT SQL SERVER 2008 AS BACK-END


SQL Server is RDBMS tool which has been used by me as back-end due to
following reason:

In

todays

competitive

environment,

an

organization

wants

comprehensive, secure, reliable, and productive data platform for its


business applications. SQL Server provides all these facilities.

SQL Server 2008 combines data analysis, reporting, integration, and


notification services.

The SQL Server database Engine provides a platform that allows


managing data application very easily.

Independently accepted standard


High transaction processing
Rational architecture: Independent of physical data storage
Large database and space management
Client/server (Distributed processing) environment
Portability and connectivity
Back and recovery facilities

Full proof security management

7:SYSTEM ANALYSIS:
Problem Definition: The e-shopping Administrator is the super user and has complete control over all the
activities that can be performed. The application notifies the administrator of all shop creation requests, and
the administrator can then approve or reject them. The administrator also manages the list of available
product categories. The administrator can also view and delete entries in the guestbook.
Shop Owner: Any user can submit a shop creation request through the application. When the request is
approved by the Mall Administrator, the requester is notified, and from there on is given the role of Shop
Owner. The Shop Owner is responsible for setting up the shop and maintaining it. The job involves managing
the sub-categories of the items in the shop. Also, the shop owner can add or remove items from his shop.
The Shop Owner can view different reports that give details of the sales and orders specific to his shop. The
Shop Owner can also decide to close shop and remove it from the mall.
Employees: Purchase department under a Purchase manager to overlook purchasing activities if
warehousing needs arise.
Sales department under a Sales manager who will look after the sale of products and services, the most
important activity.
Accounts department under an Accounts manager to look after the accounting activities of the enterprise.

Requirement Specification:- It is quite difficult and time consuming task


to find the information as well as maintaining information manually. If all
these information are to be kept at a single place it is also not possible in the
manual system. Computerized system will upgrade and manage information
very easily.
As it is a web-based application so it uses Internet
technologies and its hardware/software requirement will also be more
comprehensive than Desktop application system. Some Network devices will
be required like modems, switches, Internet connection.

Software required for the system is also different from a


normal desktop system. First of all a server software will be mandatory (here
Internet Information Server (IIS)). A browser is also needed as a client
process on the user side.
Preliminary Investigation: -System Analysis is not only time consuming
but also a rigorous task. But it is crucial and most important phase of
Software development process.
Preliminary Investigation is the process of gathering data
for requirement analysis. It is more helpful for problem definition and
requirement specification.

DATA FLOW DIAGRAM OF THE PROPOSED SYSTEM


A data flow diagram is a primary graphic tool for the analysis phase of the
system development life cycle. Analysts to show what happens to data
items, as they flow through the system use it.
An information moves through software, it is modified by a series of
transformations. Data flow diagram is a graphical technique that depicts
information flow and the transforms the are as data move from input to
output. The basic form of a DFD is also known as data flow graph or a bubble
chart. The DFD serve two purposes:
(i) To provide and indication of how data are transform as they move through
the system.
(ii) To depict the functions that transforms that data flow.
The DFD provides additional information that is used during the
analysis of information domain and serve as a basis for the modeling of
function.
Basic notations, which used to create DFD, are as follows:
RECTANGLE
It is used to represent an external entity or another system element that
produces information for transformation or receive information.
CIRCLE
It used to represent any process or transform which applied on data
ARROW
Arrow represents one or more data items or data objects.
PARRALEL LINE
The parallel line used to represent any database

DFD at 0 Level:

1 Level DFD:

2 Level DFD:

Entity - Relationship Diagram:-

8:MODULE DESCRIPTION
We know that it is quite difficult to do any thing of its whole part at a time.
So it is the task of the programmer to break/split the whole set of task into
various small module so that one can handle them effectively. But it depends
upon the software system that in which Extent it will be broken so that there
is no inter-dependency among them.
This project developed for On-Line Shopping is broken into
following module.
1. Admin Module
2. User Module
3. Customer Service Module
4. Advertisement Module
5. Employee Module
6. Payment Module
7. Purchase Module
8. Product Tracking Module
9. Searching Module
10. Report Module
11. Security

1. ADMIN MODULE: - Admin module is mainly for the owner of the


system. This module performs the work of regular checking process. Every
one needs current information about any thing. So, this module is

responsible for updating the information continuously if any, in the system


so that one can find timely information. But the main function of this
module is to handle security of this system. Different types of
authentication and authorization process is performed for this purpose.
This module is also responsible for advertisement bid. Any organizations
that are eager for advertisement can contact us for their ad. This module
handles the entire task related to advertisement like specifying and
allocating the space and related cost.

2. USER

PAGE MODULE:-

User page module is for front page of this

system. It is the main page of the system in which all the links of this
system are kept. Now the main thing is how to make the home page
interactive and user friendly so that there should not be any problem for
the user. This is the task of the system administrator to make the home
page Interactive.

3. CUSTOMER

SERVICE MODULE:- In the customer service module, the

customer will use this website to on-line shopping. And also the
customer send the request to the shopping.

4. ADVERTISEMENT

MODULE:-

In

any

web

based

application

advertisement is main thing. Any organization wants to give their


advertisement on Internet. This module handle information about the
advertisement related task. Interested Organization can contact us for
their

advertisement.

This

module

also

calculates

the

cost

of

advertisement corresponding to their acquired space. The place for


advertisement can be categorized into to parts i.e. the space on the
home page and the space on other pages. The cost of the advertisement
is also varied according to place of advertisement.

5. EMPLOYEE

MODULE:- In employee module, all the employee related

information stored and managed in this module. Employee will look all
the demand of the customer and serve it.

6. PAYMENT

MODULE:- In this module, the customer will payment in

different mode like demand draft, or by credit card.

7. PURCHASE

MODULE:- In this module, the all selected item could be

purchased by the customer. And will payment by DD.

8. PRODUCT TRACKING MODULE:- In this module, the customer demand


for the product and payment for that product and after that the
customer will contact with the product tracking module.

9. SEARCH

MODULE:- Search module provides search facilities to the

search different product to the purchase.

10.

REPORT MODULE:- This module generates various reports to

higher authorities of the system. As we know that this system has


additional functionality to act as a important for the website and also for
the which may help in future.

11.

SECURITY MODULE:-

security module is concerned with

security of the system. As this system is public website but it has


provided security to the admin module only because this module can
update information of the system so to make sure that no any
unauthorized user could change information. This module has various
mechanisms to check the validity of the user.

9:DATA STRUCTURE/TABLE DESIGN


Database is collection of data that can be treated as single unit. ThisSingle or
individual unit is called table. In relational database system Table is
combination of rows and columns which show records and fields
Respectively. After great efforts we determine the main entities, there
attribute and relationship among them. After determining all these entities,
we design the table structure as follows:
Login Table:
S.R
1.

Data Type
Integer

Size
5

Validation

2.

Field Name
S.No (autoincrement)
U_name

Varchar

20

Primary Key

3.

Password

Varchar

20

Data Type
Varchar
Varchar
Date

Size
20
20

Employee Details Table:


S.R
1.
2.
3.

Field Name
E_Id
E_Name
J_date

Validation
Primary key

4.
5.
6.
7.
8.
9.

Sex
Address
Phone No
DOB
Salary
Specialization

Varchar
Varchar
Integer
Date
Integer
Varchar

6
50
10

Data Type
Integer
Varchar

Size
5
20

Validation

Validation

10
20

Category Table:
S.R
1.
2.

Field Name
Category id
Name

Primary Key

Sub-Category Table:
S.R
1.
2.

Field Name
Sub-Category id
Name

Data Type
Integer
Varchar

Size
5
20

Category Id

Integer

Primary Key

Customer Service Table:


S.R
1.

Field Name
First Name

Data type
Varchar

Size
20

2.
3.
4.
5.
6.
7
8
9
10
11

Middle Name
Last Name
Address
Contact_no
Gender
Birth Date
User Name
Password
Question
Answer

Varchar
Varchar
Varchar
Integer
Varchar
Integer
Varchar
Varchar
Varchar
Varchar

20
20
300
12
10
20
20
20
500
1000

Purchase Table:

Validation
Primary
key

S.R
1.
2.
3.
4.
5.
6.

Field Name
Pur_id
ItemName
Rate
Item_category
Quantity
Date

Data type
Varchar
Varchar
Varchar
Varchar
Integer
Datetime

Size
10
300
100
300
5

Validation
Primary key

Data type
Varchar
Varchar
Varchar
dateTime
dateTime
Varchar
Varchar
Varchar
Varchar

Size
10
30
79

Validation
Primary key

Data Type
Varchar
Varchar
Date
Varchar
Varchar
Integer
Integer

Size
20
200

Advertisement Table:
S.R
1.
2.
3.
4.
5.
6.
7.
8.
9.

Field Name
Ad_id
Ad_name
Image
Ad_start_date
ad_end_date
Comp_name
Address
Contact_no
Email

89
78
12
78

Payment Table:
S.R
1.
2.
3.
4.
5.
6.
7.

Field Name
P_id
P_name
P_date
Cust_name
Pay_mode
Cash
DD

Product Tracking Table:

67
50
10
23

Validation
Primary key

S.R
1
2
S.R
3
1.

Field Name
State Id
State
Field Name
Name
Country
ID
P_id

Data Type
Varchar
Varchar
Data Type
Varchar
Varchar

Size
20
20
Size
20
20

2.
3.
4.
5.
6.
7.

Cust_name
Delvr_date
Amount
Contact_no
Address
Email

Varchar
Date
Varchar
Varchar
Varchar
Varchar

200

Validation
Primary key
Validation
Primary key

67
50
100
56

Country Table:

S.R Field Name


1
Country id
2
Country name
3
Country Alias
State Table:
S.R
1
2
3

Field Name
StateId
StateName
CountryID

Data Type
Varcher
Varchar
Varchar

Size
20
50
50

Validation
Primary key

Data Type
Varchar
Varchar
Varchar

Size
20
20
20

Validation
Primary key

Data Type
Varchar
Varchar
Varchar

Size
20
20
20

Validation
Primary key

City Table:
S.R
1
2
3

Field Name
City Id
City Name
State ID

10 :PROCESS LOGIC
Process logic is concerned with how the system interact with users and
fulfill there requirements? Being a web based system; user of this system
can easily access this system through Internet. It provides various
functionalities, attracts the user to use it, and makes the user comfortable to
work on it.
Before providing access to the manipulating authorities, it first
demands for user name and password based on user type. If the name and
password entered are correct then one can enter the admin menu and can
change any contents from this place. Note that it also works as a public
website where one can see the information based on the purpose to access
this website. There is no need for authentication here, because they has to
only access the site not change or update any content and they also cannot
change it because they have no authority to change. Here user finds various
menus and sub menus and can select any one of them as there requirement.
Let I explain the process logic of admin module that how one
can perform the task of administrator. First one has to give user name and
password which should be checked by the system on the basis of information
stored in the database.

SYSTEM FLOW CHART

11:SYSTEM SECURITY MEASURE


Security is the most important part of any system. It can be either the
security of system program functionalities or underlying database. We
have very cautious process of authentication of user that no one could
change its contents in unauthorized manner.
Security and integrity of database are very important for any
software system because databases are the backbone of the system.
Security need to be implemented at every level of the system so that only
authorized user can access the system for updation and other significance
process.
Entering correct password while opening the system or we can say
that entering the system is the process of authentication. If any one is
entering the password is wrong then he/she cannot access the system for
any change purpose.
The main purpose of the security is to save system from accidentally
changes or loss of information or also getting wrong information. The
system administrator is the person that can change the information
or update the information. He can also grant the permission that who
has to enter the system and what can he do. So security is the most
important topic to be concerned.

12:FUTURE SCOPE OF THE PROJECT


On-Line Shopping is a web-based project which is made for
remote-shopping or shopping through Internet. As the technology is being
advanced the way of life is changing accordance. Now a days we can place
the order for any thing from our home. There is no need to go the shop of the
things we want. The order can be placed online through Internet. The
payment, the confirmation of purchasing; we can do every thing we want.
Now we can think that how the days have been changed with time. People
had to stand in rows to wait there terms to buy a particular thing from a
popular shop. But what is happening now a days; we can extremely surprise
that those things can be available on the door-step in few hours.
In future we will try to make this website which work so flexible and
beneficial for the customer and also try to make smooth service.

13:BIBLIOGRAPHY

Books:
Software engineering by Roger s. Pressman

An Introduction To Database Systems by Bipin C Desai

Asp.NET (Beginning) 1.1 by vb.net 2003 BY Wrox.

Professional C# 2nd edition by Wrox.

Book on Indian culture


A book of Microsoft press on Asp.Net through C#

ONLINE SHOPPING CART (FOR FASHIONANDYOU.COM)


SUBMITTED BY: KARANSINH R. PARMAR (BCA-126339493)
UNDER THE GUIDENCE OF:
Online Shopping Cart(For FashionANDyou.com)

Вам также может понравиться