56
CHAPTER-1 INTRODUCTION In modern era, computers have made everything under one roof and have knit the world together. Because of IT revolution computers have been made the core element in every place. Computerization has become an eventical one for people who prefer speedy and ease of access. Human beings are liable to make mistakes and the output usually depends on the efficiency of the persons involved. But computers could usually generate efficient which varies upon the person operating the system. This project entitled Online Web Mart System For Jewellery is designed to maintain the jewel items sales activities. This system keeps track of all sales activities and also details about customers and product items. This project is developed using Microsoft Visual Studio as front end and MS SQL Server 2005 as back end. 1

online web mart system for jewellery

Embed Size (px)

Citation preview

Page 1: online web mart  system for  jewellery

CHAPTER-1

INTRODUCTION

In modern era, computers have made everything under one roof and have knit the

world together. Because of IT revolution computers have been made the core element in

every place. Computerization has become an eventical one for people who prefer speedy

and ease of access. Human beings are liable to make mistakes and the output usually

depends on the efficiency of the persons involved. But computers could usually generate

efficient which varies upon the person operating the system.

This project entitled Online Web Mart System For Jewellery is designed to

maintain the jewel items sales activities. This system keeps track of all sales activities

and also details about customers and product items.

This project is developed using Microsoft Visual Studio as front end and MS SQL

Server 2005 as back end.

1

Page 2: online web mart  system for  jewellery

1.1 Problem Description

In this modern competitive world marketing a product of a company is very

difficult task. They have to tackle the competitors, dealers and customers. In every stage

of marketing the product, the company should have to plan perfectly. Otherwise they

cannot able to market their products successfully. Nowadays, Internet becomes one of the

most popular media to reach the customer directly and market our products to the

customers directly.

1.2 Project Objective

This project Online Web Mart System For Jewellery is an online shopping

center, through which consumer can buy the jeweler products online. Users of this site

can use this site not only for buying the products but they can get full information about

all of the jeweler products. Wide range of product categories makes it easier.

The steps involved in placing order for consumer products are as follows. Users first

view the categories list, and then they can view the particular product details with image

facility. They view the product image in large and small size. They can get the prize and

all mandatory details. If they choose one product to buy, then they add that product to

cart by using Add to cart link. They can view the cart whenever they want. Shopping cart

has all the products which were chosen by the user. It displays the Name of the product,

quantity, price per quantity, total price, for purchased products. It also has the removes

from cart buttons to delete the products in the shopping cart.

After purchase the products user provide the payment details to the supplier. They

must fill up the form in the payment module. Here they give the payment mode, address

for communication, name, etc. through this information payment is transferred for the

purchased products.

The seller can remotely upload the product image and specification so that the

administrator of the site can place it at the showcase online. The buyer can select the

product and confirm the order by giving their details.

2

Page 3: online web mart  system for  jewellery

CHAPTER-2

SYSTEM ANALYSIS

2.1 Existing System

To market the products in such distance, the company has to appoint dealers and

they have to monitor their products will slash down. Payment tracking is also a tedious

job in the manual marketing.

The company has to keep track of the manpower requirement, their work details,

payment details and have to deploy more employees in this regard. To overcome these

kind problems, the company is decided to market through Internet.

2.2 Proposed System

This project Online Web Mart System for Jewellery is an online shopping,

through which we can buy the products online. The users of this site can use this site not

only for buying the products but they can get full information about all of the consumer

products. Wide range of product categories makes it easier.The idea of this site is to have

a central hub for users to buy their products.

The administrator can remotely upload the product image and specifications of

the site. The buyer can select the product and confirm the order by giving their details.

The payment can also be made online. The admin has privileges to view the reports

about the site and based on the information gathered the site’s business part can be

enhanced.

3

Page 4: online web mart  system for  jewellery

CHAPTER-3

SYSTEM SPECIFICATION

3.1 Hardware Specification

Processor : Intel Pentium D CPU 3.00 GHZ

RAM : 1 GB

Hard Disk : 80 GB

1.44 MB FDD

52X CD ROM

14’’ LCD Monitor

104 Keys Keyboard

3.2 Software Specification

Front end : Microsoft Visual Studio .NET 2008

Back end : MS SQL Server 2005

