You are on page 1of 108

JP INSTITUTE OF ENGINEERING & TECHNOLOGY,

MEERUT

E-MART.COM
SUBMITTED IN PARTIAL FULFILLMENT OF THE
REQUIREMENTS
FOR THE AWARD OF THE DEGREE OF
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE & ENGINEERING

SESSION: 2010-11
SUBMITTED BY
ROLL NO:0728210051
ROLL NO:0228210016
ROLL NO:0728210017
ROLL NO:0728210009

SUJEET KR. SINGH


ASHOK KUMAR
ASHWANI KR. DESHWAL
ANAND GUPTA

UNDER THE GUIDANCE OF MR. SANJEEV KUMAR SHARMA


PROJECT GUIDE MR. MAYANK SINGH

SUBMITTED TO
UTTAR PRADESH TECHNICAL UNIVERSITY, LUCKNOW

JP INSTITUTE OF ENGINEERING &


TECHNOLOGY, MEERUT

E-MART.COM

SUBMITTED BY

ROLL NO:0728210051
ROLL NO:0228210016
ROLL NO:0728210017
ROLL NO:0728210009

SUJEET KR. SINGH


ASHOK KUMAR
ASHWANI KR. DESHWAL
ANAND GUPTA

SESSION: 2010-11

TABLE OF CONTENTS

CERTIFICATES.................................................................................................6
DECLARATION10
ACKNOWLEDGEMENTS ...................................................................................11
ABSTRACT ............................................................................................................12
LIST OF TABLES...................................................................................................13

CHAPTER:1
PROBLEM DESCRIPTION14
INTRODUCTION..15
1.1 BACKGROUND OF THE PROBLEM...17
1.3 OBJECTIVES18

CHAPTER:2
LITERATURE SURVEY19
2.1 SYSTEM DEVELOPMENT METHODOLOGY28
2.2 REQUIREMENT ANALYSIS.30
2.3 PROJECT REQUIREMENT ...30
2.4 FEASIBILITY STUDY... 30
2.5 BLOCK DIAGRAM ...33
2.6 MODELLING..35

2.6.1 FLOWCHART..29
2.6.2 USE CASES..30
2.6.3 ER- DIAGRAM ...33

CHAPTER:3
DESIGN...44
3.1 MODULE SPECIFICATION45
3.2 FORMS NAME......................................46

CHAPTER:4
CODING.47
4.1 TOOLS, PLATFORM & LANGUAGE USED48
4.2 TECHNOLOGY OVERVIEW OF THE PROJECT

49

4.3 CODING....68

CHAPTER:5
TESTING..87
5.1 BLACK-BOX TESTING88
5.2 WHITE-BOX TESTING.88
5.3 INTERFACE TESTING.89
5.4 TESTING PROCESS..91

CHAPTER:6
SNAPSHOTS AND TABLES USED92
6.1 SNAPSHOTS..93
6.2 TABLES USED...98
4

CHAPTER:7
MAINTENANCE & CONCLUSION..102
7.1 MAINTENANCE...103
7.2 LIMITATIONS...104
7.3 CONCLUSION...105
7.4 REFERENCES....106

CERTIFICATE
This is to certify that this Project Report entitled E-MART.COM which is
submitted by SUJEET KR. SINGH, having Roll No 0728210051 , in the partial
fulfillment, for the award of degree of Bachelor of Technology in Department of
Computer Science & Engineering, of JP INSTITUTE OF ENGINEERING &
TECHNOLOGY, Meerut, affiliated to UTTAR PRADESH TECHNICAL
UNIVERSITY, Lucknow; is carried out by him under my supervision.
The matter embodied in this Project Work has not been submitted earlier for award of
any degree or diploma in any university/institution to the best of our knowledge and
belief.

MR. MAYANK SINGH


SHARMA
Project Guide
(Asst. Prof. CSE)

MR. SANJEEV KUMAR


(Head of the Department)

Date: __/__/____

CERTIFICATE
This is to certify that this Project Report entitled E-MART.COM which is
submitted by ASHOK KUMAR , having Roll No 0728210016, in the partial
fulfillment, for the award of degree of Bachelor of Technology in Department of
Computer Science & Engineering, of JP INSTITUTE OF ENGINEERING &
TECHNOLOGY, Meerut, affiliated to UTTAR PRADESH TECHNICAL
UNIVERSITY, Lucknow; is carried out by him under my supervision.
The matter embodied in this Project Work has not been submitted earlier for award of
any degree or diploma in any university/institution to the best of our knowledge and
belief.

MR. MAYANK SINGH


SHARMA
Project Guide
(Asst. Prof. CSE)

MR. SANJEEV KUMAR


(Head of the Department)

Date: __/__/____

CERTIFICATE
This is to certify that this Project Report entitled E-MART.COM which is
submitted by ASHWANI KR. DESHWAL, having Roll No 0728210017, in the
partial fulfillment, for the award of degree of Bachelor of Technology in Department
of Computer Science & Engineering, of JP INSTITUTE OF ENGINEERING &
TECHNOLOGY, Meerut, affiliated to UTTAR PRADESH TECHNICAL
UNIVERSITY, Lucknow; is carried out by him under my supervision.
The matter embodied in this Project Work has not been submitted earlier for award of
any degree or diploma in any university/institution to the best of our knowledge and
belief.

MR. MAYANK SINGH


SHARMA
Project Guide
(Asst. Prof. CSE)

MR. SANJEEV KUMAR


(Head of the Department)

Date: __/__/____

CERTIFICATE
This is to certify that this Project Report entitled E-MART.COM which is
submitted by ANAND GUPTA

, having Roll No 0728210009 , in the partial

fulfillment, for the award of degree of Bachelor of Technology in Department of


Computer Science & Engineering, of JP INSTITUTE OF ENGINEERING &
TECHNOLOGY, Meerut, affiliated to UTTAR PRADESH TECHNICAL
UNIVERSITY, Lucknow; is carried out by him under my supervision.
The matter embodied in this Project Work has not been submitted earlier for award of
any degree or diploma in any university/institution to the best of our knowledge and
belief.

MR. MAYANK SINGH


SHARMA
Project Guide
(Asst. Prof. CSE)

MR. SANJEEV KUMAR


(Head of the Department)

Date: __/__/____

DECLARATION
We hereby declare that this submission is our own work and that, to the best of my
knowledge and belief, it contains no material previously published or written by
another person nor material which to a substantial extent has been accepted for the
award of any other degree or diploma of the university or other institute of higher
learning, except where due acknowledgment has been made in the text.

10

ACKNOWLEDGEMENT
It gives us a great sense of pleasure to present the report of the Project Work,
undertaken during B. Tech. Final Year. We owe special debt of gratitude to Mr.
Mayank Singh Department of Computer Science & Engineering, JP Institute of
Engineering & Technology, Meerut for his constant support and guidance throughout
the course of our work. His sincerity, thoroughness and perseverance have been a
constant source of inspiration for us. It is only his cognizant efforts that our endeavors
have seen light of the day.
We also take the opportunity to acknowledge the contribution of Mr. Sanjeev
Kumar Sharma, Associate Professor & Head, Department of Computer Science &
Engineering, JP Institute of Engineering & Technology, Meerut for his full support
and assistance during the development of the project.
We also do not like to miss the opportunity to acknowledge the contribution of all
faculty members of the department for their kind assistance and cooperation during
the development of our project.
Last but not the least, we acknowledge our friends for their contribution in the
completion of the project.

11

ABSTRACT
E-MART is a website which cater the buyer visiting to the site a buy can search the
catalogue he is willing to purchase can show case his product online .
To full fill this requirement we have used robust technology launched by Microsoft
which is .net
We have used frame 3.5 with ASP.net , Style sheet and back end in SQL 2008
(express version)
In this E-MART customer can visit with his user ID and he can search required
products and add them in the shopping cart, after purchasing the required products he
can pay online.
The seller can show case his product on the site in required category and he can add
prices to the products which can be seen be customers.

12

LIST OF TABLES
1. USER TABLE
2. PRODUCT CATEGORY TABLE
3. PRODUCT TABLE
4. SHOPPING CART TABLE
5. ORDER TABLE
6. REVIEW TABLE

