Sei sulla pagina 1di 58

E-Shopping

INTRODUCTION TO ASP.NET
ASP.NET is a powerful tool for making dynamic and interactive web pages. It is a
server side scripting technology that enables embedded (in web pages) to be executed by an
internal server.

 ASP.NET stands for active server pages.


 ASP.NET is a Microsoft technology.
 ASP.NET is a program that runs inside us.
 It is a Microsoft internal server.
 It comes with window XP.7 and 8.1. It is also available for use with other Microsoft
windows.
 It is easy to install and ideal for the developing and testing web applications.

 HOW DOES ASP.NET WORK?

ASP.NET is programming frameworks built on the common language runtime that


can be used in sever to build powerful web applications. ASP.NET offers several
important advantages over previous web development modules:

 ENHANCED PERFORMANCE: - ASP.NET is compiled common language


runtime code running on the server. Unlike its interpreted predecessors, ASP.NET can
take advantage of early binding, just-in-time compilation, native optimization and
caching services right out of the box. This amounts to dramatically better performance
before you ever write a line of code.

 WORLD-CLASS TOOL SUPPORT: - The ASP.NET framework is complemented


by a rich tool box and designer in the visual studio integrated development
environment. Drag-and –drop server controls and automatic deployment are just a few
of the features this powerful tool provides.

 POWER AND FLEXIBILITY: - Because ASP.NET is based on the common


language runtime, the power and flexibility of that entire platform is available to web
application developers. The .Net framework class library, messaging, and data access
solutions are all seamlessly accessible from the web.ASP.NET is also language-
independent, so you can choose the language that best applies to your application or
partition your application across many languages. Further, common language runtime,
interoperability guarantees that your existing investment in COM-based development
is preserved when migrating to ASP.NET.

BCA Vth sem Page 1


E-Shopping

 SIMPLICITY: - ASP.NET makes it easy to perform common tasks, from simple


form submission and client authentication to deployment and site configuration. For
example, the ASP.NET page framework allows you to build user interfaces that
cleanly separate application logic from presentation code and to handle events in a
simple, visual Basic like forms processing model. Additionally, the common language
runtime simplifies development with managed code services such as automatic
reference counting and garbage collection.

 MANAGEABILITY: - ASP.NET employs a text-based, hierarchical configuration


system, with simplifies applying settings to your server environment and web
applications, become configuration information is stored as plain text, new settings
may be applied without the aid of local administration tools. This “zero local
administration “philosophy extends to deploying ASP.NET.no server restarts is
required, even to deploy or replace running complied code.

 SCALABILITY AND AVALABILITY:- ASP.NET has been designed with


scalability in mind, with features specially tailored to improve performance in
clustered and multiprocessor environment .further, processor are closely monitored
and managed by the ASP.NET runtime, so that if one misbehaves(leaks, deadlocks),a
new process can be created in its place, which helps keeps your application constantly
available to handle requests.

 CUSTOMIZABILITY AND EXTENSIBILITY:- ASP.NET delivers a well


factored architecture that developers to “plug-in” their code at the appropriate level.
In fact, it is possible to extend or replace any subcomponent of the ASP.NET runtime
with your custom-written component, implement custom authenticating or state
services has never been easier.

 SECURITY:-with built in windows authentication and per application configuration,


you can be assured that your applications are secure.

BCA Vth sem Page 2


E-Shopping

SQL SERVER 2005

Microsoft SQL 2008 is a full featured relational database management system that
offers a variety of administrative tools.

Microsoft SQL server is an application used to create computer database.

Microsoft SQL provides an environment used to generate database that can be accessed from
workstations. The internet or other media such as personal digital assistant (PDA).

 A connection represents a physical connection to some data store such as


SQL SERVER.
 A command represents a directive to retrieve from (select)or manipulate
(insert, update ,delete)the data store.
 A dataset represents the actual data an application works with .note that data
sets are always disconnected from their source connection to data set can be
easily reconciled with the originating data model.

As we know that the database is a repository for stored, operational data in a


database environment and common data are available and used by several users. Instead of
each program (or user) to manage its own data, the data across applications are shared by all
authorized users with the help of database software managing the data as an entity.

The general concept behind a database is to handle information as an integrated


whole. A database is a collection of interrelated data stored with minimum redundancy to
serve many users quickly and effectively. The general objective is to make information easy,
quick, expensive and flexible for the user.

