You are on page 1of 89

SHOBHIT UNIVERSITY

PROJECT REPORT ON
E-SHOPPING (Online shopping)
(.net)
Submitted for the Partial fulfillment of Degree of

BACHELOR OF TECHNOLOGY
(INFORMATION TECHNOLOGY)
Session in (2013-14)

Submitted To:
Mr. Vijay Maheshwari
(HOD, IT Branch)

Submitted by:
YOGESH KUMAR
B.Tech. Final Year
Roll. MRT07UGBIT236
Enrolment No. 2007060487

CERTIFICATE

This is to certify Yogesh Kumar students of 4th year Semester of IT branch has completed this
project on E-SHOP (The online buying and selling website) in .NET with his sincere efforts
under my supervision.

(Mamta Bansal)

Vijay Maheshwari

Guide, Faculty IT

(HOD, IT Department)

ACKNOWLEDGEMENT
I take the opportunity to express my cordial gratitude and deep sense of indebtedness
to my guide Ms. Mamta Bansal

for the valuable

guidance and inspiration throughout the

project duration. I feel Thankful to her for her innovative ideas, which led to successful
completion of this project work. I feel proud and fortune to work under such an outstanding
mentor on our project E-SHOP( The online buying and selling website). She has always
welcomed my problem and helped me to clear my doubts . I will always be grateful to her for
providing me moral support and sufficient time.
At the same time, I would like to thank Mr. Vijay Maheshwari (HOR) sir and
all other faculty members and all non-teaching staff in
Computer Science & Engg Department for their valuable co-operation.

INTRODUCTION
Before Starting the project we should fully know about the meaning of project. There are seven
letters in the word PROJECT each character has its own technical meaning.
Planning: - This deal with the idea at thinking and which are required for the project.
Resource:-The money problem will be solved and resources from which collected.
Operating:-The procedure from which the getting job is prepared in a systematic way is known as
operation.

Joint effort:-

This is directly proper to a operation output is made of several person working


sincerely is known as JOINT EFFORT.
Engineering: - A well-educated engineer can do this work in a better way to find out better result.
Hence the project is as engineering function.
Co-operation:- To make the project successfully, it is necessary for its success and completion of
project.
Technique: - It must as it gives a better shape. It is not possible to complete the project without
technique.

The project is a system that gives the systematic way of planning and
working.
E-SHOP is being launched because a need for a destination where the local community could come
together and help each other is seen. Community members within a city can come here to find an
apartment to live in, sell their old car, or music system, promote their small business, do all types of
trading activities, all types of e business, trade any item that they might want or have to offer. It
incorporates Information Technology to do online trade and commerce using internet as the
supporting component. Thus E-SHOP will give user the platform to sell and buy the things at the
best buy cost directly from the seller of that commodity.

E-SHOP fulfills the requirements of an individual related to e-shop (situation vacant / buy n
sell.). Its a destination where the local community could come together and help each other. A
person can search for a house on rent without the involvement of a property dealer and save the
extra money which he/she would have paid as commission. Moreover, the person do all this in a
single click of the mouse button i.e, searching / traversing & posting advertisements etc. can be done
while sitting at home.

What is E-SHOP all about?


E-SHOP is a web application that automatically matches posters of ADs with potential viewers
through a communication network in which a host system communicates with the Posters and
Potential Viewers. The host system obtains and stores a first set of records each corresponding to a
particular ad. This set of records can then be searched by a remote data terminal associated with a
potential viewer. The results of this search are then provided to the potential poster, who indicates
specific ad listings that the viewer may be interested in. The viewer provides identifying information

which is then provided to the poster of the indicated ad.


Provisions are made to ensure that the ad posters who list ads support the system.
Further, the system permits automatic evaluation of potential viewers to screen
posters whose information does not match minimum criteria. Its a system for selectively displaying
ad listings to potential viewers and for obtaining ad viewer profile information associated with said
potential viewers which is provided to ad posters of ad described in said ad listings.

E-SHOP provides the platform but does not directly participate in, nor is it involved in any
shopping transactions. Advertisements are posted not by my system, but users of my system. My
system requires a user to register before sending a quote. My system will send the information as
filled in by the user on the form to require registration for those who participate in a variety of its
services.
The system has an administrator who keeps an eye on the overall functioning of the system. The
system gets revenue by displaying Banner Advertisements which is done and controlled by the
administrator.

The system entitled E-SHOP (Online Buying and Selling Shop) is application software,
which aims at providing services to the local community and providing them with an option of
selecting the ADs of their choices and further decide to continue with the transaction.

OBJECTIVE
The summary of the objective of this software is to completely automate the process of:

Provide better understanding between ad posters and its viewers.

Provide a user friendly environment so that the ad posters can post their
ads easily and free of cost.

To maintain and store ad details, response details, ad viewers details, ad


posters details

Provide excellent and easy to access means of communication medium


between ad posters and its viewers.

Provide value to its contributors by making available to them its vast


global audience reach.

Provide E-SHOP as a service to enable its users to connect with one


another.

Provide local commerce site, uniquely integrating E-SHOP system. The system
offers unmatched values such as Real Estate, Travels,
jobs/Training, Movies/Entertainment, buy/sale, Matrimonial and more.

The following advertising opportunities are offered:-

Banner Advertising

Add Your Logo

Button Advertising

What contribution would the Project Make?


This is an era of Information Technology where getting information is the base of each and
every thing. Success of any business depends upon its popularity and goodwill. Today, market has
been expanded and you have to be a global player, today every individual wants to access most of
the information from his own place and then do transaction. The project would help in effective and
systematic access to the Advertisements posted by the Poster and invalid access by any person will
be caught at the time of registration of the Viewer.

THE EXISTING SYSTEM


The existing system like other online shopping sites system works by manually supplying
information regarding an Advertisement to be placed in the media (say Newspapers, magazines
etc.)which must be checked thoroughly before given for final print. The existing system has got lot
of intricacies within itself and need lot of human effort and paper works. All above the data need to
be maintained properly and maintaining this is a tedious and risky process as a small printing error
may completely change the sense of the Advertisement. Moreover to view a data or to keep a record
of a particular Advertisement may need lot of paper to be searched.

Some of the negative aspects of the existing system are as follows:


1) Course of action is time consuming. Wherever a need for search arises, the process evolves
search through paper records.
2) Readability of records is constrained. All the records may not be handled or written by the
same person. So the format and style of records differ and hence it is difficult to understand.
3) Paper records are easily damaged in course of time. The life time of paper record is
unreliable less that it easily gets spoiled.
4) Expenditure is high. Manual system needs added man power.
5) It is difficult for the user to categorize and do the comparative study of the ADs on the
basis of just reading about it on a piece of Paper.To overcome these, the proposed system has
been suggested.

10

REQUIREMENTS ANALYSIS
SYSTEM STUDY AND PROBLEM FORMULATION

Requirement Analysis
At the heart of system analysis is a detailed understanding of all important facets of business area under
investigation. (For this reason, the process of acquiring this is often termed the detailed investigation)
Analyst, working closely with the employees and managers, must study the business process to answer these
key questions:

What is being done?


How is it being done?
How frequent does it occur?
How great is the volume of transaction or decisions?
How well is the task being performed?
Does a problem exist?
If a problem exist, how serious is it?
If a problem exists, what is the underlying cause?
Requirement analysis relies on fact-finding techniques. These include:
Interview
Questionnaires
Record inspection
On-site observation

11

IDENTIFICATION OF NEED

In the world we are growing for globalization day by day with the development in IT resources and
advancement, by using latest technologies it is possible to access any information of any type while sitting at
home. Survival on manual system is difficult that is why computerized systems are more in demand. The
modules should be complete database driven and interactive that should provide the proper information
regarding the online classifieds and yellow pages system.

Success of any system depends up to a large extent on how accurately a problem is defined,
thoroughly investigated and properly carried out to the choice of solution. Analysis is the only phase in
which the requirements for the new system are identified. System analysis is a detailed study of the
various operations performed by a system and their relationship within and outside of the system. The
question is: what must be done to solve the problem? One aspect of analysis is defining the boundaries of
the system and determining whether or not a user system should consider other related system. During
analysis data are collected on the available files, decision points and transactions handled by the parent
system. Data flow diagram, interviews, onsite observations, questionnaires are used as a logical system
model and tools to perform the analysis.

An analyst is responsible for performing following tasks:


Gathered all facts about the present system from the employees.
Studied strength and weakness of the current system.
Determined what must be done to solve the problem.

12

Prepared a functional specifications document.


In order to reduce the time, there is a need for computerized system that can retrieve data, insert data,
update existing data or delete existing data. These modules are developed wit the aim of reducing time,
reducing manpower, reducing cost so that the records can be easily maintained. The volume of work and
complexity are increasing year by year. This system reduces complexity and workload.

PRELIMINARY INVESTIGATION

A request to take assistance from information system can be made for many reasons, but in each case
someone in the organization initiate the request. When the request is made, the first system activity the
preliminary investigation begins. This activity has three parts:
Request clarification
Feasible Study
Request approval

Many requests from employees and users in the organization are not clearly defined. Therefore, it
becomes necessary that project request must be examined and clarified properly before considering
systems investigation.