13

CHAPTER:1

PROBLEM
PROBLEM
DESCRIPTION
DESCRIPTION

14

INTRODUCTION
E-MART is a web-based application intended to provide automated solution and
services to customer and shop owner.
Consider a Shop which have all of its business through INTERNET i.e., WEBSITES.
The Shop has its offices in few states and nor Shop use courier facility to deliver the
product .If possible home delivery is also possible.
This E-MART Shop mainly has two sectors first one is sale which sale the product to
the customer and second buying of product to see on the store.

E-MART Purchase of products.


The success of a company is mainly based on its satisfied customers, which in turn
gives huge profits.
Retaining existing customers is also an important job of a company. E-MART
concentrates on the retention of customers by collecting all data from every
interaction, every customer makes with a company from 'all' access points whether
they are phone, mail, web or field. The Shop can them use this data for specific
business purposes viz., marketing, service, support or sales.

15

E-MART is basically the collection and distribution of "all" data to "all" areas of
business. The data can then help market the company, help up sell to existing
customer, understand customers better so that customers can be given better service
and allows them to interact with the company by whatever means they wish.

16

BACKGROUND OF THE PROBLEM


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.
Earlier customer has to go shop to shop to gather the information about the product he
is searching for, which proved to be the tedious as well as time consuming job. Using
web application this task reduced the time to gather information about the product and
buying the product is being made a click away job.

17

OBJECTIVES
The main objectives of developing the E-MART are as given below: 1. To provide information about any Products in different category online.
2. Customer can purchase Products Online.
3. Customer can login and get various information about product and can
purchase the suitable product.
4. Customer can pay online, so security is must therefore E-MART
provide secure transactions.
5. Data security is maintained to relatively high level by implementing it
at Database level, so as to ensure that only authorized users have access
to confidential client information
6. Seller can show case their product to t he Shop with the help of
administrator

18

CHAPTER: 2

LITERATURE
LITERATURE
SURVEY
SURVEY

19

SYSTEM DEVELOPMENT METHODOLOGY


1.INITIATION PHASE
The initiation of a system (or project) begins when a business need or opportunity is
identified. A Project Manager should be appointed to manage the project. This
business need is documented in a Concept Proposal. After the Concept Proposal is
approved, the System Concept Development Phase begins.

2.SYSTEM CONCEPT DEVELOPMENT PHASE


Once a business need is approved, the approaches for accomplishing the concept are
reviewed for feasibility and appropriateness. The Systems Boundary
Document identifies the scope of the system and requires Senior Official
approval and funding before beginning the Planning Phase.

3.PLANNING PHASE
The concept is further developed to describe how the business will operate once the
approved system is implemented, and to assess how the system will impact employee
and customer privacy. To ensure the products and /or services provide the required
capability on-time and within budget, project resources, activities, schedules, tools,
and reviews are defined. Additionally, security certification and accreditation
activities begin with the identification of system security requirements and the
completion of a high level vulnerability assessment.

20

4.REQUIREMENT ANALYSIS
Phase Functional user requirements are for Shopy defined and delineate the
requirements in terms of data, system performance, security, and
maintainability requirements for the system. All requirements are defined to
a level of detail sufficient for systems design to proceed. All requirements
need to be measurable and testable and relate to the business need or
opportunity identified in the Initiation Phase.

5.DESIGN PHASE
The physical characteristics of the system are designed during this phase. The
operating environment is established, major subsystems and their inputs and outputs
are defined, and processes are allocated to resources. Everything requiring user input
or approval must be documented and reviewed by the user. The physical
characteristics of the system are specified and a detailed design is prepared.
Subsystems identified during design are used to create a detailed structure of the
system. Each subsystem is partitioned into one or more design units or modules.
Detailed logic specifications are prepared for each software module.

6.DEVELOPMENT PHASE
hardware, The detailed specifications produced during the design phase are translated
into communications, and executable software. Software shall be unit tested,
integrated, and retested in a systematic manner. Hardware is assembled and tested.

21

7.INTEGRATION AND TEST PHASE


The various components of the system are integrated and systematically tested. The
user tests the system to ensure that the functional requirements, as defined in the
functional requirements document, are satisfied by the developed or modified system.
Prior to installing and operating the system in a production environment, the system
must undergo certification and accreditation activities.

8.IMPLEMENTATION PHASE
The system or system modifications are installed and made operational in a
production environment. The phase is initiated after the system has been tested and
accepted by the user. This phase continues until the system is operating in production
in accordance with the defined user requirements.

9.OPERATIONS AND MAINTENANCE PHASE


The system operation is ongoing. The system is monitored for continued performance
in accordance with user requirements, and needed system modifications are
incorporated. The operational system is periodically assessed through In-Process
Reviews to determine how the system can be made more efficient and effective.
Operations continue as long as the system can be effectively adapted to respond to an
organizations needs. When modifications or changes are identified as necessary, the
system may reenter the planning phase.

10.DISPOSITION PHASE
The disposition activities ensure the orderly termination of the system and preserve
the vital information about the system so that some or all of the information may be
reactivated in the future if necessary. Particular emphasis is given to proper
22

preservation of the data processed by the system, so that the data is effectively
migrated to another system or archived in accordance with applicable records
management regulations and policies, for potential future access.

SDLC OBJECTIVES
This guide was developed to disseminate proven practices to system developers,
project managers, program/account analysts and system owners/users throughout the
DOJ. The specific objectives expected include the following:

To reduce the risk of project failure.

To consider system and data requirements throughout the entire life of the
system.

To identify technical and management issues early.

To disclose all life cycle costs to guide business decisions.

To foster realistic expectations of what the systems will and will not provide.

To provide information to better balance programmatic, technical,


management, and cost aspects of proposed system development or
modification.

To encourage periodic evaluations to identify systems that are no longer


effective.

To measure progress and status for effective corrective action.

23

To support effective resource management and budget planning.

To consider meeting current and future business requirements.

KEY PRINCIPLES
This guidance document refines traditional information system life cycle management
approaches to reflect the principles outlined in the following subsections. These are
the foundations for life cycle management.

LIFE CYCLE MANAGEMENT SHOULD BE USED TO ENSURE


A STRUCTURED APPROACH TO INFORMATION SYSTEMS
DEVELOPMENT, MAINTENANCE, AND OPERATION
This SDLC describes an overall structured approach to information management.
Primary emphasis is placed on the information and systems decisions to be made and
the proper timing of decisions. The manual provides a flexible framework for
approaching a variety of systems projects. The framework enables system developers,
project managers, program/account analysts, and system owners/users to combine
activities, processes, and products, as appropriate, and to select the tools and
methodologies best suited to the unique needs of each project.

1.SUPPORT THE USE OF AN INTEGRATED PRODUCT TEAM


24

The establishment of an Integrated Product Team (IPT) can aid in the success of a
project. An IPT is a multidisciplinary group of people who support the Project
Manager in the planning, execution, delivery and implementation of life cycle
decisions for the project. The IPT is composed of qualified empowered individuals
from all appropriate functional disciplines that have a stake in the success of the
project. Working together in a proactive, open communication, team oriented
environment can aid in building a successful project and providing decision makers
with the necessary information to make the right decisions at the right time.

2.EACH SYSTEM PROJECT MUST HAVE A PROGRAM


SPONSOR
To help ensure effective planning, management, and commitment to information
systems, each project must have a clearly identified program sponsor. The program
sponsor serves in a leadership role, providing guidance to the project team and
securing, from senior management, the required reviews and approvals at specific
points in the life cycle. An approval from senior management is required after the
completion of the first seven of the SDLC phases, annually during Operations and
Maintenance Phase and six-months after the Disposition Phase. Senior management
approval authority may be varied based on dollar value, visibility level, congressional
interests or a combination of these.
The program sponsor is responsible for identifying who will be responsible for Shopy
accepting the delivered system at the end of the Implementation Phase.

3.A SINGLE PROJECT MANAGER MUST BE SELECTED FOR


EACH SYSTEM PROJECT

25