Frame work : ASP.NET

Code behind file : C#

Operating System : WINDOWS 2007

4

Page 5: online web mart  system for  jewellery

CHAPTER-4

SOFTWARE DESCRIPTION

4.1 Front End Description

Introduction To ASP.NET

ASP.NET is the part of the .Net framework. ASP.NET, the latest version of

Active Server Pages, is Microsoft’s technology for building dynamic, database-

driven websites. Active Server Pages is one of the most popular languages for

building scalable, interactive Web sites. Several of the highest traffic Web sites

on the Internet employs Active Server Pages.ASP.NET represents a radical

departure from previous versions of Active Server Pages.

Features of ASP.NET

ASP.NET uses compiled code for written in Common Language Runtime

languages such as Visual Basic and C#.

ASP.NET pages are built out of server-side controls. Web server enables us to

represent and program against Hypertext Markup Language (HTML) elements

using an intuitive object model.

ASP.NET includes a new technology called Web Services. It is used to access

methods and properties and transfer database data across the Internet.

ASP.NET is the part of Microsoft’s .Net framework. Anyone can access

thousands of .Net classes in the code that enable us to perform wondrously

diverse tasks as generating images on-the –fly and saving an array to a file.

ASP.NET includes page and data caching mechanisms that enable us to easily and

dramatically improve the performance of the Web site.

5

Page 6: online web mart  system for  jewellery

.Net Framework

The .NET Framework is the infrastructure for the new Microsoft .NET Platform.

The .NET framework is a common environment for building, deploying, and running

web applications and Web Services. The .NET Framework contains a Common language

runtime and common class libraries – like ADO.NET, ASP.NET and Windows Forms –

to provide advanced standard services that can be integrated into a variety of computer

systems.

The .NET Framework provides a feature-rich application environment, simplified

development and easy integration between a numbers of different development

languages. The .NET Framework is language neutral. Currently is supports C++, C#,

Visual Basic, and Jscript (The Microsoft version of JavaScript).Microsoft’s Visual

Studio.NET is a common development environment for the new .NET Framework.

Asp.Net Controls

Asp.Net Contains a large set of HTML controls. Almost all HTML elements on

page can be defined as ASP.Net control objects that can be controlled by scripts.Asp.Net

also contains a new set of object oriented input controls, like programmable list boxes

and validation controls .A new data grid control supports sorting ,data paging ,and

everything that is expect by others from a dataset control.

6

Page 7: online web mart  system for  jewellery

4.2 Back End Description

SQL SERVER is client/server Relational Database Management System that uses

Transact-SQL to send request between a client and SQL server.

The Microsoft SQL Server 2005 Database Engine is the core service for storing,

processing, and securing data. The Database Engine provides controlled access and rapid

transaction processing to meet the requirements of the most demanding data consuming

applications within your enterprise. The Database Engine also provides rich support for

sustaining high availability.

A client/server database system is made up of two components:

Programs that provide an interface for client-based users to access data.

The database structure that manages and stores the data on the server.

For example, if you use Microsoft SQL Server 2005 to create a checking account

application, you must set up a database structure to manage the account transaction data

and an application that acts as the user interface to the database. This allows users to

access checking account information.

Creating a database to serve your business needs requires an understanding of

how to design, create, and maintain each of these components to make sure that your

database performs optimally.

Data Definition Language

Data definition language (DDL) statements are SQL stataements that support the

definition or declaration of database objects; for example, CREATE TABLE, DROP

TABLE and ALTER TABLE.

Only the members of the sysadmin, dbcreator, dbowner, or db_ddladmin role can

execute DDL Statements by default. If multiple user accounts create objects, the

7

Page 8: online web mart  system for  jewellery

sysadmin and dbowner roles can use the SETUSER function to impersonate another user

or the sp_ changeobjectowner system procedure to change the owner of an object.

Data Manipulation Language

DML Statements are used to change data or retrieve information. DML statements

include:

SELECT

INSERT

UPDATE

DELETE

By default, only the members of the sysadmin, dbcreator, dbowner or

db_datawriter role can execute DML statements.

CHAPTER-5

PROJECT DESCRIPTION

8

Page 9: online web mart  system for  jewellery

5.1 Overview of the project