The feasibility study is carried out by a small group of people who are familiar with information system
techniques, understand the parts of the business or organization that will be involved or affected by the
project, and are skilled in the system analysis and design process.

Request Approval:

13

It is not necessary that all request projects are desirable or feasible. Some organizations receive so many
projects request from employees that only a few of them can be purchased. However, those projects that are
feasible and desirable should be put into a schedule.
In some cases, development can start immediately, although usually system staff members are busy on
other ongoing projects. When such situation arises, management decides which projects are more urgent and
schedule them accordingly. After a project request is approved, its cost, priority, completion time and
personal requirements are estimated and used to determine whether to add it to any existing project list. Later
on, when the other projects have been completed, the proposed application development can be initiated.
Analysis is a process of studying a problem and to find the best solution to that problem. System
analysis gives us the target for the design and the implementation. Analysis is one phase, which is important
phase for system development life cycle. System development is a problem solving techniques. Analysis
involves interviewing the client and the user. Three people and the existing documents about the current
mode of operation are the basic source of information for the analyst.

Analysis is the process of studying a problem to find the best solution to that problem. System analysis gives
us the target for the design and the implementation. Analysis is one phase of the very important phase of the
system development life cycle. System development is a problem solving techniques. Analyses involve
interviewing the client and the user. These people and the existing document about the current mode of
operation are the basic source of information for the analyst.

14

SOFTWARE ENGINEERING PARADIGM

Computer Aided Software Engineering can be as simple as a single tool that support a specific software
engineering activity or as complex as a complete environment that encompasses tools, a database, people,
hardware, a network, operating system, standards, and myriad other components. Each building block forms a
foundation for the next, with tools sitting as the top of the heap. It is interesting to note that the foundation for
effective CASE environment has relatively little to do for software engineering tools themselves. Rather,
successful environments appropriate hardware and systems software. In addition, the environment
architecture must consider the human work patterns that are applied during the software engineering process.

The environment composed of the hardware platform and system support (including networking software,
software management, and object management services), the groundwork for CASE. But the CASE
environment itself demands other building blocks. A set of portability services provides a bridge between
CASE tools and their integration framework and the environment architecture. The integration framework is
a collection of specialized programs that enables individuals CASE tools to communicate one another, to
create a project database, and to exhibit the same look and feel to the end user (the software engineer).
Portability services allow CASE tools and their integration framework to migrate across different hardware
platforms and operating system with out significant adaptive maintenance.

The building blocks represent a comprehensive foundation for the integration of CASE tools. However, most
CASE tools in use today have been: constructed using all these building blocks.

In fact some CASE tools remain point solution: That is, a tool is used to assist in a particular software
engineering activity (e.g. analysis modeling) but does not directly communicate with other tools, is not tied

15

into a project database, is not part of an integrated CASE environment (l-CASE). Although this situation is
not ideal, a CASE tool can be used quite effectively, even if it is a point solution.

At the low end of the integration spectrum is the individual (point solution) tool. When individual tools can
provide tools provide facilities for data exchange, the integration level is improved slightly. Such tools
produce output in a standard format that should be compatible with other tools that can read the format. In
some cases, the builder of complementary CASE tools work together to form a bridge between the tools (e.g.
an analysis and design tool that is coupled with a code generator). Using this approach, the team develops,
synergy between the tools separately. Single source integration occurs when a single CASE tools vendor
integrates a number of different tools and sells them as a package.

Although this approach is quite effective, the closed architecture of most single source environments
precludes easy addition from other vendors.

16

Feasibility Study

A feasibility study is conducted to select the best system that meets performance requirement. This
entails an identification description, an evaluation of candidate system and the selection of best system for he
job. The system required performance is defined by a statement of constraints, the identification of specific
system objective and a description of outputs.

17

SOFTWARE & HARDWARE


REQUIREMENT
Software Requirement:

Front End

: ASP.NET

Back End

: SQL Server 2008

Technology

: .Net Framework

Programming Language

: C#.Net

Operating System

: Windows XP , Vista

Hardware Requirement:
P4-1 GHz
20 GB HDD
256 MB RAM
CD Rom Drive

18

DETAILS OF THE TECHNOLOGY USED


Microsoft Visual Studio 2008
Microsoft Visual Studio 2008 delivers on Microsofts vision of smart client applications by enabling
developers to rapidly create connected applications that deliver the highest quality, rich user
experiences. With Visual Studio 2008, organizations will find it easier than ever before to capture
and analyze information to help them make effective business decisions. Visual Studio 2008 enables
organizations of every size to rapidly create more secure, manageable, and reliable applications that
take advantage of Windows Vista and the 2007 Office system. Visual Studio 2008 delivers key
advances for developers in three primary pillars:
Rapid application development
Effective team collaboration
Breakthrough user experiences

This white paper discusses the different customer experiences that deliver on these three pillars
through the following five technology areas.
Developing

Smart Client Applications. Visual Studio 2008 delivers new and easy ways for
developers to build smart clients. It provides a comprehensive set of tools and classes that simplify
integrating smart clients with new or existing Web applications, and it enables local data caching for
disconnected scenarios.
Creating

Microsoft Office Applications. Visual Studio Tools for Office (VSTO) is fully
integrated into Visual Studio 2008 Professional Edition. Developers can now customize various

19

Office applications, such as Outlook and PowerPoint, to improve user productivity and simplify
deployment.
Building

Windows Vista Applications. Developers can easily leverage new platform


technologies, and deliver more compelling applications to their customers, by effortlessly
incorporating new Windows Presentation Foundation features into both existing Windows Forms
applications and new applications.
Handling

Data More Productively. The introduction of Language Integrated Query (LINQ) and
other data-access improvements enable developers to apply a consistent programmatic approach to
data handling, perform data access with new data-design surfaces, and use built-in classes for the
occasionally connected design pattern.
Enabling

New Web Experiences. Developers can easily create efficient, interactive Web
applications with Visual Studio 2008. Seamless integration of the familiar ASP.NET AJAX
programming model enables more efficient client-side execution, giving end users a more
responsive Web interface. JavaScript IntelliSense and debugging further improve the development
experience.

20

Microsoft SQL Server 2008


Microsoft SQL Server 2008 provides a trusted, productive, and intelligent data platform that enables
you to run your most demanding mission-critical applications, reduce time and cost of development
and management of applications, and deliver actionable insight to your entire organization.
SQL Server 2008 provides the functionality for applications and users to issue full-text queries
against character-based data in SQL Server tables. Before full-text queries can be run on a given
table, the database administrator must create a full-text index on the table. The full-text index
includes one or more character-based columns in the table. These columns can have any of the
following data types: char, varchar, nchar, nvarchar, text, ntext, image, xml, varbinary, or
varbinary(max). Each full-text index indexes one or more columns from the base table, and each
column can have a specific language. Beginning in SQL Server 2008, full-text search supports more
than 50 diverse languages, such as English, Spanish, Chinese, Japanese, Arabic, Bengali, and Hindi.
For each supported language, SQL Server provides language-specific linguistic components,
including a word breaker and stemmer and an empty thesaurus file. For each full-text language, SQL
Server also provides a file in which you can optionally define language-specific synonyms to extend
the scope of search queries (a thesaurus file). In addition, beginning in SQL Server 2008, a system
stoplist is provided. To support specific language or business scenarios, you can alter the system
stoplist by adding and removing stopwords (also known as noise words), and you can create
additional stoplists as needed.

21

.NET FRAMEWORK SDK


Overview
The Microsoft .NET Framework Software Development Kit (SDK) includes tools, documentation
and samples developers need to write, build, test, and deploy .NET Framework applications on x86
platforms.
The Microsoft .NET Framework Software Development Kit (SDK) v2.0 (x86) includes tools,
documentation and samples developers need to write, build, test, and deploy .NET Framework
applications.
You must install the .NET Framework Redistributable Package version 2.0 (x86) prior to installing
the .NET Framework 2.0 SDK (x86).

System Requirements

Supported Operating Systems:Windows 2000 Service Pack 3;Windows Server


2003;Windows Vista Business;Windows Vista Enterprise;Windows Vista Home
Basic;Windows Vista Home Premium;Windows Vista Starter;Windows Vista
Ultimate;Windows XP Service Pack 2

RequiredSoftware:oNET Framework v2.0 (x86): You must install the .NET Framework
v2.0 (x86) prior to installing the .NET Framework SDK (x86).

Visual Studio 2005 Users: If you have already installed Microsoft Visual Studio 2005 (except the
Express Editions), you do not need to install the .NET Framework SDK separately. Visual Studio
2005 includes the SDK as one of the optional components to install during Visual Studio 2005 setup.

COMMON LANGUAGE RUNTIME


ASP.NET
ASP.NET is a web application framework developed and marketed by Microsoft to allow
programmers to build dynamic web sites, web applications and web services. It was first released in
January 2002 with version 1.0. This is the latest incarnation of Microsoft's middleware for the
Internet. ASP.NET is built upon the .NET Framework. The .NET Framework has two main
components: the common language runtime (CLR) and the .NET Framework class library. The CLR
is the foundation of the .NET Framework.
ASP.NET is a set of Web development tools offered by Microsoft.

22

ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be
executed by an Internet server.

ASP.NET is a Microsoft Technology

ASP stands for Active Server Pages

ASP.NET is a program that runs inside IIS