In database design specific objectives are considered:-

 Ease of learning and use.


 More information at low cost.
 Accuracy and integrity.
 Recovery from failure.
 Performance.

In this way, it is characterized by quick retrieval of information from huge tables.


This quality allows it to cater to the ever-changing business needs of the present age. It
supports fourth generation language, SQL, thereby making it easier for the customers to grasp
it, a development language where complicated procedures, functions etc. can be used.

BCA Vth sem Page 3


E-Shopping

SYNOPSIS
Objectives:
The objective of the project “E-SHOPPING” is to develop e-shopping system of the
wide variety of electronic items online.

This project is mainly developed to give the details of the various types of different
brands of electronic items under one roof which helps the customer to go for good choice and
satisfy them, through by online where they can purchase and get delivered to their home or
required place easily and within few days safely.

Today the internet and its boom have created a new economic scenario that not only
stresses on the classical concept of the “product” but also on the modern concept of “service”. It
is this level of service that dictates whether a commercial venture will succeed or not in the market. To
provide a high accessibility of service we will design the online shopping website, so that potential
customers need not go to a physical shop to buy products or services. There are several objective of
this websites are following given below.

•This site is gives all the information about the e-shopping to provide better service for the
customer.

•It provides the facility to the customers who want to shop on-line due to lack of time.

•It provides facility to the customer to payment by the Credit card only.

•It’s providing the full details about the product and related information about the product like cost, size,
quantity etc.

•With the help of it we can save the time and money also.

•It provides the remote shopping by the Credit card only.

Project Description:-

In today’s busy life, one has to know how to lead quick life style. One may not have
much time to search for each and every requirement under different platforms.

The purpose of this document is to provide a complete description of all the function and
specification of the E-SHOPPING, which is used by online user to view the complete
description of electronic items of different vendor they want to buy.

BCA Vth sem Page 4


E-Shopping

Existing System:-

The existing system was an automated system. But it was found to be inefficient in
meeting the growing demands of population.

Disadvantage of the existing system:

 Time Consuming
 Expensive
 Needed an agent

Proposed System: -

The proposed system differs from the existing system by clubbing into a single form
reducing the existing so as to introduce various other properties in the software and making it
easier to fill the details. And this software will be helpful in the smooth functioning of the
organization due to integration of various functions. The software maintains central database
with following information stored in different tables: -customer’s purchase details in the
database table –registration of customer –payment details –stock details

Hardware Requirements:
CPU: Intel pentium4 processor or higher

RAM: 512 MB DDR2 or higher

Hard Disk: 80 GB and higher

Devices: Keyboard, Mouse etc.

Software Requirement:
Operating System: Windows XP, Windows7,Windows 8.1…..

Browser: Internet-Explorer 6.0 and above, Google Chrome

Front End: Microsoft Visual Studio-2008

Back End: Microsoft SQL Server 2008 R2

BCA Vth sem Page 5


E-Shopping

 SOFTWARE REQUIREMENT
SPECFICATION

INTRODUCTION

Purpose

This document is our understanding of potential client’s system requirements and


dependencies at this initial phase of project prior to any actual design or development work.
This will help in the full automation of E-SHOPPING. The document will help us to
understand what our project is meant for. We also look forward for a reassurance that, the
clients and our development team understand the other requirements from that perspective at
this given point of time.

Project Scope

The task on hand is to develop a E-SHOPPING System. The aim of this project is to
automate the key process involved in the E-SHOPPING. The aim of this web-based project is
to develop a tool intended to automate the various process involved in the shopping and also
help members to get information about new arrivals, availability of the reserved products

OVER ALL DESCRIPTION

Product Features

Main features of the product can be listed as below:

 This product has been designed to facilitate operations and activities much easier for the
user.
 This product consists of two modules namely Admin module, and User module.
 Customizability
 Extensibility

Operating environment

Windows xp, windows 7

BCA Vth sem Page 6


E-Shopping

Design and implementation constraints

 Should have a server with enough performance to handle the expected traffic.
 Should have a well designed and maintained database.

Usability

This product is designed in such a way that it meets all the requirements of the user. Also
these requirements are established in such a way that it is accessed easily by the user.This
system provides different functionalities to enable the user to get a clear picture of what they
want to explore.

Assumptions and Dependencies

 The details related to the product, customer, payment and service transaction provided
. manually
 Administrator is created in the system already
 Roles and tasks are predefined

Guidelines

Code is kept clean and simple for future upgrades and maintenance.