The Project Manager has responsibility for the success of the project and works
through a project team and other supporting organization structures, such as working
groups or user groups, to accomplish the objectives of the project. Regardless of
organizational affiliation, the Project Manager is accountable and responsible for
ensuring that project activities and decisions consider the needs of all organizations
that will be affected by the system. The Project Manager develops a project charter to
define and clearly identify the lines of authority between and within the agencys
executive management, program sponsor, (user/customer), and developer for purposes
of management and oversight.

4.A COMPREHENSIVE PROJECT MANAGEMENT PLAN IS


REQUIRED FOR EACH SYSTEM PROJECT
The project management plan is a pivotal element in the successful solution of an
information management requirement. The project management plan must describe
how each life cycle phase will be accomplished to suit the specific characteristics of
the project. The project management plan is a vehicle for documenting the project
scope, tasks, schedule, allocated resources, and interrelationships with other projects.
The plan is used to provide direction to the many activities of the life cycle and must
be refined and expanded throughout the life cycle.

5. SPECIFIC INDIVIDUALS MUST BE ASSINGNED TO


PERFORM KEY ROLES THROUGHOUT THE LIFE CYCLE
Certain roles are considered vital to a successful system project and at least one
individual must be designated as responsible for each key role. Assignments may be
made on a full- or part-time basis as appropriate. Key roles include
program/functional management, quality assurance, security, telecommunications
26

management, data administration, database administration, logistics, financial,


systems engineering, test and evaluation, contracts management, and configuration
management. For most projects, more than one individual should represent the actual
or potential users of the system (that is, program staff) and should be designated by
the Program Manager of the program and organization.

MODEL USED

27

REQUIREMENT ANALYSIS
NEED
In current competitive scenario every business establishment needs quality
processes to increase their efficiency as well as improve their productivity. It is of
vital importance that manual, time consuming & monotonous operations are
automated so as to streamline the working of an organization. Since, the existing
system (manual work) takes more time and manpower for processing. It is keeping
in mind this business philosophy (mantra) that we propose an E-MART. Our system
will deal with all the aspects SALES of all Products and show case of all Goods for
sale or seller can add their products.

28

PROJECT REQUIREMENTS
I.) Software Requirements
Client on Internet: Web Browser, Operating System(any)
Web Server: inbuilt with Visual Studio
Data Base Server: SQL Server 2008, Operating System (any)
Development End: Visual Studio 2008, SQL Server 2008
II.)Hardware Requirements

Client Side
Internet
Explorer
6.0
Server Side
Visual Studio
2008

Processor
Core to duo

RAM
1 GB

Core to duo

As per server
requirement

Disk Space
40 GB

As per server
requirement

SYSTEM ANALYSIS
System Analysis is a management technique, which helps in designing a new system
or improving an existing system. System Analysis is the process of gathering and
interpreting facts, diagnosing problems (if any), using information to recommend
improvements to the system. There are four basic elements of system analysis: Output, Input, Files, processes. For computerization of any system, the existing
system must be thoroughly being understood to determine how the computer can be
best used to make its operation most effective. This is acquired by analyzing existing
system.

29

FEASIBILITY STUDY
Feasibility study is the process of determination of whether or not a project is worth
doing. Feasibility studies are undertaken within tight time constraints and forShopy
culminate in a written and oral feasibility report. I have taken two weeks in feasibility
study with my co-developer. The contents and recommendations of this feasibility
study helped us as a sound basis for deciding how to proceed the project. It helped in
taking decisions such as which software to use, hardware combinations, etc.
1.

Technical Feasibility

2.

Economical Feasibility

3.

Operational Feasibility

1. Technical Feasibility
Technical feasibility determines whether the work for the project can be done with the
existing equipment, software technology and available personnel. Technical
feasibility is concerned with specifying equipment and software that will satisfy the
user requirement.
This project is feasible on technical remarks also, as the proposed system is more
beneficiary in terms of having a sound proof system with new technical components
installed on the system. The proposed system can run on any machines supporting
Windows and Internet services and works on the best software and hardware that had
been used while designing the system so it would be feasible in all technical terms of
feasibility.

30

2. Economical Feasibility
Economical feasibility determines whether there are sufficient benefits in creating to
make the cost acceptable, or is the cost of the system too high. As this signifies costbenefit analysis and savings. On the behalf of the cost-benefit analysis, the proposed
system is feasible and is economical regarding its pre-assumed cost for making a
system.
We classified the costs of E-MART according to the phase in which they occur. As
we know that the system development costs are usually one-time costs that will not
recur after the project has been completed. For calculating the Development costs we
evaluated certain cost categories viz.
1. Personal costs
2. Computer usage
3.

Cost of any new computer equipments and software.

3. Operational Feasibility
It is common knowledge that computer installations have some thing to do with
turnover, transfers, retraining and changes in employee job status. Therefore, it is
understandable that the introduction of a candidate system requites special efforts to
educate, sell, and train the staff on new ways of conducting business.
The system will be used if it is developed well then be resistance for users that
undetermined

No major training and new skills are required as it is based on DBMS model.

31

It will help in the time saving and fast processing and dispersal of user request
and applications

.New product will provide all the benefits of present system with better
performance.

.Improved information, better management and collection of the reports.

User involvement in the building of present system is sought to keep in mind


the user specific requirement and needs.

User will have control over there own information. Important information
such as pay-slip can be generated at the click of a button.

Faster and systematic processing of user application approval, allocation of


IDs, payments, etc. used had greater chances of error due to wrong
information entered by mistake.

32

BLOCK DIAGRAM

33

34

MODELLING

FLOWCHART

1.USE CASE
35

A use case is a set of scenarios that describing an interaction between a user and a
system. A use case diagram displays the relationship among actors and use cases.
The two main components of a use case diagram are use cases and actors.

An actor is represents a user or another system that will interact with the system you
are modeling. A use case is an external view of the system that represents some
action the user might perform in order to complete a task.

Access The eSHOP Website

Browse Catalog and Search Item


CUSTOMER

Get Product Information

BUYING
36

User Login

Buy the Product

Give Shipping Info


CUSTOMER
Give Payment Info

Get Invoice (i.e., Slip)

Get confirmed i.e. Received Product

37

SELL

User Login

Show case (Add Products)

Give information of Products


CUSTOMER
Give Price Information

Stock information

Get conformed

Context level dfd

38

39

ER-DIAGRAM
CUSTOMER ENTITY

40

PRODUCT ENTITY

SHOPPING SHOP

41

FORM RELATION

42

ACTIVITY DIAGRAM

43

CHAPTER:3

DESIGN
DESIGN

44

MODULE SPECIFICATION

1. USER MODULE
Users are the customers, they may be buyer or sellers. The job of the sellers
are to showcase their items on the website. The buyers are the one who want
to get information about the different products or want to buy product of their
choice at one place.

2. ADMINISTRATOR MODULE
The administrator is the one who has the power and authority to maintain the
site and to secure the customers from frauds. He can also maintain the site and
updates the information. He can also maintain the different item stocks. He is
liable to inform the customers about their orders and requirements.

3. SHOPPING CART MODULE


Shopping cart module is the module which maintains the selected products
from the buyer and puts it in the buying list. Through this module user can
select the products of their choice and can also delete the products they are not
liking to place order for. In this user maintain the list of items he may place
order for and checks out for the things before placing the order.

45

FORMS NAME
1. Default page
2. Login page
3. Contact page
4. Admin Add New Item page
5. Admin Maintain Items page
6. Admin Sales Maintenance page
7. Admin User Maintenance page
8. Description Purchase Page
9. Description Purchase Anonymous
10. Main Page
11. Main Page Admin page
12. Main Page Users page
13. Master User add items page
14. Register new user page
15. Search Items page
16. Shopping Cart page
17. View My Reviews page

46

18. View Reviews page


19. View Status Purchase page

CHAPTER:4

CODING
CODING

47

TOOLS, PLATFORM & LANGUAGE TO BE


USED

TOOLS:

FRONT-END