IIS (Internet Information Services) is Microsoft's Internet server

IIS comes as a free component with Windows servers

IIS is also a part of Windows 2000 and XP Professional

When a browser requests an HTML file, the server returns the file

When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET engine on
the server

The ASP.NET engine reads the file, line by line, and executes the scripts in the file

Finally, the ASP.NET file is returned to the browser as plain HTML

ADO.NET
ADO.NET is a set of computer software components that can be used by programmers to access
data and data services. It is a part of the base class library that is included with the Microsoft .NET
Framework.
ADO.NET provides consistent access to data sources such as Microsoft SQL Server, as well as data
sources exposed through OLE DB and XML. Data-sharing consumer applications can use
ADO.NET to connect to these data sources and retrieve, manipulate, and update data.
ADO.NET cleanly factors data access from data manipulation into discrete components that can be
used separately or in tandem. ADO.NET includes .NET Framework data providers for connecting to
a database, executing commands, and retrieving results. Those results are either processed directly,
or placed in an ADO.NET DataSet object in order to be exposed to the user in an ad-hoc manner,
combined with data from multiple sources, or remoted between tiers. The ADO.NET DataSet object
can also be used independently of a .NET Framework data provider to manage data local to the
application or sourced from XML.
ADO.NET provides functionality to developers writing managed code similar to the functionality
provided to native COM developers by ADO. For a discussion of the differences between ADO and
ADO.NET, see "ADO.NET for the ADO Programmer" at http://msdn.microsoft.com/library/enus/dndotnet/html/ADONETProg.asp.

23

Components Of ADO.NET
The following diagrams show the basic ADO.NET component architecture. The diagram on the left
shows the Data Provider classes: Command, Connection, DataAdapter and DataReader. These
classes provide bridges between .NET applications and data sources. The diagram on the right
shows the DataSet class hierarchy. These classes create the .NET application's representation of a set
of data.

24

25

Benefits of the ADO.NET can be listed as follows;

1. Interoperability- You can avail the advantage of the flexibility and broad acceptance of XML in
ADO.NET applications.
2. Maintainability- Various substantial, architectural changes and transformations required in the
life of a deployed system can be easily carried out, if the application is implemented in ADO.NET
using datasets.
3. Programmability- ADO.NET data components enables you program more quickly and with
fewer mistakes in Visual Studio encapsulate data access functionality. It also allows you to access
data through typed programming as ADO.NET data classes generated by the designer tools result in
the typed datasets.
4. Performance- ADO.NET datasets offer performance advantages, for disconnected applications,
over ADO disconnected record sets.
5. Scalability- ADO.NET enables scalability by helping the programmers to conserve limited
resources.

26

TIME ANALYSIS
DURATION OF PROJECT:-

27

COST ANALYSIS
SOFTWARE COST

VISUAL STUDIO3.5
SQL SERVER2008
DREAMWEAR

28

:
:
:

20000/15000/Free

THE PROPOSED SYSTEM


The proposed system is a computerized one. This has greater accuracy and efficiency.
This takes only limited time for retrieval of desired result from the user.
The proposed system can be used to maintain efficiently the postings and retrieval of
any type of Advertisement posted by a Poster. The proposed system is also useful and helpful in
checking out different Advertisements by a Viewer so that he/she can easily categorize and select the
appropriate AD for him/herself depending on the requirement and his/her choice. He/she can also
create his/her mail account using my system. Since my system is allowing Banner Advertisements to
obtain revenue out of it, a user can post his/her companys or firms Advertisement using my system.
The system includes two users:

1) Administrator
Poster ( post ADs )
2) General User

The user gets into the system using user name and a unique password. Each user has his own
accessibility permission to accomplish his task flawlessly. The administrator also has a ID and
password to get access to the system so that no unauthorized person is able to keep an eye on the
working of the complete system.

Advantages of the proposed system are

29

1) Easy access to the data


2) The new system is more user friendly, reliable and flexible.
3) Pop-up menus to carry out transactions for a new user, and for other alert
messages.
4) Timely Report generation.

DATA FLOW DIAGRAM


Data Flow Diagramming is a means of representing a system at any level of detail with a
graphic network of symbols showing data flows, data stores, data processes, and data
sources/destination.
The data flow diagram is analogous to a road map. It is a network model of all possibilities with
different detail shown on different hierarchical levels. This processes of representing different details level is
called leveling or partitioning by some data flow diagram advocates. Like a road map, there is no starting
point or stop point, no time or timing, or steps to get somewhere. We just know that the data path must exist
because at some point it will be needed. A road map shows all existing or planned roads because the road is
needed.

Details that is not shown on the different levels of the data flow diagram such as volumes,
timing, frequency, etc. is shown on supplementary diagrams or in the data dictionary. For example,
data store contents may be shown in the data dictionary.
Data Flow Diagram (DFD) uses a number of symbols to represent the systems. Data Flow
Diagram also known as Bubble Chart is used to clarify system requirements and identifying the

30

major transformations that will become programs in system design. So it is the starting point of the
design phase that functionally decomposes the requirements specifications down to the level of
details.

31

Terms used in DFD

Process
A process transforms data values. The lowest level processes are pure functions without side

effects. An entire data flow graphics high level process.

Graphical representation:

Graphical Representation:

Data flows
A data flow connects the output of an object or process to input of another object or

process. It represents the intermediate data value within a computation. It is represented by an arrow
and labeled with a description of data, usually its name or type.

Graphical Representation:

Actors
An actor is active object that drives the data flow graph by producing or consuming values.

Data store
A data store is a passive object with in a data flow diagram that stores data for later access.

Graphical Representation:

External Entity
A rectangle represents an external entity such as a librarian ,a library member.

32

Graphical Representation:

Output Symbol
This box represented data production during human computer interaction

Graphical Representation:

Context Level DFD for

VIEWER

E-shop

Search Contacts

Registration

View Contacts

POSTER

Login

E-shop
Search Ads
Post a new Ad.
( Online classifieds & Yellow Pages )
View Ads
Edit & Maintain ads
Send Response

View Responses
Show Banner Ads

View Regd. Users

Maintain Category

ADMINISTRATOR

33

LEVEL1 DFD for

E-shop

34

View Contacts

Search Contacts

Viewer
Contacts

View Ads

Search
Ads

Ads
Category

Send Response

Responses

View Responses

Post
Ads

Login
Process

Edit
Ads

Poster
New Poster

Maintain
View Registered Users
Category

Administrator

Maintain
Advertisers
Details

Registered Users

Send
Notification

Show
Banner Ads

Advertisers Details

35

Entity Relationship diagrams

Email
Name

AD id
Category

Address
Poster ID

Date

City

AD id

P. id

Posts

Description

AD id Maintains

Sends response

Category id

Date of viewing

V id

Response text

Belongs

Status

AD

Date

AD id

AD poster
P_id

Image

Date

Phone no

Password

Category

Responses

Response id

Views
AD id
M

Category

Category id
Category description

36

AD Viewer

37

Customer: Add new Customer when he/she enters.


Item, ShoppingCart: Maintain items, bill items selected from this shop.

Class: Item
Attributes: name, item_id, shop_id, price. Responsibilities: Display price. Collaborations:

Class: ShoppingCart Attributes: items


Responsibilities: Add item. Delete item. Collaborations: Item: Add, delete item.
Class: Guestbook

38

Attributes: customer, date, comment.

Responsibilities:
Enlist Comments.
Add /Delete Comments.

Collaborations:
10. IDENTIFYING METHODS & ATTRIBUTES:
Here's a brief description of the objects and methods, we identified with respect to our project.

Mall
Mall will provide a single roof for various shops. The mall performs the creation of a set of different shops, such as a
book store, a shoe store, etc. The mall greets an arriving customer, performs authentication for him/her and allocates
him/her the shopping cart. Mall presents the customer with a list of different stores availble and allows the customer to
shop at any of stores in the mall.
Some of the things a customer can do at the mall are: Get a list of available stores Get a shopping cart Enter a store
/shop

Notable Attributes:
name - the name of the mall shops - a collection of stores of different types customers - the customers currently in the
mall owner - the owner of the mall.
guestbook - a collection of comments by different customers Possible Methods:
void enter(Customer c) - customer c enters the mall
void exit(Customer c) - customer c exits the mall
ShoppingCart getShoppingCart - returns an empty shopping cart
Enumeration customers() - returns an enumeration of the customers in the mall
void checkout(shoppingCart cart) - checkout and purchase the items in the shopping cart
Shop: The Abstract superclass for a shop

Notable Attributes:
name - the name of the store
storeId - unique ID for the store
items - items available for sale in the store
customers - the customers currently in the store
owner - the owner of the shop

Possible Methods:
abstract void enter(Customer c) - customer c enters the store
abstract void exit(Customer c) - customer c exits the store

39

Enumeration customers() - returns an enumeration of the customers in the store


Enumeration items() - returns an enumeration of the items available for sale in the store
abstract void addToCart(shopingCart, item) - add an item to the shopping cart
abstract void removeFromCart(shopingCart, item) - remove an item from the shopping cart
BookStore: A possible subclass of Store ShoeStore: A possible
subclass of Store GameStore: A possible subclass of Store

Item: An item for sale in a store