EXTERNAL INTERFACE REQUIREMENTS

User interface

System should provide necessary information at the same time not overloading pages
with information. Each page in the interface should have navigation bar which indicates the
place he is currently at. Also same navigation or other mechanism should allow him to easily
go up and down the hierarchy.
If the user is logged into the system it should be clearly displayed on the page. Also there
should be clearly displayed on the page. Also there should be a logout button in a clearly
visible area for such users.

BCA Vth sem Page 7


E-Shopping

Software interfaces

Connection to shared resources like databases should be done using the libraries
provided in the core of the system. Also each module can have its own library functions
which are specific to that module. These are intended of information sharing. Using these
modules any stake holders can interact with the system

SYSTEM FEATURES

 Intel core i5 processor


 500gb Hard-disk
 4gb Ram
 Windows 7

OTHER NON-FUNCTIONAL REQUIREMENTS


Security

The system must automatically log out all customers after a period of inactivity. The
system should not leave any cookies on the customer’s computer containing the user’s
password. The system’s back-end servers shall only be accessible to authenticated
administrators.

Reliability

The system provides storage of all databases on redundant computers with automatic
switchover. The reliability of the overall program depends on the reliability of the separate
components. The main pillar of reliability of the system is the backup of the database which
is continuously maintained and updated to reflect the most recent changes. Thus the overall
stability of the system depends on the stability of container and its underlying operating
system.

Maintainability

A commercial database is used for maintaining the database and the application server takes
care of the site. In case of a failure, a re-initialization of the program will be done. Also the
software design is being done with modularity in mind so that maintainability can be done
efficiently.

Portability

The application is HTML and scripting language based. So the end-user part is fully
portable and any system using any web browser should be able to use the features of the
system, including any hardware platform that is available or will be available in the future.

BCA Vth sem Page 8


E-Shopping

Feasibility Studies
Feasibility studies aim to objectively and rationally uncover the strengths and
weaknesses of an existing business or proposed venture, opportunities and threats present in
the environment, the resources required to carry through, and ultimately the prospects for
success. In its simplest terms, the two criteria to judge feasibility are cost required and value
to be attained.

Feasibility study evaluates the project's potential for success; therefore, perceived
objectivity is an important factor in the credibility of the study for potential investors and
lending institutions. It must therefore be conducted with an objective, unbiased approach to
provide information upon which decisions can be based.

There are five areas of feasibility study which includes –

Technical
Economic
Legal
Operational,
Scheduling.

The assessment is based on an outline design of system requirements, to determine


whether the company has the technical expertise to handle completion of the project. When
writing a feasibility report, the following should be taken to consideration. A brief description
of the business to assess more possible factor/s which could affect the study

The part of the business being examined

The human and economic factor

The possible solutions to the problem

At this level, the concern is whether the proposal is both technically and legally feasible
(assuming moderate cost).

Legal Feasibility

Determines whether the proposed system conflicts with legal requirements, e.g. a data
processing system must comply with the local Data Protection Acts.

Operational Feasibility

Operational feasibility is a measure of how well a proposed system solves the


problems, and takes advantage of the opportunities identified during scope definition and
how it satisfies the requirements identified in the requirements analysis phase of system
development.

BCA Vth sem Page 9


E-Shopping

The operational feasibility assessment focuses on the degree to which the proposed
development projects fits in with the existing business environment and objectives with
regard to development schedule, delivery date, corporate culture, and existing business
processes.

To ensure success, desired operational outcomes must be imparted during design and
development. These include such design-dependent parameters such as reliability,
maintainability, supportability, usability, disposability, sustainability, affordability and
others. These parameters are required to be considered at the early stages of design if desired
operational behaviors are to be realized. A system design and development requires
appropriate and timely application of engineering and management efforts to meet the
previously mentioned parameters. A system may serve its intended purpose most effectively
when its technical and operating characteristics are engineered into the design. Therefore
operational feasibility is a critical aspect of systems engineering that needs to be an integral
part of the early design phases.

Economic Feasibility

The purpose of the economic feasibility assessment is to determine the positive


economic benefits to the organization that the proposed system will provide. It includes
quantification and identification of all the benefits expected. This assessment typically
involves a cost/ benefits analysis.

Technical Feasibility

The technical feasibility assessment is focused on gaining an understanding of the


present technical resources of the organization and their applicability to the expected needs of
the proposed system. It is an evaluation of the hardware and software and how it meets the
need of the proposed system.

