Sie sind auf Seite 1von 77

PROJECT REPORT

OF
ONLINE BOOK ORDER PROCESSING SYSTEM

Submitted By
Name :NishaSadhwani
Enrolment No: 3521130001


Submitted to the School of Computer and Information Sciences
In partial fulfillment of the requirements
For the degree of
Master of Computer Applications



SRM UNIVERSITY



Student Declaration

I hereby declare that the project proposal titled OnlineBook Order Processing Systemis
submitted by me to the Srm University, for the partial fulfillment of the Degree of Masterof
ComputerApplications.



Name of student :NishaSadhwani
Enrolment No: 3521130001









Contents

S. No. Topic
1 Title of the Project
2 Objective of the Project
3. Introduction
4. Software Requirements Specification
5. Use Case Diagrams
6. Architectural Design
7. Database Design
8. Coding
9. Snapshots
10. Conclusion
11. Future Scope
12. Bibliography







Objective of the Project

The main objective of the project is to create an online book order processing system that
allows users to search and purchase a book based on title, author and subject. The selected books
are displayed in a tabular format and the user can order their books online through credit card
payment. The Administrator will have additional functionalities when compared to the common
user.
















Introduction


Online Book order processing system is an online web application where the customer can
purchase books online. Through a web browser the customers can search for a book by its title or
author, later can add to the shopping cart and finally purchase using credit card transaction. The
user can login using his account details or new customers can set up an account very quickly.
They should give the details of their name, contact number and shipping address. The user can
also give feedback to a book by giving ratings on a score of five. The books are divided into
many categories based on subject Like Software, Database, English, Architecture etc.

This project has the following functionalities:

1) A Home page with product catalog
This is the page where the user will be navigated after a successful login. It will displayall the
book categories and will have a search keyword option to search for the required book. It also
includes some special sections like recommended titles, weekly special books.

2) Search
A search by keyword option is provided to the user using a textbox .The keyword to be
Entered should be the book title.

3) Search
Search helps the user to search for a book based on Title, Author, and Category and price range.
All the books which match the particular search criteria and their total count will be displayed
.From here the user can select a book and add to the shopping cart.
4) Book Description
If the user would like to know details about a book he can click on the title from where he will be
directed to a Book description page.



5) User Voting
The user can give rating to a book based on his interest. He can rate it by giving a score of five as
Excellent, four for very good, three for good, two for regular and one for deficient. The final
rating of a book will depend on all the individual user rating.

6) Shopping Cart
The user can manage a shopping cart which will include all the books he selected. The user can
edit, delete and update his shopping cart. A final shopping cart summary is displayed which
includes all the items the user selected and the final total cost.

7) Managing user accounts
Each user should have an account to access all the functionalities of website. User can login
using login page and logout using the logout page. All the user sessions will be saved in the
database.

8) Administration
The Administrator will be provided with special functionalities like
Add or delete a book category
Add or delete a member
Manage member orders.
Add or delete a Credit Card type.




Software Requirement Specifications

Software Technologies:

Operating System : WindowsXP.
Server Technology : ASP .NET
Language : C#.net
Back-End : sql server 2005
Browser used:Internet Explorer 6.0
Server :IIS (Internet Information Server 6.0)

Hardware Technologies:

Processor : Pentium III processor (800MHz.)
Memory : 256 MBRAM
Hard Disk : 10 GB HDD
Display : Super VGA (800 x 600) or higher-resolution monitor with 256 colors
Mouse :Microsoft Mouse or compatible pointing device



Introduction Of ASP.NET