Notable Attributes:
itemName - the name of the item
itemId - unique ID for the item
storeld - the ID of the store from which the item came
price - the price of the item
Customer: A customer visiting the mall. This class extends the general person class.

Notable Attributes:
shoppingCart - the shopping cart being used by the customer store - the store the
customer is currently in.

Possible Methods:
addItemToCart() - adds a given item to shopping cart writeGuestBook() - adds
his/her comments to guest book
removeItemFromCart() - removes the added item from cart.
ShoppingCart : A shopping cart for the customer. Notable
Attributes:
items - items currently in the shopping cart Possible

Methods:
Enumeration items() - returns an enumeration of the items currently in the cart
addItem()- adds a given item to collection removeItem() - removes the given item
from the collection. calcSubTotal() - calculates the incremental total of all the
items in the cart.

40

GuestBook:
Customers visiting the mall can send there comments about the shopping experience at the mall to mall admin via
guestbook. Each cutomer will have comment as an attribute field and the guestbook is the collection of such comments
and is an attribute of the Mall class.

Notable Attributes:
comments
customer
date

Possible functions:
Add comment() View comments() Delete comments()

MallOwner: The owner of the mall or mall admin as referred in the class diagram above. This class also extends the
person class.

Notable Atttributes:
password

Possible functions:
NotifyO - notifies the request for shop
viewGuestBook() - views the comments in the guest book
ShopOwner: The owner of a shop. Each shop has a owner. This class also extends the person class.

Notable Atttributes:
password shop_id

Possible functions:
Discontinue_shop()

Person:
Notable Atttributes:
name email phone
address

41

11. REFINING INITIAL CLASS DIAGRAM


12. REFINING METHODS & ATTRIBUTES
Refining attributes of Mall class:
After refining, the method of mall class is: #enter: void #exit: void
#getShoppingCart: Shopping Cart #customers: enumeration #checkOut: void

Refining methods of Shop class:


After refining, the attributes of Shop class is:
#enter(): void # exit(): void
#customers(): enumeration #items(): enumeration #addToCart(): void
# removeFromCart() : void

Refining methods of Customer class:


After refining, the attributes of Customer class is:
#addItemToCart(): void #writeGuestBook(): void #removeItemFromCart(): void

Refining methods of Shopping Cart class:


After refining, the attributes of shopping Cart class is:
# items(): enumeration #addItem(): void #removeItem(): void #calcSubTotal(): void

Refining methods of Guest Book class:


After refining, the attributes of Guest Book is:
#Add_comment(): void #View_comments(): void #Delete_comments(): void

Refining methods of Mall Owner class:


After refining, the Mall Owner class is:
#Notify(): void #viewGuestBook(): void

Refining methods of Shop Owner class:


After refining, the Shop Owner class is:
#Discontinue_shop(): void

42

14. DETAILED CLASS DIAGRAM

15. CODE SNIPPETS AND SNAPSHOTS

43

E-SHOP.COM

SCREEN SHOTS

44 | P a g e

E-SHOP.COM

45 | P a g e

E-SHOP.COM

46 | P a g e

E-SHOP.COM

47 | P a g e

E-SHOP.COM

48 | P a g e

E-SHOP.COM

49 | P a g e

E-SHOP.COM

50 | P a g e

E-SHOP.COM

51 | P a g e

E-SHOP.COM

CODING
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs"
Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Shop More : Online Shopping Mart</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style2
{
text-align: center;
}
.style5
{
height: 65px;
}
.style8
{
height: 435px;
}
.style12
{
height: 52px;
text-align: right;
}
</style>
</head>
<body background="Images/Background.png">
<form id="form1" runat="server">
<table align="center" border="0" width="800px"
style="border-bottom: medium solid #A4BAE8; height: 650px; border-left-color: #A4BAE8;
border-right-color: #A4BAE8; border-top-color: #A4BAE8; width: 800px;">
<tr>
<td class="style5" colspan="2"
style="border-bottom-style: solid; border-bottom-color: #41678E"
title="ONLINE">
<asp:Image ID="Image1" runat="server" Width="100%"
ImageUrl="~/Images/Fabcom-homepage-copy.jpg" Height="130px" />
</td>
</tr>
<tr>
<td bgcolor="#0066CC">
<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1"
Height="16px" Width="251px"
onpageindexchanging="FormView1_PageIndexChanging">
<EditItemTemplate>
Name:

52 | P a g e

E-SHOP.COM
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'
/>

<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<InsertItemTemplate>
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'

/>

<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Welcome:
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
&nbsp;<br />
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click">Logout</asp:LinkButton>
<br />
</ItemTemplate>
<EmptyDataTemplate>
Welcome: Guest<br />
<a href="Login.aspx">Login</a> or <a
href="registernewuser.aspx">register</a>
</EmptyDataTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Name] FROM [UserTable] WHERE [Username] =
@Username">
<SelectParameters>
<asp:SessionParameter Name="Username" SessionField="Username" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td class="style12" bgcolor="#0066CC">
&nbsp;</td>
</tr>
<tr style="vertical-align: top">
<td class="style5" bgcolor="#0066CC">
<asp:TreeView ID="TreeView1" runat="server" Height="144px"
ImageSet="BulletedList4" BackColor="#FFFFCC" BorderColor="#CC33FF"
ForeColor="Red">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD"
HorizontalPadding="0px" VerticalPadding="0px" />
<Nodes>
<asp:TreeNode NavigateUrl="~/MainPageUsers.aspx" Text="Main Page"
Value="Main Page"></asp:TreeNode>
<asp:TreeNode Text="User Control Panel" Value="User Control Panel">
<asp:TreeNode NavigateUrl="~/ViewUserProfile.aspx"

53 | P a g e

E-SHOP.COM
Text="View \ Modify User profile" Value="View \ Modify User profile">
</asp:TreeNode>
<asp:TreeNode NavigateUrl="~/ViewStatusPurchase.aspx" Text="View Order
Status"

Value="View Order Status"></asp:TreeNode>


<asp:TreeNode NavigateUrl="~/viewMyReviews.aspx" Text="View My Reviews"
Value="View My Reviews"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode NavigateUrl="~/SearchItems.aspx" Text="Search For Items"
Value="Search For Items"></asp:TreeNode>
<asp:TreeNode Text="View Shopping cart" Value="View Shopping cart"
NavigateUrl="~/ShoppingCart.aspx">
</asp:TreeNode>
<asp:TreeNode NavigateUrl="~/ContactUs.aspx" Text="Contact Us"
Value="Contact Us"></asp:TreeNode>
</Nodes>
<NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black"
HorizontalPadding="0px" NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>
</td>
<td class="style8" width="100%">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td class="style2" colspan="2" bgcolor="#0000CC">
Radha Govind, CS Final Year Students April 2013
</td>
</tr>
</table>
</form>
</body>
</html>

54 | P a g e

E-SHOP.COM
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs"
Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Shop More : Online Shopping Mart</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style2
{
text-align: center;
}
.style5
{
height: 65px;
}
.style8
{
height: 435px;
}
.style12
{
height: 52px;
text-align: right;
}
</style>
</head>
<body background="Images/Background.png">
<form id="form1" runat="server">
<table align="center" border="0" width="800px"
style="border-bottom: medium solid #A4BAE8; height: 650px; border-left-color: #A4BAE8;
border-right-color: #A4BAE8; border-top-color: #A4BAE8; width: 800px;">
<tr>
<td class="style5" colspan="2"
style="border-bottom-style: solid; border-bottom-color: #41678E"
title="ONLINE">
<asp:Image ID="Image1" runat="server" Width="100%"
ImageUrl="~/Images/Fabcom-homepage-copy.jpg" Height="130px" />
</td>
</tr>
<tr>
<td bgcolor="#0066CC">
<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1"
Height="16px" Width="251px"
onpageindexchanging="FormView1_PageIndexChanging">
<EditItemTemplate>
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'
/>
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"

55 | P a g e

E-SHOP.COM
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<InsertItemTemplate>
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'
/>

<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Welcome:
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
&nbsp;<br />
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click">Logout</asp:LinkButton>
<br />
</ItemTemplate>
<EmptyDataTemplate>
Welcome: Guest<br />
<a href="Login.aspx">Login</a> or <a
href="registernewuser.aspx">register</a>
</EmptyDataTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Name] FROM [UserTable] WHERE [Username] =
@Username">
<SelectParameters>
<asp:SessionParameter Name="Username" SessionField="Username" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td class="style12" bgcolor="#0066CC">
&nbsp;</td>
</tr>
<tr style="vertical-align: top">
<td class="style5" bgcolor="#0066CC">
<asp:TreeView ID="TreeView1" runat="server" Height="144px"
ImageSet="BulletedList4" BackColor="#FFFFCC" BorderColor="#CC33FF"
ForeColor="Red">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD"
HorizontalPadding="0px" VerticalPadding="0px" />
<Nodes>
<asp:TreeNode NavigateUrl="~/MainPageUsers.aspx" Text="Main Page"
Value="Main Page"></asp:TreeNode>
<asp:TreeNode Text="User Control Panel" Value="User Control Panel">
<asp:TreeNode NavigateUrl="~/ViewUserProfile.aspx"
Text="View \ Modify User profile" Value="View \ Modify User profile">
</asp:TreeNode>
<asp:TreeNode NavigateUrl="~/ViewStatusPurchase.aspx" Text="View Order
Status"
Value="View Order Status"></asp:TreeNode>
<asp:TreeNode NavigateUrl="~/viewMyReviews.aspx" Text="View My Reviews"