ASP.NET(With C#)

BACK-END

SQL 2008

PLATFORM:

Windows XP

48

TECHNOLOGY OVERVIEW OF MY PROJECT


.NET 2008 FRAMEWORK, SQL 2008
.NET 2008 WITH C# 2.0
The Microsoft .NET Framework version 2.0 extends the .NET Framework version 1.1
with new features, improvements to existing features, and enhancements to the
documentation. This section provides information about some key additions and
modifications.
For more information about compatibility and for a list of the public API
modifications to the class library that might affect the compatibility of your
application.

64-BIT PLATFORM SUPPORT


The new generation of 64-bit computers enables the creation of applications that can
run faster and take advantage of more memory than is available to 32-bit applications.
New support for 64-bit applications enables users to build managed code libraries or
easily use unmanaged code libraries on 64-bit computers. For more information, see
64-bit Applications.

49

ACCESS CONTROL LIST SUPPORT


An access control list (ACL) is used to grant or revoke permission to access a
resource on a computer. New classes have been added to the .NET Framework that
allow managed code to create and modify an ACL. New members that use an ACL
have been added to the I/O, registry, and threading classes.

ADO.NET
New features in ADO.NET include support for user-defined types (UDT),
asynchronous database operations, XML data types, large value types, snapshot
isolation, and new attributes that allow applications to support multiple active result
sets (MARS) with SQL Server 2005. For more information about these and other new
ADO.NET features, see What's New in ADO.NET.

ASP.NET
The Microsoft .NET Framework 2.0 includes significant enhancements to all areas of
ASP.NET. For Web page development, new controls make it easier to add commonly
used functionality to dynamic Web pages. New data controls make it possible to
display and edit data on an ASP.NET Web page without writing code. An improved
code-behind model makes developing ASP.NET pages easier and more robust.
Caching features provide several new ways to cache pages, including the ability to
build cache dependency on tables in a SQL Server database.
You can now customize Web sites and pages in a variety of ways. Profile properties
enable ASP.NET to track property values for individual users automatically. Using

50

Web Parts, you can create pages that users can customize in the browser. You can add
navigation menus using simple controls.
Improvements to Web site features allow you to create professional Web sites faster
and more easily. Master pages allow you to create a consistent layout for all the pages
in a site, and themes allow you to define a consistent look for controls and static text.
To help protect your sites, you can pre compile a Web site to produce executable code
from source files (both code files and the markup in .aspx pages). You can then
deploy the resulting output, which does not include any source information, to a
production server. Enhancements to ASP.NET also include new tools and classes to
make Web site management easier for Web site developers, server administrators, and
hosters.
ASP.NET accommodates a wide variety of browsers and devices. By default, controls
render output that is compatible with XHTML 1.1 standards. You can use device
filtering to specify different property values on the same control for different
browsers.
For a more complete list of new features in ASP.NET, see What's New in ASP.NET.

AUTHENTICATED STREAMS
Applications can use the new Negotiate Stream and Stream classes for authentication
and to help secure information transmitted between a client and a server. These
authenticated stream classes support mutual authentication, data encryption, and data
signing. The Negotiate Stream class uses the Negotiate security protocol for
authentication. The Stream class uses the Secure Socket Layer (SSL) security protocol
for authentication.

51

COM INTERPOL SERVICES ENHANCEMENTS


Four major enhancements have been made to the classes and tools that support
interoperability with COM:

The operating system maintains a limited number of handles, which are used

to reference critical operating system resources. The new Safe Handle and Critical
Handle classes, and their specialized derived classes, provide safe and reliable means
of manipulating operating system handles.

Marshaling improvements make interoperating with native code easier. Two

enhancements to the interlope marshaled satisfy the two most common user requests:
the ability to wrap native function pointers into delegates and the ability to marshal
fixed-size arrays of structures inside structures.

The performance of calls between applications in different application

domains has been made much faster for common call types.

New switches on the Type Library Importer (Tlbimp.exe) and Type Library

Exporter (Tlbexp.exe) eliminate dependency on the registry to resolve type library


references. This enhancement is important for creating robust build environments.

CONSOLE CLASS ADDITIONS


New members of the Console class enable applications to manipulate the dimensions
of the console window and screen buffer; to move a rectangular area of the screen
buffer, which is useful for performing smooth, simple animation; and to wait while
reading console input until a key is pressed. Other new class members control the
foreground and background colors of text, the visibility and size of the cursor, and the
frequency and duration of the console beep.

52

The normalization process converts character representations of text to a

standard form so the representations can be compared for equivalence.

The Get Culture Info method overload provides a cached version of a read-

only Culture Info object. Use the cached version when creating a new Culture Info
object to improve system performance and reduce memory usage.

I/O ENHANCEMENTS
Improvements have been made to the usability and functionality of various I/O
classes. It is now easier for users to read and write text files and obtain information
about a drive.
You can now use the classes in the System.IO.Compression namespace to read and
write data with the GZIP compression and decompression standard, described in the
IETF RFC 1951 and RFC 1952 specifications, which are available at the IETF
Request for Comments (RFC) search page. Note: search is limited to RFC numbers.

MANIFEST-BASED ACTIVATION
This feature provides new support for loading and activating applications through the
use of a manifest. Manifest-based activation is essential for supporting ClickOnce
applications. Traditionally, applications are activated through a reference to an
assembly that contains the application's entry point. For example, clicking an
application's .exe file from within the Windows shell causes the shell to load the
common language runtime (CLR) and call a well-known entry point within that .exe
file's assembly.
The manifest-based activation model uses an application manifest for activation rather
than an assembly. A manifest fully describes the application, its dependencies,
53

security requirements, and so forth. The manifest model has several advantages over
the assembly-based activation model, especially for Web applications. For example,
the manifest contains the security requirements of the application, which enables the
user to decide whether to allow the application to execute before downloading the
code. The manifest also contains information about the application dependencies.
Manifest-based activation is provided by a set of APIs that allow managed hosts to
activate applications and add-ins described by a manifest. These APIs contain a
mixture of both new classes and extensions to existing classes.
This activation model also invokes an entity called a Trust Manager that performs the
following tasks:
1.

Determines whether an application is allowed to be activated. This decision

can be made by prompting the user, querying policy, or by any other means deemed
appropriate for a given Trust Manager.
2.

Sets up the security context to run an application in. Most commonly, this step

involves setting up a code access security (CAS) policy tree on the application
domain in which the application will run.

.NET FRAMEWORK REMOTING


.NET Framework remoting now supports IPv6 addresses and the exchange of generic
types. The classes in the System.Runtime.Remoting.Channels.Tcp namespace support
authentication and encryption using the Security Support Provider Interface (SSPI).
Classes in the new System.Runtime.Remoting.Channels.Ipc namespace allow
applications on the same computer to communicate quickly without using the
network. Finally, you can now configure the connection cache time-out and the

54

number of method retries, which can improve the performance of network loadbalanced remote clusters.
Using classes in the System.Net.NetworkInformation namespace, applications can
access IP, IPv4, IPv6, TCP, and UDP network traffic statistics. Applications can also
view address and configuration information for the local computers network
adapters. This information is similar to the information returned by the Ipconfig.exe
command-line tool.

PING
The Ping class allows an application to determine whether a remote computer is
accessible over the network. This class provides functionality similar to the Ping.exe
command-line tool, and supports synchronous and asynchronous calls.

PROCESSING HTTP REQUESTS FROM WITHIN


APPLICATIONS
You can use the HttpListener class to create a simple Web server that responds to
HTTP requests. The Web server is active for the lifetime of the HttpListener object
and runs within your application, with your application's permissions. This class is
available only on computers running the Windows XP Service Pack 2 or Windows
Server 2003 operating systems.

PROGRAMMATIC CONTROL OF CACHING


Using the classes in the System.Net.Cache namespace, applications can control the
caching of resources obtained using the WebRequest, WebResponse, and WebClient
classes. You can use the predefined cache policies provided by the .NET Framework

55

or specify a custom cache policy. You can specify a cache policy for each request and
define a default cache policy for requests that do not specify a cache policy.
The .NET Framework is an integral Windows component that supports building and
running the next generation of applications and XML Web services. The .NET
Framework is designed to fulfill the following objectives:

To provide a consistent object-oriented programming environment whether

object code is stored and executed locally, executed locally but Internet-distributed, or
executed remotely.

To provide a code-execution environment that minimizes software deployment

and versioning conflicts.

To provide a code-execution environment that promotes safe execution of

code, including code created by an unknown or semi-trusted third party.

To provide a code-execution environment that eliminates the performance

problems of scripted or interpreted environments.

To make the developer experience consistent across widely varying types of

applications, such as Windows-based applications and Web-based applications.

To build all communication on industry standards to ensure that code based on

the .NET Framework can integrate with any other code.


The .NET Framework has two main components: the common language runtime and
the .NET Framework class library. The common language runtime is the foundation
of the .NET Framework. You can think of the runtime as an agent that manages code
at execution time, providing core services such as memory management, thread
management, and remoting, while also enforcing strict type safety and other forms of

56

code accuracy that promote security and robustness. In fact, the concept of code
management is a fundamental principle of the runtime. Code that targets the runtime
is known as managed code, while code that does not target the runtime is known as
unmanaged code. The class library, the other main component of the .NET
Framework, is a comprehensive, object-oriented collection of reusable types that you
can use to develop applications ranging from traditional command-line or graphical
user interface (GUI) applications to applications based on the latest innovations
provided by ASP.NET, such as Web Forms and XML Web services.
The .NET Framework can be hosted by unmanaged components that load the
common language runtime into their processes and initiate the execution of managed
code, thereby creating a software environment that can exploit both managed and
unmanaged features. The .NET Framework not only provides several runtime hosts,
but also supports the development of third-party runtime hosts.
For example, ASP.NET hosts the runtime to provide a scalable, server-side
environment for managed code. ASP.NET works directly with the runtime to enable
ASP.NET applications and XML Web services, both of which are discussed later in
this topic.
Internet Explorer is an example of an unmanaged application that hosts the runtime
(in the form of a MIME type extension). Using Internet Explorer to host the runtime
enables you to embed managed components or Windows Forms controls in HTML
documents. Hosting the runtime in this way makes managed mobile code (similar to
Microsoft ActiveX controls) possible, but with significant improvements that only
managed code can offer, such as semi-trusted execution and isolated file storage.

57

The following illustration shows the relationship of the common language runtime
and the class library to your applications and to the overall system. The illustration
also shows how managed code operates within a larger architecture.

58

.NET FRAMEWORK IN CONTEXT

The following sections describe the main components and features of the .NET
Framework in greater detail.

FEATURES OF THE COMMOMN LANGUAGE RUNTIME


The common language runtime manages memory, thread execution, code execution,
code safety verification, compilation, and other system services. These features are
intrinsic to the managed code that runs on the common language runtime.
With regards to security, managed components are awarded varying degrees of trust,
depending on a number of factors that include their origin (such as the Internet,
enterprise network, or local computer). This means that a managed component might
59

or might not be able to perform file-access operations, registry-access operations, or


other sensitive functions, even if it is being used in the same active application.
The runtime enforces code access security. For example, users can trust that an
executable embedded in a Web page can play an animation on screen or sing a song,
but cannot access their personal data, file system, or network. The security features of
the runtime thus enable legitimate Internet-deployed software to be exceptionally
feature rich.
The runtime also enforces code robustness by implementing a strict type-and-codeverification infrastructure called the common type system (CTS). The CTS ensures
that all managed code is self-describing. The various Microsoft and third-party
language compilers generate managed code that conforms to the CTS. This means
that managed code can consume other managed types and instances, while strictly
enforcing type fidelity and type safety.
In addition, the managed environment of the runtime eliminates many common
software issues. For example, the runtime automatically handles object layout and
manages references to objects, releasing them when they are no longer being used.
This automatic memory management resolves the two most common application
errors, memory leaks and invalid memory references.
The runtime also accelerates developer productivity. For example, programmers can
write applications in their development language of choice, yet take full advantage of
the runtime, the class library, and components written in other languages by other
developers. Any compiler vendor who chooses to target the runtime can do so.
Language compilers that target the .NET Framework make the features of the .NET

60

Framework available to existing code written in that language, greatly easing the
migration process for existing applications.

Classes enables you to focus on the logic of your service, without concerning

yourself with the

Use of delegates rather than function pointers for increased type safety and

security. Function pointers are available through the use of the unsafe C# keyword
and the /unsafe option of the C# compiler (Csc.exe) for unmanaged code and data.

61

APPLICATION DOMAIN OVERVIEW


Historically, process boundaries have been used to isolate applications running on the
same computer. Each application is loaded into a separate process, which isolates the
application from other applications running on the same computer.
The applications are isolated because memory addresses are process-relative; a
memory pointer passed from one process to another cannot be used in any meaningful
way in the target process. In addition, you cannot make direct calls between two
processes. Instead, you must use proxies, which provide a level of indirection.
Managed code must be passed through a verification process before it can be run
(unless the administrator has granted permission to skip the verification). The
verification process determines whether the code can attempt to access invalid
memory addresses or perform some other action that could cause the process in which
it is running to fail to operate properly. Code that passes the verification test is said to
be type-safe. The ability to verify code as type-safe enables the common language
runtime to provide as great a level of isolation as the process boundary, at a much
lower performance cost.
Application domains provide a more secure and versatile unit of processing that the
common language runtime can use to provide isolation between applications. You can
run several application domains in a single process with the same level of isolation
that would exist in separate processes, but without incurring the additional overhead
of making cross-process calls or switching between processes. The ability to run
multiple applications within a single process dramatically increases server scalability.

62

Isolating applications is also important for application security. For example, you can
run controls from several Web applications in a single browser process in such a way
that the controls cannot access each other's data and resources.
The isolation provided by application domains has the following benefits:

Faults in one application cannot affect other applications. Because type-safe

code cannot cause memory faults, using application domains ensures that code
running in one domain cannot affect other applications in the process.

Individual applications can be stopped without stopping the entire process.

Using application domains enables you to unload the code running in a single
application.

Code running in one application cannot directly access code or resources from

another application. The common language runtime enforces this isolation by


preventing direct calls between objects in different application domains. Objects that
pass between domains are either copied or accessed by proxy. If the object is copied,
the call to the object is local. That is, both the caller and the object being referenced
are in the same application domain. If the object is accessed through a proxy, the call
to the object is remote. In this case, the caller and the object being referenced are in
different application domains. Cross-domain calls use the same remote call
infrastructure as calls between two processes or between two machines. As such, the
metadata for the object being referenced must be available to both application
domains to allow the method call to be JIT-compiled properly. If the calling domain
does not have access to the metadata for the object being called, the compilation
might fail with an exception of type System.IO.FileNotFound. See Remote Objects
for more details. The mechanism for determining how objects can be accessed across

63

domains is determined by the object. For more information, see MarshalByRefObject


Class.

The behavior of code is scoped by the application in which it runs. In other

words, the application domain provides configuration settings such as application


version policies, the location of any remote assemblies it accesses, and information
about where to locate assemblies that are loaded into the domain.

Permissions granted to code can be controlled by the application domain in

which the code is running.

64

APPLICATION DOMAINS AND ASSEMBLIES


This topic describes the relationship between application domains and assemblies.
You must load an assembly into an application domain before you can execute the
code it contains. Running a typical application causes several assemblies to be loaded
into an application domain.
If an assembly is used by multiple domains in a process, the JIT output from an
assembly's code can be shared by all domains referencing the assembly. The runtime
host decides whether to load assemblies as domain-neutral when it loads the runtime
into a process. For more information, see the LoaderOptimizationAttribute attribute
and the associated LoaderOptimization enumeration. For hosting, see the
documentation for CorBindToRuntimeEx in the common language runtime Hosting
Interfaces Specification found in the .NET Framework SDK.
There are three options for loading domain-neutral assemblies:

Load no assemblies as domain-neutral, except Mscorlib, which is always

loaded domain-neutral. This setting is called single domain because it is commonly


used when the host is running only a single application in the process.

Load all assemblies as domain-neutral. Use this setting when there are

multiple application domains in the process, all of which run the same code.

Load strong-named assemblies as domain-neutral. Use this setting when

running more than one application in the same process.


When you decide whether to load assemblies as domain-neutral, you must make a
tradeoff between reducing memory use and performance. The performance of a
domain-neutral assembly is slower if that assembly contains static data or static
65

methods that are accessed frequently. Access to static data is slower because of the
need to isolate assemblies. Each application domain that accesses the assembly must
have a separate copy of the static data, to prevent references to objects in static fields
from crossing domain boundaries. As a result, the runtime contains additional logic to
direct a caller to the appropriate copy of the static data or method. This extra logic
slows down the call.
An assembly is not shared between domains when it is granted a different set of
permissions in each domain. This can occur if the runtime host sets an application
domain-level security policy. Assemblies should not be loaded as domain-neutral if
the set of permissions granted to the assembly is likely to be different in each domain

66

ABOUT TECHNOLOGY
WHY WE USE SQL?
1.SECURITY MANAGEMENT:
SQL Server provides a controlled access to data to users by providing a
combination of privileges.
a). Backup and Recovery:
SQL Server provided sophisticated security backup and recovery routines.
b). Open connectivity:
SQL Server provides open connectivity to and from other vendors software
such as Microsoft. Also SQL Server database can be access by various frontend softwares such as Microsoft Visual Basic , Power Builder etc.
c). Space Management:
In SQL Server once can flexibly allocate disk spaces for data storage and can
control them subsequently. SQL Server 8 is designed with special feature of
data
warehousing

