BigBazaar Report
Transcript of BigBazaar Report
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
1. INTRODUCTION:
1.1 Background
In this age of information technology (IT) electronic transaction always plays a vital role to assist the professionally busy people for doing the online (virtual) shopping to fulfill their daily needs on a single roof without any trouble. Today e-commerce is the most buzz word for the digital transactions of thin gs. E-commerce plays the leading role to shrink the business world into a single virtual market. “Big Bazaar” is an effective solution to assemble all these requirements.
Besides customer service, what drives us is our conviction, that the internet can transform the way we shop - save time and money, and most importantly, help us get exactly what we want. Our customers know what you want. Our application is to help you share that with us, so that we can increasingly find a closer match to it. Eventually, we would like to proactively notify you of what you may be interested in. In any event, our stores should be increasingly able to reflect the ability to fulfill customer’s needs, uniquely and completely. We could call that our mission.
The vision of this project an internet all shopping experience that is highly intuitive and interactive and enables all customers to customize the merchandize or service that they want.
It is this vision that we bring to “Big Bazaar”. As the name implies, we would like to deliver unprecedented value products to customers, be it in terms of price, or delivery or post-sales service or tailored products to suit customer specific needs. We promise customers the best, and more to come along the same lines.
Software is being built considering ease in use and cost effective. Using this software does not need any particular training needs to its employees.
To implement the “Big Bazaar” we will use .NET 3.5 with C# as development tool and SQL Server as database.
1.2 Objective
Necessity of physical bound-less, time bound-less shopping place to the customers is driving force towards the development of “Big Bazaar”. The objective of “Big Bazaar” is to provide one and only one virtual shopping mall to the customers. The vision of this project an internet all shopping experience that is highly intuitive and interactive and enables all customers to customize the merchandize or service that they want.Key objectives of “Big Bazaar” are listed below:
a. Online Shopping
b. Facilitate customers by providing 24/7 shopping place
c. Customizable ordering
d. Easy and effective way of order management
e. Simple (GUI based) architecture
f. Customizable architecture.
Page-1
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
1.3 Purpose,Scopes & Applicability
1.3.1) PURPOSE: Sole purpose of this “Big Bazaar (online shopping)” software is to
provide the easy and customizable 24/7 online shopping facility to the customers. The
purpose of “Big Bazaar” is as follows:
To provide the 24/7 online shopping
To make such type of shopping place where customers could fulfill his/her
requirements
To manage employee as well as user requirements
To reduce human resource
To gain more revenue with less effort and investment
To provide Interactive GUI environment to the users
Provide secure transaction (especially for credit card transactions).
1.3.2) SCOPE:
The scope of the project is as follows
24/7 Online shopping
Customer can order from around the world
Multimode payment facility
It can be used by internal employees as well as outsiders
2. SERVEY OF TECHNOLOGIES
Before selecting the technology, we have made a simple survey to decide on which
technology to use. It is e-commerce based software, so we need object oriented features
in the programming language to implement this software. Remote Database is also
required to maintain detail information about the products, users, customers etc.
a) Survey for Programming Language:Survey data including features of each programming languages and its limitations and
usefulness for our project development is shown in the tabular format:
Page-2
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Programming
Language (PL)
Feature Chosen Explanation
.Net .NET is the Microsoft product, which
follows object oriented patterns of
programming. It is the platform
independent so, we can run the software
built by using .NET technology in any
platform. It provides multilingual
environment. It also supports the concept
of partial class, multithreading, exception
handling and provides security features.
The main feature of .net is, it is twice
compiled.
yes It is the platform independent,
provides multilingual
environment and supports
concept of partial classes. It
integrates presentation
technologies, component
technologies and data
technologies on a single
platform. So as to enable users
to develop web based
applications as easily as they
do on desktop systems. Since it
provides these all the features
in one roof, we choose .Net as
PL.
Java Java is also a fully object oriented
language. It has extensive built in support
for networking features. It is an open
community PL with no licensing
requirements. It has in-built in support for
multithreading, exception handling.
No It does not support
multilingual environment and
also needs various
frameworks to develop the
project and
C C is a most versatile programming
language. We can build any type of
software using this PL. It is extensively
used for system–level
programming .Using C, we can interact at
system-level. It follows structured way of
programming.
No It is good for system-level but
it has not built-in support for
object oriented based
programming language. Using
this language we need great
effort to make any commercial
software. So, we have rejected
it..
C++ It has got all the system-level feature of C
as well as some more specific features. It
follows Object-Oriented pattern of
programming.
No It has also not built in support
for direct interaction with the
database so its difficult to
develop interactive web
application software using this
Page-3
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
PL.
b) Survey for Databases
Survey data including features of each database and its limitations and usefulness for our project
development is shown in the tabular format:
DATABASE DESCRIPTION CHOSEN EXPLANATION
SQL Server The SQL server is a Microsoft
database. It is a good database but
mostly used in Microsoft
compatible environment like under
Microsoft Operating System and in
Microsoft front-end technology. It
provides the facilities to execute all
the types of SQL statements. We
can execute triggers and stored
procedures. Different database
features like indexing, database
administration etc is available in
this DBMS software.
Yes Since SQL Server is a Microsoft
product. It is mostly used under
Microsoft compatible
environment and we are
using .NET, so it’s easy to use
with .NET and hence we have
chosen SQL server as our
database.
ORACLE Oracle is a product of oracle
corporation. It is the most widely
used database in the industry today.
It can handle multiple requests in
the network from the different
client and align them. It has highly
sophisticated and customizable
locking mechanism. It also provides
the functionality for all the types of
SQL statements, PL/SQL, triggers,
stored procedures, indexing. It has
got high class facility for
administration of database in the
networking environment.
No As we are know that oracle is a
product of oracle corporation, so
we need a licensing to use it. Also
oracle is mostly used for that
software which has database
extensive features. But our
application does not need such a
robust database features, and
hence we are not choosing oracle
as our database.
MYSQL The MYSQL is an open community
database and it does not require
No As we know, it is not a product of
Microsoft. And it is not
Page-4
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
licensing to use. It is easy to use. It
can handle multiple requests from
different sources. It also gives the
facility for all the types of SQL
statements, database administration,
triggers and procedures.
compatible with Microsoft .NET
framework as sql server. We
require extra effort to play with it.
That’s a reason why we are not
choosing it as our database.
MS-ACCESS MS-Access is a Microsoft product.
It comes with the Microsoft Office
Package and we need to buy the
package. It has got graphical user
interface for database activities and
is easy to use. It has got facilities
for executing SQL statements, form
and report creation etc. It has not
got good security features, which is
most important. It is mostly used in
Small organizations and for
educational purpose.
No Because we are creating software
that will be more cost-effective
and it needs licensing. Though
most of the organizations have
MS Office package already
installed but we can not guarantee
it. And it has not got good
security features, so we have not
chosen MS-Access as database for
our application.
To conclude, we have chosen asp.net with c# as Programming language and sql server as
a database to develop our application. Both are the Microsoft products so it is user friendly. It will
be cost-effective and easy to use. Since team members are already familiar with .NET
technology, so it will be feasible from Human Resource point of view.
3. Description of selected technology ASP.NET:
ASP.NET is a web technology by Microsoft. Using server controls, programmers can use it
to build dynamic web sites, web applications and XML web services. It is part of Microsoft's
.NET framework and is the successor to Microsoft's Active Server Pages (ASP) technology.
ASP.NET is built on the Common Language Runtime (CLR), meaning programmers can write
ASP.NET code using any Microsoft .NET languages.
C#.NET:
Page-5
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
C# is a fully Object-Oriented language like Java. And is the first component oriented
language. It is a simple, robust, and type safe language derived from the C and C++ languages. It
is generally suitable for building n-tier web applications. It gives quick access to data stores like
SQL server and oracle. It offers XML web services and server side controls. C# also facilitates
deployment easier.
ADO.NET:
ADO.NET is the data access model for .NET-based applications. It can be used to access
relational database systems such as SQL Server 2005, Oracle, and many other data sources for
which there is an OLEDB or ODBC provider. It provides the .NET programmer with access to
relational data sources, XML, and application data. ADO.NET supports a variety of development
needs, including the creation of database clients and middle-tier business objects used by
applications, tools, languages, and Internet browsers.
HTML:
HTML, stands for Hypertext Markup Language, is the predominant markup language for
the creation of web pages. It provides structure by denoting certain text as headings, paragraphs,
lists, and so on. It helps to supplement that text with interactive forms, embedded images, and
other objects. HTML is also often used to refer to content of the MIME type text/html /XHTML.
DHTML:
Dynamic HTML (DHTML) is a set of innovative features in Microsoft Internet Explorer
4.0. With DHTML, we can easily add effects to our documents that previously were difficult to
achieve. Dynamic HTML provides authors with enhanced creative control so they can manipulate
any page element at any time. Dynamic HTML is also the easiest way to make Web pages
interactive, using open, standards-based technologies. For example, we can hide text and images
in our document and keep this content hidden until a given time elapses or the user interacts with
the page.
JAVA SCRIPT:
JavaScript is a Scripting Language of the World Wide Web, which offers a way to add
intelligence and interactivity to Web pages. With JavaScript, we can:
process data collected in HTML forms right on the user's computer, without involving a
server
create and store data on the user's machine
add interactivity to graphics
change page elements on the fly based on user input; and
Page-6
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Integrate HTML data more tightly with other Web technologies
The main usage of JavaScript is to add various Web functionalities, Web form
validations, browser detections, creation of cookies and so on.
SQL SERVER 2005:
The SQL server is a Microsoft database. One of SQL's greatest benefits is it is truly a cross-
platform language and a cross-product language. It provides the facilities to execute all the types
of SQL statements. We can execute triggers and stored procedures. Different database features
like indexing, database administration etc is available in this DBMS software.
Page-7
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
4. REQUIREMENTS AND ANALYSIS:
System analysis is the first step towards the software building process. The purpose of system analysis is to understand the system requirements, identify the data, functional and behavioral requirements and building the models of the system for better understanding of the system.
System analysis is the course of gathering and interpreting facts, diagnosing problem & using the information to develop the proposed system and recommend improvement to the system. In other words System Analysis is a management technique which help us in designing a new system or improving an existing system. In the system development life cycle first three part like Requirement Analysis, feasibility Analysis & Basic System Specification fall under the system analysis part. System analysis is the application of the system approach to problem solving using computers. The ingredients are the system’s elements, processes & technology. This means that to do the system work one needs to understand the system’s concept and how organization operates as a system that meets the organization’s requirements. The important thing is that the user point of view must be taken in to account in the analysis part for a successful design and subsequently later development. Analysis is the detailed study of the various operations performed in present system and their relationship within and outside the system.
One aspect of system analysis is also to define the boundaries of the system and determining weather other related system’s work be adopted or not. During analysis, data are collected from the available files and various transactions handled by the present system. Data flow diagrams, interviews, and onsite observation helped a lot in understanding the system. The interview is a commonly used tool in analysis. Interview requires special skill and sensitivity because it is an effective tool to know the exact information about the system. Bias in data collection and interpretation can be a problem; therefore one must be careful in gathering the data required for analysis. Once analysis is completed the analyst founds himself in a position to deal with the problem specified.
In the process of system analysis we should first understand that, what the present system is? What it does is how it works (i.e. processes). After analyzing these points we become able to identify the problems the present system is facing. Upon evaluating current problems and desired information (input and output to the system), the analyst looks towards one or more solutions. After this, a models from three different aspects of the system-data, function and behavior. The models created during the system analysis process helps in better understanding of data and control flow, functional processing, operational behavioral and information content.
Requirement Analysis : is a detailed understanding of all important facts of business area under investigation & the study of those facts comes under the requirement analysis. In the requirement analysis first we determine the fact like what is being done? How is it being done? etc and then specify it. After detailed study the need of this system is established in view of the fact that personal information and various other information that are in records in various departments in an office is difficult to gather and to provide at a single place. System is developed to fulfill the following objectives:-Provide all information at single place within no time.
To meet the demands of fast & up to date personal and other official information.
Page-8
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
As an infrastructure support for decision making. For generation of various official activities.For processing routine jobs like generation of reports for a particular activity for a particular day, month or year.Extend the ability & efficiency to deal with reports & queries.To provide very user friendly environment. Preliminary Investigation:-
Once the request for the information system development is received, the first system activity “preliminary investigation” begins. This activity is independent of the software-engineering paradigm applied for the development of the system. In other words we can say that the whether a system will be developed by means of the system development life cycle (SDLC), a prototyping strategy, or the structured analysis method, or a combination of these methods, preliminary investigation must be performed first. This activity has three parts:
i) Request Clarification: It may be possible that the request that has been received is not clearly defined and it is difficult to figure out what for the request is. So, in that case, the person who has made the request is contacted and asked to explain the request. If the request is appropriate enough then in that case feasibility study is carried out for that request. I.e. before the feasibility study, the request must be determined and defined precisely. After request clarification the feasibility study is performed. If the request for the information system is feasible in the request is approved and then starts the real analysis phase called “Requirement study”. The data that are collected from the organization as the part of preliminary investigation is follows three mechanisms also called “ Fact Finding Techniques “:
Reviewing existing Documents material and existing systems (web sites)Conducting Interviews and On-Site Observation
To conduct preliminary investigation, we contacted with the different export house I talked with head of the organization employees and the students about the current working system and about the tasks they were performing. We used all the three fact-finding techniques for data collection. We collected various papers & documents related to the activities like online and its pay methods etc.
Latter on, we examined the various kinds of reports and result the institute were producing. The above said fact finding techniques not only helped in the understanding of the system but also proposed some solutions to the e-commerce..
ii) Information Content: Information content represents the individual data and control objects that constitute some larger collection of information transformed by the software. In our case the object, which is composite of a number of important pieces of data as project, package and item with its category. So the contents is defined by the necessary attributes required to create it. During the analysis of the information domain the inter relationship between objects is also defined.
iii) Information flow: Information flow represents the manner in which data and control changes as each moves through a system. Input objects are transformed into intermediate information, which is further transformed to output. Here, additional information is also supplied and transformations are some engineering functions/formulae.
Page-9
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
4.1 Problem Definition:
Problem definition is very first step of system analysis. In the era of business world, the peoples
are mostly involved to solve the condition of business requirement.
People do not have sufficient time to go to boundary limited location for shopping. And if there is
not availability of departmental store the problem will be much greater. The problems in the
traditional shopping system are pointed below:
1. The performance of the system,
2. location boundary limitation
3. time boundary
4. not so cost effective
5. need more effort for human resources
6. need great effort to run the business
7. The security of the data & software
8. The economy of processing,
4.2 PRELIMINARY INVESTIGATION:
The manual System:
In the manual system the companies selling their products have to provide
services through channels and mode of operations existing through different hierarchy
level of problem solving stages and vice-versa to customer.
This is a tedious process and a person at higher level in the hierarchy is not
having the complete control over the people who are at the lower level or the direct
interaction between the customer and helpdesk officer. The system being proposed will
only automate and facilitate the manual form as well as will provide blend.
To overcome the limitations of the existing system, we are building the new software based
solution to the problem. Now, we will briefly describe the requirements of the system.
System under Study:
In order to understand the need of the proposed system first we will have to understand
the demand and supply of such system accordingly in the real world, and in nowadays context.
With more then 1 billion population of the country like ours, where everything is
changing fast and figures complete change in the mod of human interaction changing the direct
dependability between man & man and man & machine through the fast growing electronics
mode of communication opening a new door for internet technology to act as a interactive media
Page-10
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
for a professional interaction, this system deals directly with customer interaction with the
respective companies for the products and service regarding to that products. The interaction
response time can be decreased through a viable Internet based response, request and query
management system.
With the increasing of web broadband network using optical fiber cable the system being
developed is feasible and can act as a trusted mode of communication between
companies and their customers.
4.3 MODULE DESCRIPTION
The whole system is divided into different module:
Module 1: Admin Module Adding Category Adding Sub Category Adding Products Modifying Products Modifying Category and Sub Category Reports feedback view category view sub category view product Query
Module 2: User Module Registration Form Search for product Add to cart Online Payment Feedback Form Query
Module 3: Search Module Search Engine
Module 4: Payment Gateway Online Payment
Module 5: Database Design DFD Relationship Transaction
Page-11
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
4.4 PLANNING & SCHEDULING
THE CONCEPT:
Project scheduling is similar to any multitask engineering effort. It is an activity that distributes estimated effort across the planned project duration by allocating the effort to specific software engineering tasks. Every project has a deadline to complete. To complete a software project within stipulated time frame, proper scheduling should be done. So, we can say that the successful software project is that which are well scheduled and must be develop in scheduled time frame. A software project scheduling involves plotting project activities against a time frame. So, the scheduling is about developing a road map structure or a network based on analysis of the tasks that must be performed to complete the projects. The schedule evolves over time. During early stages of project planning, a microscopic schedule is developed. This type of schedule identifies all major software-engineering activities and the product functions to which they are applied. As the project gets under way, each entry on the macroscopic schedule is refined into a detailed schedule. Here, specific software tasks are identified and scheduled. The scheduling objective is to define all project tasks, build a network that depicts their interdependencies, identity the tasks that are critical within the network, ant then track their progress to ensure that delay is recognized “ one Day at a time”. To accomplish this, the manager must have a schedule that has been defined at a degree of resolution that enables the manager to monitor progress and control the project. There are mainly two software project scheduling methods that can be applied to software development.
This is the very important phase for any software development cycle as it determines the plan and schedule of the system. But it requires more skill and knowledge to implement. The planning is basically used to determine the feasibility of the system. Either it is economic feasibility or operational feasibility. The points under planning are given below:
4.4.1) RESOURCE PLANNING:
The resource planning is basically used to determine what types of resources are needed
to implement the system. Either it is human resource or hardware-software resources. The
explanations are given below:
4.4.1.1) Human Resource:
The human resource planning is also known as the estimation of effort. Estimate the
effort is based on the man-month or man-hour. Man-month is an estimate of personal resources
required for the project. Once the size of the s/w is estimated, the next step is to estimate the
effort based on the size. The development of any application s/w system is more than just coding
the system. Depending upon deliverable requirements, the estimation of effort for the project will
vary. Efforts are estimated in no. of man-months.
Page-12
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
The best way to estimate effort is based on the organization own historical data of
development process organization follows similar development life cycle for developing various
applications.
Since we are creating the ‘Big Bazaar software to present our mini project, we have a
group of 2 members to complete this project. The roles and responsibilities of each individual are
given in roles and responsibility page.
4.4.1.2) Hardware/Software resources:
The hardware and software resources needed to successfully complete the project and to
implement the project too. The hardware and software requirement has mentioned under
hardware-software requirement heading.
4.4.2) ESTIMATION OF COST:
The cost estimation is always plays an important role for any system. The Various cost
estimation factors are given below:
i) Documentation Cost
ii) Research and development cost
iii) Traveling cost
iv) Hardware/Software cost
v) Estimation of effort
Scheduling is used to determine which phase to be completed in which time period. A
Gantt chart is used for this purpose. A Gantt chart can be developed for the entire project or a
separate chart can be developed for each function. A tabular form is maintained where now
indicates the task with milestones and column indicates duration. The Gantt chart for the ‘Big
Bazaar’ is given below:
Page-13
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Page- 14
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Page- 15
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
PERT CHART
Program evaluation and review technique (PERT) and critical path method both techniques are driven by information already developed in earlier project planning activities. Gantt charts are a project control technique that can be used for several purposes, including scheduling, budgeting and resources planning. . A Gantt chart is a bar chart, with each bar is proportional to the length of time planned for the activity.
Inter task dependencies cannot be shown using these techniques. PERT charts show tasks inter dependencies directly. It is organized by events and activities or tasks. In my project a set of tasks was performed for the project development. The major identified Software Engineering Tasks at software project development are as follows:
System Analysis
System Design
Software Development
Software Testing
Software Installation
Software Documentation
System Evaluation
The timeline chart, also called a Gantt chart of the above task set (Time Frame: 4 months) has been prepared. The PERT Chart of the software development phase is also prepared and is depicted in below figure. It is based on the different modules identified in the software.
Page-16
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
PERT (Program Evaluation and Review Technique) CHART
Page-
Problem
Analysis
Selection & Learning the s/w to be used
Under-standing Database
Coding
Page
Designing
Implementation
Evaluation
Testing
Analysis of the existing
Systems Like the proposed
one
3rd Week
1 Week 1 Week
2nd Week
1st Week
1 Week
Week 4-5
2 Weeks
Week 6-10
Week 11-13
14th Week
15th Week
16th Week
2 Weeks
1 Weeks1 Weeks
1 Weeks
START
17
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
4.5 Software and Hardware Requirement
Any system which is to be built needs some software and hardware for implementation. The
software generally used to build the system and hardware used to execute it successfully. In
today’s scenario there are different tool available for the creation of software like .net, java, c, c+
+, etc. Since we are creating an e-commerce project and .NET is best suited for e-commerce
project because it contains in-built class libraries. We are using the ASP.NET as a front-end and
SQL Server as a back-end tool for our project. The software and hardware requirement are given
below:
Software Requirement
Language used : ASP.NET with C#
OS : Windows XP, sp2
Database : SQL Server 2005
Package : MS-Office (word, power point), Enterprise Architect 7.5
Web Server : IIS
Hardware Requirement
Processor : Pentium-IV
RAM : 256MB
HDD : 40GB
Page-18
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
4.6 Preliminary Description
Once the request for the information system development is received, the first system activity “preliminary investigation” begins. This activity is independent of the software-engineering paradigm applied for the development of the system. In other words we can say that the whether a system will be developed by means of the system development life cycle (SDLC), a prototyping strategy, or the structured analysis method, or a combination of these methods, preliminary investigation must be performed first.
This activity has three parts:
Request Clarification Study and Approval
It may be possible that the request that has been received is not clearly defined and it is difficult to figure out what for the request is. So, in that case, the person who has made the request is contacted and asked to explain the request. If the request is appropriate enough then in that case feasibility study is carried out for that request. I.e. before the feasibility study, the request must be determined and defined precisely. After request clarification the feasibility study is performed. If the request for the information system is feasible in the request is approved and then starts the real analysis phase called “Requirement study”. The data that are collected from the organization as the part of preliminary investigation is follows three mechanisms also called “ Fact Finding Techniques “:
Reviewing existing Documents material and existing systems (web sites)
Conducting Interviews and
On-Site Observation
To conduct preliminary investigation, we contacted with the different vaastu consultency firms which provides the facilities of online vaastu consultency and vaastu related query searching. I talked with head of the organization and employees about the current working system. We used all the three fact-finding techniques for data collection. We collected various papers & documents related to the activities like consulancy. Weanalyzed every aspect of the system, and conducted survey to know the requirement of the general people.
4.7 PRODUCT DESCRIPTION:
The new System Completely remove the problems occur in existing system. The new
system has the following objectives:
a. Online Shopping
b. Facilitate customers by providing 24/7 shopping place
c. Customizable ordering
d. Easy and effective way of order management
Page-19
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
e. Simple architecture
f. Customizable architecture.
The new system provides the following facilities:
a. 24/7 online shopping
b. Add to cart facility
c. Multimode (credit/master cards etc.) payment facilities
d. Creating user’s account
e. Show shopping history on user basis
f. Feedback column for the customer
g. User authentication
h. Server’s configuration settings
i. Modifying user account(s)
j. Automatic deletion of unused user accounts
k. Real time (online) help to customers.
4.8 CONCEPTUAL MODELS
The system design is very important phase for any software project. The modeling shows
the symbol of reality. The design phase comes after the requirement and analysis phase. It
requires sound knowledge and conceptual idea about the overall architecture. Good design always
lead to the successfully completion of the project and bad design may lead to the failure. There
are different designs available like ER diagram, DFD (data flow diagram), UML diagram etc. We
have created the E-R diagram, DFD’s, and use case diagram in the requirement phase.
The diagrams are given below:
4.8.1 Data Flow Diagram
Functional description of the project and the flow of data within the system are described through
Data Flow Diagram (DFD) presented below. We have presented DFD up to one-level.
Page-20
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Fig: One-Level DFD for “Big Bazaar”
Page-21
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
2.0
Display Login Form
Login Unsuccessful
Login Successful
User Home Page
Customer
Information Database
Fig 1.2 Second Level DFD
2.1
Disp_redgform
Customer loginUser Regestration
Regestration Successfull
Page-22
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Customer
3.0
Select item
3.4
Continue Shopping
3.3Change ShoppingCart info
3.2
ReviewItem
3.1
List OfSelected
Item
Product infoDatabase
Checkout
Desired Item Desired Item
Back to website
Modified List Of Items
One or More Desired Item
Product Description
Price Prod Image
Desired
Items
With info
First Of Items
To Purchase
Desired Item with Info Desired
Item
with Info
Finalize
Item ListFig.1.3 Third Level DFD
4.8.2 E-R Diagram
The E-R diagram stands for Entity Relationship diagram. Entity Relationship Diagram shows the
main entities of the system and relationship between them.
The different entities of the system are:
Admin (Aid, AName, ALogin, APwd, HintQues, HintAns).
User (UId, FName, LName, Gender, UserId, Pwd, Address, Contact)
Product (PId, PName, PDescription)
Order (OId, UId, ODate)
Supplier (Sid, SName, Address, Contact)
PaymentDetail (UId, OId, PMode, CardNo, ExpDate)
Bill (Bid, UId, OId, Amount)
The E-R diagram is given below:
Page-23
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Page-
ADMIN
ONLINE PAYMENT
DETAILSUPPLIER
BILL
PRODUCT
USER ORDER
Manage
Has
For
Search
Place
Has
SuppliesBy
Manage
M
M M
M
M
1
11
1
M
M
M
1
UID
ONo
BNo
UID
PID
ONo
PIDAID
SID
SID
AID
PID
UID Phone No
Pwd
UName
SID
Contact
AddressSName
AID
HintsQues
APwdAName
ALogin
UID
PasswordONo
ODate
M
M
PID
Category
PName Company
Quantity
Price
TraIDBNo
Category
PName Company
Quantity
Price
Amount
ONo
BNo
ONo
HintAns
24
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Fig :- Entity Relationship Diagram
4.8.3 USE-CASE diagram
The use case diagram is generally used to determine the facility of the system. There are
two main entities in the Use-case diagram. They are:
Actors: Who is going to do the things?
Use-cases: What to do.
The use-case diagram for the ‘Big Bazaar’ is given below:
uc Big Bazaar: Main
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
Admin User
Login
Product/Details
Update/Modify Details
Login User Information
Payment Details
Generate Bill
Deliv ery Status
Page-25
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Admin Module:
uc Big Bazaar: Admin Module
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
Big Bazaar: Admin Module
AdminDatabase
Login/Logout
Add / Modify Product
Add / Modify Category
Change A/C Info
Generate Bill
Deliv ery Product
User Module:
uc Big Bazaar: User Module
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version EA 7.5 Unregistered Trial Version
User
Payment Process
Database
Customer Support System
Search for Item
Place Order
Login
Registration
Signout
Feedback
Obtain Help
Page-26
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
4.8.4 Sequence Diagram
Admin Module
Page-27
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
User Module
Page-28
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Page-29
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
5. System Design
System design develops the architectural details required to build a system or product. System design is an engineering process by which we are representing of something that is to be built. It is a blueprint for constructing the software. In the software engineering context, design focuses on four major area of concern: data, architecture, interfaces and component. Once the software requirements have been analyzed and specified, software design is the first of three technical activities-design, code generation, and test are required to build the and verify the software. After making Software Requirement Specification of the project, now we are in position to design the software. The system design process encompasses the following activities:
Partition the analysis model into subsystems. Identify concurrency that is dictated by the problem. Allocate subsystem to processors and tasks. Develop a design for the user interface. Choose a basic strategy for implementing data management. Identify global resources and the control machanism required to access them. Design and approprate control machanism for the system, including task
management. Consider how boundary conditions should be handled. Review and consider trade-offs.
5.1 DATABASE DESIGN
5.1.1 SCHEMA DESIGN:
Data design creates the model of data or information that is represented at a high level of abstraction.This data model is then refined into progressively more implementation-specific representation that can be processed by the computer based system.Data design is a process by which we transform the information gathered in during the analysis into the data structures.
Database Schema for the BigBazaar (online shopping) are given below:
1. Admin Table
This tables stores information about the Administrators of the system along with login information.
Admin Table
Field Type Null Key Default Extra
Aid Int NO PRI
AdminId varchar(50) NO
Page-30
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
AlternateEmail varchar(50) NO
FName varchar(20) NO
LName varchar(20) YES NULL
Password varchar(20) NO
Gender varchar(20) NO
Country varchar(20) NO NULL
State varchar(20) NO NULL
City varchar(20) NO NULL
Address varchar(150) NO
Contact varchar(20) NO
HintQ varchar(200) YES NULL
HintA varchar(100) YES NULL
2. User Table
This tables stores information about the users of the system along with login information.
User Table
Field Type Null Key Default Extra
Uid Int NO PRI
UserId (Email) varchar(50) NO
AlternateEmail varchar(50) NO
FName varchar(20) NO
LName varchar(20) YES NULL
Password varchar(20) NO
Gender varchar(20) NO
Country varchar(20) NO
State varchar(20) NO
City varchar(20) NO
Address varchar(150) NO
Contact varchar(20) YES NULL
HintQ varchar(200) YES NULL
3. Product Table
This tables stores information about the Products details of the system.
Page-31
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Product Table
Field Type Null Key Default Extra
Pid Int NO PRI
PName varchar(500) NO
PDescription varchar(5000) YES NULL
4. SubProduct Table
This tables stores information about the Sub Products details of the system.
SubProduct Table
Field Type Null Key Default Extra
SPid Int NO PRI
PId Int NO FK
SPName varchar(500) NO
SPDescription varchar(5000) YES NULL
5. Item Table
This tables stores information about the Items details of the system.
Item Table
Field Type Null Key Default Extra
IId Int NO PRI
PId Int NO FK
SPId Int NO FK
IName varchar(500) NO
IDescription varchar(500) YES NULL
IMRP Int NO
IPrice Int NO
IQuantity Int NO
IImage varchar(5000) YES
IDate Datetime NO
6. Order Table
This tables stores information about the order of the user.
Page-32
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Order Table
Field Type Null Key Default Extra
OId Bigint NO PRI
UId Int NO FK
ODate Datetime NO
7. OrderDetail Table
This tables stores information about the order details of the user.
OrderDetail Table
Field Type Null Key Default Extra
OId Bigint NO FK
IId Int NO FK
IName varchar(500) NO
Quantity Int NO
MRP Money NO
Price Money NO
Total Money NO
8. PaymentDetail Table
This tables stores information about the payment details of the user.
PaymentDetail Table
Field Type Null Key Default Extra
PId Bigint NO PK
OId Bigint NO FK
CNo Bigint NO FK
PMode Varchar(50) NO
9. ShippingDetail Table
This tables stores information about the shipping details of the customer.
ShippingDetail Table
Field Type Null Key Default Extra
OId Bigint NO FK
Page-33
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
FName varchar(50) NO
LName varchar(50) YES NULL
EmailId varchar(50) NO
Contact varchar(50) YES NULL
Address varchar(200) NO
City varchar(50) YES NULL
State varchar(50) YES NULL
Country varchar(50) YES NULL
PinCode varchar(50) YES NULL
10. CardInfo Table
This tables stores information about the Payment card details of the customer.
CardInfo Table
Field Type Null Key Default Extra
CNo Bigint NO PK
CType varchar(50) NO
Password varchar(4) NO
Balance Money NO
5.1.2 DATA INTEGRITY & CONSTRAINTS:
Data are prone less at the time of udpation, so we imply certain techniques to make it consistent.
Normalization is a technique used in RDBMS to decompose into table into two or more different tables to remove functional dependency as well as redundancy. The normalization has different form namely-First NF, Second NF, Third NF, BCNF and Fourth NF. The decomposition of the table should be in the manner that data should not be lost i.e. the union of the decomposed table should must give the actual table. Normalization is also necessary to maintain referential integrity. In our context, we used normalization technique up to a three NF as our project had much number of FDs and case of data redundancy.
Constraints are set of rules implied on data field to make data integrated and consistant.Here we have used Primary key, foreign key constraints to make it relational and consistant.
5.2 USER INTERFACE DESIGN
Page-34
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
User Interface Design is one of the important aspect of any user software. Users need easy, comfortable and effiicient user interface. BigBazaar (online shopping) appliation contains GUI based User Interface.Screen shots for the BigBazaar (online shopping) interface are given below:
1. Home Page
Page-35
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
2. Item Detail Page
Page-36
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
3. Add to Cart Page
Page-37
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
4. User Login Page
Page-38
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
5. User Registration Page
Page-39
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
6. Shipping Detail Page
Page-40
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
7. Shipping Detail Page
Page-41
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
8. Customer Bill Page
Page-42
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
9. Admin Login Page
Page-43
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
10. Product Entry Page (Product Category)
Page-44
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
11. Product Entry Page (Sub Product)
Page-45
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
12. Product Entry Page (Items)
Page-46
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
13. Change Password for User
Page-47
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
14. Forget Password Page
Page-48
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
15. About Developers
Page-49
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
5.3 SECURITY ISSUES:
System security consideration ensures the protection of information against unauthorized access, modification or destruction. Data is always considered a priceless asset in all organizations, and protecting data is a high priority consideration for any computer based system.
Software components of the BigBazaar (online shopping) is deployed in the centrals server. The server machine should be kept in secure place and operating system in server should provide strong security mechanism. MS SQL Server server provides its own authentication mechanism before connecting to the database. So, Database server is secure due to MS SQL Server’s strong security architecture.
Users (Customers and Admin) of the application does not need authentication before gaining access to the site. But user compulsirely got authenticated before doing the online shopping and administrator also authenticated to gain access to the Admin panel. User Name and password information is stored in the central database in MS SQL Server.
5.4 TEST CASES DESIGN:
This term software testing conjures images of large number of test cases prepared to exercise computer programs and the data that they manipulate. Testing must also extend to the third element of the software configuration-documentation.
Errors in documentation can be as devastating to the acceptance of the program as error in data or source code. It is for this reason that documentation testing should be a meaningful part of every software test plan.
6. Implementation and testing
6.1 IMPLEMENTATION APPROACHES:
We can implement easily this application. Reusability is possible as and when we require in this application. We can update it next version. We can add new features as and when we require. There is flexibility in all the modules. Scope of this document is to put down the requirements, clearly identifying the information needed by the user, the source of the information and outputs expected from the system.
Implementation approach includes the following steps :-
i) Project Initiation.
ii) Business Requirements Analysis.
iii) System Design
iv) Software Development
v) Software Testing
vi) software deployment and execution
Page-50
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Fig: Deployment Diagram of “Big Bazaar” Software
6.2 PAGE DESIGN SOURCE (.ASPX FILES)
Web Page Name: Master.aspx
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %><%@ Register TagName="Menu" TagPrefix="IBP" Src="~/UserControl/Menu.ascx" %><!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>Master Page</title> <link rel="Stylesheet" type="text/css" href="StyleSheet.css" /> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder></head><body bgcolor="#ededed"> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <div id="main">
Page-
User
User
Big Bazaar Web Server
Big Bazaar Database
51
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<table cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="100%"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="vertical-align:top; width:100%;"> <table cellpadding="0" cellspacing="0" width="100%" bgcolor="#7F8989"> <tr> <td><img src="Img/BBLogoLeft.jpg" alt="Logo" /></td> <td align="right"> <img src="Img/BBLogoRight.jpg" height="75px" width="75px" alt="Logo" /></td> </tr> </table> </td> </tr> <tr> <td style="vertical-align:top;width:100%;"> <table cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff"> <tr> <td width="15%" valign="top"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> <img id="ImgDeep" src="Img/side-image.gif" alt="" height="215px" width="224px"/> </td> </tr> <tr> <td style="padding-top:10px;vertical-align:top;"> <table cellpadding="0" cellspacing="0" width="100%" style="background-color:#BD781D;padding:7px; font-weight:bold;"> <tr> <td> All Categories </td> </tr> </table> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" style="padding-left:0px;background-color:#E0E0E0;" width="100%"> <tr> <td> <div id="dbm-list"> <asp:Menu ID="Menu1" runat="server" OnMenuItemClick="Menu1_MenuItemClick1"> </asp:Menu> </div> </td> </tr> </table> </td> </tr> </table> </td>
Page-52
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<td width="85%" valign="top"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td><IBP:Menu ID="m1" runat="server" /></td> </tr> <tr> <td valign="top"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td style="padding-top:10px;"> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td> <div class="clear"></div> </td> </tr> <tr> <td> <div id="footer"> <div id="foot1"> <img src="Img/paypal.gif" alt="" /></div> <div id="site"> Site Designed & Developed By - <a href="AboutDevelopers.aspx">MP Joshi & Deepak Kumar</a></div> <div id="foot2"> <a href="Home.aspx">Home</a> | <a href="Contact.aspx">Contact Us</a> | <a href="AboutDevelopers.aspx"> About Developers</a> | <a href="">Sitemap</a> <br /> © 2010, All right reserved. </div> <div class="clear"> </div> </div> </td> </tr> </table> </td> </tr> </table> </div>
Page-53
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</form></body></html>
Web Page Name: Home.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" Title="Big Bazar - Home : Welcome to the Digital World" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"><link rel="Stylesheet" type="text/css" href="StyleSheet.css" /></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div id="d-top"> Featured Products</div><table cellpadding="0" style="padding-left:4px;padding-right:4px;" cellspacing="0" width="100%"><tr><td><fieldset id="fieldsetDList" runat="server" width="80%" class="tblOuter"><asp:DataList ID="dList" GridLines="Both" runat="server" bgcolor="#E0E0E0" RepeatColumns="3" RepeatDirection="Horizontal" Width="100%" onitemcommand="dList_ItemCommand"><ItemTemplate><table cellpadding="0" cellspacing="0" width="100%" style="padding:7px;line-height:30px;"><tr><td style="vertical-align:middle;"><a href="#" class="aUnderline"><asp:Image ID="imgImage" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" Height="110px" ImageUrl='<%#Eval("IImage") %>' Width="80px" /></a></td>
<td style="vertical-align:top;width:100%; padding:7px;"><table cellpadding="0" cellspacing="0" width="100%"><tr><td style="vertical-align:top;"><asp:HiddenField ID="hfIId" Value='<%#Eval("IId") %>' runat="server" /><a href="#" class="a"><asp:Label ID="lblIName" CssClass="iName" Text='<%#Eval("IName") %>' runat="server"></asp:Label></a></td></tr><tr><td class="detail">MRP: <asp:Label ID="lblIMRP" Font-Strikeout="true" Text='<%#Eval("IMRP") %>' runat="server" ForeColor="Red"></asp:Label></td></tr><tr><td class="detail">
Page-54
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
BB Price: <asp:Label ID="lblIPrice" Text='<%#Eval("IPrice") %>' runat="server" ForeColor="Red"></asp:Label></td></tr><tr><td><asp:ImageButton ID="ibShowDetails" CommandName="ShowDetails" ImageUrl="~/Img/detail.jpg" runat="server" /></td></tr><tr><td style="padding-top:10px;"><asp:ImageButton ID="ibAddtocart" ImageUrl="~/Img/addcart.jpg" CommandName="AddToCart" runat="server" /></td></tr>
</table>
</td></tr></table></ItemTemplate></asp:DataList><%--</div>--%></fieldset>
</td></tr><tr><td align="right" style="padding:7px;width:80%;"><table width="100%"><tr><td><asp:LinkButton ID="lbPrev" Text="Previous" runat="server" CssClass="aUnderline" onclick="lbPrev_Click"></asp:LinkButton>|<asp:LinkButton ID="lbNext" Text="Next" runat="server" CssClass="aUnderline" onclick="lbNext_Click"></asp:LinkButton></td></tr></table></td></tr></table></asp:Content>
Web Page Name: ProductEntry.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ProductEntry.aspx.cs" Inherits="ProductEntry" Title="Untitled Page" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ATK" %><asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <link rel="Stylesheet" type="text/css" href="StyleSheet.css" /></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Page-55
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<table cellpadding="0" cellspacing="0" width="100%" class="tblOuter"><tr><td><table cellpadding="0" cellspacing="0" width="100%"><tr><td width="100%"><table cellpadding="0" style="padding-left:4px;padding-right:4px;" cellspacing="0" width="100%"><tr> <td width="100%">
<ATK:TabContainer ID="tc1" Width="100%" ActiveTabIndex="2" runat="server"><ATK:TabPanel ID="tp1" Width="100%" TabIndex="0" runat="server"><HeaderTemplate>Category</HeaderTemplate><ContentTemplate><table cellpadding="0" cellspacing="0" width="70%" align="center" class="TC"><tr><td><fieldset><legend>Add Category...</legend><table cellpadding="0" cellspacing="0" width="100%" bgcolor="#E0E0E0" style="padding:1px;line-height:30px;"><tr><td align="right">Product:</td><td><asp:TextBox ID="txtPName" runat="server" Height="15px"></asp:TextBox></td></tr><tr><td align="right">Description:</td><td><asp:TextBox ID="txtPDescription" runat="server" Height="15px" TextMode="MultiLine" Width="150px"></asp:TextBox></td></tr><tr><td colspan="2" align="center"><asp:Button ID="btnPInsert" runat="server" Text="Insert" onclick="btnPInsert_Click" /></td></tr></table></fieldset> </td></tr><tr><td style="padding-top:20px;"><fieldset><legend>Category List...</legend><table cellpadding="0" cellspacing="0" width="100%"><tr><td width="100%"><table width="100%" bgcolor="#E0E0E0" cellpadding="0" style="padding:4px;" cellspacing="0"><tr><td><asp:GridView ID="gvwProduct" runat="server" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" OnPageIndexChanging="gvwProduct_PageIndexChanging" OnRowCancelingEdit="gvwProduct_RowCancelingEdit" OnRowEditing="gvwProduct_RowEditing" Width="100%"
Page-56
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
onrowdeleting="gvwProduct_RowDeleting" onrowupdating="gvwProduct_RowUpdating"><AlternatingRowStyle BackColor="White" /><Columns><asp:TemplateField><ItemTemplate><asp:CheckBox ID="chkSelect" runat="server" /></ItemTemplate><ItemStyle VerticalAlign="Middle" Width="5%" /></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:HiddenField ID="hfPID" Value='<%#Eval("PId") %>' runat="server" /></ItemTemplate><EditItemTemplate><asp:HiddenField ID="hfPId" Value='<%#Eval("PId") %>' runat="server" /></EditItemTemplate></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:Label ID="lblPName" runat="server" Height="15px" Text='<%#Eval("PName")%>'></asp:Label></ItemTemplate><EditItemTemplate><asp:TextBox ID="txtPName" runat="server" Font-Size="11px" Height="15px" Text='<%#Eval("PName")%>'></asp:TextBox></EditItemTemplate><HeaderTemplate>Product</HeaderTemplate><HeaderStyle CssClass="alignLeft" /><ItemStyle Width="20%" /></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:Label ID="lblPDescription" runat="server" Height="15px" Text='<%#Eval("PDescription")%>'></asp:Label></ItemTemplate><EditItemTemplate><asp:TextBox ID="txtPDescription" Font-Size="11px" runat="server" Height="15px" Text='<%#Eval("PDescription")%>'></asp:TextBox></EditItemTemplate><HeaderTemplate>Description</HeaderTemplate><HeaderStyle CssClass="alignLeft" /><ItemStyle Width="50%" /></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:LinkButton ID="lbEdit" runat="server" CommandName="Edit" Text="Edit"></asp:LinkButton></ItemTemplate><EditItemTemplate><asp:LinkButton ID="lbUpdate" runat="server" CommandName="Update" Text="Update"></asp:LinkButton><asp:LinkButton ID="lbCancel" runat="server" CommandName="Cancel" Text="Cancel"></asp:LinkButton></EditItemTemplate><ItemStyle Width="10%" /></asp:TemplateField><asp:TemplateField><ItemTemplate><asp:LinkButton ID="lbDelete" runat="server" CommandName="Delete" Text="Delete"></asp:LinkButton></ItemTemplate><ItemStyle Width="15%" /></asp:TemplateField>
Page-57
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</Columns><EditRowStyle BackColor="#7C6F57" /><FooterStyle BackColor="White" Font-Bold="True" /><HeaderStyle BackColor="White" Font-Bold="True" /><PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Left" /></asp:GridView></td></tr></table></td></tr></table></fieldset></td></tr></table> </ContentTemplate></ATK:TabPanel><ATK:TabPanel ID="tp2" Width="100%" TabIndex="1" runat="server"><HeaderTemplate>Sub Category</HeaderTemplate><ContentTemplate><table cellpadding="0" cellspacing="0" width="70%" align="center" class="TC"><tr><td><fieldset><legend>Add Sub Category...</legend><table cellpadding="0" cellspacing="0" width="100%" bgcolor="#E0E0E0" style="padding:1px;line-height:30px;"><tr><td align="right">Product:</td><td><asp:UpdatePanel ID="up1" runat="server"><ContentTemplate><asp:DropDownList ID="ddlSCProduct" AutoPostBack="true" Width="150px" runat="server" Height="20px"></asp:DropDownList></ContentTemplate></asp:UpdatePanel></td></tr><tr><td align="right">Child Product:</td><td><asp:TextBox ID="txtSCCProduct" runat="server" Height="15px" Width="150px"></asp:TextBox></td></tr><tr><td align="right">Description:</td><td><asp:TextBox ID="txtSCDescription" runat="server" Height="15px" TextMode="MultiLine" Width="150px"></asp:TextBox></td></tr><tr><td colspan="2" align="center"><asp:Button ID="btnSPInsert" runat="server" Text="Insert" onclick="btnSPInsert_Click" /></td></tr></table></fieldset></td>
Page-58
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</tr><tr><td style="padding-top:20px;"><fieldset><legend>Category List...</legend><table cellpadding="0" cellspacing="0" width="100%"><tr><td width="100%"><table width="100%" bgcolor="#E0E0E0" cellpadding="0" style="padding:4px;" cellspacing="0"><tr><td><asp:GridView ID="gvwSProduct" runat="server" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" Width="100%" onpageindexchanging="gvwSProduct_PageIndexChanging" onrowcancelingedit="gvwSProduct_RowCancelingEdit" onrowdeleting="gvwSProduct_RowDeleting" onrowediting="gvwSProduct_RowEditing" onrowupdating="gvwSProduct_RowUpdating"><AlternatingRowStyle BackColor="White" /><Columns>
<asp:TemplateField><ItemTemplate><asp:CheckBox ID="chkSelect" runat="server" /></ItemTemplate><ItemStyle VerticalAlign="Middle" Width="5%" /></asp:TemplateField>
<asp:TemplateField><ItemTemplate><asp:HiddenField ID="hfSPId" Value='<%#Eval("SPId") %>' runat="server" /></ItemTemplate><EditItemTemplate><asp:HiddenField ID="hfSPId" Value='<%#Eval("SPId") %>' runat="server" /></EditItemTemplate></asp:TemplateField>
<asp:TemplateField><ItemTemplate><asp:Label ID="lblPName" runat="server" Height="15px" Text='<%#Eval("PName")%>'></asp:Label></ItemTemplate><EditItemTemplate><asp:UpdatePanel ID="up2" runat="server"><ContentTemplate><asp:DropDownList ID="ddlPName" AutoPostBack="true" Font-Size="11px" runat="server" Height="20px"></asp:DropDownList></ContentTemplate></asp:UpdatePanel></EditItemTemplate><HeaderTemplate>Product</HeaderTemplate><HeaderStyle CssClass="alignLeft" /><ItemStyle Width="20%" /></asp:TemplateField>
<asp:TemplateField><ItemTemplate>
Page-59
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<asp:Label ID="lblSPName" runat="server" Height="15px" Text='<%#Eval("SPName")%>'></asp:Label></ItemTemplate><EditItemTemplate><asp:TextBox ID="txtSPName" runat="server" Font-Size="11px" Height="15px" Text='<%#Eval("SPName")%>'></asp:TextBox></EditItemTemplate><HeaderTemplate>Child Product</HeaderTemplate><HeaderStyle CssClass="alignLeft" /><ItemStyle Width="20%" /></asp:TemplateField>
<asp:TemplateField><ItemTemplate><asp:Label ID="lblSPDescription" runat="server" Height="15px" Text='<%#Eval("SPDescription")%>'></asp:Label></ItemTemplate><EditItemTemplate><asp:TextBox ID="txtSPDescription" runat="server" Font-Size="11px" Height="15px" Text='<%#Eval("SPDescription")%>'></asp:TextBox></EditItemTemplate><HeaderTemplate>Description</HeaderTemplate><HeaderStyle CssClass="alignLeft" /><ItemStyle Width="50%" /></asp:TemplateField>
<asp:TemplateField><ItemTemplate><asp:LinkButton ID="lbEdit" runat="server" CommandName="Edit" Text="Edit"></asp:LinkButton></ItemTemplate><EditItemTemplate><asp:LinkButton ID="lbUpdate" runat="server" CommandName="Update" Text="Update"></asp:LinkButton><asp:LinkButton ID="lbCancel" runat="server" CommandName="Cancel" Text="Cancel"></asp:LinkButton></EditItemTemplate><ItemStyle Width="10%" /></asp:TemplateField>
<asp:TemplateField><ItemTemplate><asp:LinkButton ID="lbDelete" runat="server" CommandName="Delete" Text="Delete"></asp:LinkButton></ItemTemplate><ItemStyle Width="15%" /></asp:TemplateField></Columns><EditRowStyle BackColor="#7C6F57" /><FooterStyle BackColor="#1C5E55" Font-Bold="True" /><HeaderStyle BackColor="White" Font-Bold="True" /><PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Left" /></asp:GridView></td></tr></table></td></tr></table></fieldset>
</td></tr>
Page-60
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</table></ContentTemplate></ATK:TabPanel>
<ATK:TabPanel ID="tp3" Width="100%" TabIndex="2" runat="server"><HeaderTemplate>Products</HeaderTemplate><ContentTemplate><table cellpadding="0" cellspacing="0" width="85%" align="center" class="TC"><tr><td><fieldset><legend>Add Item...</legend><table cellpadding="0" cellspacing="0" width="100%" bgcolor="#E0E0E0" style="padding:1px;line-height:30px;"><tr><td align="right">Product:</td><td><asp:UpdatePanel ID="up6" runat="server"><ContentTemplate><asp:DropDownList ID="ddlIPName" AutoPostBack="true" Width="150px" runat="server" Height="20px" onselectedindexchanged="ddlIPName_SelectedIndexChanged"></asp:DropDownList></ContentTemplate></asp:UpdatePanel></td></tr><tr><td align="right">Child Product:</td><td><asp:UpdatePanel ID="up4" runat="server"><ContentTemplate><asp:DropDownList ID="ddlISPName" Width="150px" runat="server" Height="20px"></asp:DropDownList></ContentTemplate></asp:UpdatePanel></td></tr><tr><td align="right">Item Name:</td><td><asp:TextBox ID="txtIName" runat="server" Height="15px" Width="150px"></asp:TextBox></td></tr><tr><td align="right" style="vertical-align:top;">Description:</td><td><asp:TextBox ID="txtIDescription" runat="server" Height="30px" TextMode="MultiLine" Width="150px"></asp:TextBox></td></tr><tr><td align="right">MRP:</td><td><asp:TextBox ID="txtIMRP" runat="server" Height="15px" Width="150px"></asp:TextBox></td></tr><tr><td align="right">Price:</td><td><asp:TextBox ID="txtIPrice" runat="server" Height="15px" Width="150px"></asp:TextBox></td></tr><tr>
Page-61
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<td align="right">Quantity:</td><td><asp:TextBox ID="txtIQuantity" runat="server" Height="15px" Width="150px"></asp:TextBox></td></tr>
<tr> <td align="right"> Image:</td> <td> <asp:FileUpload ID="fuIImage" runat="server" Height="20px" Width="180px" /> </td> </tr> <tr> <td align="center" colspan="2"> <asp:Button ID="btnIInsert" runat="server" OnClick="btnIInsert_Click" Text="Insert" /> </td> </tr>
</table></fieldset></td></tr><tr><td style="padding-top:20px;"> <fieldset> <legend>Item List...</legend> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="100%"> <table bgcolor="#E0E0E0" cellpadding="0" cellspacing="0" style="padding:4px;" width="100%"> <tr> <td> <asp:GridView ID="gvwItem" runat="server" AllowPaging="True" AutoGenerateColumns="False" GridLines="None" OnPageIndexChanging="gvwItem_PageIndexChanging" OnRowCancelingEdit="gvwItem_RowCancelingEdit" OnRowDeleting="gvwItem_RowDeleting" OnRowEditing="gvwItem_RowEditing" OnRowUpdating="gvwItem_RowUpdating" Width="100%" PageSize="5"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:CheckBox ID="chkSelect" runat="server" /> </ItemTemplate> <ItemStyle VerticalAlign="Middle" Width="3%" /> </asp:TemplateField> <asp:TemplateField>
Page-62
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<ItemTemplate> <asp:HiddenField ID="hfIId" runat="server" Value='<%#Eval("IId") %>' /> </ItemTemplate> <EditItemTemplate> <asp:HiddenField ID="hfIId" runat="server" Value='<%#Eval("IId") %>' /> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblPName" runat="server" Height="15px" Text='<%#Eval("PName")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:Label ID="lblPName" runat="server" Height="15px" Text='<%#Eval("PName")%>'></asp:Label> <asp:HiddenField ID="hfPName" runat="server" Value='<%#Eval("PName") %>' /> </EditItemTemplate> <HeaderTemplate> Product </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblSPName" runat="server" Height="15px" Text='<%#Eval("SPName")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:UpdatePanel ID="up5" runat="server"> <ContentTemplate> <asp:DropDownList ID="ddlSPName" runat="server" Font-Size="11px" Height="20px"> </asp:DropDownList> </ContentTemplate> </asp:UpdatePanel> <asp:HiddenField ID="hfSPName" runat="server" Value='<%#Eval("SPName") %>' /> </EditItemTemplate> <HeaderTemplate> Child Product </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIName" runat="server" Height="15px" Text='<%#Eval("IName")%>'></asp:Label> </ItemTemplate> <EditItemTemplate>
Page-63
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<asp:TextBox ID="txtIName" runat="server" Font-Size="11px" Height="15px" Text='<%#Eval("IName")%>'></asp:TextBox> </EditItemTemplate> <HeaderTemplate> Item Name </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIDescription" runat="server" Height="15px" Text='<%#Eval("IDescription")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtIDescription" runat="server" Font-Size="11px" Height="15px" Text='<%#Eval("IDescription")%>'></asp:TextBox> </EditItemTemplate> <HeaderTemplate> Description </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="20%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIMRP" runat="server" Height="15px" Text='<%#Eval("IMRP")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtIMRP" runat="server" Font-Size="11px" Height="15px" Text='<%#Eval("IMRP")%>'></asp:TextBox> </EditItemTemplate> <HeaderTemplate> MRP </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="8%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIPrice" runat="server" Height="15px" Text='<%#Eval("IPrice")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtIPrice" runat="server" Font-Size="11px" Height="15px"
Page-64
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Text='<%#Eval("IPrice")%>'></asp:TextBox> </EditItemTemplate> <HeaderTemplate> Price </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="8%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIQuantity" runat="server" Height="15px" Text='<%#Eval("IQuantity")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtIQuantity" runat="server" Font-Size="11px" Height="15px" Text='<%#Eval("IQuantity")%>'></asp:TextBox> </EditItemTemplate> <HeaderTemplate> Qty </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="8%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Image ID="imgIImage" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" Height="50px" ImageUrl='<%#Eval("IImage") %>' Width="50px" /> </ItemTemplate> <EditItemTemplate> <asp:FileUpload ID="fuIImage" runat="server" Font-Size="11px" Height="15px" /> </EditItemTemplate> <HeaderTemplate> Image </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="13%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="lbEdit" runat="server" CommandName="Edit" Text="Edit"></asp:LinkButton> </ItemTemplate> <EditItemTemplate>
Page-65
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<asp:LinkButton ID="lbUpdate" runat="server" CommandName="Update" Text="Update"></asp:LinkButton> <asp:LinkButton ID="lbCancel" runat="server" CommandName="Cancel" Text="Cancel"></asp:LinkButton> </EditItemTemplate> <ItemStyle Width="5%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:LinkButton ID="lbDelete" runat="server" CommandName="Delete" Text="Delete"></asp:LinkButton> </ItemTemplate> <ItemStyle Width="5%" /> </asp:TemplateField> </Columns> <EditRowStyle BackColor="#7C6F57" /> <FooterStyle BackColor="#1C5E55" Font-Bold="True" /> <HeaderStyle BackColor="White" Font-Bold="True" /> <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Left" /> </asp:GridView> </td> </tr> </table> </td> </tr> </table> </fieldset> </td></tr></table></fieldset> </td> </tr></table></ContentTemplate></ATK:TabPanel></ATK:TabContainer> </td></tr></table></td></tr></table>
</td></tr></table></asp:Content>
Web Page Name: ShowItems.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ShowItems.aspx.cs" Inherits="ShowItems" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
Page-66
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<link rel="Stylesheet" type="text/css" href="StyleSheet.css" /></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div id="d-top"> Featured Products</div><table cellpadding="0" style="padding-left:4px;padding-right:4px;" cellspacing="0" width="100%"><tr><td class="itemp"><fieldset id="fieldsetDList" runat="server" width="80%" class="tblOuter"><asp:DataList ID="dList" GridLines="Both" runat="server" bgcolor="#E0E0E0" RepeatColumns="3" RepeatDirection="Horizontal" Width="100%" onitemcommand="dList_ItemCommand"><ItemTemplate><table cellpadding="0" cellspacing="0" width="100%" style="padding:7px;line-height:30px;"><tr><td style="vertical-align:middle;"><a href="#" class="aUnderline"><asp:Image ID="imgImage" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" Height="110px" ImageUrl='<%#Eval("IImage") %>' Width="80px" /></a></td>
<td style="vertical-align:top;width:100%; padding:7px;"><table cellpadding="0" cellspacing="0" width="100%"><tr><td style="vertical-align:top;"><asp:HiddenField ID="hfIId" Value='<%#Eval("IId") %>' runat="server" /><a href="#" class="a"><asp:Label ID="lblIName" CssClass="iName" Text='<%#Eval("IName") %>' runat="server"></asp:Label></a></td></tr><tr><td class="detail">MRP: <asp:Label ID="lblIMRP" Font-Strikeout="true" Text='<%#Eval("IMRP") %>' runat="server" ForeColor="Red"></asp:Label></td></tr><tr><td class="detail">BB Price: <asp:Label ID="lblIPrice" Text='<%#Eval("IPrice") %>' runat="server" ForeColor="Red"></asp:Label></td></tr><tr><td><asp:ImageButton ID="ibShowDetails" CommandName="ShowDetails" ImageUrl="~/Img/detail.jpg" runat="server" /></td></tr><tr><td style="padding-top:10px;">
Page-67
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<asp:ImageButton ID="ibAddtocart" ImageUrl="~/Img/addcart.jpg" CommandName="AddToCart" runat="server" /></td></tr>
</table>
</td></tr></table></ItemTemplate></asp:DataList></fieldset>
</td></tr><tr><td align="right" style="padding:7px;"><asp:LinkButton ID="lbPrev" Text="Previous" runat="server" CssClass="aUnderline" onclick="lbPrev_Click"></asp:LinkButton>|<asp:LinkButton ID="lbNext" Text="Next" runat="server" CssClass="aUnderline" onclick="lbNext_Click"></asp:LinkButton></td></tr></table></asp:Content>
Web Page Name: ShowDetails.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ShowDetails.aspx.cs" Inherits="ShowDetails" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"><link rel="Stylesheet" type="text/css" href="StyleSheet.css" /></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div id="d-top"> Feature Products</div> <div class="clear"></div><table cellpadding="0" cellspacing="0" width="100%"><tr><td><table cellpadding="0" cellspacing="0" width="70%" class="tblOuter" align="center"><tr><td><fieldset><legend>Shopping cart</legend><table cellpadding="0" cellspacing="0" width="100%" bgcolor="#E0E0E0" style="padding:7px;line-height:30px;"><tr><td style="vertical-align:middle;"><a href="#" class="aUnderline"><asp:Image ID="imgIImage" runat="server" BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" Height="140px"
Page-68
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Width="180px" /></a>
</td><td style="vertical-align:top;width:100%; padding:7px;"><table cellpadding="0" cellspacing="0" width="100%"><tr><td><a href="#" class="a"><asp:Label Font-Size="13" ID="lblIName" runat="server" CssClass="iName" ></asp:Label><asp:HiddenField ID="hfIId" runat="server" /></a></td></tr><tr><td>Description: <asp:Label ID="lblIDescription" runat="server"></asp:Label></td></tr><tr><td>MRP: <asp:Label ID="lblIMRP" Font-Strikeout="true" runat="server" ForeColor="Red"></asp:Label></td></tr><tr><td>BB Price: <asp:Label ID="lblIPrice" runat="server" ForeColor="Red"></asp:Label></td></tr><tr><td style="padding-top:10px;"><asp:ImageButton ID="ibAddtocart" ImageUrl="~/Img/addtocart.gif" CommandName="AddToCart" runat="server" Height="25px" Width="100px" onclick="ibAddtocart_Click"/></td></tr></table></td></tr></table></fieldset></td></tr></table></td></tr></table></asp:Content>
Web Page Name: ShoppingCart.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ShoppingCart.aspx.cs" Inherits="ShoppingCart" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <link rel="Stylesheet" type="text/css" href="StyleSheet.css" />
Page-69
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div id="d-top"> View Cart</div> <table cellpadding="0" cellspacing="0" width="100%"><tr><td><table cellpadding="0" cellspacing="0" width="100%" class="tblOuter" align="center"><tr><td style="padding-top:20px;">
<fieldset> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="100%"> <table bgcolor="#E0E0E0" cellpadding="0" cellspacing="0" style="padding:4px;" width="100%"> <tr> <td> <asp:GridView ID="gvwItem" runat="server" AutoGenerateColumns="False" GridLines="None" Width="100%" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" onrowcommand="gvwItem_RowCommand" onrowdeleting="gvwItem_RowDeleting"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:HiddenField ID="hfIId" runat="server" Value='<%#Eval("IId") %>' /> </ItemTemplate> <EditItemTemplate> <asp:HiddenField ID="hfIId" runat="server" Value='<%#Eval("IId") %>' /> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIName" runat="server" Height="15px" Text='<%#Eval("IName")%>'></asp:Label> </ItemTemplate> <HeaderTemplate> Product Name </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="30%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="txtIQuantity" Text='<%#Eval("IQuantity")%>' runat="server" Width="35px" Font-Size="11px" Height="15px"></asp:TextBox>
Page-70
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</ItemTemplate> <HeaderTemplate> Quantity </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIMRP" ForeColor="Red" Font-Strikeout="true" runat="server" Height="15px" Text='<%#Eval("IMRP")%>'></asp:Label> </ItemTemplate> <HeaderTemplate> MRP </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="14%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIPrice" runat="server" Height="15px" Text='<%#Eval("IPrice")%>'></asp:Label> </ItemTemplate> <HeaderTemplate> Offer Price </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="13%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblTotal" Text='<%#Eval("IPrice") %>' runat="server" Height="15px" ></asp:Label> </ItemTemplate> <HeaderTemplate> Total </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="13%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Button ID="btnReCalc" Text="Re-Calculate" CommandName="Re-Calculate" runat="server" /> </ItemTemplate> <HeaderTemplate> Re-Calculate </HeaderTemplate> <HeaderStyle CssClass="alignLeft" />
Page-71
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
<ItemStyle Width="10%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Button ID="btnDelete" Text="Delete" CommandName="Delete" runat="server" /> </ItemTemplate> <HeaderTemplate> Delete </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> </Columns> <FooterStyle BackColor="White" ForeColor="#000066" /> <RowStyle ForeColor="#000066" /> <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /> <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /> </asp:GridView> </td> </tr> </table> </td> </tr> <tr> <td> <div id="finish"> <div id="f-total"> <asp:Label ID="Label3" runat="server" Text="Total Amount - Rs."></asp:Label> <asp:Label ID="lblTot" runat="server"></asp:Label> </div> <div id="f-btn"> <asp:Button ID="btnCheckOut" runat="server" Text="Check Out" onclick="btnCheckOut_Click" /> </div> </div> </td> </tr> </table> </fieldset> </td></tr>
</table></td></tr></table></asp:Content>
Page-72
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Web Page Name: ShippingDetails.aspx
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ShippingDetails.aspx.cs" Inherits="ShippingDetails" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div id="d-top"> Shipping Details</div> <table cellpadding="0" cellspacing="0" width="100%"><tr><td><table cellpadding="0" cellspacing="0" width="100%" class="tblOuter" align="center"><tr><td style="padding-top:20px;">
<fieldset> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="100%"> <table bgcolor="#E0E0E0" cellpadding="0" cellspacing="0" style="padding:4px;" width="100%"> <tr> <td> <asp:GridView ID="gvwSDetail" runat="server" AutoGenerateColumns="False" GridLines="None" Width="100%" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" onrowcommand="gvwItem_RowCommand" onrowdeleting="gvwItem_RowDeleting"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:TemplateField> <ItemTemplate> <asp:HiddenField ID="hfIId" runat="server" Value='<%#Eval("IId") %>' /> </ItemTemplate> <EditItemTemplate> <asp:HiddenField ID="hfIId" runat="server" Value='<%#Eval("IId") %>' /> </EditItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIName" runat="server" Height="15px" Text='<%#Eval("IName")%>'></asp:Label> </ItemTemplate> <HeaderTemplate> Product Name </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="30%" />
Page-73
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:TextBox ID="txtIQuantity" Text='<%#Eval("IQuantity")%>' runat="server" Width="35px" Font-Size="11px" Height="15px"></asp:TextBox> </ItemTemplate> <HeaderTemplate> Quantity </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIMRP" ForeColor="Red" Font-Strikeout="true" runat="server" Height="15px" Text='<%#Eval("IMRP")%>'></asp:Label> </ItemTemplate> <HeaderTemplate> MRP </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="14%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblIPrice" runat="server" Height="15px" Text='<%#Eval("IPrice")%>'></asp:Label> </ItemTemplate> <HeaderTemplate> Offer Price </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="13%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="lblTotal" Text='<%#Eval("IPrice") %>' runat="server" Height="15px" ></asp:Label> </ItemTemplate> <HeaderTemplate> Total </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="13%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Button ID="btnReCalc" Text="Re-Calculate" CommandName="Re-Calculate"
Page-74
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
runat="server" /> </ItemTemplate> <HeaderTemplate> Re-Calculate </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Button ID="btnDelete" Text="Delete" CommandName="Delete" runat="server" /> </ItemTemplate> <HeaderTemplate> Delete </HeaderTemplate> <HeaderStyle CssClass="alignLeft" /> <ItemStyle Width="10%" /> </asp:TemplateField> </Columns> <FooterStyle BackColor="White" ForeColor="#000066" /> <RowStyle ForeColor="#000066" /> <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /> <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /> </asp:GridView> </td> </tr> </table> </td> </tr> <tr> <td> <div id="finish"> <div id="iQuan"> <asp:Label ID="Label3" runat="server" Text="Total Amt: "></asp:Label> <asp:Label ID="lblTot" runat="server"></asp:Label> </div> <div id="f-total"> <asp:Label ID="Label1" runat="server" Text="Total Item: "></asp:Label> <asp:Label ID="lblTotQuantity" runat="server" Text="0"></asp:Label> </div> </div> </td> </tr> </table> </fieldset>
Page-75
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</td></tr>
<tr><td><fieldset><legend>Shipping Detail</legend><table cellpadding="0" cellspacing="0" width="100%" bgcolor="#E0E0E0" style="padding:1px;line-height:30px;"><tr><td align="right">First Name:</td><td><asp:TextBox ID="txtFName" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFName" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter First Name</asp:RequiredFieldValidator></td></tr><tr><td align="right">Last Name:</td><td><asp:TextBox ID="txtLName" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtLName" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter Last Name</asp:RequiredFieldValidator></td></tr><tr><td align="right">Email-Id:</td><td><asp:TextBox ID="txtEId" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtEId" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter Email-Id</asp:RequiredFieldValidator></td></tr><tr><td align="right">Contact:</td><td><asp:TextBox ID="txtContact" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtContact" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter your Contact</asp:RequiredFieldValidator></td></tr><tr><td align="right">Address:</td><td><asp:TextBox ID="txtAddress" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
Page-76
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
ControlToValidate="txtAddress" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter Shipping Address</asp:RequiredFieldValidator></td></tr><tr><td align="right">City:</td><td><asp:TextBox ID="txtCity" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtCity" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter City</asp:RequiredFieldValidator></td></tr><tr><td align="right">State:</td><td><asp:TextBox ID="txtState" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtState" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter State</asp:RequiredFieldValidator></td></tr><tr><td align="right">Country:</td><td><asp:TextBox ID="txtCountry" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtCountry" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter Country</asp:RequiredFieldValidator></td></tr><tr><td align="right">Pin Code:</td><td><asp:TextBox ID="txtPinCode" runat="server" Height="18px"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtPinCode" ErrorMessage="RequiredFieldValidator" CssClass="errMsg">* Enter Pin Code</asp:RequiredFieldValidator></td></tr>
<tr><td align="right"><asp:Button ID="btnShip" Text="Ship To Above Address" runat="server" Height="20px" onclick="btnShip_Click" /></td><td><asp:Label ID="lblErrMsg" runat="server" CssClass="errMsg"></asp:Label></td></tr></table>
Page-77
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
</fieldset></td></tr>
</table></td></tr></table></asp:Content>
Page-78
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
6.3 CODING DETAILS AND CODE EFFICIENCY
Class Name: Mydbs.cs
using System;using System.Data;using System.Configuration;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Collections;using System.Data.SqlClient;
/// <summary>/// This class is a wrapper for SQL 2005 all Database drivers,/// generic methods are placed here/// </summary>public class Mydbs{ SqlConnection con; SqlCommand com; SqlDataAdapter da; DataSet ds; DataTable dt; SqlParameter p1, p2,p3,p4,p5; #region Constructor public Mydbs(String constr) //connection Name from webConfig
{con = new SqlConnection();
con.ConnectionString = ConfigurationManager.ConnectionStrings[constr].ToString();
} #endregion;
#region Public Methods
/// <summary> /// This is to retrive all data from database into datatable /// </summary> /// <param name="TblName">string, Table name</param> /// <returns>datatable</returns> public DataTable ShowAll(String TblName) { dt=new DataTable(); da = new SqlDataAdapter("usp_ShowAll", con); da.SelectCommand.CommandType = CommandType.StoredProcedure; da.SelectCommand.Parameters.Add("@TblName",TblName); da.Fill(dt); return dt; }
Page-79
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
/// <summary> /// This is to retrive data from table according to condition /// </summary> /// <param name="TblName">String, Table Name</param> /// <param name="ClmListWithValue">Hssh Table,Column list</param> /// <returns></returns> public DataTable ShowAllWithCondition(String TblName,Hashtable ClmListWithValue) { string str1 = ""; string str2 = "";
dt = new DataTable(); da = new SqlDataAdapter("usp_ShowAllWithCondition", con); da.SelectCommand.CommandType = CommandType.StoredProcedure; da.SelectCommand.Parameters.Add("@tblnm", TblName); foreach (string key in ClmListWithValue.Keys) { str1 = str1 + key + "^"; } foreach (string value in ClmListWithValue.Values) { str2 = str2 + value + "^"; } da.SelectCommand.Parameters.Add("@clmlst", str1); da.SelectCommand.Parameters.Add("@clmvls", str2); da.Fill(dt); return dt; }
/// <summary> /// This is to insert data into database /// </summary> /// <param name="TblName">String,Table Name</param> /// <param name="clmlst">Array List, Column list</param> public void InsertFunc(String TblName, ArrayList clmlst) { string str=""; com = new SqlCommand("usp_Insert", con); com.CommandType = CommandType.StoredProcedure; p1 = new SqlParameter("@tblnm", SqlDbType.Text, 98); p2 = new SqlParameter("@clmlst", SqlDbType.Text, 8000); p1.Value = TblName; for (int i = 0; i < clmlst.Count; i++) { str =str+ clmlst[i] + "^"; } p2.Value = str; com.Parameters.Add(p1); com.Parameters.Add(p2); con.Open(); com.ExecuteNonQuery(); con.Close(); }
/// <summary> /// This is to update database by passing parameters /// </summary> /// <param name="TblName">String, Table Name</param> /// <param name="ToBeUpdatedColumnListWithValue">Hash Table, To be updated column list</param>
Page-80
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
/// <param name="ConditionColumnName">String, Condition column name</param> /// <param name="ConditionColumnValue">String, Condition column value</param> public void UpdateFunc(String TblName, Hashtable ToBeUpdatedColumnListWithValue, String ConditionColumnName, String ConditionColumnValue) { string str1 = ""; string str2 = ""; com = new SqlCommand("usp_Update", con); com.CommandType = CommandType.StoredProcedure; p1 = new SqlParameter("@tblnm", SqlDbType.Text, 98); p2 = new SqlParameter("@clmlst", SqlDbType.Text, 8000); p3 = new SqlParameter("@clmvls", SqlDbType.Text, 8000); p4 = new SqlParameter("@clmnm", SqlDbType.Text, 900); p5 = new SqlParameter("@clmlval", SqlDbType.Text, 900); p1.Value = TblName; foreach (String key in ToBeUpdatedColumnListWithValue.Keys) { str1 = str1 + key+"^"; } foreach (String value in ToBeUpdatedColumnListWithValue.Values) { str2 = str2 + value + "^"; } p2.Value = str1; p3.Value = str2; p4.Value = ConditionColumnName; p5.Value = ConditionColumnValue; com.Parameters.Add(p1); com.Parameters.Add(p2); com.Parameters.Add(p3); com.Parameters.Add(p4); com.Parameters.Add(p5); con.Open(); com.ExecuteNonQuery(); con.Close(); }
/// <summary> /// This is to delete data from database /// </summary> /// <param name="TableName">String, Table name</param> /// <param name="ConditionColumnName">String, Condition Column name</param> /// <param name="ConditionColumnValue">String, Condition column value</param> public void DeleteFunc(String TableName, String ConditionColumnName, String ConditionColumnValue) { com = new SqlCommand("usp_Delete", con); com.CommandType = CommandType.StoredProcedure; p1 = new SqlParameter("@tblnm", SqlDbType.Text, 98); p2 = new SqlParameter("@clmnm", SqlDbType.Text, 900); p3 = new SqlParameter("@clmlval", SqlDbType.Text, 900); p1.Value = TableName; p2.Value = ConditionColumnName; p3.Value = ConditionColumnValue;
Page-81
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
com.Parameters.Add(p1); com.Parameters.Add(p2); com.Parameters.Add(p3); con.Open(); com.ExecuteNonQuery(); con.Close(); }
/// <summary> /// This is to retrive data from multiple tables using join /// </summary> /// <param name="FirstTableName">String, First Table name</param> /// <param name="SecondTableName">String, Second table name</param> /// <param name="ConditionFirstTableColumnName">String, condition for first table</param> /// <param name="ConditionSecondTableColumnName">String, Condition for second table</param> /// <returns></returns> public DataTable ShowAllUsingJoin(string FirstTableName, string SecondTableName, String ConditionFirstTableColumnName, String ConditionSecondTableColumnName) { dt = new DataTable(); da = new SqlDataAdapter("usp_ShowAllJoin", con); da.SelectCommand.CommandType = CommandType.StoredProcedure; da.SelectCommand.Parameters.Add("@tblnm1", FirstTableName); da.SelectCommand.Parameters.Add("@tblnm2", SecondTableName); da.SelectCommand.Parameters.Add("@clm1", ConditionFirstTableColumnName); da.SelectCommand.Parameters.Add("@clm2", ConditionSecondTableColumnName); da.Fill(dt); return dt; }
/// <summary> /// This is to retrive data from multiple tables using join with conditions /// </summary> /// <param name="FirstTableName">String, First table name</param> /// <param name="SecondTableName">String, Second table name</param> /// <param name="ConditionFirstTableColumnName">String, condition for first table</param> /// <param name="ConditionSecondTableColumnName">String, Condition for second table</param> /// <param name="ClmListWithValue">Hash Table, column list with values</param> /// <returns></returns> public DataTable ShowAllUsingJoinWithCondition(string FirstTableName, string SecondTableName, String ConditionFirstTableColumnName, String ConditionSecondTableColumnName, Hashtable ClmListWithValue) { string str1 = ""; string str2 = ""; dt = new DataTable(); da = new SqlDataAdapter("usp_ShowAllJoinWithCondition", con); da.SelectCommand.CommandType = CommandType.StoredProcedure; da.SelectCommand.Parameters.Add("@tblnm1", FirstTableName); da.SelectCommand.Parameters.Add("@tblnm2", SecondTableName);
Page-82
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
da.SelectCommand.Parameters.Add("@clm1", ConditionFirstTableColumnName); da.SelectCommand.Parameters.Add("@clm2", ConditionSecondTableColumnName); foreach (string key in ClmListWithValue.Keys) { str1 = str1 + key + "^"; } foreach (string value in ClmListWithValue.Values) { str2 = str2 + value + "^"; } da.SelectCommand.Parameters.Add("@clmlst", str1); da.SelectCommand.Parameters.Add("@clmvls", str2); da.Fill(dt); return dt; }
/// <summary> /// This is to retrive data from multiple tables using multiple join conditions /// </summary> /// <param name="FirstTableName">String, Table name</param> /// <param name="SecondTableName">String, first table name</param> /// <param name="ThirdTableName">String,second table name </param> /// <param name="FirstConditionFirstTableColumnName">String, Column name of first table</param> /// <param name="SecondConditionSecondTableColumnName">String, Column name of second table</param> /// <param name="FirstConditionSecondTableColumnName">String,Column name of first table </param> /// <param name="SecondConditionThirdTableColumnName">String, Column name of second table</param> /// <returns></returns> public DataTable ShowAllUsingMultipleJoin(string FirstTableName, string SecondTableName, string ThirdTableName, string FirstConditionFirstTableColumnName, string SecondConditionSecondTableColumnName, string FirstConditionSecondTableColumnName, string SecondConditionThirdTableColumnName) { dt = new DataTable(); da = new SqlDataAdapter("usp_ShowMultipleJoin", con); da.SelectCommand.CommandType = CommandType.StoredProcedure; da.SelectCommand.Parameters.Add("@tblnm1", FirstTableName); da.SelectCommand.Parameters.Add("@tblnm2", SecondTableName); da.SelectCommand.Parameters.Add("@tblnm3", ThirdTableName);
da.SelectCommand.Parameters.Add("@clm1", FirstConditionFirstTableColumnName); da.SelectCommand.Parameters.Add("@clm2", SecondConditionSecondTableColumnName);
da.SelectCommand.Parameters.Add("@clm3", FirstConditionSecondTableColumnName); da.SelectCommand.Parameters.Add("@clm4", SecondConditionThirdTableColumnName); da.Fill(dt); return dt;
Page-83
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
}
#endregion;
}
Web Page: Masterpage.master.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.Configuration;using System.Xml.Linq;using System.Data.SqlClient;
public partial class MasterPage : System.Web.UI.MasterPage{ MenuItem ChildItem; SqlConnection MyCon = new SqlConnection(WebConfigurationManager.ConnectionStrings["constr"].ConnectionString); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string cmd1 = "select PId,Pname from Product"; string cmd2 = "select SPId,SPName,PId from SubProduct"; SqlDataAdapter ad = new SqlDataAdapter(cmd1, MyCon); DataSet ds = new DataSet(); ad.Fill(ds, "Product"); ad.SelectCommand.CommandText = cmd2; ad.Fill(ds, "SubProduct");
DataRelation relation = new DataRelation("ParentChild", ds.Tables["Product"].Columns["PId"], ds.Tables["SubProduct"].Columns["PId"], true); ds.Relations.Add(relation);
foreach (DataRow row in ds.Tables["Product"].Rows) { MenuItem MainItem = new MenuItem(row["PName"].ToString(), row["PId"].ToString()); Menu1.Items.Add(MainItem); DataRow[] ChildRows = row.GetChildRows(relation);
foreach (DataRow ChildRow in ChildRows) { ChildItem = new MenuItem(ChildRow["SPName"].ToString(), ChildRow["SPId"].ToString()); MainItem.ChildItems.Add(ChildItem); } }
Page-84
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
} }
protected void Menu1_MenuItemClick1(object sender, MenuEventArgs e) { string str = e.Item.Value.ToString(); Response.Redirect("~/ShowItems.aspx?SPId=" + str + ""); }}
Web Page: Home.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;
public partial class Home : System.Web.UI.Page{ Mydbs db; DataTable dt; PagedDataSource obj; static int currentpage = 0;
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bindDList(); } } void bindDList() { db = new Mydbs("constr"); dt = db.ShowAll("Item"); obj = new PagedDataSource(); try { obj.AllowPaging = true; obj.PageSize = 6; obj.DataSource = dt.DefaultView; obj.CurrentPageIndex = currentpage; lbPrev.Enabled = !obj.IsFirstPage; lbNext.Enabled = !obj.IsLastPage; dList.DataSource = obj; dList.DataBind(); } catch (Exception) { } }
Page-85
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
protected void dList_ItemCommand(object source, DataListCommandEventArgs e) { HiddenField hf; if (e.CommandName == "ShowDetails" || e.CommandName == "AddToCart") { hf = (HiddenField)e.Item.FindControl("hfIId"); Session["HomeSessionIId"] = hf.Value; Response.Redirect("ShowDetails.aspx"); }
} protected void lbPrev_Click(object sender, EventArgs e) { currentpage = currentpage - 1; bindDList(); } protected void lbNext_Click(object sender, EventArgs e) { currentpage = currentpage + 1; bindDList(); }}
Web Page: UserRegister.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class UserRegister : System.Web.UI.Page{ Mydbs db; DataTable dt; ArrayList arr; Hashtable ht; protected void Page_Load(object sender, EventArgs e) { } protected void btnRegister_Click(object sender, EventArgs e) { db = new Mydbs("constr"); dt=new DataTable(); ht = new Hashtable(); ht.Add("UserId", txtUserId.Text); dt = db.ShowAllWithCondition("Usr",ht); if (txtUserId.Text == "") { lblUserIdCheck.Text = "* Please Enter UserId"; } else if (dt.Rows.Count>0)
Page-86
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
{ lblUserIdCheck.Text = "* User Id already exist!!"; } else { arr = new ArrayList(); arr.Add(txtUserId.Text); arr.Add(txtAlternateEmail.Text); arr.Add(txtFName.Text); arr.Add(txtLName.Text); arr.Add(txtPassword.Text); if (rdMale.Checked == true) arr.Add(rdMale.Text); else arr.Add(rdFemale.Text); arr.Add(ddlCountry.SelectedValue); arr.Add(ddlState.SelectedValue); arr.Add(txtCity.Text); arr.Add(txtAddress.Text); arr.Add(txtContact.Text); arr.Add(txtHintQ.Text); arr.Add(txtHintA.Text); db.InsertFunc("Usr", arr);
txtUserId.Text = ""; txtAlternateEmail.Text = ""; txtFName.Text = ""; txtLName.Text = ""; txtPassword.Text = ""; txtCPassword.Text = ""; rdMale.Checked = true; ddlCountry.SelectedValue = "India"; ddlState.SelectedValue = "Delhi"; txtCity.Text = ""; txtAddress.Text = ""; txtContact.Text = ""; txtHintQ.Text = ""; txtHintA.Text = ""; } }}
Web Page: AdminLogin.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class AdminLogin : System.Web.UI.Page{ Mydbs db;
Page-87
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
DataTable dt;
protected void Page_Load(object sender, EventArgs e) { }
protected void btnLogin_Click(object sender, ImageClickEventArgs e) { Mydbs db = new Mydbs("constr"); dt = new DataTable(); dt = db.ShowAll("Admin"); int f = 0; if (txtPassword.Text.Trim().ToString().Length > 3) { foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == txtUserId.Text && dr[5].ToString() == txtPassword.Text) { Session["AdminSession"] = txtUserId.Text; Session["AdminFName"] = dr[3].ToString(); Response.Redirect("ProductEntry.aspx"); } } if (f == 0) { lblErrMsg.Text = "Invalid User Name or Password!!"; txtUserId.Focus(); } } else lblErrMsg.Text = "Password should be minimum Four Characters!!"; }}
Web Page: UserLogin.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page{ Mydbs db; DataTable dt; protected void Page_Load(object sender, EventArgs e) { }
protected void btnLogin_Click1(object sender, ImageClickEventArgs e) { db=new Mydbs("constr");
Page-88
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
dt=db.ShowAll("Usr"); int flag = 0; if (txtPassword.Text.Trim().ToString().Length > 3) { foreach (DataRow dr in dt.Rows) { if (txtUserId.Text == dr[1].ToString() && txtPassword.Text == dr[5].ToString()) { Session["UserSession"] = txtUserId.Text; Session["UserSessionUId"] = dr[0].ToString(); Session["UserFName"] = dr[3].ToString(); Response.Redirect("ShippingDetails.aspx"); } } if (flag == 0) { lblErrMsg.Text = "Invalid User Name or Password!!"; txtUserId.Focus(); } } else lblErrMsg.Text = "Password should be minimum Four Characters!!"; } }
Web Page: ChangePasswordAdmin.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class ChangePassword1 : System.Web.UI.Page{ Mydbs db; protected void Page_Load(object sender, EventArgs e) { } protected void btnChangePassword_Click(object sender, EventArgs e) { db = new Mydbs("constr"); DataTable dt = db.ShowAll("Admin"); Hashtable ht = new Hashtable(); int flag = 0; foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == txtAdminId.Text && dr[5].ToString() == txtOldPassword.Text) { ht.Add("AdminId", dr[1].ToString());
Page-89
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
ht.Add("AlternateEmail", dr[2].ToString()); ht.Add("FName", dr[3].ToString()); ht.Add("LName", dr[4].ToString()); ht.Add("Password", txtNewPassword.Text); ht.Add("Gender", dr[6].ToString()); ht.Add("Country", dr[7].ToString()); ht.Add("State", dr[8].ToString()); ht.Add("City", dr[9].ToString()); ht.Add("Address", dr[10].ToString()); ht.Add("Contact", dr[11].ToString()); ht.Add("HintQ", dr[12].ToString()); ht.Add("HintA", dr[13].ToString()); db.UpdateFunc("Admin", ht, "AId", dr[0].ToString());
txtAdminId.Text = ""; txtOldPassword.Text = ""; txtNewPassword.Text = ""; txtConformPassword.Text = ""; lblErrorMsg.Text = "Password has been changed sucessfully!!"; lblErrorMsg.CssClass = "sucessMsg"; flag = 1; break; } } if (flag == 0) { lblErrorMsg.Text = "Please ensure correct data!!"; } }}
Web Page: ChangePasswordUser.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class Admin_ChangePassword : System.Web.UI.Page{ Mydbs db; DataTable dt; Hashtable ht; protected void Page_Load(object sender, EventArgs e) { } protected void btnChangePassword_Click(object sender, EventArgs e) { db = new Mydbs("constr"); DataTable dt = db.ShowAll("Usr"); Hashtable ht = new Hashtable();
Page-90
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
int flag = 0; foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == txtUserId.Text && dr[5].ToString() == txtOldPassword.Text) { ht.Add("UserId", dr[1].ToString()); ht.Add("AlternateEmail", dr[2].ToString()); ht.Add("FName", dr[3].ToString()); ht.Add("LName", dr[4].ToString()); ht.Add("Password", txtNewPassword.Text); ht.Add("Gender", dr[6].ToString()); ht.Add("Country", dr[7].ToString()); ht.Add("State", dr[8].ToString()); ht.Add("City", dr[9].ToString()); ht.Add("Address", dr[10].ToString()); ht.Add("Contact", dr[11].ToString()); ht.Add("HintQ", dr[12].ToString()); ht.Add("HintA", dr[13].ToString());
db.UpdateFunc("Usr", ht, "UId", dr[0].ToString()); lblErrorMsg.Text = "Password has been changed sucessfully!!"; lblErrorMsg.CssClass = "sucessMsg"; flag = 1; break; } } if (flag == 0) { lblErrorMsg.Text = "Please ensure correct data!!"; } }}
Web Page: ForgetPasswordUser.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class ForgetPassword : System.Web.UI.Page{ Mydbs db; protected void Page_Load(object sender, EventArgs e) { divUpdate.Visible = false;
} protected void btnSubmit_Click(object sender, EventArgs e)
Page-91
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
{ db = new Mydbs("constr"); DataTable dt = db.ShowAll("Usr"); Hashtable ht = new Hashtable();
int flag = 0; foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == txtUserId.Text && dr[13].ToString() == txtHintA.Text) { flag = 1; divSubmit.Visible =false ; divUpdate.Visible =true; divErrMsg.Visible = false; break; } } if (flag == 0) { lblErrMsg.Text = "Please ensure correct data!!"; } }
protected void btnUpdate_Click(object sender, EventArgs e) { db = new Mydbs("constr"); DataTable dt = db.ShowAll("Usr"); Hashtable ht = new Hashtable();
int flag = 0; foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == txtUserId.Text && dr[13].ToString() == txtHintA.Text) { ht.Add("UserId", dr[1].ToString()); ht.Add("AlternateEmail", dr[2].ToString()); ht.Add("FName", dr[3].ToString()); ht.Add("LName", dr[4].ToString()); ht.Add("Password", txtPassword.Text); ht.Add("Gender", dr[6].ToString()); ht.Add("Country", dr[7].ToString()); ht.Add("State", dr[8].ToString()); ht.Add("City", dr[9].ToString()); ht.Add("Address", dr[10].ToString()); ht.Add("Contact", dr[11].ToString()); ht.Add("HintQ", dr[12].ToString()); ht.Add("HintA", dr[13].ToString());
db.UpdateFunc("Usr", ht, "UId", dr[0].ToString()); lblSucessMsg.Text = "Password has been changed sucessfully!!"; divSubmit.Visible = false; divUpdate.Visible = true; divErrMsg.Visible = false; flag = 1; break; } }
Page-92
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
if (flag == 0) { divSubmit.Visible = true; divUpdate.Visible = false; divErrMsg.Visible = true; flag = 1; lblErrMsg.Text = "Please ensure correct data!!"; } }}
Web Page: ProductEntry.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Collections;using System.Xml.Linq;
public partial class ProductEntry : System.Web.UI.Page{ Mydbs db; DataTable dt,dt1,dt2; Hashtable ht1; protected void Page_Load(object sender, EventArgs e) { if (Session["AdminSession"] == null) { Response.Redirect("AdminLogin.aspx"); } if (!IsPostBack) { bindGrid(); bindDDLSCProduct(); bindDDLIPName(); bindDDLISPName(); } }
void bindGrid() { db = new Mydbs("constr"); dt = db.ShowAll("Product"); gvwProduct.DataSource = dt; gvwProduct.DataBind();
dt1 = db.ShowAllUsingJoin("Product", "SubProduct", "Product.PId", "SubProduct.PId"); gvwSProduct.DataSource = dt1; gvwSProduct.DataBind();
Page-93
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
dt2 = db.ShowAllUsingMultipleJoin("Product", "SubProduct", "Item", "Product.PId", "SubProduct.PId","SubProduct.SPId", "Item.SPId"); gvwItem.DataSource = dt2; gvwItem.DataBind(); } void bindDDLSCProduct() { db = new Mydbs("constr"); dt = new DataTable(); dt = db.ShowAll("Product"); ddlSCProduct.DataSource = dt; ddlSCProduct.DataTextField = "PName"; ddlSCProduct.DataBind(); }
void bindDDLIPName() { db = new Mydbs("constr"); dt = new DataTable(); dt = db.ShowAll("Product"); ddlIPName.DataSource = dt; ddlIPName.DataTextField = "PName"; ddlIPName.DataBind(); }
void bindDDLISPName() { db = new Mydbs("constr"); dt = new DataTable(); ht1=new Hashtable(); ht1.Add("PName",ddlIPName.SelectedValue); dt= db.ShowAllUsingJoinWithCondition("Product", "SubProduct", "Product.PId", "SubProduct.PId", ht1); ddlISPName.DataSource = dt; ddlISPName.DataTextField = "SPName"; ddlISPName.DataBind(); }
protected void ddlIPName_SelectedIndexChanged(object sender, EventArgs e) { bindDDLISPName(); } protected void gvwProduct_PageIndexChanging(object sender, GridViewPageEventArgs e) { gvwProduct.PageIndex = e.NewPageIndex; bindGrid(); tc1.ActiveTabIndex = 0; }
protected void gvwProduct_RowEditing(object sender, GridViewEditEventArgs e) { gvwProduct.EditIndex= e.NewEditIndex; bindGrid(); tc1.ActiveTabIndex = 0; }
Page-94
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
protected void gvwProduct_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { gvwProduct.EditIndex= -1; bindGrid(); tc1.ActiveTabIndex = 0; }
protected void btnPInsert_Click(object sender, EventArgs e) { db = new Mydbs("constr"); ArrayList arr = new ArrayList(); arr.Add(txtPName.Text); arr.Add(txtPDescription.Text); db.InsertFunc("Product", arr); txtPName.Text = ""; txtPDescription.Text = ""; bindGrid(); } protected void gvwProduct_RowUpdating(object sender, GridViewUpdateEventArgs e) { CheckBox c1 = (CheckBox)gvwProduct.Rows[e.RowIndex].FindControl("chkSelect"); if (c1.Checked == true) { db = new Mydbs("constr"); TextBox t1 = (TextBox)gvwProduct.Rows[e.RowIndex].FindControl("txtPName"); TextBox t2 = (TextBox)gvwProduct.Rows[e.RowIndex].FindControl("txtPDescription"); HiddenField h1 = (HiddenField)gvwProduct.Rows[e.RowIndex].FindControl("hfPId"); ht1 = new Hashtable(5); ht1.Add("PName", t1.Text); ht1.Add("PDescription", t2.Text); db.UpdateFunc("Product", ht1, "PId", h1.Value); } gvwProduct.EditIndex = -1; bindGrid(); tc1.ActiveTabIndex = 0; }
protected void gvwProduct_RowDeleting(object sender, GridViewDeleteEventArgs e) { CheckBox c1 = (CheckBox)gvwProduct.Rows[e.RowIndex].FindControl("chkSelect"); if (c1.Checked == true) { db = new Mydbs("constr"); HiddenField h1 = (HiddenField)gvwProduct.Rows[e.RowIndex].FindControl("hfPId"); db.DeleteFunc("Product", "PId", h1.Value); bindGrid(); } tc1.ActiveTabIndex = 0; }
Page-95
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
protected void gvwSProduct_PageIndexChanging(object sender, GridViewPageEventArgs e) { gvwSProduct.PageIndex = e.NewPageIndex; bindGrid(); tc1.ActiveTabIndex = 1; }
protected void gvwSProduct_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { gvwSProduct.EditIndex = -1; bindGrid(); tc1.ActiveTabIndex = 1; }
protected void gvwSProduct_RowEditing(object sender, GridViewEditEventArgs e) { gvwSProduct.EditIndex = e.NewEditIndex; bindGrid(); db = new Mydbs("constr"); dt = new DataTable(); dt = db.ShowAll("Product"); DropDownList d1 = (DropDownList)gvwSProduct.Rows[e.NewEditIndex].FindControl("ddlPName"); d1.DataSource = dt; d1.DataTextField = "PName"; d1.DataBind(); tc1.ActiveTabIndex = 1; }
protected void gvwSProduct_RowUpdating(object sender, GridViewUpdateEventArgs e) { CheckBox c1 = (CheckBox)gvwSProduct.Rows[e.RowIndex].FindControl("chkSelect"); if (c1.Checked == true) { db = new Mydbs("constr"); dt = new DataTable(); ht1 = new Hashtable(); DropDownList d1 = (DropDownList)gvwSProduct.Rows[e.RowIndex].FindControl("ddlPName"); TextBox t1 = (TextBox)gvwSProduct.Rows[e.RowIndex].FindControl("txtSPName"); TextBox t2 = (TextBox)gvwSProduct.Rows[e.RowIndex].FindControl("txtSPDescription"); HiddenField h1 = (HiddenField)gvwSProduct.Rows[e.RowIndex].FindControl("hfSPId");
dt = db.ShowAll("Product"); foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == d1.SelectedValue) { ht1.Add("PId",dr[0].ToString()); break; } }
Page-96
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
ht1.Add("SPName", t1.Text); ht1.Add("SPDescription", t2.Text); db.UpdateFunc("SubProduct", ht1, "SPId", h1.Value); } gvwSProduct.EditIndex = -1; bindGrid(); tc1.ActiveTabIndex = 1; }
protected void gvwSProduct_RowDeleting(object sender, GridViewDeleteEventArgs e) { CheckBox c1 = (CheckBox)gvwSProduct.Rows[e.RowIndex].FindControl("chkSelect"); if (c1.Checked == true) { db = new Mydbs("constr"); HiddenField h1 = (HiddenField)gvwSProduct.Rows[e.RowIndex].FindControl("hfSPId"); db.DeleteFunc("SubProduct", "SPId", h1.Value); bindGrid(); } tc1.ActiveTabIndex = 1; }
protected void btnSPInsert_Click(object sender, EventArgs e) { ArrayList arr = new ArrayList(); db = new Mydbs("constr"); dt = db.ShowAll("Product"); foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == ddlSCProduct.SelectedValue) { arr.Add(dr[0].ToString()); break; } } arr.Add(txtSCCProduct.Text); arr.Add(txtSCDescription.Text); db.InsertFunc("SubProduct", arr); txtSCCProduct.Text = ""; txtSCDescription.Text = ""; bindGrid(); }
protected void gvwItem_PageIndexChanging(object sender, GridViewPageEventArgs e) { gvwItem.PageIndex = e.NewPageIndex; bindGrid(); tc1.ActiveTabIndex = 2; }
protected void gvwItem_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { gvwItem.EditIndex = -1; bindGrid(); tc1.ActiveTabIndex = 2; }
Page-97
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
protected void gvwItem_RowDeleting(object sender, GridViewDeleteEventArgs e) { CheckBox c1 = (CheckBox)gvwItem.Rows[e.RowIndex].FindControl("chkSelect"); if (c1.Checked == true) { db = new Mydbs("constr"); HiddenField h1 = (HiddenField)gvwItem.Rows[e.RowIndex].FindControl("hfIId"); db.DeleteFunc("Item", "IId", h1.Value); bindGrid(); } tc1.ActiveTabIndex = 2; }
protected void gvwItem_RowEditing(object sender, GridViewEditEventArgs e) { gvwItem.EditIndex = e.NewEditIndex; bindGrid();
db = new Mydbs("constr"); dt = new DataTable(); Label l1 = (Label)gvwItem.Rows[e.NewEditIndex].FindControl("lblPName"); HiddenField h1 = (HiddenField)gvwItem.Rows[e.NewEditIndex].FindControl("hfPName"); HiddenField h2 = (HiddenField)gvwItem.Rows[e.NewEditIndex].FindControl("hfSPName"); FileUpload fu1=(FileUpload)gvwItem.Rows[e.NewEditIndex].FindControl("fuIImage"); CheckBox c1 = (CheckBox)gvwItem.Rows[e.NewEditIndex].FindControl("chkSelect"); c1.Checked = true;
dt1 = new DataTable(); ht1 = new Hashtable(); ht1.Add("PName", l1.Text);
dt1 = db.ShowAllUsingJoinWithCondition("Product", "SubProduct", "Product.PId", "SubProduct.PId", ht1); DropDownList d2 = (DropDownList)gvwItem.Rows[e.NewEditIndex].FindControl("ddlSPName"); d2.DataSource = dt1; d2.DataTextField = "SPName"; d2.DataBind(); d2.SelectedValue = h2.Value; tc1.ActiveTabIndex=2; } protected void gvwItem_RowUpdating(object sender, GridViewUpdateEventArgs e) { CheckBox c1 = (CheckBox)gvwItem.Rows[e.RowIndex].FindControl("chkSelect"); if (c1.Checked == true) { db = new Mydbs("constr"); dt = new DataTable();
Page-98
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
ht1 = new Hashtable();
Label l1 = (Label)gvwItem.Rows[e.RowIndex].FindControl("lblPName"); DropDownList d2 = (DropDownList)gvwItem.Rows[e.RowIndex].FindControl("ddlSPName"); TextBox t1 = (TextBox)gvwItem.Rows[e.RowIndex].FindControl("txtIName"); TextBox t2 = (TextBox)gvwItem.Rows[e.RowIndex].FindControl("txtIDescription"); TextBox t3 = (TextBox)gvwItem.Rows[e.RowIndex].FindControl("txtIMRP"); TextBox t4 = (TextBox)gvwItem.Rows[e.RowIndex].FindControl("txtIPrice"); TextBox t5 = (TextBox)gvwItem.Rows[e.RowIndex].FindControl("txtIQuantity"); FileUpload fu1 = (FileUpload)gvwItem.Rows[e.RowIndex].FindControl("fuIImage"); HiddenField h1 = (HiddenField)gvwItem.Rows[e.RowIndex].FindControl("hfIId");
dt = db.ShowAllUsingJoin("Product", "SubProduct", "Product.PId", "SubProduct.PId"); foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == l1.Text && dr[5].ToString() == d2.SelectedValue) { ht1.Add("PId", dr[0].ToString()); ht1.Add("SPId", dr[3].ToString()); break; } } ht1.Add("IName", t1.Text); ht1.Add("IDescription", t2.Text); ht1.Add("IMRP", t3.Text); ht1.Add("IPrice", t4.Text); ht1.Add("IQuantity", t5.Text); if (fu1.HasFile) { string str = "Img\\ItemImg\\" + t1.Text + ".jpeg"; ht1.Add("IImage",str); fu1.PostedFile.SaveAs(Server.MapPath(str)); } string strDate = DateTime.Now.ToString(); ht1.Add("IDate", strDate);
db.UpdateFunc("Item", ht1, "IId", h1.Value); } gvwItem.EditIndex = -1; bindGrid(); tc1.ActiveTabIndex = 2; }
protected void btnIInsert_Click(object sender, EventArgs e) { ArrayList arr = new ArrayList(); int x=0;
Page-99
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
db = new Mydbs("constr"); dt = db.ShowAllUsingJoin("Product", "SubProduct", "Product.PId", "SubProduct.PId"); foreach (DataRow dr in dt.Rows) { if (dr[1].ToString() == ddlIPName.SelectedValue && dr[5].ToString() == ddlISPName.SelectedValue) { arr.Add(dr[0].ToString()); arr.Add(dr[3].ToString()); } x = int.Parse(dr[0].ToString()); } arr.Add(txtIName.Text); arr.Add(txtIDescription.Text); arr.Add(txtIMRP.Text); arr.Add(txtIPrice.Text); arr.Add(txtIQuantity.Text); if (fuIImage.HasFile) { string str = "Img\\ItemImg\\" + txtIName.Text + ".jpeg"; arr.Add(str); fuIImage.PostedFile.SaveAs(Server.MapPath(str)); }
string strDate = DateTime.Now.ToString(); arr.Add(strDate); db.InsertFunc("Item", arr);
txtIName.Text = ""; txtIDescription.Text = ""; txtIMRP.Text = ""; txtIPrice.Text = ""; txtIQuantity.Text = ""; bindGrid(); }}
Web Page: ShowItems.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;
public partial class ShowItems : System.Web.UI.Page{ Mydbs db; DataTable dt; PagedDataSource obj; static int currentpage = 0;
Page-100
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) bindDList(); }
void bindDList() { if (Request.QueryString["SPId"]!=null) { string SPId = Request.QueryString["SPId"].ToString(); Hashtable ht = new Hashtable(); ht.Add("SPId", SPId); db = new Mydbs("constr"); dt = db.ShowAllWithCondition("Item", ht); obj = new PagedDataSource(); try { obj.AllowPaging = true; obj.PageSize = 6; obj.DataSource = dt.DefaultView; obj.CurrentPageIndex = currentpage; lbPrev.Enabled = !obj.IsFirstPage; lbNext.Enabled = !obj.IsLastPage; dList.DataSource = obj; dList.DataBind(); } catch (Exception) { } }
if (Request.QueryString["PId"]!= null) { string PId = Request.QueryString["PId"].ToString(); Hashtable ht = new Hashtable(); ht.Add("PId", PId); db = new Mydbs("constr"); dt = db.ShowAllWithCondition("Item", ht); obj = new PagedDataSource(); try { obj.AllowPaging = true; obj.PageSize = 6; obj.DataSource = dt.DefaultView; obj.CurrentPageIndex = currentpage; lbPrev.Enabled = !obj.IsFirstPage; lbNext.Enabled = !obj.IsLastPage; dList.DataSource = obj; dList.DataBind(); } catch (Exception) { } } }
protected void dList_ItemCommand(object source, DataListCommandEventArgs e) { HiddenField hf; if (e.CommandName == "ShowDetails" || e.CommandName == "AddToCart") {
Page-101
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
hf = (HiddenField)e.Item.FindControl("hfIId"); Session["HomeSessionIId"] = hf.Value; Response.Redirect("ShowDetails.aspx"); } }
protected void lbPrev_Click(object sender, EventArgs e) { currentpage = currentpage - 1; bindDList(); }
protected void lbNext_Click(object sender, EventArgs e) { currentpage = currentpage + 1; bindDList(); }}
Web Page: ShowDetails.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class ShowDetails : System.Web.UI.Page{ Mydbs db; DataTable dt; Hashtable ht;
protected void Page_Load(object sender, EventArgs e) { if (Session["HomeSessionIId"] != null) { db = new Mydbs("constr"); dt = new DataTable(); ht = new Hashtable(); ht.Add("IId", Session["HomeSessionIId"].ToString());
dt = db.ShowAllWithCondition("Item", ht); hfIId.Value = dt.Rows[0][0].ToString(); imgIImage.ImageUrl = dt.Rows[0][8].ToString(); lblIName.Text = dt.Rows[0][3].ToString(); lblIDescription.Text = dt.Rows[0][4].ToString(); lblIMRP.Text = dt.Rows[0][5].ToString(); lblIPrice.Text = dt.Rows[0][6].ToString(); lblIName.Text = dt.Rows[0][3].ToString(); } else {
Page-102
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Response.Redirect("home.aspx"); } }
protected void ibAddtocart_Click(object sender, ImageClickEventArgs e) { Session["DetailSessionIId"] = hfIId.Value; Response.Redirect("ShoppingCart.aspx"); }}
Web Page: ShoppingCart.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class ShoppingCart : System.Web.UI.Page{ Mydbs db; DataTable dt,dt1; Hashtable ht,ht1; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bindGrid(); } }
void bindGrid() { db = new Mydbs("constr"); dt1 = new DataTable(); ht1 = new Hashtable(); ht1.Add("IId", Session["DetailSessionIId"].ToString()); dt1 = db.ShowAllWithCondition("Item", ht1);
dt = new DataTable(); dt.Columns.Add("IId"); dt.Columns.Add("IName"); dt.Columns.Add("IQuantity"); dt.Columns.Add("IMRP"); dt.Columns.Add("IPrice"); dt.Columns.Add("ITotal");
if (Session["AddToCart"] != null) dt = (DataTable)Session["AddToCart"]; DataRow dr = dt.NewRow();
Page-103
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
dr[0] = dt1.Rows[0][0].ToString(); dr[1] = dt1.Rows[0][3].ToString(); dr[2] = 1; dr[3] = dt1.Rows[0][5].ToString(); dr[4] = dt1.Rows[0][6].ToString(); dr[5] = dt1.Rows[0][6].ToString(); dt.Rows.Add(dr); gvwItem.DataSource = dt; gvwItem.DataBind(); Session["AddToCart"] = dt; getTotal(); }
public void getTotal() { dt = (DataTable)Session["AddToCart"]; int i = 0; double tot = 0; foreach (GridViewRow dr in gvwItem.Rows) { TextBox t1 = (TextBox)dr.Cells[2].FindControl("txtIQuantity"); Label l1 = (Label)dr.Cells[4].FindControl("lblIPrice"); Label l2 = (Label)dr.Cells[5].FindControl("lblTotal"); double p = Convert.ToDouble(t1.Text); double q = Convert.ToDouble(l1.Text); double x = p * q; l2.Text = Convert.ToString(x); dt.Rows[i][2] = t1.Text; dt.Rows[i][5] = l2.Text; Session["AddToCart"] = dt; tot = tot + x; i++; } lblTot.Text = tot.ToString(); }
protected void gvwItem_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Re-Calculate") { getTotal(); } }
protected void gvwItem_RowDeleting(object sender, GridViewDeleteEventArgs e) { dt = (DataTable)Session["AddToCart"]; dt.Rows[e.RowIndex].Delete(); gvwItem.DataSource = dt; gvwItem.DataBind(); Session["AddToCart"] = dt; getTotal(); }
protected void btnCheckOut_Click(object sender, EventArgs e) { if (Session["UserSession"] == null)
Page-104
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Response.Redirect("UserLogin.aspx"); else Response.Redirect("ShippingDetails.aspx"); }}
Web Page: ShippingDetails.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class ShippingDetails : System.Web.UI.Page{ Mydbs db; DataTable dt,dt1; Hashtable ht;
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) bindGrid();
}
void bindGrid() { if (Session["UserSession"] != null) { gvwSDetail.DataSource = Session["AddToCart"]; gvwSDetail.DataBind(); getTotal(); } }
public void getTotal() { dt = (DataTable)Session["AddToCart"]; int i = 0; int totQua = 0; double tot = 0; foreach (GridViewRow dr in gvwSDetail.Rows) { TextBox t1 = (TextBox)dr.Cells[2].FindControl("txtIQuantity"); Label l1 = (Label)dr.Cells[4].FindControl("lblIPrice"); Label l2 = (Label)dr.Cells[5].FindControl("lblTotal"); double p = Convert.ToDouble(t1.Text); double q = Convert.ToDouble(l1.Text); double x = p * q; l2.Text = Convert.ToString(x);
Page-105
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
dt.Rows[i][2] = t1.Text; dt.Rows[i][5] = l2.Text; Session["AddToCart"] = dt; tot = tot + x; totQua = totQua + Convert.ToInt32(t1.Text); i++; } lblTot.Text = tot.ToString(); lblTotQuantity.Text = Convert.ToString(totQua); }
protected void gvwItem_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Re-Calculate") { getTotal(); }
}
protected void gvwItem_RowDeleting(object sender, GridViewDeleteEventArgs e) { dt = (DataTable)Session["AddToCart"]; dt.Rows[e.RowIndex].Delete(); gvwSDetail.DataSource = dt; gvwSDetail.DataBind(); Session["AddToCart"] = dt; getTotal(); }
protected void btnShip_Click(object sender, EventArgs e) { db = new Mydbs("constr"); dt = new DataTable(); ht = new Hashtable(); ArrayList arr = new ArrayList(); ht.Add("UserId", txtEId.Text); dt = db.ShowAllWithCondition("Usr", ht); if (dt.Rows.Count > 0) { dt1 = new DataTable(); dt1.Columns.Add("OId"); dt1.Columns.Add("FName"); dt1.Columns.Add("LName"); dt1.Columns.Add("EId"); dt1.Columns.Add("Contact"); dt1.Columns.Add("Address"); dt1.Columns.Add("City"); dt1.Columns.Add("State"); dt1.Columns.Add("Country"); dt1.Columns.Add("PinCode");
DataRow dr = dt1.NewRow(); dr[0] = ""; dr[1] = txtFName.Text; dr[2] = txtLName.Text; dr[3] = txtEId.Text; dr[4] = txtContact.Text; dr[5] = txtAddress.Text;
Page-106
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
dr[6] = txtCity.Text; dr[7] = txtState.Text; dr[8] = txtCountry.Text; dr[9] = txtPinCode.Text;
dt1.Rows.Add(dr); Session["ShippingDetail"] = dt1; Response.Redirect("PaymentDetails.aspx"); } else { lblErrMsg.Text = "Ensure Correct Email-Id"; txtEId.Focus(); } }}
Web Page: PaymentDetails.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class PaymentDetails : System.Web.UI.Page{ DataTable dt,dt1,dt2,dt3; Mydbs db; Hashtable ht,ht1,ht2; ArrayList arr,arr1,arr2,arr3;
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) bindGrid(); }
void bindGrid() { if (Session["UserSession"] != null) { gvwPmtDetail.DataSource = Session["AddToCart"]; gvwPmtDetail.DataBind(); getTotal(); } }
public void getTotal() { if (Session["AddTocart"] != null) { dt = (DataTable)Session["AddToCart"];
Page-107
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
int i = 0; int totQua = 0; double tot = 0; foreach (GridViewRow dr in gvwPmtDetail.Rows) { TextBox t1 = (TextBox)dr.Cells[2].FindControl("txtIQuantity"); Label l1 = (Label)dr.Cells[4].FindControl("lblIPrice"); Label l2 = (Label)dr.Cells[5].FindControl("lblTotal"); double p = Convert.ToDouble(t1.Text); double q = Convert.ToDouble(l1.Text); double x = p * q; l2.Text = Convert.ToString(x); dt.Rows[i][2] = t1.Text; dt.Rows[i][5] = l2.Text; Session["AddToCart"] = dt; tot = tot + x; totQua = totQua + Convert.ToInt32(t1.Text); i++; } lblTot.Text = tot.ToString(); lblTotQuantity.Text = Convert.ToString(totQua); } }
protected void btnProceed_Click(object sender, EventArgs e) { db = new Mydbs("constr"); dt = new DataTable(); ht = new Hashtable(); ht.Add("CNo", txtCardNo.Text); ht.Add("Ctype", ddlPaymentType.SelectedValue); ht.Add("Password", txtPassword.Text); dt = db.ShowAllWithCondition("CardInfo",ht); double bal=Convert.ToDouble(dt.Rows[0][3].ToString()); if (dt.Rows.Count > 0 && bal>=Convert.ToDouble(lblTot.Text)) { arr = new ArrayList(); string UId = Session["UserSessionUId"].ToString(); string date = DateTime.Now.ToString(); arr.Add(UId); arr.Add(date); db.InsertFunc("Oder", arr);
dt1 = (DataTable)Session["AddToCart"]; arr1 = new ArrayList();
dt2 = new DataTable(); ht2 = new Hashtable(); ht2.Add("UId", (Session["UserSessionUId"].ToString())); dt2 = db.ShowAllWithCondition("Oder", ht2); int x = dt2.Rows.Count; foreach (DataRow dr in dt1.Rows) { arr1.Clear(); arr1.Add(dt2.Rows[x - 1][0].ToString()); arr1.Add(dr[0].ToString()); arr1.Add(dr[1].ToString()); arr1.Add(dr[2].ToString()); arr1.Add(dr[3].ToString()); arr1.Add(dr[4].ToString());
Page-108
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
arr1.Add(dr[5].ToString()); db.InsertFunc("OrderDetail", arr1); }
arr2 = new ArrayList(); arr2.Add(dt2.Rows[x - 1][0].ToString()); arr2.Add(txtCardNo.Text); arr2.Add(ddlPaymentType.SelectedValue); db.InsertFunc("PaymentDetail", arr2);
dt3 = new DataTable(); dt3 = (DataTable)Session["ShippingDetail"]; arr3 = new ArrayList(); arr3.Add((dt2.Rows[x - 1][0].ToString())); arr3.Add(dt3.Rows[0][1].ToString()); arr3.Add(dt3.Rows[0][2].ToString()); arr3.Add(dt3.Rows[0][3].ToString()); arr3.Add(dt3.Rows[0][4].ToString()); arr3.Add(dt3.Rows[0][5].ToString()); arr3.Add(dt3.Rows[0][6].ToString()); arr3.Add(dt3.Rows[0][7].ToString()); arr3.Add(dt3.Rows[0][8].ToString()); arr3.Add(dt3.Rows[0][9].ToString()); db.InsertFunc("ShippingDetail", arr3);
Session["CNo"] = txtCardNo.Text; Session["CType"] = ddlPaymentType.SelectedValue; Session["ODate"] = dt2.Rows[0][2].ToString(); Session["TPrice"] = lblTot.Text; Session["TQty"] = lblTotQuantity.Text; Response.Redirect("BillGenerate.aspx"); } else { lblErrMsg.Text = "Ensure Correct Data!!"; } }}
Web Page: BillGenerate.aspx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class BillGenerate : System.Web.UI.Page{ static Int32 BNo;
protected void Page_Load(object sender, EventArgs e) { DataTable dt=(DataTable)Session["ShippingDetail"];
Page-109
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
string Addr="Name: "+dt.Rows[0][1].ToString()+"<br>Address: "+dt.Rows[0][5].ToString() + "<br>Contact: " + dt.Rows[0][4].ToString() + "<br>Email: <span style=color:blue;><u>" + dt.Rows[0][3].ToString() + "</u></span>"; if (!IsPostBack) { bindGrid(); } lblWelcome.Text = Session["UserFName"].ToString(); lblCardNo.Text = Session["CNo"].ToString(); lblPaymentType.Text =Session["CType"].ToString(); lbltotal.Text = Session["TPrice"].ToString(); lblQuantity.Text = Session["TQty"].ToString(); lblOrderDate.Text = Session["ODate"].ToString(); lblShipAddress.Text = Addr; BNo++; lblBillNo.Text="BB-"+BNo; }
void bindGrid() { if (Session["UserSession"] != null) { DataTable dt; dt = (DataTable)Session["AddToCart"]; gvwBill.DataSource = Session["AddToCart"]; gvwBill.DataBind(); } } }
Web Page: Menu.ascx.cs
using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;
public partial class Menu : System.Web.UI.UserControl{ Mydbs db; DataTable dt; Hashtable ht;
protected void Page_Load(object sender, EventArgs e) { DataTable dt; if (Session["AdminSession"] != null || Session["UserSession"]!=null) { if (Session["AdminSession"] != null)
Page-110
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
lblFName.Text = Session["AdminFName"].ToString(); else lblFName.Text = Session["UserFName"].ToString();
divRegLogin.Visible = false; divLogout.Visible = true; } else { divRegLogin.Visible = true; divLogout.Visible = false; } if (!IsPostBack) { bindddlSearch(); ddlQuickSearch.Items.Insert(0, "All Category");
} if (Session["QuickSearchSessionSelectedValue"] != null) ddlQuickSearch.Items.Insert(0, Session["QuickSearchSessionSelectedValue"].ToString()); }
protected void lbLogout_Click(object sender, EventArgs e) { Session.Abandon(); Session.Clear(); Session.RemoveAll(); Response.Redirect("Home.aspx"); } void bindddlSearch() { db = new Mydbs("constr"); dt = new DataTable(); dt = db.ShowAll("Product"); ddlQuickSearch.DataValueField = "PId"; ddlQuickSearch.DataTextField = "PName"; ddlQuickSearch.DataSource = dt; ddlQuickSearch.DataBind(); }
protected void ibGo_Click(object sender, ImageClickEventArgs e) { try { db = new Mydbs("constr"); string str = ddlQuickSearch.SelectedItem.Value; dt = new DataTable(); ht = new Hashtable(); ht.Add("PId", str); dt = db.ShowAllWithCondition("Product", ht); Session["QuickSearchSessionSelectedValue"] = dt.Rows[0][1].ToString(); Response.Redirect("ShowItems.aspx?PId=" + str); } catch (Exception exp) { } }
Page-111
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
}
6.4 Testing Approach:
Testing is a method to check the integrity, reliability and the performance of the software. To ensure the perfection of the software it is necessary to test it with some real featured data, which is going to be the scenario of the software.
Software Testing is the process to evaluate capability of a system/program to ensure that it meets its required results. Software applications can fail in different ways. Identifying all of the failures is generally not possible. But by applying different techniques in different types of testing an attempt can be made to identify critical defects. Hence testing can be used as a process to
Prove that the program is error free Ensure that the software performs its intended functions as per the expectations.
Discover errors before the software is delivered to the customer.
Execute a program with the intent of finding errors.
Demonstrate that the software is working according to the specifications and that behavioral and performance requirements are met.
Perform operation on a system or application under controlled conditions (normal and abnormal) and evaluating the results.
Validate an application to check if it
Does what it is expected to do
Does not do what it is not expected to do
However no system is ever perfect. There could be problem such as communication problem, program negligence or time constraint creates errors that must be eliminated before the system is ready for the user’s acceptance testing. Testing is done in order to test investigating of each module in the system i.e. it is the process of exercising or
Page-112
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
evaluating a system or system component by manual or automated means to verify that it satisfies specified requirements. It also tests to find discrepancies between the system and its original objective the primary concern is the capability of the individual modules. The system is tested with the response of the volume of transactions, stress and recovery from the failure and the usability. There might be different specification and the requirement for data length, type and data element name. Testing is carried out at different levels at various intervals.
Following are given the rules that can serve well as testing objectives:-
A good test case is one that has a high probability of finding errors. A successful error is one that detects an as-yet undiscovered error.
Various testing techniques used are categorized as follows:
a). White Box Testing
In white box testing we exercises the internal logic of a program,
examine internal program structure and derived tests from an examination of the
program’s logic, tested internal paths and working of the software. To perform this we
used to develop test cases for unit and integration testing.
b). Black Box Testing
In black box testing we exercises the input and output requirements of a
program, tested by conducting specifications of requirement for which the software
should do. This test is derived from the I/O specification and used in most functional
tests.
White Box Strategies
White box testing strategies uses the control structure of the program and
design to derive test cases.
Basis Path Testing
Test cases are derived to exercise the basis set that guarantee that every
statement in the program is executed at least once during testing. It is applied in series of
steps.
Test case for login button of the login form:
Test case 1: All the following combinations are tested
Password is valid and Username is valid
Password is valid and Username is invalid
Page-113
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Password is invalid and Username is invalid
Password is invalid and Username is valid
Expected results:
No error crossing this stage when Password & Username are both permissible
combination of characters. In all other case error message is displayed.
Test case 2: Following input combination is tried where permissible set of characters
for username & password are entered which are non-existent in table.
Password is valid, existent and Username is valid, existent
Password is valid, existent and Username is valid, nonexistent
Password is valid, nonexistent and Username is valid, existent
Password is valid, nonexistent and Username is valid, nonexistent
Expected Results:
If no entry into the system then error message displayed. And user is linked to the
registration page.
Test Case 3: To test this both username & password to be entered must be valid &
existent in the registration table.
Password = Valid, Existent ; and
Username = Valid, Existent
Similarly all the other internal paths & logic can be tested.
v). Control Structure Testing
Condition testing
Condition testing is a test case design method that exercises the logical
conditions contained in a program module. If a condition is incorrect, then at least one of
the conditions is incorrect. So, types of errors in a condition include Boolean operator
error (incorrect/missing/extra Boolean operators), Boolean variable error, Boolean
parenthesis error, relational operator error and arithmetic expression error. It mainly
focuses on testing each condition in the program. The condition testing strategies to be
employed are:
Branch testing:
Page-114
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
For a compound condition C, the true and false branches of C and every
simple condition in C need to be executed at least once.
Loop testing
Loops are cornerstone for the vast majority of all algorithms implemented in
software. Loop testing focuses exclusively on the validity of loop constructs. Testing
approach for different types of loops is listed below.
Simple loops:
The following set of tests will be applied to simple loops, where n is the
maximum number of allowable passes through the loop.
Skip the loop entirely
Only one pass through the loop
Two passes through the loop
m passes through the loop where m < n
n – 1, n, n + 1 passes through the loop.
Nested loops:
Simple loop testing strategy if applied to the nested loops will increase the no.
of possible tests geometrically. Approaches for nested loops are:
Start at the innermost loop. Set all other loops to minimum values
Conduct simple loop tests for the innermost loop while holding the
outer loops at their minimum iteration parameter values. Add other tests for out-of-
range or excluded values.
Work outward, conducting tests for the next loop, but keep all
other outer loops at minimum values and other nested loops to typical values.
Continue till all loops have been tested.
Concatenated loops:
When concatenated loops are independent then approach for simple loop was
applied & if they happen to be dependent the nested loop approach was applied.
Unstructured loops:
This class of loops was redesigned to reflect the use of the structured
programming constructs.
Black Box Strategies
Page-115
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Black Box testing strategy focuses on the functional requirements of the
software without any regard to the internal structure. It is used in most system level
testing where functional, performance, recovery and security & stress are main issues.
This applied strategy finds errors in incorrect or missing functions (compared to white
box), interface errors, errors in external data structures and in behavior performance
problems (Combinations of input make it behave poorly). It also finds errors in
initialization and termination (Sensitive to certain inputs (e.g. performance). It is
performed much later in process than white box...
A test strategy that uses every possible input condition as a test case would be
ideal but is not possible. We apply following Black-Box Testing Strategies.
Graph Based Testing
The first step in black box testing is to understand the objects that are
modeled in software and the relationships that connect the objects. Once this has been
accomplished, the next step is to define a series of tests that verify all objects that have
the expected relationship with another.
Boundary Value Analysis
It is a test case design technique that complements equivalence partitioning, by
selecting test cases at the “edges” of the class. Greater no. of errors tends to occur at the
boundaries of the input domain rather than in the “Center”. Rather than any element in
class, BVA selects tests at the edge of the class. In addition to input condition, test cases
can be derived for output conditions. Similar to Equivalence partitioning, BVA,
equivalence classes are identified first then boundaries.
Some guidelines for BVA:
1. If an input condition specifies a range bounded by values a & b then test cases will be
designed with values a and b and just above and just below a & b.
2. If an input condition specifies a number of values, test cases will be developed that
exercise the minimum and maximum numbers. Values just above and just below
minimum and maximum are also tested.
These 2 guidelines are also applied to the output conditions. Designing test
case to exercise the data structure at its boundary will test boundaries prescribed on
internal program data structures.
Testing Strategies for Web Application
Page-116
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
The approach of web app testing adopts the basic principle for all Software
testing and applies a strategy and tactics that have been recommended for object oriented
system .the following steps summarizes the approach:
1). The content model for the web app is reviewed to uncover errors.
This is like copyediting
2). The design model for the web application as reviewed to uncover navigation error.
Use cases derived as part of the analyst activity, allow a web engineer to exercise each
usage scenario against the architectural and navigational design. These non executable
test help uncover error in navigation.
3). Selected processing component and web page is unit tested.
When web apps are considered, the concepts of the unit changes, each web page
encapsulated in itself content navigation link as Well As script, form and applet
(processing element). It is not always possible or practical to test each of these
characteristics individually.
4). The architecture is constructed and integration tests are Conducted.
The strategy for integration testing depend upon the architecture that has been chosen for
the web application
5). The assembled web application is tested for overall functionality and content delivery.
Like conventional validation, the validation of web based systems and application focuses
on user visible action and user recognizable output from the system. To assist in the
derivation of validation tests the tester should draw upon use cases the use cases provides
a scenario that has high likelihood of uncovering errors in user interaction requirement.
6). The web application is implemented in a variety of different Environmental
configuration and is tested for compatibility with each configuration.
7). The web application is tested by controlled and monitored Population of end user.
Finally with the modular concept inside the application it is being also tested for its
Reliability: The system reliability will be insured through data integrity rules built into
the database at the backend and the system rules built into the front-end application. The
system will take assurance from the user before making any changes permanent.
e). Validation Checks
This will be as such to maintain consistent and persistent Information on the
web when most of the time the project has to Deal With uploads so a minor error will
Page-117
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
down the impression of the Company. Therefore, validation checks by software itself
using the Flavors of JavaScript and manual checks are also necessary as:
1. Correct entry of data in the form.
2. Correct updating of question and with the most suitable answer etc.
7. CONCLUSION
7.1 CONCLUSION & LIMITATION OF SYSTEM
The quality of the system depends on number of factors such as design, development, testing and implementation. One vital aspects of the system quality is reliability. A system is said to reliable when used it doesn’t produce failure that is dangerous and costly.
I have strived to prevent occurrence of errors using different methods and techniques that include error detection, correction and tolerance (e.g. Exception handling). The system has been designed so as to ensure maximum reliability in operation with maximum errors. I have tried to achieve maximum goal given in objective.
The system is able to achieve the objective and provide the ultimate result called ”CUSTOMER SATISFACTION”.
Here are limitations:
It is mainly built for the dummy credit card database environment, so it could not be implemented realtime shopping.
It does not includes the full administrative functionalities.
7.2 FUTURE SCOPE OF THE PROJECT
Future scope is directly dependent on the lay stone of the project that is we will have to design a system which when the time passes having a better system initially should not become a useless later.
The system is built in ASP.NET with C# and follows good modular structure so extensibility to the system can be gained easily and we can reuse the existing component of the system for the further developments.
Future scopes of the project includes the following:
New services such as staff Management can be added to the system easily.
The system can use existing databases of the organization.
Page-118
BigBazaar (Online Shopping) BigBazaar (Online Shopping)
Better performance and User Interface Design with extensive discussion with end users.
More customizations could be provided with the software.
8. REFERENCES
BOOKS:
Database System Concepts By Henry F Korth Software Engineering By Roger Pressman System Analysis & Design By Whitten ASP.NET 3.5 with C# By WROX series Programming in C# By E. Balagurusamy
WEBSITES: http://www.dotnetspider.com http://forums.asp.net http://codeproject.com http://www.w3schools.com
Page-119