56 | P a g e

E-SHOP.COM
Value="View My Reviews"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode NavigateUrl="~/SearchItems.aspx" Text="Search For Items"
Value="Search For Items"></asp:TreeNode>
<asp:TreeNode Text="View Shopping cart" Value="View Shopping cart"
NavigateUrl="~/ShoppingCart.aspx">
</asp:TreeNode>
<asp:TreeNode NavigateUrl="~/ContactUs.aspx" Text="Contact Us"
Value="Contact Us"></asp:TreeNode>
</Nodes>
<NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black"
HorizontalPadding="0px" NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>
</td>
<td class="style8" width="100%">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td class="style2" colspan="2" bgcolor="#0000CC">
Radha Govind, CS Final Year Students April 2013
</td>
</tr>
</table>
</form>
</body>
</html>

57 | P a g e

E-SHOP.COM
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
MaintainScrollPositionOnPostback="true" AutoEventWireup="true"
CodeFile="ShoppingCart.aspx.cs" Inherits="ShoppingCart" Title="Online Shopping" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"


DataKeyNames="ShoppingID" DataSourceID="SqlDataSource1" BackColor="White"
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3"
GridLines="Vertical" style="margin-right: 0px"
onrowupdated="GridView1_RowUpdated" ShowFooter="True">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<Columns>
<asp:ImageField DataImageUrlField="ProductImageThumb"
DataImageUrlFormatString="Thumbnails/{0}" ReadOnly="True">
</asp:ImageField>
<asp:BoundField DataField="ProductName" HeaderText="Product" ReadOnly="True"
SortExpression="ProductName" />
<asp:BoundField DataField="ProductShortDescription" HeaderText="Description"
ReadOnly="True" SortExpression="ProductShortDescription" />
<asp:BoundField DataField="Price" HeaderText="Price" ReadOnly="True"
SortExpression="Price" />
<asp:CommandField ButtonType="Image" DeleteImageUrl="~/Images/Delete.jpg"
DeleteText="Remove From Shopping Cart" ShowDeleteButton="True" />

</Columns>
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<EmptyDataTemplate>
<b><span class="style17">Shopping cart is empty</span></b>
</EmptyDataTemplate>
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
<br />

<asp:SqlDataSource ID="SqlDataSource1" runat="server"


ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [ShoppingCart] WHERE [ShoppingID] = @ShoppingID"
InsertCommand="INSERT INTO [ShoppingCart] ([ProductIDNo], [UserID], [SalesStatus], [qty])
VALUES (@ProductIDNo, @UserID, @SalesStatus, @qty)"
SelectCommand="SELECT ShoppingCart.ShoppingID, ShoppingCart.ProductIDNo,
ShoppingCart.UserID, ShoppingCart.SalesStatus, ShoppingCart.qty, ProductTable.ProductName,
ProductTable.Price, ProductTable.ProductImageThumb, ProductTable.ProductShortDescription
FROM ShoppingCart INNER JOIN ProductTable ON ShoppingCart.ProductIDNo =
ProductTable.ProductID WHERE (ShoppingCart.SalesStatus = @SalesStatus) AND
(ShoppingCart.UserID = @username)"

58 | P a g e

E-SHOP.COM
UpdateCommand="UPDATE [ShoppingCart] SET [ProductIDNo] = @ProductIDNo, [UserID] =
@UserID, [SalesStatus] = @SalesStatus, [qty] = @qty WHERE [ShoppingID] = @ShoppingID">
<SelectParameters>
<asp:Parameter DefaultValue="Open" Name="SalesStatus" Type="String" />
<asp:SessionParameter DefaultValue="" Name="Username" SessionField="Username" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ShoppingID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductIDNo" Type="String" />
<asp:Parameter Name="UserID" Type="String" />
<asp:Parameter Name="SalesStatus" Type="String" />
<asp:Parameter Name="qty" Type="Int32" />
<asp:Parameter Name="ShoppingID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProductIDNo" Type="String" />
<asp:Parameter Name="UserID" Type="String" />
<asp:Parameter Name="SalesStatus" Type="String" />
<asp:Parameter Name="qty" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>
<tr>
<td colspan="2">
<a href="Payment.aspx">Pay All Payment</a>
</td>
</tr>
<br />
</asp:Content>

59 | P a g e

E-SHOP.COM
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void FormView2_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
{
this.GridView1.DataBind();
}
protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
}

60 | P a g e

E-SHOP.COM
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="AdminMasterPage.master.cs"
Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Online Shopping</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style2
{
text-align: center;
}
.style5
{
height: 65px;
}
.style8
{
height: 435px;
}
</style>
</head>
<body background="Images/SlideShowTabs.SlideShowTabImage0_1334061917627.png">
<form id="form1" runat="server">
<table align="center" border="0" width="800px">
<tr>
<td class="style5" colspan="2"
style="border-bottom-style: solid; border-bottom-color: #41678E">
<asp:Image ID="Image1" runat="server" Width="100%"
ImageUrl="~/Images/SlideShowTabs.SlideShowTabImage3_1334061917627.png"
Height="130px" />
</td>
</tr>
<tr>
<td bgcolor="#CCFFFF">
<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1"
style="direction: ltr" Width="190px">
<EditItemTemplate>
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'
/>
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<InsertItemTemplate>
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>'
/>
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />

61 | P a g e

E-SHOP.COM
&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Welcome:
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
<br />
<asp:LinkButton ID="LinkButton1" runat="server"
onclick="LinkButton1_Click">Logout</asp:LinkButton>
<br />
</ItemTemplate>
<EmptyDataTemplate>
Welcome: Guest<br />
<asp:LinkButton ID="LinkButton2" runat="server"
onclick="LinkButton2_Click">Login</asp:LinkButton>
</EmptyDataTemplate>
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Name] FROM [UserTable]"></asp:SqlDataSource>
</td>
<td bgcolor="#CCFFFF">
</td>
</tr>
<tr style="vertical-align: top">
<td class="style5" bgcolor="#CCFFFF">
<asp:TreeView ID="TreeView1" runat="server" ImageSet="Simple">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD"
HorizontalPadding="0px" VerticalPadding="0px" />
<Nodes>
<asp:TreeNode NavigateUrl="~/MainPageAdmin.aspx" Text="Main Page"
Value="Main Page"></asp:TreeNode>
<asp:TreeNode Text="Users' Control Panel" Value="Users' Control Panel">
<asp:TreeNode NavigateUrl="~/AdminUserMaintenance.aspx"
Text="View / Modify Users" Value="New Node"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Sales" Value="Sales">
<asp:TreeNode NavigateUrl="~/AdminSalesMaintenance.aspx"
Text="Sales Maintenance" Value="Sales Maintenance"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Items" Value="Items">
<asp:TreeNode NavigateUrl="~/AdminAddNewItem.aspx" Text="Add New Item"
Value="Add New Item"></asp:TreeNode>
<asp:TreeNode NavigateUrl="~/AdminMaintainItems.aspx"
Text="View / modify Items" Value="View / modify Items"></asp:TreeNode>
<asp:TreeNode NavigateUrl="~/ViewReviews.aspx" Text="View Reviews"
Value="View Reviews"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
<NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black"
HorizontalPadding="0px" NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>

62 | P a g e

E-SHOP.COM
</td>
<td class="style8" width="100%">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td class="style2" colspan="2"
style="border-bottom-style: solid; border-bottom-color: #88A5E1"
bgcolor="#CCFFFF">
Radhagovind, CS Final Year Students April 2013</td>
</tr>
</table>
</form>
</body>
</html>

63 | P a g e

E-SHOP.COM
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["UserType"] == null || !Session["UserType"].Equals("admin"))
Response.Redirect("Default.aspx");
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("MainPage.aspx");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Response.Redirect("login.aspx");
}
}

64 | P a g e