67

WHY WE USE ASP.NET?


1. Rich Class Framework
2. Compiled execution
3. Rich output caching
4. Web-Farm Session State
5. Enhanced Reliability
6. Easy Deployment
Dynamic update of running application

68

CODING
Login master page
.aspx coding
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="Login.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>E-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;
}
.style13
{
width: 174px;
}
.style14
{
vertical-align: top;
height: 65px;
width: 174px;
background-image: url('file:///C:/Documents%20and
%20Settings/Administrator/Desktop/EWAPP/Images/menubg%20copy.png');
}
</style>
</head>
<body style="background-color: #FFCC99">
<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-topcolor: #A4BAE8;">
<tr>
<td class="style5" colspan="2"

69

style="border-bottom-style: solid; border-bottom-

color: #41678E">

<asp:Image ID="Image1" runat="server" Width="194px"


ImageUrl="~/Images/imagesCA167IXN.jpg"
Height="80px" />
<asp:Image ID="Image2" runat="server"
ImageUrl="Images/title2.JPG"
Height="80px" Width="400px" /></td>
</tr>
<tr>
<td class="style13">
<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"
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 %>"

70

SelectCommand="SELECT [Name] FROM [UserTable]


WHERE [Username] = @Username">
<SelectParameters>
<asp:SessionParameter Name="Username"
SessionField="Username" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td class="style12">
&nbsp;</td>
</tr>
<tr style="vertical-align: top">
<td class="style14">
<asp:TreeView ID="TreeView1" runat="server"
Height="51px" 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="~/MainPage.aspx"
Text="Main Page"
Value="Main Page"></asp:TreeNode>
<asp:TreeNode
NavigateUrl="~/SearchItemsAnonymous.aspx" Text="Search For Items"
Value="Search For Items"></asp:TreeNode>
<asp:TreeNode
NavigateUrl="~/ContactUsAnony.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">
JP Institute of Engineering & Technology
</td>
</tr>
</table>
</form>
</body>
</html>

Admin master page

71

.aspx coding
<%@ 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>Yahya's Cameras</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;
}
.style4
{
height: 24px;
}
.style5
{
height: 65px;
}
.style8
{
height: 435px;
}
</style>
</head>
<body style="background-color: #FFCC99">
<form id="form1" runat="server" >
<table align="center" border="0" width="800px">
<tr>
<td class="style5" colspan="2"
style="border-bottom-style: solid; border-bottomcolor: #41678E">
<asp:Image ID="Image1" runat="server" Width="194px"
ImageUrl="~/Images/imagesCA167IXN.jpg"
Height="80px" />
<asp:Image ID="Image2" runat="server"
ImageUrl="Images/title2.JPG"
Height="80px" Width="400px" />
</td>
</tr>
<tr>
<td>
<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" />