Online Web Mart For Jewellery Shopping is an advanced software application for

enterprises that wish to exploit the opportunities of the World Wide Web through the

deployment of advanced E-Shopping mall. The platform supports a set of generic

services such as multiple catalogues, products, shopping carts and order management that

can be fully customized to support any business requirement. Here create the E-Shopping

application for jewelry mart.

Products are our main module in which user can get the information about the

jewel items. Here Jewels are categorized as Necklaces, Rings, Earrings, Bangles, Sets

These are all present al links as well as provide the images. By selecting link and images,

the information about the corresponding category models will be displayed from the

database along with the picture. From that information, user can select the product and

add it to their shopping cart. At any time they can view their Shopping Cart and delete or

add products in the Cart.

After finishing the selection of all the products, customer must be login to view

their cart items and they will be lead to the page of Payment Tracking System. Here

Customer must give their payment details. After getting the credit card number will be

checked for the originality of the number. After that it will be verified with the bank

database with information given by the customer. Once all the verifications are done,

then only the customer order will registered. After registering customer, the goods will

be delivered to the customer in short period.

5.2 Modules

1. Administrator

2. Registration

3. Shopping

4. Check out

5.2.1 Modules Description

9

Page 10: online web mart  system for  jewellery

Administrator

In this module administrator can maintain a database for the clients who are doing

purchase products from the company and their details such as client name, address,

product details, quantity. These details are used for future references.

The administrator can remotely upload the product image and specification so that

the site can place it at the showcase online. The buyer can select the product and confirm

the order by giving their details. The payment can also be made online. The admin has

privileges to view the reports about the site and based on the information gathered the

site’s business part can be enhanced.

Registration

Customers are required to register on the website before they can do the shopping.

The website also provides several features for the non-registered user. In Registration

module the customer can register their information like name, address, Pin code, contact

number, email-id, etc.

Shopping

In this module product catalog are displayed to the end users or customers.

Images of the products are very important for online purchasing. So those in the product

catalog products are displayed with images and additional information.

If they choose one product to buy, then they add that product to cart by using Add

to cart link. They can view the cart whenever they want. Shopping cart has all the

products which were chosen by the user. It displays the Name of the product, quantity,

price per quantity, total price, for purchased products. It also has the add cart and

removes from cart buttons to add and delete the products in the shopping cart.

Checkout

After purchase the products user provide the payment details to the supplier. They

must fill up the form in the payment module. Here they give the payment mode, address

10

Page 11: online web mart  system for  jewellery

for communication, name, etc. through this information payment is transferred for the

purchased products.

11

Page 12: online web mart  system for  jewellery

5.3 Data Flow Diagram

Level 0

Context Level DFD

12

Page 13: online web mart  system for  jewellery

Level 1

Online Orders

13

Page 14: online web mart  system for  jewellery

Level 2

Customer Payment Details

5.4 Database Design

14

Page 15: online web mart  system for  jewellery

A collection of interrelated datasets stored together and controlled by a

specific scheme for efficient management of information. A consistent and specified set

of procedures used for building, maintaining, accessing, and interrogating from a

database.

Table Name : User Table

Purpose : Registration

Primary Key : ID

S .NO FIELD

NAME

TYPE DESCRIPTION CONSTRAINT

1. ID Int Id of the customer Primary Key

2. USER NAME nvarchar(50)User name of the

customer

3. PASSWORD nvarchar(50)Password for

authentication

4. EMAIL nvarchar(50)Email Id of the

customer

5. ADDRESS nvarchar(50)Address of the

customer

6. NAME nvarchar(50)Name of the

customer

7. PHONE nvarchar(50) Phone number

8. USER TYPE nvarchar(50)Type of the

Customer

Table Name : Product Table

Purpose : Product Details

15

Page 16: online web mart  system for  jewellery

Primary Key : ProductID

S.NO FIELD NAME TYPE DESCRIPTION CONSTRAINT

1. ProductID Int Id of the product Primary Key

2. ProductName nvarchar(50) Name of the product

3.ProductDescript

ionnvarchar(2000)

Description about

product

4.ProductShortDe

scriptionnvarchar(500)

Short description

about product

5. Price Float Product price

6. Category nvarchar(50) Product category