E-SHOP.COM
<%@ Page Language="C#" MasterPageFile="~/AdminMasterPage.master"
MaintainScrollPositionOnPostback="true" AutoEventWireup="true"
CodeFile="AdminAddNewItem.aspx.cs" Inherits="AdminPage" Title="Online Shopping" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.style9
{
text-decoration: underline;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<hr>
<p>
<span __designer:mapid="16c" class="style9">Adding New Item:</span>
<br __designer:mapid="d3" />
<br __designer:mapid="d4" />
<br __designer:mapid="d5" />
Product&#39;s Name:
</p>
<p>
<asp:TextBox ID="txtProductName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtProductName" ErrorMessage="Product's Name is
Requierd">*</asp:RequiredFieldValidator>
<br __designer:mapid="169" />
<br __designer:mapid="16a" />
Product&#39;s Short Description:</p>
<p>
&nbsp;<asp:TextBox ID="txtShortDescription" runat="server" Height="62px"
TextMode="MultiLine" Width="326px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtShortDescription" ErrorMessage="Description is
Reqiuerd">*</asp:RequiredFieldValidator>
</p>
<p>
<br __designer:mapid="d7" />
<br __designer:mapid="d8" />
Product&#39;s Description:
</p>
<p>
<asp:TextBox ID="txtProductDescription" runat="server" Height="156px"
TextMode="MultiLine" Width="375px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtProductDescription"
ErrorMessage="Description is Requierd">*</asp:RequiredFieldValidator>
<br __designer:mapid="da" />
<br __designer:mapid="db" />
Catogery:
<asp:DropDownList ID="dropCatInsert" runat="server"
DataSourceID="SqlDataSource2" DataTextField="Catogery"
DataValueField="Catogery">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [ProductCatogery] WHERE ([CatogeryID] &gt;
@CatogeryID)">

65 | P a g e

E-SHOP.COM

</p>

<SelectParameters>
<asp:Parameter DefaultValue="1" Name="CatogeryID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>

<p>
Price:
<asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtPrice" ErrorMessage="Price is
reqiuerd">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToValidate="txtPrice" ErrorMessage="Onlt numbers are accepted"
Operator="DataTypeCheck" Type="Integer">*</asp:CompareValidator>
</p>
<p>
&nbsp;</p>
<hr />
<p>
<br __designer:mapid="167" />
Upload Product Full Size Image:
</p>
<p>
<asp:FileUpload ID="FileUpload1" runat="server" ondatabinding="btnsaveProduct_Click" />
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="FileUpload1"
ErrorMessage="you must enter product full size
image">*</asp:RequiredFieldValidator>
&nbsp;<asp:Label ID="lblFullSizeImage" runat="server" style="color:
#FFFFFF"></asp:Label>
</p>
<p>
Upload Product Thumbnail Size Image:</p>
<p>
<asp:FileUpload ID="FileUpload2" runat="server"
ondatabinding="btnsaveProduct_Click" />
&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
ControlToValidate="FileUpload2"
ErrorMessage="you must enter product thubnail size
image">*</asp:RequiredFieldValidator>
&nbsp;<asp:Label ID="lblThumbSizeImage" runat="server"
style="font-weight: 700; color: #FFFFFF"></asp:Label>
</p>
<p>
&nbsp;</p>
<hr />
<p>
<br __designer:mapid="de" />
</p>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
<p>
<br __designer:mapid="df" />
<br __designer:mapid="e1" />
<br __designer:mapid="e2" />
<asp:Label ID="lblAddingNewItem" runat="server" ForeColor="#FF3300"></asp:Label>
<br __designer:mapid="e4" />
<br __designer:mapid="e5" />
<asp:Button ID="btnsaveProduct" runat="server" Text="Add The Item"

66 | P a g e

E-SHOP.COM
onclick="btnsaveProduct_Click" />
<asp:Button ID="btnInsert" runat="server" Text="insert another Item"
onclick="btnInsert_Click" />
<br __designer:mapid="e8" />
<br __designer:mapid="e9" />
<br __designer:mapid="ea" />
<br __designer:mapid="eb" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [ProductTable] WHERE [ProductID] = @ProductID"
InsertCommand="INSERT INTO [ProductTable] ([ProductName], [ProductDescription],
[ProductShortDescription], [Price], [Category], [ProductImage], [ProductImageThumb]) VALUES
(@ProductName, @ProductDescription, @ProductShortDescription, @Price, @Category,
@ProductImage, @ProductImageThumb)"
SelectCommand="SELECT * FROM [ProductTable]"

UpdateCommand="UPDATE [ProductTable] SET [ProductName] =


@ProductName, [ProductDescription] = @ProductDescription, [ProductShortDescription] =
@ProductShortDescription, [Price] = @Price, [Category] = @Category, [ProductImage] =
@ProductImage, [ProductImageThumb] = @ProductImageThumb WHERE [ProductID] =
@ProductID">
<DeleteParameters>
<asp:Parameter Name="ProductID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductDescription" Type="String" />
<asp:Parameter Name="ProductShortDescription" Type="String" />
<asp:Parameter Name="Price" Type="Double" />
<asp:Parameter Name="Category" Type="String" />
<asp:Parameter Name="ProductImage" Type="String" />
<asp:Parameter Name="ProductImageThumb" Type="String" />
<asp:Parameter Name="ProductID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:ControlParameter ControlID="txtProductName" Name="ProductName"
PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtProductDescription"
Name="ProductDescription" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtProductDescription"
Name="ProductShortDescription" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtPrice" Name="Price" PropertyName="Text"
Type="Double" />
<asp:ControlParameter ControlID="dropCatInsert" Name="Category"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="lblFullSizeImage" Name="ProductImage"
PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="lblThumbSizeImage"
Name="ProductImageThumb"
PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</p>

67 | P a g e

E-SHOP.COM
<p>
&nbsp;</p>
<p>
</p>
<p>
<br />
</p>
<p>
</p>
</asp:Content>

68 | P a g e

E-SHOP.COM
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

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