72

runat="server"

&nbsp;<asp:LinkButton ID="UpdateCancelButton"

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") %>' />
<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 class="style4">
&nbsp;</td>
</tr>
<tr style="vertical-align: top">
<td class="style5">
<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"

73

Node"></asp:TreeNode>

Text="View / Modify Users" Value="New

</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>
</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-bottomcolor: #88A5E1">
JP Institute of Engineering &amp; Technology</td>
</tr>
</table>
</form>
</body>
</html>

Master page master


<%@ 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>E-MART</title>

74

<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 style="background-color: #FFCC99">
<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-topcolor: #A4BAE8; width: 800px;">
<tr>
<td class="style5" colspan="2"
style="border-bottom-style: solid; border-bottomcolor: #41678E">
<asp:Image ID="Image1" runat="server" Width="194px"
ImageUrl="~/Images/imagesCA167IXN.jpg"
Height="80px" />
<asp:Image ID="Image2" runat="server"
ImageUrl="Images/title2.JPG"
Height="80px" Width="400px" />
</td>
</tr>
<tr>
<td>
<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"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>

75

<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">
&nbsp;</td>
</tr>
<tr style="vertical-align: top">
<td class="style5">
<asp:TreeView ID="TreeView1" runat="server"
Height="144px" 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="~/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"

76

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">
B.Tech. Students JP Institute of Engineering &
Technology 2011
</td>
</tr>
</table>
</form>
</body>
</html>

77

Default page
.aspx coding
<%@ Page Language="C#" MasterPageFile="~/login.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
Title="E-MART" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head"
Runat="Server">
<style type="text/css">
.style15
{
width: 100%;
height: 267px;
}
.style16
{
width: 100%;
height: 270px;
}
.style17
{
font-weight: bold;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<%--<p class="style2"
style="font-family: Arial, Helvetica, sans-serif; font-size:
xx-large; font-weight: bold; text-transform: none; color: #FF0000;
text-decoration: underline overline">
Sorry You don&#39;t Have Privileges to access this page!!!
</p>--%>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<table class="style15" width="100%">
<tr>
<td>
<table class="style16" border="3px" style="border:
thin solid #000000" >
<tr style="height:33%">
<td align="center" bgcolor="#F0F0F0"
width="100%">
<p> WANT TO BUY SOME PRODUCT ?</p></td>
</tr>
<tr style="height:33%">
<td align="center" width="100%">
CLICK BELOW</td>
</tr>
<tr style="height:33%">
<td align="center" width="100%">
<asp:Button ID="Button2" runat="server"
BackColor="#993300" Font-Bold="True"
Font-Names="Times New Roman" FontSize="Larger" Height="40px"
onclick="Button2_Click"
style="height: 40px" Text="BUY" Width="120px" />
</td>

78

</tr>
</table>
</td>
<td>
<table class="style16" border="3px" style="border:
thin solid #000000">
<tr style="height:33%">
<td align="center" bgcolor="#F0F0F0"
width="100%">
<p>
WANT TO SELL SOME PRODUCT ?</p>
</td>
</tr>
<tr style="height:33%" >
<td align="center" width="100%">
CLICK BELOW</td>
</tr>
<tr style="height:33%">
<td align="center" width="100%">
<asp:Button ID="Button3" runat="server"
BackColor="#993300" Font-Bold="True"
Font-Names="Times New Roman" FontSize="Larger" Height="40px"
onclick="Button2_Click"
style="height: 40px" Text="SELL" Width="120px" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="style16">
<tr>
<td class="style17">
<p style="font-size:x-large"> What is E-MART.com ?</p>
<p>E-MART.com is
an&nbsp;
online&nbsp; trading platform, connecting&nbsp; buyers&nbsp;
and&nbsp; sellers worldwide.</p>
<asp:Image ID="Image1" runat="server"
ImageUrl="~/Images/Bike.jpg"
Height="120px" Width="533px"/>
</td>
</tr>
</table>
</asp:Content>
.cs coding
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;

79

using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("Login.aspx");
}
}