7. ProductImage nvarchar(500) Product Image

8.ProductImageT

humbnvarchar(50)

Product Image

Thumb

Table Name : Shopping Cart

Purpose : Shopping Product Details

16

Page 17: online web mart  system for  jewellery

Primary Key : ShoppingID

S.NO FIELD NAME TYPE DESCRIPTION CONSTRAINT

1. ShoppingID IntId of the Shopping

productPrimary Key

2. ProductIDNo nvarchar(50)Product ID

Number

3. UserID nvarchar(2000) User ID

4. SalesStatus nvarchar(500) Sales Status

5. Qty IntQuantity of

product

Table Name : Order Table

Purpose : Product orders

Primary Key : SerialNumber

S.NO FIELD NAME TYPE DESCRIPTION CONSTRAINT

1. SerialNumber IntSerial No of the

Shopping productPrimary Key

2. UserName nvarchar(50)Name of the

customer

3. Amount Float Amount

Table Name : ReviewTable

Purpose : Product Reviews

17

Page 18: online web mart  system for  jewellery

Primary Key : ReviewID

S.NO FIELD NAME TYPE DESCRIPTION CONSTRAINT

1. ReviewID IntReviewID of the

Shopping productPrimary Key

2. Username nvarchar(50)Name of the

customer

3. Review nvarchar(50) Review

4. ProductID nvarchar(50) ProductID

Table Name : BankTable

Purpose : BankDetails

S.NO FIELD NAME TYPE DESCRIPTION CONSTRAINT

1. Cardnumber nchar(10)Customer card

number

2. Amount FloatAmount of the

customer

5.5 Input Design

18

Page 19: online web mart  system for  jewellery

Input design is the most important part of the overall system design, which

requires very careful attention. Often the collection of input data is the most expensive

part of the system. Input design is concentrated on estimating what the inputs are and

how often is to be arranged on the input screen, how frequently the data are to be

collected etc.

Some of the inputs used in this project are:

Customer details

Purpose: This form is used to maintain customer details, Jewel item details, bank

details.

View Reviews

Purpose: This form is used to Review all the orders from customers

Sales Orders

Purpose: This form is used to record sales order and is used to determine process

The order

5.6 Output Design

Computer output is most important and direct source of information to the user.

Efficient and intelligible output design should improve the system’s relationship with the

user and help in decision making. Output from the computer system is required to

communicate the result of processing to the user and to provide permanent copy of

these results for later consultation. While designing the output, the type of output,

concern format, frequency response etc have been taken into consideration.

Some of the outputs used in this project are:

Customer details

Report is generated to maintain all customer details. In this report customer code,

customer name, address, city, email are displayed.

Shopping carts

Report is generated to maintain all item details. In this report item code, item

name, item purchase rate, item category are displayed.

CHAPTER-6

SYSTEM TESTING

19

Page 20: online web mart  system for  jewellery

System Testing is an important stage in any system development life cycle.

Testing is a process of executing a program with the intention of finding errors. The

importance of software testing and its implications with respect to software quality

cannot be overemphasized. Software testing is a critical element of software quality

assurance and represents the ultimate review of specification, design and coding. A good

test case is one that has a high probability of finding a yet undiscovered error.

Testing is the set of activities that can be planned in advance and conducted

systematically. Different test conditions should be thoroughly checked and the bugs

detected should be fixed. The testing strategies formed by the user are performed to prove

that the software is free and clear from errors. To do this, there are many ways of testing

the system’s reliability, completeness and maintainability.

6.1 Unit Testing

Unit testing, also known as component testing refers to tests that verify the

functionality of a specific section of code, usually at the function level. The unit testing is

the initial level and also the development level testing method for all software

development process. This testing technique is applied on the small component of the

system.

In this project ONLINE WEB MART SYSTEM FOR JEWELLERY, each phase

thought of a module. There are so many modules like admin, registration, shopping, and

checkout. Each module has been tested by giving different set of inputs when developing

each as well as finishing the development so that module works without any error.

6.2 Integration Testing

The integration is the main process in the software development life cycle.

Integration testing is a systematic technique for constructing the program structure while

conducting test to uncover errors associate with interfacing. Objectives are used to take

unit test modules and built program structure that has been directed by design. After