{
protected void Page_Load(object sender, EventArgs e)
{
btnInsert.Visible = false;
//
btnsaveProduct.Visible = false;
}
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
//
MultiView1.ActiveViewIndex = RadioButtonList1.SelectedIndex;
}
protected void btnsaveProduct_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
FileUpload1.SaveAs("E:/dotnet-2013/Online Shopping website/Online Shopping
website/EWAPP/Uploadedpix" + FileUpload1.FileName);
lblFullSizeImage.Text = FileUpload1.FileName;
}
if (FileUpload2.HasFile)
{
FileUpload2.SaveAs("E:/dotnet-2013/Online Shopping website/Online Shopping
website/EWAPP/Thumbnails/" + FileUpload2.FileName);
}

lblThumbSizeImage.Text = FileUpload2.FileName;
btnsaveProduct.Visible = true;

SqlDataSource1.Insert();
this.lblAddingNewItem.Text = "Item Has Been Added into the Database";
btnsaveProduct.Visible = false;
btnInsert.Visible = true;
txtPrice.Enabled = false;
txtShortDescription.Enabled = false;
txtProductDescription.Enabled = false;
txtProductName.Enabled = false;
dropCatInsert.Enabled = false;

69 | P a g e

E-SHOP.COM
}
protected void btnInsert_Click(object sender, EventArgs e)
{
txtPrice.Text = "";
txtProductDescription.Text = "";
txtProductName.Text = "";
txtPrice.Enabled = true;
txtProductDescription.Enabled = true;
txtProductName.Enabled = true;
btnsaveProduct.Visible = true;
dropCatInsert.Enabled = true;
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
//
txtsearchUser.Visible = true;
//btn1.Visible = true;
//txtUserIDSearch.Visible = false;
btn2.Visible = false;
// LinkButton1.Visible = false;
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
//txtUserIDSearch.Visible = true;
//
btn2.Visible = true;
//

//

txtsearchUser.Visible = false;
//btn1.Visible = false;
// LinkButton2.Visible = false;
}
protected void DropSearchItems_SelectedIndexChanged(object sender, EventArgs e)
{

}
//protected void btnuploadImages_Click(object sender, EventArgs e)
//{
// if (FileUpload1.HasFile)
// {
//
FileUpload1.SaveAs("E:/dotnet-2013/Online Shopping website/Online Shopping
website/EWAPP/Uploadedpix/" + FileUpload1.FileName);
// }
// if (FileUpload2.HasFile)
// {
//
FileUpload2.SaveAs("E:/dotnet-2013/Online Shopping website/Online Shopping
website/EWAPP/Thumbnails/" + FileUpload2.FileName);
// }

// txtFimage.Text = FileUpload1.FileName;
// txtTimage.Text = FileUpload2.FileName;
// Label1.Visible = false;
// // btnsaveProduct.Visible = true;
//}

70 | P a g e

E-SHOP.COM

71 | P a g e

E-SHOP.COM
<%@ Page Language="C#" MasterPageFile="~/AdminMasterPage.master"
MaintainScrollPositionOnPostback="true" AutoEventWireup="true"
CodeFile="AdminUserMaintenance.aspx.cs" Inherits="AdminUserMaintenance" Title="Online
Shopping" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
.style17
{
width: 129%;
}
.style19
{
text-align: center;
font-weight: bold;
font-size: medium;
}
.style18
{
width: 156px;
}
.style20
{
width: 132px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True"
onselectedindexchanged="RadioButtonList1_SelectedIndexChanged">
<asp:ListItem Value="0">Add New Account</asp:ListItem>
<asp:ListItem Value="1">View / modify My account</asp:ListItem>
<asp:ListItem Value="2">View / Modify All User Accounts</asp:ListItem>
</asp:RadioButtonList>
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View1" runat="server">
<table class="style17">
<tr>
<td class="style19" colspan="2"
style="border-color: #000080; background-color: #AABFEA; border-bottom-style:
solid;">
Add New Administrator Account</td>
</tr>
<tr>
<td class="style18">
Name</td>
<td>
<asp:TextBox ID="txtName" runat="server" Width="139px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="txtName" ErrorMessage="Name Is
requierd">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style18">
Passport Number</td>
<td>

72 | P a g e

E-SHOP.COM
<asp:TextBox ID="txtpassportNumber" runat="server"
Width="139px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtpassportNumber"
ErrorMessage="Please Enter your Passport
Number">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style18">
UserName</td>
<td>
<asp:TextBox ID="txtUserName" runat="server" Width="139px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="txtUserName" ErrorMessage="Please Enter your
username">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style18">
Password</td>
<td>
<asp:TextBox ID="txtPassword1" runat="server" Width="139px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtPassword1" ErrorMessage="please enter your
password">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style18">
Re-Type Password</td>
<td>
<asp:TextBox ID="txtpassword2" runat="server" Width="137px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="txtpassword2" ErrorMessage="please enter The password
again">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="txtPassword1" ControlToValidate="txtpassword2"
ErrorMessage="Password is not matched">*</asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style18">
Email</td>
<td>
<asp:TextBox ID="txtEmail1" runat="server" Width="136px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
ControlToValidate="txtEmail1" ErrorMessage="Please Enter your
Email">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server"
ControlToValidate="txtEmail1" ErrorMessage="RegularExpressionValidator"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+
([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style18">

73 | P a g e

E-SHOP.COM
Confirm your Email</td>
<td>
<asp:TextBox ID="txtEmail2" runat="server" Width="138px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
ControlToValidate="txtEmail2" ErrorMessage="Please Enter your
Email">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2"
runat="server"
ControlToValidate="txtEmail2" ErrorMessage="accepted format is
name@domain.ooo"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+
([-.]\w+)*">*</asp:RegularExpressionValidator>
<asp:CompareValidator ID="CompareValidator2" runat="server"
ControlToCompare="txtEmail1" ControlToValidate="txtEmail2"
ErrorMessage="The Email address does not
matched">*</asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style18">
Address:</td>
<td>
<asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine"
Width="141px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server"
ControlToValidate="txtAddress"
ErrorMessage="accepted format is
name@domain.ooo">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style18">
Chose the user Role</td>
<td>
<asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True">
<asp:ListItem>admin</asp:ListItem>
<asp:ListItem>user</asp:ListItem>
</asp:ListBox>
</td>
</tr>
<tr>
<td class="style18">
&nbsp;</td>
<td>
<asp:Label ID="Label1" runat="server" ForeColor="#000066"></asp:Label>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</td>
</tr>
<tr>
<td class="style18">
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [UserTable] WHERE [ID] = @ID"
InsertCommand="INSERT INTO [UserTable] ([Username], [Password], [Email],
[Address], [Name], [IDnumber], [UserType]) VALUES (@Username, @Password, @Email,
@Address, @Name, @IDnumber, @UserType)"
SelectCommand="SELECT * FROM [UserTable]"

74 | P a g e

E-SHOP.COM
UpdateCommand="UPDATE [UserTable] SET [Username] = @Username,
[Password] = @Password, [Email] = @Email, [Address] = @Address, [Name] = @Name,
[IDnumber] = @IDnumber, [UserType] = @UserType WHERE [ID] = @ID">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="IDnumber" Type="String" />
<asp:Parameter Name="UserType" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:ControlParameter ControlID="txtUserName" Name="Username"
PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtPassword1" Name="Password"
PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="txtEmail1" Name="Email"
PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="txtAddress" Name="Address"
PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="txtName" Name="Name"
PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="txtpassportNumber" Name="IDnumber"
PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="ListBox1" Name="UserType"
PropertyName="SelectedValue" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</td>
<td>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Register" />
</td>
</tr>
</table>
</asp:View>
<br />
<br />
<asp:View ID="View2" runat="server">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
CellPadding="3" DataKeyNames="ID" DataSourceID="SqlDataSource3"
GridLines="Vertical" BackColor="White" BorderColor="#999999" BorderStyle="None"
BorderWidth="1px">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False"
ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="Username" HeaderText="Username"

75 | P a g e

E-SHOP.COM
SortExpression="Username" />
<asp:BoundField DataField="Password" HeaderText="Password"
SortExpression="Password" />
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
<asp:BoundField DataField="Address" HeaderText="Address"
SortExpression="Address" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="IDnumber" HeaderText="IDnumber"
SortExpression="IDnumber" />
</Columns>
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [UserTable] WHERE ([UserType] = @UserType) AND
([Username] = @Username)">
<SelectParameters>
<asp:Parameter DefaultValue="admin" Name="UserType" Type="String" />
<asp:SessionParameter DefaultValue="" Name="Username"
SessionField="Username" />
</SelectParameters>
</asp:SqlDataSource>
<asp:FormView ID="FormView2" runat="server" DataKeyNames="ID"
DataSourceID="SqlDataSource4" onitemupdated="FormView2_ItemUpdated">
<EditItemTemplate>
<table class="style17">
<tr>
<td class="style20">
ID:</td>
<td>
<asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
</td>
</tr>
<tr>
<td class="style20">
Username:</td>
<td>
<asp:Label ID="UsernameLabel" runat="server" Text='<%#
Bind("Username") %>' />
</td>
</tr>
<tr>
<td class="style20">
Password:</td>
<td>
<asp:TextBox ID="PasswordTextBox" runat="server"
Text='<%# Bind("Password") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server"
ControlToValidate="PasswordTextBox" ErrorMessage="Password Is
reqierd">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style20">

76 | P a g e

E-SHOP.COM
Email:</td>
<td>
<asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email")
%>' />

<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server"


ControlToValidate="EmailTextBox" ErrorMessage="Address is
Reqiuerd">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3"
runat="server"
ControlToValidate="EmailTextBox"
ErrorMessage="Email is not in the correct format"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+
([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style20">
Address:</td>
<td>
<asp:TextBox ID="AddressTextBox" runat="server" Text='<%#
Bind("Address") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server"
ControlToValidate="AddressTextBox" ErrorMessage="Address is
requierd">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style20">
Name:</td>
<td>
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>'
/>
</td>
</tr>
<tr>
<td class="style20">
Passport number:</td>
<td>
<asp:Label ID="IDnumberLabel" runat="server" Text='<%#
Bind("IDnumber") %>' />
</td>
</tr>
<tr>
<td class="style20">
UserType:</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server"
SelectedValue='<%# Bind("UserType") %>'>
<asp:ListItem>admin</asp:ListItem>
<asp:ListItem>user</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;</td>
</tr>
</table>

77 | P a g e

E-SHOP.COM
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
<br />
<asp:ValidationSummary ID="ValidationSummary2" runat="server" />
</EditItemTemplate>
<InsertItemTemplate>
Username:
<asp:TextBox ID="UsernameTextBox" runat="server"
Text='<%# Bind("Username") %>' />
<br />
Password:
<asp:TextBox ID="PasswordTextBox" runat="server"
Text='<%# Bind("Password") %>' />
<br />
Email:
<asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
<br />
Address:
<asp:TextBox ID="AddressTextBox" runat="server" Text='<%# Bind("Address") %>'
/>

<br />
Name:
<asp:TextBox ID="NameTextBox" runat="server" Text='<%# Bind("Name") %>' />
<br />
IDnumber:
<asp:TextBox ID="IDnumberTextBox" runat="server"
Text='<%# Bind("IDnumber") %>' />
<br />
UserType:
<asp:TextBox ID="UserTypeTextBox" runat="server"
Text='<%# Bind("UserType") %>' />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
<table class="style17">
<tr>
<td class="style20">
ID:</td>
<td>
<asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
</td>
</tr>
<tr>
<td class="style20">
Username:</td>
<td>
<asp:Label ID="UsernameLabel" runat="server" Text='<%#
Bind("Username") %>' />
</td>
</tr>
<tr>
<td class="style20">

78 | P a g e

E-SHOP.COM
Password:</td>
<td>
<asp:Label ID="PasswordLabel" runat="server" Text='<%# Bind("Password")
%>' />

/>

%>' />

</td>
</tr>
<tr>
<td class="style20">
Email:</td>
<td>
<asp:Label ID="EmailLabel" runat="server" Text='<%# Bind("Email") %>'
</td>
</tr>
<tr>
<td class="style20">
Address:</td>
<td>
<asp:Label ID="AddressLabel" runat="server" Text='<%# Bind("Address")
</td>
</tr>
<tr>
<td class="style20">
Name:</td>
<td>
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>'

/>

</td>
</tr>
<tr>
<td class="style20">
Passport number:</td>
<td>
<asp:Label ID="IDnumberLabel" runat="server" Text='<%#
Bind("IDnumber") %>' />
</td>
</tr>
<tr>
<td class="style20">
UserType:</td>
<td>
<asp:Label ID="UserTypeLabel" runat="server" Text='<%# Bind("UserType")
%>' />
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;</td>
</tr>
</table>
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
&nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
CommandName="Delete" Text="Delete" />
&nbsp;
</ItemTemplate>
</asp:FormView>

79 | P a g e

E-SHOP.COM
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [UserTable] WHERE [ID] = @ID"
InsertCommand="INSERT INTO [UserTable] ([Username], [Password], [Email], [Address],
[Name], [IDnumber], [UserType]) VALUES (@Username, @Password, @Email, @Address, @Name,
@IDnumber, @UserType)"
SelectCommand="SELECT * FROM [UserTable] WHERE ID = @ID"
UpdateCommand="UPDATE [UserTable] SET [Username] = @Username, [Password] =
@Password, [Email] = @Email, [Address] = @Address, [Name] = @Name, [IDnumber] =
@IDnumber, [UserType] = @UserType WHERE [ID] = @ID">
<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="ID"
PropertyName="SelectedValue" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="IDnumber" Type="String" />
<asp:Parameter Name="UserType" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="IDnumber" Type="String" />
<asp:Parameter Name="UserType" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</asp:View>
<br />
<br />
<asp:View ID="View3" runat="server">
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
CellPadding="3" DataKeyNames="ID" DataSourceID="SqlDataSource10"
GridLines="Vertical">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False"
ReadOnly="True" SortExpression="ID" />
<asp:BoundField DataField="Username" HeaderText="Username"
SortExpression="Username" />
<asp:BoundField DataField="Password" HeaderText="Password"
SortExpression="Password" />
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
<asp:BoundField DataField="Address" HeaderText="Address"

80 | P a g e

E-SHOP.COM
SortExpression="Address" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="IDnumber" HeaderText="IDnumber"
SortExpression="IDnumber" />
<asp:BoundField DataField="UserType" HeaderText="UserType"
SortExpression="UserType" />
</Columns>
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource10" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [UserTable] WHERE [ID] = @ID"
InsertCommand="INSERT INTO [UserTable] ([Username], [Password], [Email], [Address],
[Name], [IDnumber], [UserType]) VALUES (@Username, @Password, @Email, @Address, @Name,
@IDnumber, @UserType)"
SelectCommand="SELECT * FROM [UserTable] WHERE ([UserType] = @UserType)"
UpdateCommand="UPDATE [UserTable] SET [Username] = @Username, [Password] =
@Password, [Email] = @Email, [Address] = @Address, [Name] = @Name, [IDnumber] =
@IDnumber, [UserType] = @UserType WHERE [ID] = @ID">
<SelectParameters>
<asp:Parameter DefaultValue="user" Name="UserType" Type="String" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="IDnumber" Type="String" />
<asp:Parameter Name="UserType" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="IDnumber" Type="String" />
<asp:Parameter Name="UserType" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<br />
<asp:FormView ID="FormView3" runat="server" DataKeyNames="ID"
DataSourceID="SqlDataSource11" onitemupdated="FormView2_ItemUpdated">
<EditItemTemplate>
<table class="style17">
<tr>
<td class="style20">
ID:</td>
<td>
<asp:Label ID="IDLabel0" runat="server" Text='<%# Eval("ID") %>' />

81 | P a g e

E-SHOP.COM
</td>
</tr>
<tr>
<td class="style20">
Username:</td>
<td>
<asp:Label ID="UsernameLabel0" runat="server" Text='<%#
Bind("Username") %>' />
</td>
</tr>
<tr>
<td class="style20">
Password:</td>
<td>
<asp:TextBox ID="PasswordTextBox0" runat="server"
Text='<%# Bind("Password") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server"
ControlToValidate="PasswordTextBox0" ErrorMessage="Password is
Reqiuerd">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style20">
Email:</td>
<td>
<asp:TextBox ID="EmailTextBox0" runat="server" Text='<%# Bind("Email")
%>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server"
ControlToValidate="EmailTextBox0" ErrorMessage="Email Is
reqiured">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator4"
runat="server"
ControlToValidate="EmailTextBox0"
ErrorMessage="Email is not in the correct
format">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style20">
Address:</td>
<td>
<asp:TextBox ID="AddressTextBox0" runat="server"
Text='<%# Bind("Address") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server"
ControlToValidate="AddressTextBox0" ErrorMessage="Address is
reqiuerd">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style20">
Name:</td>
<td>
<asp:Label ID="NameLabel0" runat="server" Text='<%# Bind("Name") %>'
/>
</td>
</tr>
<tr>
<td class="style20">

82 | P a g e

E-SHOP.COM
Passport number:</td>
<td>
<asp:Label ID="IDnumberLabel0" runat="server" Text='<%#
Bind("IDnumber") %>' />
</td>
</tr>
<tr>
<td class="style20">
UserType:</td>
<td>
<asp:DropDownList ID="DropDownList2" runat="server"
SelectedValue='<%# Bind("UserType") %>'>
<asp:ListItem>admin</asp:ListItem>
<asp:ListItem>user</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;</td>
</tr>
</table>
<asp:LinkButton ID="UpdateButton0" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
&nbsp;<asp:LinkButton ID="UpdateCancelButton0" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
<br />
<asp:ValidationSummary ID="ValidationSummary3" runat="server" />
</EditItemTemplate>
<InsertItemTemplate>
Username:
<asp:TextBox ID="UsernameTextBox0" runat="server"
Text='<%# Bind("Username") %>' />
<br />
Password:
<asp:TextBox ID="PasswordTextBox1" runat="server"
Text='<%# Bind("Password") %>' />
<br />
Email:
<asp:TextBox ID="EmailTextBox1" runat="server" Text='<%# Bind("Email") %>' />
<br />
Address:
<asp:TextBox ID="AddressTextBox1" runat="server"
Text='<%# Bind("Address") %>' />
<br />
Name:
<asp:TextBox ID="NameTextBox0" runat="server" Text='<%# Bind("Name") %>' />
<br />
IDnumber:
<asp:TextBox ID="IDnumberTextBox0" runat="server"
Text='<%# Bind("IDnumber") %>' />
<br />
UserType:
<asp:TextBox ID="UserTypeTextBox0" runat="server"
Text='<%# Bind("UserType") %>' />
<br />
<asp:LinkButton ID="InsertButton0" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />

83 | P a g e

E-SHOP.COM
&nbsp;<asp:LinkButton ID="InsertCancelButton0" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
<table class="style17">
<tr>
<td class="style20">
ID:</td>
<td>
<asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
</td>
</tr>
<tr>
<td class="style20">
Username:</td>
<td>
<asp:Label ID="UsernameLabel1" runat="server" Text='<%#
Bind("Username") %>' />
</td>
</tr>
<tr>
<td class="style20">
Password:</td>
<td>
<asp:Label ID="PasswordLabel0" runat="server" Text='<%#
Bind("Password") %>' />
</td>
</tr>
<tr>
<td class="style20">
Email:</td>
<td>
<asp:Label ID="EmailLabel0" runat="server" Text='<%# Bind("Email") %>'
/>
</td>
</tr>
<tr>
<td class="style20">
Address:</td>
<td>
<asp:Label ID="AddressLabel0" runat="server" Text='<%# Bind("Address")
%>' />
</td>
</tr>
<tr>
<td class="style20">
Name:</td>
<td>
<asp:Label ID="NameLabel1" runat="server" Text='<%# Bind("Name") %>'
/>
</td>
</tr>
<tr>
<td class="style20">
Passport number:</td>
<td>
<asp:Label ID="IDnumberLabel1" runat="server" Text='<%#
Bind("IDnumber") %>' />

84 | P a g e

E-SHOP.COM
</td>
</tr>
<tr>
<td class="style20">
UserType:</td>
<td>
<asp:Label ID="UserTypeLabel0" runat="server" Text='<%#
Bind("UserType") %>' />
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;</td>
</tr>
</table>
<asp:LinkButton ID="EditButton0" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
&nbsp;<asp:LinkButton ID="DeleteButton0" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
&nbsp;
</ItemTemplate>
</asp:FormView>
<br />
<asp:SqlDataSource ID="SqlDataSource11" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [UserTable] WHERE [ID] = @ID"
InsertCommand="INSERT INTO [UserTable] ([Username], [Password], [Email], [Address],
[Name], [IDnumber], [UserType]) VALUES (@Username, @Password, @Email, @Address, @Name,
@IDnumber, @UserType)"
SelectCommand="SELECT * FROM [UserTable] WHERE ID = @ID"
UpdateCommand="UPDATE [UserTable] SET [Username] = @Username, [Password] =
@Password, [Email] = @Email, [Address] = @Address, [Name] = @Name, [IDnumber] =
@IDnumber, [UserType] = @UserType WHERE [ID] = @ID">
<SelectParameters>
<asp:ControlParameter ControlID="GridView2" Name="ID"
PropertyName="SelectedValue" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="IDnumber" Type="String" />
<asp:Parameter Name="UserType" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Address" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="IDnumber" Type="String" />

85 | P a g e

E-SHOP.COM
<asp:Parameter Name="UserType" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</asp:View>
<br />
<br />
<br />
</asp:MultiView>
<br />
<br />
</asp:Content>

86 | P a g e

E-SHOP.COM

CONCLUSION
As evidence of the success of this mission, there are millions of items listed each day in
thousands of different categories. There are items for almost any interest that one could imagine,
from sheet music to automobiles to hand tools to real estate. And the variety doesnt stop there.
Need a computer? One may find it listed in the proper category, in any configuration from very
old and obsolete to the latest greatest machine available. What about antiques? One can find an
antique quilt that is up for highest bid, or maybe an old violin, whose beautiful tones have
enchanted many though its years. Tickets. Maybe a ticket to the next concert of ones favorite
artist or play production. One can even find that special bottle of wine, some aged, exotic
cheese, and the perfect mood music for that special occasion.

In this instance it may be true that on eBay, they have something for everybody, whatever
their tastes may be.

87 | P a g e

E-SHOP.COM

REFERENCES
http://www.msdn.microsoft.com
http://www.asp.net
http://www.msdn.microsoft.com/vstdio
http://www.w3school.com
http://weblogs.asp.net/scottgu/default.aspx
http://codeproject.com
http://scribd.com

88 | P a g e

E-SHOP.COM

89 | P a g e

You might also like