Login page
.aspx coding
<%@ Page Language="C#" MasterPageFile="~/login.master"
AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login"
Title="Yahya's Cameras" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head"
Runat="Server">
<style type="text/css">
.style9
{
width: 58%;
}
.style10
{
width: 100%;
height: 232px;
}
.style11
{
width: 92px;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<table class="style9"
style="border-style: groove; border-width: thin thin thick thin">
<tr>
<td>
<table class="style10">
<tr>
<td class="style2" colspan="2"
style="border-width: thin; border-bottomstyle: groove; background-color: #7A9BDE;">

80

Login</td>
</tr>
<tr>
<td class="style11">
User Name:</td>
<td>
<asp:TextBox ID="TextBox1"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1"
ErrorMessage="Please Enter the
username">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr style="border-bottom-style: groove">
<td class="style11">
Password</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox2"
ErrorMessage="Please Enter The
password">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<asp:ValidationSummary
ID="ValidationSummary1" runat="server" />
<asp:Label ID="Label1" runat="server"
ForeColor="#FF3300"></asp:Label>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="Button1" runat="server"
onclick="Button1_Click" style="text-align: center"
Text="Login" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Content>

c# coding
using System;

81

using
using
using
using
using
using
using
using
using
using
using

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


{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
// Data source control that works with Sql databases
SqlDataSource sds = new SqlDataSource();

// Get connection string from application's default


configuration
sds.ConnectionString =
ConfigurationManager.ConnectionStrings["ConnectionString"].ToString()
;

// Create parameters with specified names and values


sds.SelectParameters.Add("Username", TypeCode.String,
this.TextBox1.Text);
sds.SelectParameters.Add("Password", TypeCode.String,
this.TextBox2.Text);

// Set the SQL string to retrieve data from the underlying


database
sds.SelectCommand = "SELECT * FROM [UserTable] WHERE
[Username] = @Username AND [Password] = @Password";

// Retrieve data
DataView dv =
(DataView)sds.Select(DataSourceSelectArguments.Empty);

82

// Display error message and return if the number of record


is zero
if (dv.Count == 0)
{
this.Label1.ForeColor = System.Drawing.Color.Red;
this.Label1.Text = "Login Failed!";
return;
}

// Create session variables


this.Session["Username"] = dv[0].Row["Username"].ToString();
this.Session["UserType"] = dv[0].Row["UserType"].ToString();

// Redirect to respective page based on user type


if (this.Session["UserType"].ToString().Equals("user"))
Response.Redirect("MainPageUsers.aspx");
else if (this.Session["UserType"].ToString().Equals("admin"))
Response.Redirect("MainPageAdmin.aspx");

}
}
Cart Connectivity
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AC3.aspx.cs"
Inherits="WebApplication1.AC3" %>
<!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>Untitled Page</title>
<style type="text/css">
.style1
{
font-size: xx-large;
font-weight: bold;

83

color: #FF0000;
}
.style2
{
text-align: center;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<p>
&nbsp;</p>
<p>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Image ID="Image1" runat="server" ImageUrl="~/shop.jpg" />
</p>
<p>
&nbsp;</p>
<p>
&nbsp;</p>
<p class="style2">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="style1">&nbsp;YOUR SHOPPING CART</span></p>
<p class="style2">
&nbsp;</p>
<asp:ListView ID="ListView1" runat="server" DataKeyNames="productID"
DataSourceID="SqlDataSource1" EnableModelValidation="True"
InsertItemPosition="LastItem">
<ItemTemplate>
<td runat="server" style="background-color: #E0FFFF;color: #333333;">
productID:
<asp:Label ID="productIDLabel" runat="server" Text='<%# Eval("productID") %>' />
<br />
productName:
<asp:Label ID="productNameLabel" runat="server"
Text='<%# Eval("productName") %>' />
<br />
salePrice:
<asp:Label ID="salePriceLabel" runat="server" Text='<%# Eval("salePrice") %>' />
<br />
</td>
</ItemTemplate>
<AlternatingItemTemplate>
<td runat="server" style="background-color: #FFFFFF;color: #284775;">
productID:
<asp:Label ID="productIDLabel" runat="server" Text='<%# Eval("productID") %>' />
<br />
productName:
<asp:Label ID="productNameLabel" runat="server"
Text='<%# Eval("productName") %>' />

84

<br />
salePrice:
<asp:Label ID="salePriceLabel" runat="server" Text='<%# Eval("salePrice") %>' />
<br />
</td>
</AlternatingItemTemplate>
<EmptyDataTemplate>
<table style="background-color: #FFFFFF;border-collapse: collapse;border-color:
#999999;border-style:none;border-width:1px;">
<tr>
<td>
No data was returned.</td>
</tr>
</table>
</EmptyDataTemplate>
<InsertItemTemplate>
<td runat="server" style="">
productID:
<asp:TextBox ID="productIDTextBox" runat="server"
Text='<%# Bind("productID") %>' />
<br />
productName:
<asp:TextBox ID="productNameTextBox" runat="server"
Text='<%# Bind("productName") %>' />
<br />
salePrice:
<asp:TextBox ID="salePriceTextBox" runat="server"
Text='<%# Bind("salePrice") %>' />
<br />
<asp:Button ID="InsertButton" runat="server" CommandName="Insert"
Text="Insert" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Clear" />
</td>
</InsertItemTemplate>
<LayoutTemplate>
<table runat="server" border="1"
style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;borderstyle:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
<tr ID="itemPlaceholderContainer" runat="server">
<td ID="itemPlaceholder" runat="server">
</td>
</tr>
</table>
<div style="text-align: center;background-color: #5D7B9D;font-family: Verdana, Arial,
Helvetica, sans-serif;color: #FFFFFF">
</div>
</LayoutTemplate>
<EditItemTemplate>
<td runat="server" style="background-color: #999999;">
productID:
<asp:Label ID="productIDLabel1" runat="server"
Text='<%# Eval("productID") %>' />
<br />
productName:
<asp:TextBox ID="productNameTextBox" runat="server"
Text='<%# Bind("productName") %>' />
<br />
salePrice:
<asp:TextBox ID="salePriceTextBox" runat="server"

85

Text='<%# Bind("salePrice") %>' />


<br />
<asp:Button ID="UpdateButton" runat="server" CommandName="Update"
Text="Update" />
<asp:Button ID="CancelButton" runat="server" CommandName="Cancel"
Text="Cancel" />
</td>
</EditItemTemplate>
<SelectedItemTemplate>
<td runat="server"
style="background-color: #E2DED6;font-weight: bold;color: #333333;">
productID:
<asp:Label ID="productIDLabel" runat="server" Text='<%# Eval("productID") %>' />
<br />
productName:
<asp:Label ID="productNameLabel" runat="server"
Text='<%# Eval("productName") %>' />
<br />
salePrice:
<asp:Label ID="salePriceLabel" runat="server" Text='<%# Eval("salePrice") %>' />
<br />
</td>
</SelectedItemTemplate>
</asp:ListView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:masterConnectionString %>"
InsertCommand="INSERT INTO purchaseorder(productID, quantity, price) VALUES (N'113',
02, 26000)"
SelectCommand="SELECT productID, productName, salePrice FROM productTB WHERE
(productID = 113)">
</asp:SqlDataSource>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label1" runat="server" Text="QUANTITY"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
&nbsp;</p>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton1" runat="server">ADD TO CART</asp:LinkButton>
</p>
<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</p>

86

<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton2" runat="server" BackColor="Red"
PostBackUrl="~/ac.aspx">CONTINUE SHOPPING</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<asp:LinkButton ID="LinkButton3" runat="server" BackColor="Red">GO TO FINAL
BILL</asp:LinkButton>
</p>
</form>
</body>
</html>

87

CHAPTER:5

TESTING
TESTING

88