What is ASP.NET?
ASP.NET is a Microsoft technology
ASP stands for active server pages
ASP.NET is a program that runs inside IIS
IIS (Internet information services ) is Microsoft`s internet server
IIS comes as free component with windows servers
IIS is also a part of windows 2000 XP professional
What is an ASP.NET FILE?
An ASP.NET file is not the same as an html file
An ASP.NET file can contain html ,xml,and scripts
Scripts in an ASP.NET file are executed on the server
An ASP.NET file has the file extension aspx
How does ASP.NET work?
When a browser requests an HTML file , the server returns the file
When a browser requests an ASP.NET file , IIS passes the request to the ASP.NET engine on the
server
The ASP.NET file is returned to the browser as plain HTML
The Microsoft.NET Framework
The.net framework is infrastructure for the Microsoft.NET platform
The net framework is an environment for building, deploying, and running web applications and
web services.





Introduction of SQL Server 2005
Microsoft SQL Server 2005 Express Edition is easy-to-use, lightweight, and embeddable
version of SQL Server, the leading relational database management system.
Build Flexible and Reliable Data-Driven Applications:
More than ever developers are leveraging relational databases to provide a rich end-user
experience. SQL Server Express helps developers build robust and reliable applications. Too
often database systems are overly complex for building simple applications. Microsoft Visual
Studio 2005and SQL Server Express reduce this complexity by providing a simple but
powerful development environment for building data-driven applications. Developers can design
schemas, add data, and query local databases, all inside the Visual Studio 2005 environment. If
developers need more advanced database features, then SQL Server Express can be seamlessly
upgraded to more sophisticated versions of SQL Server.

Enable Dynamic Web Sites:
In today's fast changing world even the most basic Web sites need to be interactive. SQL Server
Expressand Visual Web Developer provide a simpleintegrated platform for building dynamic
andreliable Web sites. Together these two productsprovide the tools necessary to build, deploy,
and manage Web sites. SQL Server Express includes many features attractive for Web
development. It uses the advanced query optimization engine of SQL Server 2005 to deliver fast
performance. Full-text search is included to provide powerful query capability over textual data.
In addition, databases can easily be loaded into a hosted environment through the XCopy feature.
Native XML support inside the database ensures that your Web environment can easily
interoperate with other applications through web services.















SYSTEM DESIGN
Use Case Diagram

User and Administrator are the two actors included in the Online Book order processing system.

Description of Use Cases:

1) Browse Catalog
a) Search for a Book
Purpose: A user can search for a book of his choice by selecting category and
title. Then a select query is used to retrieve data from the database and display the
selected information.
Actor: User
Input: The user will select a category and enter title in a text box provided.
Output: The system will display the books which matches the selected search
criteria.

b) Perform Advanced Search

Purpose: If the user wants to perform an advanced search he can search for a
book of his choice by selecting category, title, author and price range. Then a
select query is used to retrieve data from the database and display the selected information.
Actor: User
Input: The user will select a category and enter title, author, and price range in a
text box provided.
Output: The system will display the books which matches the selected search
criteria.

c) Give rating to a book

Purpose: If the user wants to give rating according to his opinion for a book he
can select either Excellent, Very good, good, regular or deficient. The final rating
of a book will depend on all the individual user rating.
Actor: User
Input: The user will select a rating based on his opinion.
Output: The system will display the rating of a book and the total number of
votes received.

2) Maintain Account
a) Register
Purpose: If the user doesnt have an account then he will be asked to register.
Actor: User
Input: The user will enter details in the registration form according to the
required fields.
Output: After registration the user will be directed to the main home page.

b) Login
Purpose: If the user wants to get access to all the functionalities of Online Book
Order processing system he should login using his username and password.
Actor: User
Input: The user will enter his username and password.
Output: If it is a successful login the user will be directed to the main home page.
Else if the user enters invalid information he will be asked to check the entered
information.

c) Update Profile
Purpose: If the user wants to change his personal account information then he can
update his selected fields and the entire data will be updated in the data base
through an update query.
Actor: User
Input: The user will update his account information.
Output: The system will update the entered information in the database using an
update query.

d) Logout
Purpose: If the user wants to end his session and sign out of the website then he
can use the logout option.
Actor: User
Input: The user will click the logout button.
Output: The users account session comes to an end and he should login again if
he wants to enter into the website.



3) Manage Shopping Cart
a) Place an order
Purpose: If the user wants to purchase a book then he can place an order by
selecting the add to shopping cart button and entering the quantity required under
the book description.
Actor: User
Input: The user will enter the quantity required and click the add to shopping cart
button.
Output: The order will be added to the users shopping cart.

b) Update Shopping Cart
Purpose: If the user wants to change the quantity of a book or change a book then
he can update his shopping cart.
Actor: User
Input: The user will click the details button in the shopping cart summary to edit
and update his order details..
Output: The updated order details are reflected in the shopping cart summary.

c) View Shopping Cart
Purpose: If the user wants to view the items he added to the shopping cart then he
can click the shopping cart link at the top of the page.
Actor: User
Input: The user will click the shopping cart link at the top of every page.
Output: The users shopping cart summary will be displayed in the form of a
tabular format with all the books and their quantity. A total cost of all the items is
also displayed at the bottom.



Administrator Use case

1) Login
Purpose: If the Administrator wants to get access to all the functionalities of Online Book order
processing system he should login using his username and password.
Actor: Administrator
Input: The Administrator will enter his username and password.
Output: If it is a successful login the Administrator will be directed to his menu page. Else if the
Administrator enters invalid information he will be asked to check the entered information.

2) Add or Delete Category
Purpose: If the Administrator wants to add or delete a book category then he can insert or delete
a book category using his administration rights and the category table will be updated in the
database.
Actor: Administrator
Input: If the Administrator wants to add a book category the he should click the insert link
button in the category page else he can delete a particular selected book category.
Output: The updated categories list will be displayed in the main home page.

3) Add or Delete Book
Purpose: If the Administrator wants to add or delete a book then he can insert or delete a book
using his administration rights and the book table will be updated in the database.
Actor: Administrator
Input: If the Administrator wants to add a book the he should click the insert link button in the
book page and fill the required fields related to the book. If he wants to delete a book he can
click the delete button to remove it from the database.
Output: The updated books list will be displayed in the main home page under
their particular category.


4) Manage Orders
Purpose: If the Administrator wants to add or delete an order then he can insert or delete an
order using his administration rights.
Actor: Administrator
Input: If the Administrator wants to add an order the he should click the insert link button in the
orders page else he can delete a particular selected order
Output: The updated orders list will be processed to the users.

5) Add or Delete CC (Credit Card)
Purpose: If the Administrator wants to add or delete a CC type then he can insert or delete a CC
type using his administration rights and the CC table will be updated in the database.
Actor: Administrator
Input: If the Administrator wants to add a CC type the he should click the insert link button in
the CC page else he can delete a particular selected CC type..
Output: The updated CC list will be displayed in registration page where the user will select it
for his future transactions.

6) Logout
Purpose: If the Administrator wants to end his session and sign out of the website then he can
use the logout option.
Actor: Administrator
Input: The Administrator will click the logout button.
Output: The Administrators account session comes to an end and he should login again if he
wants to enter into the website





Architecture Design

Introduction
The purpose of this document is to provide an architectural design for the Online Book order
processing system. The design will show the presentation tier, the middle tier consisting of
classes, sequence diagrams, and the data tier consisting of the database design diagram.

Architecture
Three-tier (layer) is a client-server architecture in which the user interface, business process
(business rules) and data storage and data access are developed and maintained as independent
modules or most often on separate platforms.
The Architecture of Online Book order processing system is based on three-tier architecture. The
three
logical tiers are

Presentation tier - ASP.NET Web forms, Master Pages, Images.
Middle tier C# classes.
Data tier- Database



Fig. below shows the model of 3-tier architecture.



The main reason for considering three-tier architecture for the Online Book order processing
sytem is as
follows:
Flexibility:
Management of data is independent from the physical storage support,
Maintenance of the business logic is easier,
Migration to new graphical environments is faster.
If there is a minor change in the business logic, we dont have to install the entire system in
individual users PCs.
Reusability:
Reusability of business logic is greater for the presentation layer. As this component is
developed and tested, we can use it in any other project and would be helpful for future use.
Security:
More secured architecture since the client cannot access the database.




Presentation tier
The presentation tier for the Online Book order processing system is ASP.NET Web Forms with
Master Pages. The presentation tier takes care of the user interaction and the visual part of the
website. The various Web forms used by clients are listed below.

ASP.NET Web Forms Definition

Default.aspx This web page is used to browse the entire
website and also displays different categories,
offers available.
Books.aspx This web page is used to search for books and
displays books which matched the search
criteria.
search.aspx This web page is used to display search to
find books.
Bookitem.aspx This web page is used for displaying all the
details of a book.
ShoppingCart.aspx This web page is used to display the shopping
cart and user information details.
ShoppingCartRecord.aspx This web page is used to edit shopping cart.



The diagram below captures the page flow for user in the Online Book order processing
System.

Fig. User-Page Flow

The various Web forms used by Administrator are listed below.

ASP.NET Web Forms Definition
Login.aspx This web page is used for an Administrator to
login and enter the website.
AdminMenu.aspx The webpage displays the menu of the
Administrator
MembersGrid.aspx The web page displays the members list
MembersInfo.aspx The web page displays the members personal
information.
MembersRecord.aspx The web page is used to edit and update
members information.
OrdersGrid.aspx The web page displays the orders list.

The diagram below captures the page flow for Administrator in the Online Book order
processing System.

Fig - Administrator-Page Flow



2) Sequence Diagrams

User Login


Fig.- User-Login Sequence Diagram


Book Search
Fig. - User-Book Search Sequence Diagram


Add to shopping cart

Fig.- User-Add to Cart Sequence Diagram


Administrator
Fig. - Adminstrator- Sequence Diagram

DATABASE DESIGN
A database is a collection of data with some inherent meaning, designed, built and
populated with data for a specific purpose.
A database management system provides flexibility in the storage and retrieval of data.
The DBMS is a bridge between the application program, which determines what data are needed
and how they are processed, and the operating system of the computer, which is responsible for
placing data on the magnetic storage devices. A schema defines the database and a subschema
defines the portion of the database that a specific program will use.
Characteristics
Represents complex relationships between data.
Keeps control on data redundancy.
Keeps a centralized data dictionary for the storage of information retaining to data and its
manipulation.
Enforces data access authorization.
Has automatic intelligent backup and recovery Procedure for data.
Database Administrator
A database administrator is a block of code loaded into memory, which organizes all
information (database) between the users.
The DBA takes care of the following things:
Updating database
Retrieving the data
Accepting the queries
Enforces security
Enforces data integrity specifications
Managing data sharing
Optimizing queries
Managing system catalogs
DATA DICTIONARY:
A Data Dictionary is a collection of metadata that is data about data. In addition to
storing catalog information about schemas and constraints, the data dictionary stores other
information, such as design decisions, usage standards, application program descriptions, and
user information.

The tables in the data dictionary are:
CREDIT CARD DETAILS:
NAME NULL? TYPE
CRED_ID NUMBER(15)
CUST_ID NUMBER(8)
BANK VARCHAR2(30)
DATE_ISSUE DATE
DATE_EXP DATE
PLACE_ISSUE VARCHAR2(30)


CUSTOMER DETAILS:
NAME NULL? TYPE
CUST_ID NOT NULL NUMBER(8)
CUST_NAME NOT NULL VARCHAR2(25)
SEX NOT NULL VARCHAR2(8)
JOB NOT NULL VARCHAR2(20)
STREET VARCHAR2(20)
STATE VARCHAR2(20)
COUNTRY VARCHAR2(20)
PHNO NUMBER(12)
EMAIL VARCHAR2(30)

TRANSACTION:

NAME NULL? TYPE
CUSTID NOT NULL NUMBER(8)
CARDNO NOT NULL VARCHAR2(25)
AMOUNT NOT NULL NUMBER
TRANSDATE NOT NULL VARCHAR2(20)



BOOK TABLE
NAME NULL? TYPE
P_ID NOT NULL NUMBER(8)
NAME NOT NULL VARCHAR(50)
CATEGORY NOT NULL VARCHAR(50)
PUBLISHER NOT NULL VARCHAR(50)
AUTHOR NOT NULL VARCHAR(50)
PRICE NOT NULL MONEY
DESCRIPTION NOT NULL VARCHAR(255)
PICTUREURL NOT NULL VARCHAR(255)


FEEDBACK DETAILS:
NAME NULL? TYPE
ID NOT NULL NUMBER(8)
BILLNO NUMBER(8)
PROD_ID NUMBER(8)
CUST_ID NUMBER(8)
DESCR VARCHAR2(100)

ADMINISTRATION LOGIN TABLE:
NAME NULL? TYPE
USERID NOT NULL NUMBER(8)
PASSWORD NOT NULL VARCHAR2(25)


CODING

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
// <!CDATA[
function TABLE1_onclick() {
}
// ]]>
</script>
</head>
<body style="text-align: center; color: #000000;" bgcolor="lightslategray">
<form id="form1" runat="server">
<div>
<div style="text-align: center">
<span style="font-size: 16pt">
<div style="text-align: center">
</div>
</span>
<table style="width: 119%; height: 98%">
<tr>
<td style="width: 980px; height: 708px" valign="top">
<h1>
<span style="font-size: 36pt; color: #ffcc99"><em>
Welcome To Jatto Shopping</em></span></h1>
</td>
</tr>
</table>
&nbsp;&nbsp;</div>
<h1 style="text-align: center">
<span style="font-size: 32pt; font-family: Agency FB">
</span></h1>
<p style="text-align: center">
<marquee style="z-index: 104; left: 73px; width: 805px; position: absolute; top: 104px"
id="MARQUEE1"><SPAN
style="COLOR: #333300"><STRONG>E-Commerce Online Web
Shopping</STRONG></SPAN></marquee><span style="font-size: 32pt; color:
#3300ff"><em></em></span></p>
</div>
<asp:Image ID="Image1" runat="server" Height="355px" ImageUrl="~/onlineshopping.jpg"
Style="z-index: 101; left: 70px; position: absolute; top: 192px" Width="810px" />
<asp:Menu ID="Menu2" runat="server" BackColor="#E3EAEB" DynamicHorizontalOffset="2"
Font-Names="Verdana" Font-Size="0.8em" Font-Underline="True" ForeColor="Gray"
Height="36px" Orientation="Horizontal" StaticSubMenuIndent="10px" Style="z-index:
102;
left: 70px; position: absolute; top: 146px" Width="811px"
DynamicBottomSeparatorImageUrl="~/shir.jpg" DynamicTopSeparatorImageUrl="~/lap.jpg"
ScrollDownImageUrl="~/lap.jpg">
<StaticMenuItemStyleHorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyleBackColor="#666666" ForeColor="White" />
<DynamicMenuStyleBackColor="#E3EAEB" />
<StaticSelectedStyleBackColor="#1C5E55" />
<DynamicSelectedStyleBackColor="Silver" />
<DynamicMenuItemStyleHorizontalPadding="5px" VerticalPadding="2px" />
<Items>
<asp:MenuItem Text="Home" Value="Home" NavigateUrl="~/Default.aspx"></asp:MenuItem>
<asp:MenuItem Text="Products" Value="Products"
NavigateUrl="~/Products.aspx"></asp:MenuItem>
<asp:MenuItem Text="Services" Value="Sevices"
NavigateUrl="~/producttypes.aspx"></asp:MenuItem>
<asp:MenuItem Text="Adminstrator" Value="Adminstrator"></asp:MenuItem>
<asp:MenuItem Text="About Us" Value="About Us"></asp:MenuItem>
<asp:MenuItem Text="Contact Us" Value="Contact Us"></asp:MenuItem>
</Items>
<StaticHoverStyleBackColor="#666666" ForeColor="White" />
</asp:Menu>
<div style="text-align: center; vertical-align: middle;">
&nbsp;<br />
&nbsp;</div>
</form>
</body>
</html>
Books.aspx
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString%>"
SelectCommand="SELECT [p_id], [name], [price], [description], [pictureURL] FROM [book]">
</asp:SqlDataSource>

</div>
<asp:DataList ID="DataList1" runat="server" CellPadding="20" CellSpacing="50"
DataSourceID="SqlDataSource1"
Font-Bold="False" Font-Italic="True" Font-Names="Comic Sans MS" Font-
Overline="False"
Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center"
RepeatColumns="3"
RepeatDirection="Horizontal">
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Eval("pictureURL",
"ProductImages\\thumb_{0}") %>' PostBackUrl='<%# Eval("p_id","bookitem.aspx?p_id={0}")
%>' /><br />
<asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name", "{0}")
%>'></asp:Label><br />
<asp:Label ID="priceLabel" runat="server" Text='<%# Eval("Price","{0:##0.00}")
%>'></asp:Label><br />
</ItemTemplate>
</asp:DataList><br />
&nbsp; &nbsp;&nbsp;
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default.aspx"><-
back</asp:HyperLink>
</form>
</body>
</html>
Billcheck.aspx
using System;
usingSystem.Data;
usingSystem.Configuration;
usingSystem.Collections;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Web.UI.HtmlControls;

public partial class billcheck : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Profile.Cart == null)
{
Profile.Cart = new shop.Commerce.ShoppingCart();
}
if (!Page.IsPostBack)
{
BindGrid();
}
if (Profile.Cart.Items.Count == 0)
{
TotalLabel.Visible = false;
}
}
protected void CartGrid_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
Profile.Cart.Items.RemoveAt(e.RowIndex);
BindGrid();
}
protected void CartGrid_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
CartGrid.EditIndex = -1;
BindGrid();
}
protected void CartGrid_RowEditing(object sender, GridViewEditEventArgs e)
{
CartGrid.EditIndex = e.NewEditIndex;
BindGrid();
}
protected void CartGrid_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
TextBoxQuantityTextBox = (TextBox)CartGrid.Rows[e.RowIndex].Cells[2].Controls[0];
int Quantity = Convert.ToInt32(QuantityTextBox.Text);
if (Quantity == 0)
{
Profile.Cart.Items.RemoveAt(e.RowIndex);
}
else
{
Profile.Cart.Items[e.RowIndex].Quantity = Quantity;
}
CartGrid.EditIndex = -1;
BindGrid();
}
private void BindGrid()
{
CartGrid.DataSource = Profile.Cart.Items;
DataBind();

TotalLabel.Text = String.Format("Total:{0,19:C}", Profile.Cart.Total);
Session["tot"] = TotalLabel.Text;
}
}
Shoppingcart.aspx
using System;
usingSystem.Data;
usingSystem.Configuration;
usingSystem.Collections;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Web.UI.HtmlControls;
usingshop.Commerce;
public partial class ShoppingCart : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (Profile.Cart == null)
{
Profile.Cart = new shop.Commerce.ShoppingCart();
}
if (!Page.IsPostBack)
{
BindGrid();
}
if (Profile.Cart.Items.Count == 0)
{
TotalLabel.Visible = false;
}
}
protected void CartGrid_RowEditing(object sender, GridViewEditEventArgs e)
{
CartGrid.EditIndex = e.NewEditIndex;
BindGrid();
}
protected void CartGrid_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
TextBoxQuantityTextBox = (TextBox)CartGrid.Rows[e.RowIndex].Cells[2].Controls[0];
int Quantity = Convert.ToInt32(QuantityTextBox.Text);
if (Quantity == 0)
{
Profile.Cart.Items.RemoveAt(e.RowIndex);
}
else
{
Profile.Cart.Items[e.RowIndex].Quantity = Quantity;
}
CartGrid.EditIndex = -1;
BindGrid();

}
protected void CartGrid_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
CartGrid.EditIndex = -1;
BindGrid();
}
protected void CartGrid_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
Profile.Cart.Items.RemoveAt(e.RowIndex);
BindGrid();
}
private void BindGrid()
{
CartGrid.DataSource = Profile.Cart.Items;
DataBind();
TotalLabel.Text = String.Format("Total:{0,19:C}", Profile.Cart.Total);
}
}


Billing.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="producttypes.aspx.cs"
Inherits="producttypes" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body background="smile2.jpg">
<form id="form1" runat="server">
<div align="center">
<asp:ImageButton ID="ImageButton1" runat="server" Height="92px"
ImageUrl="~/ProductImages/car-2.jpg"
Style="z-index: 100; left: 592px; position: absolute; top: 12px" Width="97px" />
<asp:ImageButton ID="ImageButton11" runat="server" Height="120px"
ImageUrl="~/ProductImages/cam-1.jpg"
Style="z-index: 114; left: 512px; position: absolute; top: 392px" Width="136px" />
<asp:ImageButton ID="ImageButton10" runat="server" Height="120px"
ImageUrl="~/ProductImages/mob-1.jpg"
Style="z-index: 113; left: 680px; position: absolute; top: 432px" Width="128px" />
<asp:ImageButton ID="ImageButton9" runat="server" Height="120px"
ImageUrl="~/ProductImages/bok-1.jpg"
Style="z-index: 112; left: 488px; position: absolute; top: 240px" Width="120px" />
<asp:ImageButton ID="ImageButton3" runat="server" Height="112px"
ImageUrl="~/ProductImages/lap-1.jpg" Style="z-index: 111; left: 672px; position: absolute;
top: 296px" Width="144px" />
<asp:Image ID="Image2" runat="server" Height="112px" ImageUrl="~/ProductImages/ipopd-
5.jpg" Style="z-index: 110; left: 816px; position: absolute; top: 0px" Width="128px" />
<span style="font-size: 18pt; color: #0000cd; font-family: Comic Sans MS">&nbsp;</span>
<asp:ImageButton ID="ImageButton8" runat="server" ImageUrl="~/button.gif"
PostBackUrl="~/Default.aspx" Style="z-index: 106; left: 55px; position: absolute; top: 39px"
/>
<asp:ImageButton ID="ImageButton6" runat="server" Height="104px"
ImageUrl="~/ProductImages/ipopd-1.jpg"
Style="z-index: 105; left: 616px; position: absolute; top: 168px" Width="152px" />
<asp:ImageButton ID="ImageButton5" runat="server" Height="96px"
ImageUrl="~/ProductImages/bik-5.jpg"
Style="z-index: 104; left: 704px; position: absolute; top: 56px" Width="104px" />
<asp:ImageButton ID="ImageButton4" runat="server" Height="154px"
ImageUrl="~/ProductImages/print-4.jpg" Style="z-index: 103; left: 840px; position:
absolute; top: 352px" Width="97px" />
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Monotype Corsiva"
Font-Size="XX-Large" ForeColor="#400040" Height="35px" Style="z-index: 102; left:
176px;
position: absolute; top: 40px" Width="392px">OUR PRODUCTS</asp:Label>
<asp:ImageButton ID="ImageButton2" runat="server" BackColor="#FFC0C0" Height="90px"
ImageUrl="~/ProductImages/bik-1.jpg" Style="z-index: 101; left: 496px; position: absolute;
top: 112px" Width="96px" />
&nbsp;
<div style="z-index: 107; left: 48px; width: 424px; position: absolute; top: 122px;
height: 314px">
<p style="background: whitesmoke; text-align: justify">
<span style="font-size: 7.5pt; font-family: Verdana"><font face="Comic Sans MS"><font
style="color: mediumblue"><font color="#ff6666" size="5" style="color: mediumblue">BPRS
is a company with a proud history of technological innovation, caring for the environment
and people. Everything Smiley Shopping &nbsp;does is designed to enrich the lives
of people by making life more "comfortable".&nbsp; Whether for the home, the office&nbsp;
youll find a USB product that will make your life more
enjoyable.</font></font></font></span></p>
</div>
<asp:Image ID="Image1" runat="server" Height="106px" ImageUrl="~/ProductImages/shirt-
1.jpg"
Style="z-index: 109; left: 808px; position: absolute; top: 168px" Width="128px" />
&nbsp;&nbsp;
<asp:ImageButton ID="ImageButton12" runat="server" ImageUrl="~/FEEDBACK.png"
Style="left: 291px;
position: absolute; top: 474px" Width="124px" Height="32px" PostBackUrl="~/login.aspx" />
<asp:ImageButton ID="ImageButton7" runat="server" Height="31px" ImageUrl="~/order.png"
PostBackUrl="~/ShoppingCartPage.aspx" Style="left: 120px; position: absolute;
top: 474px" Width="124px" />

</div>
</form>

</body>
</html>




Creditcard.aspx
<%@ Page Language="C#" %>
<%--<%@ Import Namespace ="using System.Data.SqlClient" %>--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
System.Data.SqlClient.SqlConnection con = new
System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("con"));
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand();
intcno;
protected void Button2_Click(object sender, EventArgs e)
{
txtplaceissue.Text = "";
txtphno.Text = "";
ddlbank.SelectedIndex = 0;
}
private void display()
{
if (con.State == System.Data.ConnectionState.Closed) con.Open();
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand("select
isnull(max(cred_id)+1,1) from Credit_Det", con);
cno = Convert.ToInt32(cmd.ExecuteScalar());
//con.Close();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
System.Data.SqlClient.SqlConnection con = new
System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("con"));
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand();
if (con.State == System.Data.ConnectionState.Closed) con.Open();
cmd = new System.Data.SqlClient.SqlCommand("insert into Credit_Det
values(@cred_id,@cust_id,@cust_name,@addr,@phno,@bank,@date_issue,@date_Exp,@plac
e_issue)", con);
cmd.Parameters.Add("@cred_id", System.Data.SqlDbType.Int).Value = cno;
cmd.Parameters.Add("@cust_id", System.Data.SqlDbType.Int).Value = txtcustid.Text;
cmd.Parameters.Add("@cust_name", System.Data.SqlDbType.VarChar).Value = txtname.Text;
cmd.Parameters.Add("@addr", System.Data.SqlDbType.VarChar).Value = txtaddr.Text;
//cmd.Parameters.Add("@job", System.Data.SqlDbType.Varchar).Value = txtjob.Text ;
cmd.Parameters.Add("@phno", System.Data.SqlDbType.VarChar).Value = txtphno.Text;
cmd.Parameters.Add("@bank", System.Data.SqlDbType.VarChar).Value =
ddlbank.SelectedItem.Text;
cmd.Parameters.Add("@date_issue", System.Data.SqlDbType.VarChar).Value =
txtdateissue.Text;
cmd.Parameters.Add("@date_Exp", System.Data.SqlDbType.VarChar).Value = txtdateexp.Text;
cmd.Parameters.Add("@place_issue", System.Data.SqlDbType.VarChar).Value =
txtplaceissue.Text;
cmd.ExecuteNonQuery();
Label2.Text = "Insertion Successful";
}
catch (Exception ex)
{
Label2.Text = ex.Message;
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table id="Table1" border="1" cellpadding="1" cellspacing="1" style="font-weight: bold;
z-index: 100; left: 312px; width: 528px; position: absolute; top: 184px; height: 296px"
language="javascript" onclick="return Table1_onclick()">
<tr>
<td style="width: 127px">
&nbsp;Customer Id</td>
<td style="width: 296px">
<asp:TextBox ID="txtcustid" runat="server" Width="272px"></asp:TextBox>&nbsp;
</td>
<td>
</td>
</tr>
<tr>
<td style="width: 127px">
&nbsp;Name</td>
<td style="width: 296px">
<asp:TextBox ID="txtname" runat="server" Width="272px"></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td style="width: 127px; height: 29px">
&nbsp;Address</td>
<td style="height: 29px; width: 296px;">
<asp:TextBox ID="txtaddr" runat="server" Height="40px" TextMode="MultiLine"
Width="272px"></asp:TextBox></td>
<td style="height: 29px">
</td>
</tr>
<tr>
<td style="width: 127px">
&nbsp;Phone No</td>
<td style="width: 296px">
<asp:TextBox ID="txtphno" runat="server" Width="272px"></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td style="width: 127px; height: 26px;">
&nbsp;Bank Name</td>
<td style="width: 296px; height: 26px;">
<asp:DropDownList ID="ddlbank" runat="server" Width="272px">
<asp:ListItem>SBI</asp:ListItem>
<asp:ListItem>ING VYSYA</asp:ListItem>
</asp:DropDownList></td>
<td style="height: 26px">
</td>
</tr>
<tr>
<td style="width: 127px">
&nbsp;Credit Card No</td>
<td style="width: 296px">
<asp:TextBox ID="txtcreditno" runat="server" Width="272px"></asp:TextBox></td>
<td>
<asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtcreditno"
ErrorMessage="Enter 5 digits" MaximumValue="5" MinimumValue="0"
Width="104px"></asp:RangeValidator></td>
</tr>
<tr>
<td style="width: 127px">
&nbsp;Date of Issue</td>
<td style="width: 296px">
<asp:TextBox ID="txtdateissue" runat="server" Width="272px"></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td style="width: 127px">
&nbsp;Place of Issue</td>
<td style="width: 296px">
<asp:TextBox ID="txtplaceissue" runat="server" Width="272px"></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td style="width: 127px">
&nbsp;Date of Expiry</td>
<td style="width: 296px">
<asp:TextBox ID="txtdateexp" runat="server" Width="272px"></asp:TextBox></td>
<td>
</td>
</tr>
<tr>
<td style="width: 127px">
</td>
<td style="width: 296px">
<asp:Label ID="Label2" runat="server" Width="104px"></asp:Label></td>
<td>
</td>
</tr>
</table>
&nbsp;&nbsp;
<asp:Button ID="Button2" runat="server" Font-Bold="True" Height="32px" Style="z-index:
103; left: 534px; position: absolute; top: 512px" Text="Refresh" Width="104px"
OnClick="Button2_Click" />
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="X-
Large" ForeColor="Navy" Height="32px" Style="z-index: 101; left: 344px; position: absolute;
top: 128px" Width="368px">CREDIT CARD DETAILS</asp:Label>
<asp:Button ID="Button1" runat="server" Font-Bold="True" Height="32px" Style="z-index:
102; left: 259px; position: absolute; top: 512px" Text="Submit" Width="104px"
OnClick="Button1_Click" />
<asp:Button ID="Button3" runat="server" Font-Bold="True" Height="36px"
PostBackUrl="~/billcheck.aspx" Style="left: 342px; position: relative; top: 497px"
Text="next>>" Width="110px" /></div>
</form></body></html>
Checkout.aspx
using System;
usingSystem.Data;
usingSystem.Configuration;
usingSystem.Collections;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Web.UI.HtmlControls;
usingSystem.Data.SqlClient;
public partial class checkout : System.Web.UI.Page
{
System.Data.SqlClient.SqlConnection con = new
System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("con"));
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand();
intempid;
protected void Page_Load(object sender, EventArgs e)
{
txtcustname.Focus();
display();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
System.Data.SqlClient.SqlConnection con = new
System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("con"));
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand();
if (con.State == System.Data.ConnectionState.Closed) con.Open();

cmd = new System.Data.SqlClient.SqlCommand("insert into cust_det
values(@cust_id,@cust_name,@sex,@job,@street,@city,@state,@country,@phno,@email,@a
nnu_income,@credit_cart)", con);
cmd.Parameters.Add("@cust_id", System.Data.SqlDbType.Int).Value = empid;
cmd.Parameters.Add("@cust_name", System.Data.SqlDbType.VarChar).Value =
txtcustname.Text;
cmd.Parameters.Add("@sex", System.Data.SqlDbType.VarChar).Value =
DDLGENDER.SelectedItem.Text;
cmd.Parameters.Add("@job", System.Data.SqlDbType.VarChar).Value = txtjob.Text;
//cmd.Parameters.Add("@job", System.Data.SqlDbType.Varchar).Value = txtjob.Text ;
cmd.Parameters.Add("@street", System.Data.SqlDbType.VarChar).Value = txtstreet.Text;
cmd.Parameters.Add("@city", System.Data.SqlDbType.VarChar).Value = txtcity.Text;
cmd.Parameters.Add("@state", System.Data.SqlDbType.VarChar).Value = txtstate.Text;
cmd.Parameters.Add("@country", System.Data.SqlDbType.VarChar).Value =
DDLCOUNTRY.SelectedItem.Text;
cmd.Parameters.Add("@phno", System.Data.SqlDbType.Int).Value = txtcontactno.Text;
cmd.Parameters.Add("@email", System.Data.SqlDbType.VarChar).Value = txtemail.Text;
cmd.Parameters.Add("@annu_income", System.Data.SqlDbType.Int).Value = txtannualinc.Text;
cmd.Parameters.Add("@credit_cart", System.Data.SqlDbType.Int).Value = txtcreditcard.Text;
cmd.ExecuteNonQuery();

Label3.Text = "Insertion Success & Your ID= " + empid;
}
catch (Exception ex)
{
Label3.Text = ex.Message;
}
}
private void display()
{
if (con.State == System.Data.ConnectionState.Closed) con.Open();
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand("select
isnull(max(cust_id)+1,1) from cust_det", con);
empid = Convert.ToInt32(cmd.ExecuteScalar());
//con.Close();
}
}
Checkout.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="deliver.aspx.cs"
Inherits="deliver" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div align="center">
<br />
<br />
<br />
<br />
<span style="font-size: 24pt; color: #ff3366">&nbsp; &nbsp; Thank u for purchasing the
products ........<br />
<br />
<br />
U R products will be delivered shortly........</span></div>
</form>
</body>
</html>

Feedback.aspx
using System;
usingSystem.Data;
usingSystem.Configuration;
usingSystem.Collections;
usingSystem.Web;
usingSystem.Web.Security;
usingSystem.Web.UI;
usingSystem.Web.UI.WebControls;
usingSystem.Web.UI.WebControls.WebParts;
usingSystem.Web.UI.HtmlControls;

public partial class FeddBack : System.Web.UI.Page
{
System.Data.SqlClient.SqlConnection con = new
System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("con"));
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand();
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
System.Data.SqlClient.SqlConnection con = new
System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings.Get("con"));
System.Data.SqlClient.SqlCommandcmd = new System.Data.SqlClient.SqlCommand();
if (con.State == System.Data.ConnectionState.Closed) con.Open();
cmd = new System.Data.SqlClient.SqlCommand("insert into feedback
values(@Cus_id,@Cus_name,@product,@Description)", con);
cmd.Parameters.Add("@Cus_id", System.Data.SqlDbType.VarChar).Value = txtcustid.Text;
cmd.Parameters.Add("@Cus_name", System.Data.SqlDbType.VarChar).Value =
txtcustname.Text;
cmd.Parameters.Add("@product", System.Data.SqlDbType.VarChar).Value = txtproduct.Text;
cmd.Parameters.Add("@Description", System.Data.SqlDbType.VarChar).Value =
txtDescription.Text;
cmd.ExecuteNonQuery();

Label5.Text = "Insertion Successful";
}
catch (Exception ex)
{
Label3.Text = ex.Message;
}
}
}


SNAPSHOTS

Home Page





Books





Book List ( Computer Category)








Adding Java Book in Cart





BookList(Science Category)




Adding Book In Cart






Cart




Customer Registration




Credit Card Details



Confirmation for Order





Screen After Placing Order




Feedback




Search Book




Admin Login Page





Admin Home Page





Customers List





Transaction List






CONCLUSION

The ONLINE BOOK ORDER PROCESSING SYSTEM has been validated by the client
and is functioning satisfactorily.
The solution has succeeded in achieving the following.
Providing clients to place orders on the net through user friendly interfaces.
Providing facility to the clients to place orders for the books of different publications and
authors, so that they need not know all the address of different publications.
Reducing the communication gap between the client and the organizations.





Scope for Future Enhancement

The present software solution is limited to placing order for the products on the net
through the system.
This solution can be extended to provide facility to the customer to place their orders
through mobile using MMIT (Microsoft Mobile Internet Toolkit).












Biblography

The following books were referred during the analysis and execution phase of the project .
SQL THE COMPLETE REFERENCE
By Sql Press
SOFTWARE ENGINEERING
By Roger.S.Pressman
Professional ASP.NET
By Wrox
MSDN
By Microsoft

Das könnte Ihnen auch gefallen