integration the project works successfully.

6.3 Validation Testing

20

Page 21: online web mart  system for  jewellery

Validation testing can be defined in many ways, but a simple definition is that can

be reasonably expected by the customer. After validation test has been conducted, one of

two possible conditions exists.

The functions or performance characteristics confirm to specification and are

accepted.

A deviation from specification is uncovered and a deficiency list is created.

Proposed system under consideration has been tested by using validation testing

and found to be working satisfactorily.

CHAPTER-7

SYSTEM IMPLEMENTATION

21

Page 22: online web mart  system for  jewellery

Implementation is the state in the system where the theoretical design is turned

into a working system. The most crucial stage in achieving a new successful system and

in giving confidence on the new system for the users that will work efficiently and

effectively. The system can be implemented only after thorough testing is done and if

found to work according to the specification. It involves careful planning, investigation of

the current system and its constraints on implementation, design of methods to achieve

the changeover, an evaluation of changeover methods apart from planning.

Two major tasks of preparing the implementation are education, training of the

users and testing the systems. System analysis and design efforts will be more for

complex systems beings implemented. Based on policies of individuals’ organization an

implementation coordinating committee has been appointed.

The implementation process begins with preparing a plan for the implementation

system. According to this plan, the other activities are to be carried out. In this plan,

discussion has been made regarding the equipment, resources and how to test the

activities. Thus a clear plan is preparing for the activities.

EQUIPMENT ACQUISITION

According to the above plan, the necessary equipment has to be acquired to

implement the new system. Prime Tech has all the hardware requirements for installing

and maintaining the package.

PROGRAM CODE PREPARATION

One of the most important development activities is the code of programming.

The system DFD’s and other channels are converted to modular programs. They have to

be complied, tested and debugged.

USER MANUALS

Once planning has been completed the major effort of the computer department is

to ensure that the user department consists of education and trained staff, as the system

22

Page 23: online web mart  system for  jewellery

becomes more complex. The success of a system depends upon how they are operated

and used. Thus the quality of training, the personnel is connected to the success of the

system.

CHAPTER-8

CONCLUSION AND FUTURE ENCHANCEMENT

8.1 Conclusion

23

Page 24: online web mart  system for  jewellery

This application gives an easier way to shop the things from the home itself. The

customer can select wide range of Jewel items like Necklaces, Rings, Earrings, etc.

through online. The customers can view the product specification along with its picture

to get a clear view of the product.

This application makes shopping easy and quicker. It will increase the sales of

jewels item; it will be very useful to get more customers. This will elaborate the range of

marketing area.

This web application will be more helpful to the shop as well as the customers.

8.2 Future Enhancement

The system has been developed successfully since change is a way of life new

requirements may arise in future.

The modules that we have developed are easy to understand to the users. So we

can easily maintain the system. If we want to do some modification in future also it’s

easy to make. After some years the user requirement will change so according to that we

can update this system. Like we can change the reports design or we can add lots of

modules. In Future, we will give privilege customer for some discounts for improving

our sales. May be the user want to add some fields in some particular modules then

according to the customer requirements we can later.

Software Enhancement

Flexibility

CHAPTER9

BIBLIOGRAPHY

24

Page 25: online web mart  system for  jewellery

Book References:

1.Abhijit Jano, “ASP.NET 4.0: a beginner guide “, Tata McGrawHill Publishing (2010).

2. Abraham Silberth, “Introduction to database system concepts”, Macmillian Publishing

ltd.

Online References:

1.http://asp.net.microsoft.com

2.http://www.academictutorials.com/asp/asp-introduction.asp

3.http://en.wikipedia.org

APPENDIX

9.1 Source Code

25

Page 26: online web mart  system for  jewellery

Login.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 Login : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) {

} protected void Button1_Click(object sender, EventArgs e) { // Data source control that works with Sql databases

SqlDataSource sds = new SqlDataSource();

// Get connection string from application's default configuration

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

// Create parameters with specified names and values

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

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

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

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

26

Page 27: online web mart  system for  jewellery

// Retrieve data

DataView dv = (DataView)sds.Select(DataSourceSelectArguments.Empty);

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

if (dv.Count == 0) {

this.Label1.ForeColor = System.Drawing.Color.Red;

this.Label1.Text = "Login Failed!";

return;

}

// Create session variables

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

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

// Redirect to respective page based on user type

if (this.Session["UserType"].ToString().Equals("user"))

Response.Redirect("MainPageUsers.aspx");

else if (this.Session["UserType"].ToString().Equals("admin"))

Response.Redirect("MainPageAdmin.aspx");

}}