TESTING
BLACK-BOX (FUNCTIONAL) TESTING
Testing against specification of system or component. Study it by examining its inputs
and related outputs. Key is to devise inputs that have a higher likelihood of
causing outputs that reveal the presence of defects. Use experience and
knowledge of domain to identify such test cases. Failing this a systematic
approach may be necessary. Equivalence partitioning is where the input to a
program falls into a number of classes. E.g. positive numbers vs. negative
numbers. Programs norShopy behave the same way for each member of a class.
Partitions exist for both input and output. Partitions may be discrete or overlap.
Invalid data (i.e. outside the normal partitions) is one or more partitions that
should be tested. Test cases are chosen to exercise each portion. Also test
boundary cases (atypical, extreme, zero) since these frequently show up defects.
For completeness, test all combinations of partitions. Black box testing is rarely
exhaustive (because one doesn't test every value in an equivalence partition) and
sometimes fails to reveal corruption defects caused by "weird" combination of
inputs. Black box testing should not be used to try and reveal corruption defects
caused, for example, by assigning a pointer to point to an object of the wrong
type. Static inspection (or using a better programming language!) is preferable for
this.

WHITE-BOX (STRUCTURAL) TESTING

89

Testing based on knowledge of structure of component (e.g. by looking at source


code). Advantage is that structure of code can be used to find out how many test
case need to be performed. Knowledge of the algorithm (examination of the
code) can be used to identify the equivalence partitions. Path testing is where the
tester aims to exercise every independent execution path through the component.
All conditional statements tested for both true and false cases. If a unit has n
control statements, there will be up to 2n possible paths through it. This
demonstrates that it is much easier to test emart program units than large ones.
Flow graphs are a pictorial representation of the paths of control through a
program (ignoring assignments, procedure calls and I/O statements). Use flow
graph to design test cases that execute each path. Static tools may be used to
make this easier in programs that have a complex branching structure. Tools
support. Dynamic program analyzers instrument a program with additional code.
Typically this will count how many times each statement is executed. At end, print out
report showing which statements have and have not been executed. Problems
with flow graph derived testing:
1. Data complexity not taken into account.
2. Does not test all paths in combination.
3. Really only possible at unit and module testing stages because beyond that
complexity is too high.

INTERFACE TESTING

90

Usually done at integration stage when modules or sub-systems are combined.


Objective is to detect errors or invalid assumptions about interfaces between
modules. Reason these are not shown up in unit testing is that test case may
perpetuate same incorrect assumption made by module designer. Particularly
important when OO development has been used. Four types of interface:
1. Parameter: data (or occasionally function references) passed from one unit to
another.
2. Shared memory: block of memory shared between units (e.g. global variable) .One
places data there and the other retrieves it.
3. Procedural: object-oriented or abstract data type form of interface, encapsulating
several procedures.
4. Message passing: one sub-system requests a service by passing a message. Clientserver interface also used by some OO architectures.
Three common kinds of interface error:
1. Interface misuse: caller gives wrong number/types/order of parameters or
sends invalid message.
2. Interface misunderstanding: caller misunderstanding specification of called
component and provides or receives data in legal but unexpected form.
3. Timing errors: producer/consumer of data operate at different speeds and data
is accessed before being ready. "Race conditions".
Common manifestations are when each unit assumes the other one is checking for
invalid data (failure to check return status) and the consequences of when such a
fault is propagated to other units.

91

TESTING PROCESS
Best testing process is to test each subsystem separately, as we have done in my
project. Best done during implementation. Best done after emart sub-steps of the
implementation rather than large chunks. Once each lowest level unit has been
tested, units are combined with related units and retested in combination. This
proceeds hierarchically bottom-up until the entire system is tested as a whole.
Typical levels of testing:
1. Unit -procedure, function, method
2. Module -package, abstract data type, class
3. Sub-system - collection of related modules, cluster of classes, methodmessage paths
4. Acceptance testing - whole system with real data (involve customer, user, etc)
Alpha testing is acceptance testing with a single client (common for bespoke
systems).
Beta testing involves distributing system to potential customers to use and provide
feedback. In, this project, Beta testing has been followed. This exposes system to
situations and errors that might not be anticipated by us.

92

CHAPTER:6

SNAPSHOTS &
&
SNAPSHOTS
TABLES USED
USED
TABLES

93

SNAPSHOTS
HOME PAGE

LOGIN PAGE

94

REGISTRATION PAGE

CATLOG

95

SUCCESSFULL ACCOUNT CREATION

96

PRODUCT TABLE

SHOPPING CART PAGE

USER PASSWORD TABLE


97

DATA TABLE VIEW

98

PRODUCT DESCRIPTION PAGE

TABLES USED
1.USER TABLE:-

COLUMN NAME

DATA TYPE

ID (Primary key)

Int

UserName

nvarchar(50)

Password

nvarchar(50)

99

Email

nvarchar(50)

Address

nvarchar(150)

Name

nvarchar(50)

IDNumber

nvarchar(50)

UserType

nvarchar(50)

2.PRODUCT CATEGORY TABLE:-

COLUMN NAME

DATA TYPE

CategoryID(Primary key)

Int

Category

nvarchar(50)

3.PRODUCT TABLE:-

COLUMN NAME

DATA TYPE
100

ProductID(Primary key)

Int

ProductName

nvarchar(50)

ProductDescription

nvarchar(2000)

ProductShortDescription

nvarchar(500)

Price

Float

Category

nvarchar(50)

ProductImage

nvarchar(500)

ProductImageThumb

nvarchar(50)

4.SHOPPING CART TABLE:-

COLUMN NAME

DATA TYPE

ShoppingID (Primary key)

Int

ProductIDNO

nvarchar(50)
101

UserID

nvarchar(50)

SalesStatus

nvarchar(50)

Qty

Int

5.ORDER TABLE:COLUMN NAME

DATA TYPE

SerialNumber (Primary key)

Int

Username

nvarchar(50)

Amount

Float

6.REVIEW TABLE:-

COLUMN NAME

DATA TYPE

ReviewID(Primary key)

Int

UserName

nvarchar(50)

102

Review

nvarchar(4000)

ProductID

nvarchar(50)

CHAPTER:7

MAINTENANCE &
&
MAINTENANCE
CONCLUSION
CONCLUSION
103

MAINTENANCE
Maintenance of the project is very easy due to its modular design and concept any
modification can be done very easily. All the data are stored in the software as per
user need & if user wants to change he has to change that particular data, as it will be
reflected in the software every where. Some of the maintenance applied is: -

1.BREAKDOWN MAINTENANCE: The maintenance is applied when an error occurs & system halts and further
processing cannot be done .At this time user can view documentation or consult us for
104

rectification & we will analyze and change the code if needed. Example: - If user gets
a error report width is larger than paper size while printing report & reports can not
be generated then by viewing the help documentation & changing the paper size to
A4 size of default printer will rectify the problem.

2.PREVENTATIVE MAINTENANCE: User does this maintenance at regular intervals for smooth functioning
(operation) of software as per procedure and steps mentioned in the
manual.
Some reasons for maintenance are: Error Correction: - Errors, which were not caught during testing, after the system has,
been implemented. Rectification of such errors is called corrective maintenance.
New or changed requirements: - When Organization requirements changes due to
changing opportunities.
Improved performance or maintenance requirements: -Changes that is made to
improve system performance or to make it easier to maintain in the future are called
preventive maintenance. Advances in technology (Adaptive maintenance): - Adaptive
maintenance includes all the changes made to a system in order to introduce a new
technology.

LIMITATIONS: 1. This project does not Edit the date of connection or store the date of transfer in
case of connection transfer.
2. System date for the project is like as backbone for the human, i.e. proposed
105

system is depends on system date so it must be correct.


3. Cannot be connected to the Internet.
4. There are some inherent problems like time, finance etc. to elaborate further
study.

CONLUSION
On the basis of the work done in dissertation entitled E-MART, the following
conclusions emerge from the development.
1. This project has achieved the objective of replacing/augmenting the
conventional system of arranging manpower as could be conducted by a mall
facility.
2. The development of this package has been achieved by using ASP.NET,
which is very conductive to develop the package with regard to time and
specific need to the user.
106

3. This package is highly user friendly, required an optimal minimal input from
user while providing highly relevant and focused outputs.
4. Fully automated, avoiding human intervention. Hence it provides a very rapid
cost effective alternative to the conventional manual operation/procedures;
the visual outputs are more reliable than the audio forms of manual
communication.
5. The system can further extended as per user and administrative requirements
to encompass other aspects of connection management for telecom dept.
6. We will provide e store for sellers

REFERENCES

Pro C# with .NET 3.0 (Andrew Troelsen) - by Apress publication

Pro ASP.NET 2.0in C# 2008 - by Apress publication

www.ebay.com

Black book .net 3.5

www.bytheprice.com

www.startvbdotnet.com

www.quickstart.com

107

www.asp.net.com

108

You might also like