Schedule Feasibility

A project will fail if it takes too long to be completed before it is useful. Typically this
means estimating how long the system will take to develop, and if it can be completed in a
given time period using some methods like payback period. Schedule feasibility is a measure
of how reasonable the project timetable is. Given our technical expertise, are the project
deadlines reasonable. Some projects are initiated with specific deadlines. You need to
determine whether the deadlines are mandatory or desirable.

BCA Vth sem Page 10


E-Shopping

SOFTWARE DESIGN
ER-diagram
It represents the object-relationship pairs in graphical forms. Thus, we can say
that the primary goal of ER-Diagrams is to represent data objects along with their
relationships.

ER-model for data uses three features to describe data:


 Entities which specify distinct real world items in an application.
 A relationship connects different entities and represents them meaningfully.
 Attributes which specify various properties of entities and relationships involved in a
system.

Notations used:

Entity

Relationship

Attribute

Key Attribute

BCA Vth sem Page 11


E-Shopping

Weak Entity

Multivalue Attribute

Single

1 or more

0 or 1

Many

BCA Vth sem Page 12


E-Shopping

Password Gender
Signup

Password User ID
Email id
Username
Customer Phone no
Customer
registration
login Address
Admin
Name
Admin
Password Home

Stock
Details
Admin TV I-Pod
home E-Shopping
Category

Payment
Sales details Laptop Camera
Details Customer
details

Order
Number Purchase
Product
Name
Product ID Date
Credit card
number
Amount Purchase Order
Date Name
Order No
Shipping address
BILL
Product name I

Product ID

Customer Tax
name Total
Amount
Shipping Amount
address

BCA Vth sem Page 13


E-Shopping

TABLES

Customer database:

Admin Database:

BCA Vth sem Page 14


E-Shopping

Payment Database:

Stock Database:

BCA Vth sem Page 15


E-Shopping

Bill Database:

BCA Vth sem Page 16


E-Shopping

FORMS

Welcome page

BCA Vth sem Page 17


E-Shopping

Customer Login page

BCA Vth sem Page 18


E-Shopping

Registration Page

BCA Vth sem Page 19


E-Shopping

Home page

BCA Vth sem Page 20


E-Shopping

TV Selection Page

BCA Vth sem Page 21


E-Shopping

Laptop Selection page

BCA Vth sem Page 22


E-Shopping

Ipod selection Page

BCA Vth sem Page 23


E-Shopping

Camera selection page

BCA Vth sem Page 24


E-Shopping

Purchase Order Page

BCA Vth sem Page 25


E-Shopping

Billing Page

BCA Vth sem Page 26


E-Shopping

Contact us Page

BCA Vth sem Page 27


E-Shopping

About us page

BCA Vth sem Page 28


E-Shopping

Admin Login page

BCA Vth sem Page 29


E-Shopping

Admin Homepage

BCA Vth sem Page 30


E-Shopping

Customer Details Page

BCA Vth sem Page 31


E-Shopping

Payment Details page

BCA Vth sem Page 32


E-Shopping

Stock Details Page

BCA Vth sem Page 33


E-Shopping

Sales Details page

BCA Vth sem Page 34


E-Shopping

CODING
Welcome page Coding
Partial Class eShopping
Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click
Response.Redirect("welcome.aspx")
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub
End Class

Customer Login Coding

Imports System.Data.SqlClient

Partial Class welcome


Inherits System.Web.UI.Page