Register new user.aspx.cs

using System;

27

Page 28: online web mart  system for  jewellery

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 registernewuser : System.Web.UI.Page{ protected void Button1_Click(object sender, EventArgs e) {

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

sds.SelectParameters.Add("Username", TypeCode.String, this.txtUserName.Text); sds.SelectParameters.Add("Email", TypeCode.String, this.txtEmail1.Text);

sds.SelectCommand = "SELECT * FROM [UserTable] WHERE [Username] = @Username OR [Email] = @Email";

DataView dv = (DataView)sds.Select(DataSourceSelectArguments.Empty);

if (dv.Count != 0) {

this.Label1.ForeColor = System.Drawing.Color.Red;

this.Label1.Text = "The user already Exist!";

return;

}

else {

this.SqlDataSource1.Insert(); this.Label1.Text = "New User Profile has been created you can login now"; Button1.Enabled = false; txtAddress.Enabled = false; txtEmail1.Enabled = false; txtEmail2.Enabled = false; txtName.Enabled = false; txtpassportNumber.Enabled = false; txtPassword1.Enabled = false;

28

Page 29: online web mart  system for  jewellery

txtpassword2.Enabled = false; txtUserName.Enabled = false; } }

protected void Page_Load(object sender, EventArgs e) { } protected void ImageButton1_Click(object sender, ImageClickEventArgs e) {

}}

Admin add new item

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 AdminPage : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { btnInsert.Visible = false; // btnsaveProduct.Visible = false;

} protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) {// MultiView1.ActiveViewIndex = RadioButtonList1.SelectedIndex; } protected void btnsaveProduct_Click(object sender, EventArgs e) {

if (FileUpload1.HasFile) {

29

Page 30: online web mart  system for  jewellery

FileUpload1.SaveAs("D:/Code/jewelshop/Uploadedpix/" + FileUpload1.FileName); lblFullSizeImage.Text = FileUpload1.FileName; } if (FileUpload2.HasFile) { FileUpload2.SaveAs("D:/Code/jewelshop/Thumbnails/" + FileUpload2.FileName); }

lblThumbSizeImage.Text = FileUpload2.FileName;

btnsaveProduct.Visible = true; SqlDataSource1.Insert(); this.lblAddingNewItem.Text = "Item Has Been Added into the Database"; btnsaveProduct.Visible = false; btnInsert.Visible = true; txtPrice.Enabled = false; txtShortDescription.Enabled = false; txtProductDescription.Enabled = false; txtProductName.Enabled = false; dropCatInsert.Enabled = false; } protected void btnInsert_Click(object sender, EventArgs e) { txtPrice.Text = ""; txtProductDescription.Text = ""; txtProductName.Text = ""; txtPrice.Enabled = true; txtProductDescription.Enabled = true; txtProductName.Enabled = true; btnsaveProduct.Visible = true; dropCatInsert.Enabled = true; } protected void LinkButton1_Click(object sender, EventArgs e) { } protected void LinkButton2_Click(object sender, EventArgs e) { }

protected void DropSearchItems_SelectedIndexChanged(object sender, EventArgs e) {

} }

Admin master page.aspx.cs

30

Page 31: online web mart  system for  jewellery

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.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Xml.Linq;

public partial class MasterPage : System.Web.UI.MasterPage{ protected void Page_Load(object sender, EventArgs e) { if (Session["UserType"] == null || !Session["UserType"].Equals("admin"))

Response.Redirect("Default.aspx");

} protected void LinkButton1_Click(object sender, EventArgs e) { Session.Abandon();

Response.Redirect("MainPage.aspx"); } protected void LinkButton2_Click(object sender, EventArgs e) { Response.Redirect("login.aspx"); } }

Admin Sales Maintains.aspx.cs

using System;using System.Collections;

31

Page 32: online web mart  system for  jewellery

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 AdminSalesMaintenance : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) {

} protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { MultiView1.ActiveViewIndex = RadioButtonList1.SelectedIndex; }

protected void FormView2_ItemUpdated(object sender, FormViewUpdatedEventArgs e) { this.GridView3.DataBind(); } protected void FormView3_ItemUpdated(object sender, FormViewUpdatedEventArgs e) { this.GridView2.DataBind(); }}

Default2.aspx.cs

using System;using System.Collections;

32

Page 33: online web mart  system for  jewellery

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 Default2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) {

} protected void Button1_Click(object sender, EventArgs e) { SqlDataSource sds = new SqlDataSource(); sds.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();

// Create parameters with specified names and values

sds.SelectParameters.Add("cardno", TypeCode.String, this.TextBox1.Text);

sds.SelectParameters.Add("amount", TypeCode.Double, this.TextBox4.Text);

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

sds.SelectCommand = "SELECT * FROM [bank] WHERE [cardnumber] = @cardno AND [amount] >= @amount";

// Retrieve data

DataView dv = (DataView)sds.Select(DataSourceSelectArguments.Empty);

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

if (dv.Count == 0) {

33

Page 34: online web mart  system for  jewellery

this.Label5.ForeColor = System.Drawing.Color.Red;

this.Label5.Text = "Insufficent Fund!";

return;

} else { this.Label5.ForeColor = System.Drawing.Color.Red;

this.Label5.Text = "Payment Made Successfully!";

return; }

} protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("MainPage.aspx"); }}

DiscriptionPurchase.aspx.cs

using System;

34

Page 35: online web mart  system for  jewellery

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 test2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { this.lblusernam.Text = this.Session["Username"].ToString(); lblItem.Visible = false; Linklogin.Visible = false;

if (Session["UserType"] == null) {

Linklogin.Visible = true;

btnAddToCart.Visible = false; lblItem.Visible = false;// Label1.Visible = false; }

if (Request.QueryString["ProductID"] != null) { string ProductID; ProductID = Request.QueryString["ProductID"].ToString(); string connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();

System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(connectionString); System.Data.SqlClient.SqlCommand cmd = conn.CreateCommand();

cmd.CommandText = "SELECT * FROM [ProductTable] where ProductID='" + ProductID + "'";

conn.Open();

System.Data.SqlClient.SqlDataReader dr = cmd.ExecuteReader();

35

Page 36: online web mart  system for  jewellery

this.lblProductID.Text = "";

while (dr.Read()) {

this.lblProductID.Text = dr["ProductID"].ToString(); this.lblDescription.Text = dr["productDescription"].ToString(); this.lblPrice.Text = dr["Price"].ToString(); this.lblProductName.Text = dr["ProductName"].ToString(); this.Image2.ImageUrl = dr["ProductImage"].ToString(); Image2.ImageUrl = "uploadedpix/" + dr["ProductImage"].ToString();

}

dr.Close(); conn.Close(); } else Response.Redirect("UserMainPage.aspx"); } protected void Button1_Click(object sender, EventArgs e) { // txtAddress.Visible = true; btnAddToCart.Visible = true;// Label1.Visible = true; } protected void btnAddToCart_Click(object sender, EventArgs e) { SqlDataSource1.Insert(); btnAddToCart.Visible = false; lblItem.Visible = true;// Label1.Visible = false; } protected void LinkButton2_Click(object sender, EventArgs e) { Response.Redirect("login.aspx"); }

}

ViewReviews.aspx.cs

using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;

36

Page 37: online web mart  system for  jewellery

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 ViewReviews : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) {

} protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) {

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

9.2 Screen Shots

Main Page

37

Page 38: online web mart  system for  jewellery

Search for Items

Search by Category

38

Page 39: online web mart  system for  jewellery

Product Description

Register New User

39

Page 40: online web mart  system for  jewellery

Login

40

Page 41: online web mart  system for  jewellery

Add To Chart

Shopping cart

Make payment

41

Page 42: online web mart  system for  jewellery

Admin Login

42

Page 43: online web mart  system for  jewellery

View/Modify user account

Open Orders

Adding New Item

43

Page 44: online web mart  system for  jewellery

Modify Items

44