Dim conn As New SqlConnection(("Data Source=VINUTHA;Initial


Catalog=login;Integrated Security=True")

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton2.Click
Response.Redirect("signup.aspx")
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Button1.Click
If userid.Text = " " Or password.Text = " " Then
Label4.Text = ("enter all fields")
Label4.Visible = True

Exit Sub
End If

Dim strselectquery As String


strselectquery = "select * from signup where userid='" & userid.Text & "' and
password='" & password.Text & "' "
conn.Open()

BCA Vth sem Page 35


E-Shopping

Dim cmd As New SqlCommand(strselectquery, conn)


Dim dr As SqlDataReader
dr = cmd.ExecuteReader
Label4.Visible = False
If Not dr.HasRows Then
Label4.Text = ("Invaild username or password")
Label4.Visible = True
Exit Sub
End If

conn.Close()
Session("userid") = userid.Text
Response.Redirect("home.aspx")

End Sub

Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton3.Click
Response.Redirect("adminlogin.aspx")
End Sub

End Class

Customer Registration Coding

Imports System.Data.SqlClient
Imports System.Text.RegularExpressions

Partial Class signup


Inherits System.Web.UI.Page
Dim conn As New SqlConnection("Data Source=VINUTHA;Initial
Catalog=login;Integrated Security=True")
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click

If userid.Text = "" Or password.Text = "" Or email.Text = "" Or phoneno.Text = "" Or


address.Text = "" Then
label18.Visible = True
Exit Sub
End If

BCA Vth sem Page 36


E-Shopping

If userid.Text = "" Or password.Text = "" Then


lbldisplay.Text = ("enter userid")
lbldisplay.Visible = True
End If
Dim str As String
Dim res As Integer
str = email.Text
res = check_email(Str)
label16.Visible = False
If res = 0 Then
label16.Visible = True
Exit Sub
End If

If Not IsNumeric(phoneno.Text) Then


Label13.Visible = True
Exit Sub
End If
Label13.Visible = False

If phoneno.Text < 7000000000 Or phoneno.Text > 9999999999 Then


Label13.Visible = True
Exit Sub
End If
Label13.Visible = False

Dim strselectquery As String


strselectquery = "select * from signup where USERID='" & userid.Text & "'"
conn.Open()
Dim cmd As New SqlCommand(strselectquery, conn)
Dim dr As SqlDataReader
dr = cmd.ExecuteReader
lbldisplay.Visible = False
If dr.HasRows Then
lbldisplay.Text = ("userid already exits")
lbldisplay.Visible = True
Exit Sub
End If
lbldisplay.Visible = False

conn.Close()
Dim strqueryinsert As String
strqueryinsert = "insert into signup values('" & userid.Text & "','" & password.Text &
"','" & DropDownList1.SelectedValue & "','" & email.Text & "','" & phoneno.Text & "','" &
address.Text & "')"
conn.Open()
Dim cmd2 As New SqlCommand(strqueryinsert, conn)
cmd2.ExecuteNonQuery()

BCA Vth sem Page 37


E-Shopping

conn.Close()

MsgBox("account created successfully")


Response.Redirect("welcome.aspx")
End Sub
Public Function checkint(ByVal str As String) As Boolean
Dim i As Integer
Dim flag As Boolean
flag = False
For i = 0 To str.Length - 1
If IsNumeric(str(i)) Then
flag = True
Exit For
End If
Next
Return flag
End Function
Public Function check_email(ByVal str As String) As Integer
Dim i As Integer
Dim flag As Integer
Dim sym1 As Integer
Dim sym2 As Integer
flag = 0
sym1 = 0
sym2 = 0
For i = 0 To str.Length - 1
If (str(i) = "@") Then
sym1 = 1
End If
If (str(i) = ".") Then
sym2 = 1
End If
Next

If sym1 = 1 And sym2 = 1 Then


flag = 1
End If
Return flag
End Function

End Class

BCA Vth sem Page 38


E-Shopping

Customer Home Page Coding

Partial Class second


Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
End Sub

Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton5.Click
Response.Redirect("tv.aspx")
End Sub

Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton6.Click
Response.Redirect("laptop.aspx")
End Sub

Protected Sub LinkButton7_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton7.Click
Response.Redirect("ipod.aspx")
End Sub

Protected Sub LinkButton9_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton9.Click
Response.Redirect("aboutus.aspx")
End Sub

Protected Sub LinkButton10_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton10.Click
Response.Redirect("contactus.aspx")
End Sub

Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click
Response.Redirect("tv.aspx")
End Sub

Protected Sub ImageButton3_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton3.Click
Response.Redirect("laptop.aspx")
End Sub

Protected Sub ImageButton4_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton4.Click
Response.Redirect("ipod.aspx")

BCA Vth sem Page 39


E-Shopping

End Sub

Protected Sub ImageButton5_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton5.Click
Response.Redirect("camera.aspx")
End Sub

Protected Sub LinkButton12_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton12.Click
Response.Redirect("welcome.aspx")
End Sub
End Class
TV Selection Coding

Partial Class tv
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("home.aspx")
End Sub

Protected Sub ImageButton4_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton4.Click
Session("productid") = Label40.Text
Session("productname") = Label39.Text
Session("amount") = Label41.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton5_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton5.Click
Session("productid") = Label43.Text
Session("productname") = Label42.Text
Session("amount") = Label44.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click
Session("productid") = Label4.Text
Session("productname") = Label5.Text
Session("amount") = Label6.Text
Response.Redirect("order.aspx")

BCA Vth sem Page 40


E-Shopping

End Sub

Protected Sub ImageButton3_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton3.Click
Session("productid") = Label28.Text
Session("productname") = Label29.Text
Session("amount") = Label30.Text
Response.Redirect("order.aspx")
End Sub
End Class

Laptop Selection Coding

Partial Class laptop


Inherits System.Web.UI.Page

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("home.aspx")
End Sub

Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click
Session("productid") = Label55.Text
Session("productname") = Label57.Text
Session("amount") = Label59.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton3_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton3.Click
Session("productid") = Label62.Text
Session("productname") = Label64.Text
Session("amount") = Label66.Text
Response.Redirect("order.aspx")

BCA Vth sem Page 41


E-Shopping

End Sub

Protected Sub ImageButton4_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton4.Click
Session("productid") = Label69.Text
Session("productname") = Label71.Text
Session("amount") = Label73.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton5_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton5.Click
Session("productid") = Label77.Text
Session("productname") = Label79.Text
Session("amount") = Label81.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub
End Class

Ipod Selection Coding

Partial Class ipod


Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click

Response.Redirect("home.aspx")
End Sub

BCA Vth sem Page 42


E-Shopping

Protected Sub ImageButton4_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton4.Click
Session("productid") = Label55.Text
Session("productname") = Label57.Text
Session("amount") = Label59.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton5_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton5.Click
Session("productid") = Label62.Text
Session("productname") = Label64.Text
Session("amount") = Label66.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click
Session("productid") = Label44.Text
Session("productname") = Label45.Text
Session("amount") = Label46.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton3_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton3.Click
Session("productid") = Label48.Text
Session("productname") = Label50.Text
Session("amount") = Label52.Text
Response.Redirect("order.aspx")
End Sub
End Class

Camera Selection Coding

Partial Class camera


Inherits System.Web.UI.Page

BCA Vth sem Page 43


E-Shopping

Protected Sub LinkButton4_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton4.Click

Response.Redirect("home.aspx")
End Sub

Protected Sub ImageButton4_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton4.Click
Session("productid") = Label44.Text
Session("productname") = Label45.Text
Session("amount") = Label46.Text

Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton5_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton5.Click
Session("productid") = Label48.Text
Session("productname") = Label50.Text
Session("amount") = Label52.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click
Session("productid") = label111.Text
Session("productname") = Label5.Text
Session("amount") = label112.Text
Response.Redirect("order.aspx")
End Sub

Protected Sub ImageButton3_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton3.Click
Session("productid") = Label34.Text
Session("productname") = Label36.Text
Session("amount") = Label38.Text
Response.Redirect("order.aspx")
End Sub
End Class

Customer Payments Coding

BCA Vth sem Page 44


E-Shopping

Imports System.Data.SqlClient
Partial Class order
Inherits System.Web.UI.Page

Dim conn As New SqlConnection("Data Source=VINUTHA;Initial


Catalog=login;Integrated Security=True")

Protected Sub LinkButton4_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton4.Click
Response.Redirect("home.aspx")

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
orderno.Text = Now.Year & Now.Month & Now.Day & Now.Hour & Now.Minute
label21.Text = Now.ToString("dd/MM/yyyy")

productname.Text = Session("productname")
productid.Text = Session("productid")
amount.Text = Session("amount")
End Sub

Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click

Label16.Visible = False
If credit.Text.Length <> 16 Then
Label16.Visible = True
Exit Sub
End If

Session("orderno") = orderno.Text
Session("name") = name.Text
Session("address") = address.Text
Session("amount") = amount.Text
Session("productname") = productname.Text
Session("productid") = productid.Text

Dim strselectquery As String


strselectquery = "select * from payment where address='" & address.Text & "'"
conn.Open()
Dim cmd As New SqlCommand(strselectquery, conn)
Dim dr As SqlDataReader
dr = cmd.ExecuteReader
display.Visible = False
If dr.HasRows Then
display.Visible = True
Exit Sub
End If

BCA Vth sem Page 45


E-Shopping

display.Visible = False

conn.Close()
Dim strqueryinsert As String
strqueryinsert = "insert into payment values('" & orderno.Text & "','" &
productname.Text & "','" & productid.Text & "','" & amount.Text & "','" & credit.Text & "','"
& name.Text & "','" & address.Text & "')"
conn.Open()
Dim cmd2 As New SqlCommand(strqueryinsert, conn)
cmd2.ExecuteNonQuery()
conn.Close()
Response.Redirect("bill.aspx")
End Sub

Public Function checkint(ByVal str As String) As Boolean


Dim i As Integer
Dim flag As Boolean
flag = False
For i = 0 To str.Length - 1
If IsNumeric(str(i)) Then
flag = True
Exit For
End If
Next
Return flag
End Function

End Class

BCA Vth sem Page 46


E-Shopping

Billing Page Coding

Imports System.Data.SqlClient

Partial Class bill


Inherits System.Web.UI.Page

Dim conn As New SqlConnection("Data Source=VINUTHA;Initial


Catalog=login;Integrated Security=True")

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("home.aspx")
End Sub

Protected Sub ImageButton2_Click(ByVal sender As Object, ByVal e As


System.Web.UI.ImageClickEventArgs) Handles ImageButton2.Click

Dim strselectquery As String


strselectquery = "select * from bill where amount='" & orderno.Text & "'"
conn.Open()
Dim cmd As New SqlCommand(strselectquery, conn)
Dim dr As SqlDataReader
dr = cmd.ExecuteReader
lbldisplay.Visible = False
If dr.HasRows Then
lbldisplay.Visible = True
Exit Sub
End If
lbldisplay.Visible = False

conn.Close()
Dim strqueryinsert As String
strqueryinsert = "insert into bill values('" & date1.Text & "','" & orderno.Text & "','" &
productname.Text & "','" & productid.Text & "','" & customername.Text & "','" &
address.Text & "','" & amount.Text & "','" & tax.Text & "','" & total.Text & "')"
conn.Open()
Dim cmd3 As New SqlCommand(strqueryinsert, conn)
cmd3.ExecuteNonQuery()
conn.Close()
Response.Redirect("home.aspx")

BCA Vth sem Page 47


E-Shopping

End Sub

Public Function checkint(ByVal str As String) As Boolean


Dim i As Integer
Dim flag As Boolean
flag = False
For i = 0 To str.length - 1
If IsNumeric(str(i)) Then
flag = True
Exit For
End If
Next
Return flag
End Function

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

date1.Text = Now.ToString("dd/MM/yyyy")
orderno.Text = Session("orderno")
productname.Text = Session("productname")
productid.Text = Session("productid")
customername.Text = Session("name")
address.Text = Session("address")
amount.Text = Session("amount")
tax.Text = CInt(amount.Text) * 5.5 / 100
total.Text = CInt(amount.Text) * 0.055 + CInt(amount.Text)

End Sub

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton2.Click
Dim strquerydelete As String
strquerydelete = "delete from payment where orderno='" & orderno.Text & "'"
conn.Open()
Dim cmd1 As New SqlCommand(strquerydelete, conn)
cmd1.ExecuteNonQuery()
conn.Close()
MsgBox("order is cancelled successfully")
Response.Redirect("home.aspx")

End Sub

BCA Vth sem Page 48


E-Shopping

End Class

About us Coding

Partial Class aboutus


Inherits System.Web.UI.Page

Protected Sub LinkButton4_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton4.Click
Response.Redirect("home.aspx")
End Sub
End Class

Contact us Coding

Partial Class contactus


Inherits System.Web.UI.Page

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("home.aspx")
End Sub

BCA Vth sem Page 49


E-Shopping

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub
End Class

Admin Login Coding

Imports System.Data.SqlClient

Partial Class adminlogin


Inherits System.Web.UI.Page

Dim conn As New SqlConnection("Data Source=VINUTHA;Initial


Catalog=login;Integrated Security=True")

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Button1.Click
If username.Text = " " Or password.Text = " " Then
Label4.Visible = True

Exit Sub
End If

Dim strselectquery As String


strselectquery = "select * from adminlogin where USERNAME='" & username.Text &
"' and PASSWORD='" & password.Text & "' "
conn.Open()

BCA Vth sem Page 50


E-Shopping

Dim cmd As New SqlCommand(strselectquery, conn)


Dim dr As SqlDataReader
dr = cmd.ExecuteReader
Label4.Visible = False
If Not dr.HasRows Then
Label4.Visible = True
Exit Sub
End If

conn.Close()
Session("USERNAME") = username.Text
Response.Redirect("details.aspx")

End Sub

Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton3.Click
Response.Redirect("welcome.aspx")
End Sub
End Class

Admin HomePage Coding

Partial Class details


Inherits System.Web.UI.Page

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton2.Click
Response.Redirect("customerdetails.aspx")
End Sub

Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton3.Click
Response.Redirect("paymentdetails.aspx")
End Sub

BCA Vth sem Page 51


E-Shopping

Protected Sub LinkButton4_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton4.Click
Response.Redirect("adminlogin.aspx")
End Sub

Protected Sub LinkButton5_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton5.Click
Response.Redirect("stocksdetails.aspx")
End Sub

Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton6.Click
Response.Redirect("billdetails.aspx")
End Sub

End Class

Customer Details Coding

Imports System.Data.SqlClient
Partial Class customerdetails
Inherits System.Web.UI.Page

Dim conn As New SqlConnection("Data Source=VINUTHA;Initial


Catalog=login;Integrated Security=True")

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

BCA Vth sem Page 52


E-Shopping

Dim strselectquery1 As String


strselectquery1 = "select
USERID,PASSWORD,GENDER,EMAIL,PHONENO,ADDRESS from signup"
conn.Open()
Dim cmd As New SqlCommand(strselectquery1, conn)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New Data.DataSet
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("details.aspx")
End Sub

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton2.Click
Response.Redirect("adminlogin.aspx")
End Sub

End Class

Payment Details Coding

Imports System.Data.SqlClient
Partial Class paymentdetails
Inherits System.Web.UI.Page

BCA Vth sem Page 53


E-Shopping

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("details.aspx")
End Sub
Dim conn As New SqlConnection("Data Source=VINUTHA;Initial
Catalog=login;Integrated Security=True")

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
Dim strselectquery1 As String
strselectquery1 = "select
ORDERNO,PRODUCT_NAME,PRODUCT_ID,AMOUNT,CREDIT_CARD_NUMBER,N
AME,ADDRESS from payment"
conn.Open()
Dim cmd As New SqlCommand(strselectquery1, conn)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New Data.DataSet
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
End Sub

Protected Sub LinkButton6_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton6.Click
Response.Redirect("adminlogin.aspx")
End Sub
End Class

Stock Details Coding

BCA Vth sem Page 54


E-Shopping

Imports System.Data.SqlClient
Partial Class stocksdetails
Inherits System.Web.UI.Page
Dim conn As New SqlConnection("Data Source=VINUTHA;Initial
Catalog=login;Integrated Security=True")

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
Dim strselectquery1 As String
strselectquery1 = "select PRODUCTNAME,PRODUCTID,AMOUNT,QUANTITY
from stocks"
conn.Open()
Dim cmd As New SqlCommand(strselectquery1, conn)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New Data.DataSet
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("details.aspx")
End Sub

End Class

BCA Vth sem Page 55


E-Shopping

Sales Details Coding

Imports System.Data.SqlClient
Partial Class customerdetails
Inherits System.Web.UI.Page

Dim conn As New SqlConnection("Data Source=VINUTHA;Initial


Catalog=login;Integrated Security=True")

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
Dim strselectquery1 As String
strselectquery1 = "select
USERID,PASSWORD,GENDER,EMAIL,PHONENO,ADDRESS from signup"
conn.Open()
Dim cmd As New SqlCommand(strselectquery1, conn)
Dim da As New SqlDataAdapter(cmd)
Dim ds As New Data.DataSet
da.Fill(ds)
GridView1.DataSource = ds.Tables(0)
GridView1.DataBind()
End Sub

Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton1.Click
Response.Redirect("details.aspx")
End Sub

Protected Sub LinkButton2_Click(ByVal sender As Object, ByVal e As


System.EventArgs) Handles LinkButton2.Click
Response.Redirect("adminlogin.aspx")
End Sub

End Class

BCA Vth sem Page 56


E-Shopping

BIBLIOGRAPHY
BIBLIOGRAPHY
Bibliography gives brief account of resources made use in development of the
software.

References
*Software Engineering book by Ashwini S Diwakar, Skyward Publication.

.net books
Links
*www.google.com
*www.wikipedia.com
*www.w3schools.com
*www.asp.net-tutorials.com
*www.YouTube.com
*www.pragimtech.com

Picture collections
*Google images

BCA Vth sem Page 57


E-Shopping

BCA Vth sem Page 58

Potrebbero piacerti anche