Project Report Online Shopping Cart (Implemented in ASP.Net (Code Behind C#), SQL SERVER 2008) A PROJECT REPORT SUBMITTED TO INDIRA GANDHI NATIONAL OPEN UNIVERSITY IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF BACHELOR’S IN COMPUTER APPLICATIONS (BCA) SUBMITTED BY KARANSINH RAJENDRASINH PARMAR (BCA-126339493) UNDER THE GUIDENCE OF Mr. Kamlesh Rajguru(MCA) INDIRA GANDHI NATIONAL OPEN UNIVERSITY SCHOOL OF COMPUTER AND INFORMATION SCIENCES INDIRA GANDHI NATIONAL OPEN UNIVERSITY MAIDAN GARHI, NEW DELHI – 110 068. 2015
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Project Report
Online Shopping Cart (Implemented in ASP.Net (Code Behind C#), SQL SERVER 2008)
A PROJECT REPORT SUBMITTED TO INDIRA GANDHI NATIONAL OPEN UNIVERSITY IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF
BACHELOR’S IN COMPUTER APPLICATIONS (BCA)
SUBMITTED BY
KARANSINH RAJENDRASINH PARMAR
(BCA-126339493) UNDER THE GUIDENCE OF
Mr. Kamlesh Rajguru(MCA)
INDIRA GANDHI NATIONAL OPEN UNIVERSITY
SCHOOL OF COMPUTER AND INFORMATION SCIENCES
INDIRA GANDHI NATIONAL OPEN UNIVERSITY
MAIDAN GARHI, NEW DELHI – 110 068.
2015
CERTIFICATE OF ORIGINALTY
This is to certify that the project report entitled Online Shopping Cart
Submitted to Indira Gandhi National Open University in partial fulfillment of the requirement for the award of the degree in BACHELOR’S OF COMPUTER APPLICATIONS (BCA) , is an authentic and original work carried
out by KARANSINH R. PARMAR Enrolment No.: BCA- 126339493 under the
guidance of Mr. KAMLESH RAJGURU[MCA] The matter embodied in this project is a genuine work done by the student and has not been submitted
whether to this University or to any other University / Institute for the fulfillment of the requirement of any course of study.
Signature of the Student Signature of the Guide
Name and Address Name, Designation and
of the student : Address of the Guide
Enrollment No : 126339493
ACKNOWLEDGEMENT
I am greatly pleased to take this opportunity to acknowledge the co-operation and
assistance of few people without whom this endeavor would not have been a success.
Firstly, I am indebted to my guide for having shown confidence in me, and giving me an
opportunity to debut in the world of Software Engineering under his aegis. Also, he has been
extremely patient in the initial phase of the work and has given me ample opportunity to learn
and imbibe the rudiments of the subject.
Further, I would like to express my gratitude towards all staff of Company for their co-
operation in all required matters. I am greatly thankful to my project partner who has helped me
in completion of this project directly or indirectly.
Date: 15/04/2015 (KARANSINH RAJENDRASINH PARMAR)
Place: VADODARA
Index
Sr. No. Topic Page No. 1 Introduction & Objectives of the Project.
Introduction to Software Software Development Life Cycle Meaning of Spiral Model Spiral Model Analysis Design Testing Implementation
4 Technology & Operation System
.Net Framework Framework Architecture Common Language Specification Common Language Runtime Introduction of Asp.Net Introduction of Asp.Net(C#) Introduction of Sql Server Data Access Layer
5 Software And Hardware Requirement
Specifications
Software Requirement Hardware Requirement
6 Analysis Data Flow Diagrams E-R Diagrams System Flow Diagram
Process Logic Data Dictionary (Tables) Screen Shots Testcases
functional or non-functional, though usually functional. The test designer selects valid and invalid inputs
and determines the correct output. There is no knowledge of the test object's internal structure.
Implementation
In this phase the designs are translated into code. Computer programs are written using a
conventional programming language or an application generator. Programming tools like Compilers,
Interpreters, and Debuggers are used to generate the code. Different high level programming languages
like C, C++, Pascal, and Java are used for coding. With respect to the type of application, the right
programming language is chosen
4.Technology And Operation System
The .Net Framework
A frame work is commonly thought of as a set of class libraries that aid in the development of
applications. The .net framework is more than just a set of classes. The .net framework is targeted by
compliers using a wide variety of applications. Including everything from small components that run on
handheld devices to large Microsoft ASP.ET application that span web farms, where multiple web serves
act together to improve the performance fault tolerance of a web site. The .NET framework is responsible
for providing a basic platform that these applications can share. This basic platform includes a runtimes
set of services that oversee the execution of applications. A key responsibility of the runtime is to manage
execution so that software written by different programming languages uses classes and other types
safely.
Microsoft .Net Framework Architecture
Microsoft's .NET Framework is comprised of two main components - the Common Language
Runtime (CLR) and the .NET Framework class libraries. The CLR is the real foundation of the .NET
Framework. It is the execution engine for all .NET applications. Every target computer requires the CLR
to successfully run a .NET application that uses the .NET Framework.
The main features of CLR include:
Automatic Memory Management
Thread Management
Code Compilation & Execution
Code Verification
High level of security
Remoting
Structured Exception Handling
Interoperability between Managed and Unmanaged code.
Integration with Microsoft Office System
All .NET applications are compiled into Intermediate Language code (MSIL). When executed on the
CLR, MSIL is converted into native machine code specific to the operating platform. This process is done
by a Just in Time (JIT) compiler. The code executed by the CLR is called as Managed Code. This code is
type safe and thoroughly checked by the CLR before being deployed. The .NET runtime also provides a
facility to incorporate existing COM components and DLL's into a .NET application. Code that is not
controlled by the CLR is called Unmanaged Code.
The .NET Framework is further comprised of Common Type System (CTS) and Common Language
Specification (CLS). The CTS defines the common data types used by .NET programming languages.
The CTS tells you how to represent characters and numbers in a program. The CLS represents the
guidelines defined by for the .NET Framework. These specifications are normally used by the compiler
developers and are available for all languages, which target the .NET Framework.
Net architecture
Common Language Specification
To fully interact with other objects regardless of the language they were implemented in, objects
must expose to callers only those features that are common to all the languages they must interoperate
with. For this reason, the Common Language Specification (CLS), which is a set of basic language
features needed by many applications, has been defined. The CLS rules define a subset of the Common
Type System; that is, all the rules that apply to the common type system apply to the CLS, except where
stricter rules are defined in the CLS. The CLS helps enhance and ensure language interoperability by
defining a set of features that developer can rely on to be available in a wide variety of languages. The
CLS also establishes requirements for CLS compliance; these help you determine whether your managed
code conforms to the CLS and to what extent a given tool supports the development of managed code that
uses CLS features.
If your component uses only CLS features in the API that it exposes to other code (including
derived classes), the component is guaranteed to be accessible from any programming language that
supports the CLS. Components that adhere to the CLS rules and use only the features included in the CLS
are said to be CLS-compliant components.
The CLS was designed to be large enough to include the language constructs that are commonly
needed by developers, yet small enough that most languages are able to support it. In addition, any
language constructs that makes it impossible to rapidly verify the type safety of code was excluded from
the CLS so that all CLS-compliant languages can produce verifiable code if they choose to do so.
Common Language Runtime
The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET
initiative. It is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which
defines an execution environment for program code. The CLR runs a form of byte code called the
Microsoft Intermediate Language (MSIL), Microsoft's implementation of the Common Intermediate
Language.
Developers using the CLR write code in a high level language such as C#. At compile-time, a
.NET compiler converts such code into MSIL (Microsoft Intermediate Language) code. At runtime, the
CLR's just-in-time compiler (JIT compiler) converts the MSIL code into code native to the operating
system. Alternatively, the MSIL code can be compiled to native code in a separate step prior to runtime.
This speeds up all later runs of the software as the MSIL-to-native compilation is no longer necessary.
Although some other implementations of the Common Language Infrastructure run on non-
Windows operating systems, the CLR runs on Microsoft Windows operating systems.
The virtual machine aspect of the CLR allows programmers to ignore many details of the specific
CPU that will execute the program. The CLR also provides other important services, including the
following:
Memory management
Thread management
Exception handling
Garbage collection
Security
Introduction to ASP.NET
Although in C# Language, .NET is a powerful but simple language aimed primarily at developers
creating web applications for the Microsoft .NET platform. It inherits many of the best features of C++
but with some of the inconsistencies and anachronisms removed, resulting in cleaner and logical
language. C# also contains a variety of useful new innovations that accelerate application development,
especially when used in conjunction with Microsoft Visual Studio .NET.
The Common Language Runtime provides the services that are needed for executing any
application that’s developed with one of the .NET languages. This is possible because all of the .NET
languages compile to a common Intermediate Language. The CLR also provides the common type system
that defines that data types that are used by all the .Net languages. That way, you can use same data types
regardless of what.NET language you’re using to develop your application.
Microsoft ASP.NET( C # )
Microsoft ASP.NET( C # ) is one of the most well known languages for the front-end programming.
It provides a ‘Rapid Application Development ‘environment to the developers. It provides supports for
the ODBC (Open Database Connectivity) and RDO data access methods, which can be used as a
powerful development tools. It also supports ActiveX Data Objects (ADO) access methods, which is
useful in creating a web page, and writing DHTML applications. It has such tools that any programmer
can have an attractive screens which he imagines. It is the most widely used languages and is more
flexible. Also one can have the desired properties of the various commands to create textbox’s, labels,
used in the screens. It also has the facility to create menu.
Microsoft ASP.NET(C #) is based on Visual Studio.NET that was developed in early 70’s. Visual
Studio .Net comes in several varieties including the following:
Microsoft, realizing that ASP does possess some significant shortcomings, developed ASP.net.
ASP.net is a set of components that provide developers with a framework with which to implement
complex functionality. Two of the major improvements of ASP.net over traditional ASP are scalability
and availability. ASP.net is scalable in that it provides state services that can be utilized to manage
session variables across multiple web services in a server farm. Additionally, ASP.net possesses a high
performance process model that can detect application failures and recover from them. We use the
fundamentals of programming with C# using Visual Studio .NET and .NET framework.
The project is the starting point for authoring applications, components & services in Visual
Studio.NET 2008.It eats as a container that manages your source code, data connections & references. A
project is organized as part of a solution, which can contain multiple projects that are independent of each
other. C# project file has .asproj extension whereas solution file has .sln extension.
In order to write code against an external component, your project must first contain a reference
to it. A reference can be made to the following types of component.
(1) .NET class libraries or assemblies
(2) COM components
(3) Other class libraries of projects in the same solution
(4) XML web services
Features of ASP.NET:
(1) Component Infrastructure.
(2) Language Integration.
(3) Internet Interoperation.
(4) Simple Development.
(5) Simple Deployment.
(6) Reliability.
(7) Security
Introduction to Microsoft SQL Server
Microsoft SQL Server enhances the performance, reliability, and scalability provided by earlier
releases of SQL Server by making the processes of developing applications, managing systems, and
replicating data easier than ever.
All of data processing is involved with the operations of storing and retrieving data. A database,
such as Microsoft SQL Server, is designed as the central repository for all the data of an organization. The
crucial nature of data to any organization underlines the importance of the method used to store it and
enable its later retrieval.
Microsoft SQL Server uses features similar to those found in other databases and some features
that are unique. Most of these additional features are made possible by SQL Server’s tight integration
with the Windows NT operating system. SQL Server contains the data storage options and the capability
to store and process the same volume of data as a mainframe or minicomputer.
Like most mainframe or minicomputer databases, SQL Server is a Database that has seen an
evolution from its introduction in the mid-1960s until today. Microsoft’s SQL Server is founded in the
mature and powerful relational model, currently the preferred model for data storage and retrieval.
Unlike mainframe and minicomputer databases, a server database is accessed by users-- called
clients--from other computer systems rather than from input/output devices, such as terminals.
Mechanisms must be in place for SQL Server to solve problems that arise from the access of data from
perhaps Hundreds of computer systems, each of which can process portions of the database independently
from the data on the server. Within the framework of a client/server
database, a server database also requires integration with communication components of the server in
order to enable connections with client systems.
SQL server also contains many of the front-end tools of PC databases that traditionally haven’t
been available as part of either mainframe or minicomputer databases. In addition to using a dialect of
Structured Query Language (SQL), GUI applications can be used for the storage, retrieval, and
administration of the database.
Data Access Layer:
When working with data one option is to embed the data-specific logic directly into the presentation
layer. This may take the form of writing ADO.NET code in the ASP.NET page's code portion or using the
SqlDataSource control from the markup portion. creating a connection to the database, issuing SELECT,
INSERT, UPDATE, and DELETE commands, and so on – should be located in the DAL.The
presentation layer should not contain any references to such data access code, but should instead make
calls into the DAL for any and all data requests. I have created data access layer for Fill() and Get()
methods. Get is done by two ways.
GetStory(),which will return information about the success story or user who met by this site.
GetMessage(), which will return information about a message for particular type of membership.
These methods, when invoked, will connect to the database, issue the appropriate query, and return
the results. These methods could simply return a Dataset or Data Reader populated by the database query,
but ideally these results should be returned using strongly-typed objects.
In strongly-typed Data Table, will have each of its columns implemented as properties, resulting in code
that looks like: DataTable .Rows [index].column Name.
Figure illustrates the workflow between the different layers of an application that uses Typed
Datasets.
To retrieve the data to populate the Data Table, I used a Table Adapter class, which functions as
my Data Access Layer. For our story Data Table, the Table Adapter is containing the methods –
Getstory(), Getstorybyid(memberid), and so on – that I can invoke from the presentation layer. The Data
Table’s role is to serve as the strongly-typed objects used to pass data between the layers.
I have a Typed Dataset with a single Data Table (message) and a strongly-typed Data Adapter
class (FmsgTableAdapter,PmsgTableAdpter) with a GetMessage() method.
In my application I have used pattern for inserting, updating, and deleting data, this pattern
involves creating methods that, when invoked, issue an INSERT, UPDATE, or DELETE command to the
database that operates on a single database
record. Such methods are typically passed in a series of scalar values (integers, strings, Booleans, Date
Times, and so on) that correspond to the values to insert, update, or delete.
The patterns use the Table Adapter’s Insert Command, Update Command, and Delete Command
properties to issue their INSERT, UPDATE, and DELETE commands to the database.
Figure Each Insert, Update, and Delete Request Is Sent to the Database
Immediately.
5. SOFTWARE AND HARDWAREE
REQUIREMENT SPECIFICATIONS
System Implementation
The system was initially implemented in only one computer on trial basis. First, dummy data was
fed & the testing was done. All the validations & constraints in the system were checked & tested for
dummy data so that the system will not give any error in future. It satisfies the needs of the users.
After the successful & smooth running, the system is ready for the final installation or
implementation on other computers.
The system was implemented in parallel to the old system to test whether the system is able to
perform the required task with required accuracy. After near about 15 days the new system was
completely in use.
Hardware and software require
Hardware
Pentium 2.90 Ghz. Or higher microprocessor
320 GB or More Disk Space
4 GB Ram
DVD Driver.
Mouse
Keyboard
Printer
Software
Microsoft Word. (MS Agent), MS-Visio, net Frame works, MS-Sql Server express edition.
Window platform
Any Windows operating system
Details of Hardware and Software used
Details of Hardware Used
Pentium 2.90 Ghz..
320 GB Hard Disk.
4 GB RAM.
Software Used
Application Package used is Microsoft ASP.NET( C # )
Database Package: Microsoft SQL Server 2008.
Othe tools: Microsoft VISIO (UML modeling)
MS-WORD
Window Platform
Operating System: Windows 00 / NT/window XP
6. Analysis
Data Flow Diagram
After the conclusion of interviews of officials and observations from Preliminary Investigation,
Feasibility Study and Software Requirement Specifications was signed. I had to draw the Functional
Specifications from Data Flow Diagram techniques, to start designing the system.
What is a Data Flow Diagram?
Data flow diagrams illustrate how data is processed by a system in terms of I/O.
Data Flow Diagram Notations
You can use two different types of notations on your data flow diagrams: Yourdon & Coad or
Gane & Sarson.
Process: A process transforms incoming data flow into outgoing data flow.
: Yourdon & Coad
Process
: Gane & Sarson Process
Data Flow Diagram Layers
Draw data flow diagrams in several nested layers. A single process node on a high level
diagram can be expanded to show a more detailed data flow diagram. Draw the context
diagram
The nesting of data flow layers
Context Diagrams: A context diagram is a top level (also known as Level 0) data flow
diagram. It only contains one process node (process 0) that generalizes the DFD.
Data Flow Diagram
CONTEXT LEVEL DIAGRAM
ONLINE
SHOPPING
PORTAL
SYSTEM
CUSTOMER
ADMIN
Search for ItemItems into Cart
Personal Details of Customer
Items of Gallery
Cart with Items
Bill Receipt
Item Detail product info
Sponsor Detail
Admin login Detail
Admin Username, password
Username, Password
User Information Report
Customer Information Report
Sponsor Information Report
Product Information Report
Context Level Diagram
LEVEL 1- ADMIN SITE
Admin
Username
pwd1
Verify
Uname,
pwd
2
Generate
Login
msg
3
Login
msg
Loginfo
Username
Pwd info msg
Login msg
4
5
6
Operation
Of
Products
Operation
Of
Sponsor
Operation
Of
User
Level 1 of admin site
LEVEL 2- ADMIN SITE FOR USER AND SPONSER
Admin 4.1Add/Edit/
Remove
User
Detail
Uname,
pwd
Loginfo
4.2
Generate
User Info
Report
Uname,
pwd User Info
Report
5.1Add/Edit/
Remove
Sponsor
Detail
Name,
Img path
Sponsor
5.2Id,Name,
Img path Generate
Sponsor Info
Report
Sponsor
Info
Report
Reports
Level 2 of Admin site for sponsor & user
LEVEL 2 - ADMIN SITE FOR ITEMS / PRODUCTS
Admin
6.1
Add/Edit/
Remove
Item
Detail
6.2
Add/Edit/
Remove
Department
Detail
Department
Name,
Desc
6.3
Add/Edit/
Remove
category
Detail
Name,
Desc
6.4
Add/Edit/
Remove
SubCategory
Detail
Name,
Desc
Category
Category
Product
6.5
Add/Edit/
Remove
Product
Detail
Name, Price
Img Path,
Desc
6.6
Generate
Product Info
Report
Name,
Desc
Name,
Desc
Name,
Desc
Name, Price
Img Path,
Desc
Level 2 of Admin site for Items / products
Product
Info
Report
Report
LEVEL 1 - CUSTOMER SITE
Customer
1
Search
For a
Item
Item Name,
Choose
category
2
Search a
Item from
database
Item Name,
category
3
Verify
Uname,
pwd
Customer
Username
Pwd infoUname, pwd
4
Generate
Login
msg
5
Items
Selected
by user
Click for
view cart
6
Add items
info into
cart
name,date
Qty,price
Shoppingcart
7
Generate
Cart detail
8
Add
Personal
Details
Name,addess,
Phno, city,state
customer
9
Generate
Bill
Receipt
Level 1 of customer site
LEVEL 2- CLIENT SITE FOR CART AND BILL
RECEIPT
Customer
1Collect
Items
Choose By
User
Item info
Shoppingcart
1Count the
Sub Total
Of choose
Items
Item
info
name, qty
Price, total1
Cart of
Customer
With items
1Collect
Customer
Personal
detail
Customer
User info
1Collect
Items of
Cart &
total
Shoppingcart
Personal
details
Personal
details
Cart
Detail Bill
Receipt
Cart of customer
Bill Receipt
Level 2 of Client site for cart & bill receipt
Search
Product
User
Category
Department
Cart
Product
Purchase
Product
Dept ID
Category ID
Product ID
Product
Request to buy
Product
Response
LEVEL 1 – USER SEARCH PROCESS
Entity Relationship Diagram
Category
Category Id
Name
Description
SubCatagory
IdName
Category Id
Image Path
Description
Product IdClass Id
Category Id
Description
HAS
ASubCategory
Class
HAS
A
HAS
AProduct
SubCatagory
Id
Name
Category Id
Description
Class IdSubCatagory
Id
Name
Qty
Customer
Customer
Id
Cart Id
Customer
Name
Buy Shopping Cart
City
State
Country
Mobile
Phone
Pin Code
Shipping
Address
Login Name
Password 1
Email
Cart Id
Id
Product Id Unit Price
Qty Total Price
Status
Date
Image Path
Product Id
Product
Category Id
Description
Class IdSubCatagory
Id
Name
Qty
Sales
Schema Diagram
Process Logic
1) Buyer and Seller: It is the user that uses system.
Registration: When new buyer or seller comes, he/she have to make registration.
Login: After registration, new buyer have to make login and if older buyer directly
he/she can make login.
Select Item: After login user will select the item’s information that user want to buy.
Order Item: After buyer view the item, he/she orders the item.
Upload Item’s Info: After login user have to upload his/her item’s information.
Sell Item: After uploading item’s information seller have to follow rules and
regulation of system to sell his/her item.
Upload/Select Item: After login seller or buyer can upload or select the item.
Sell/Order Item: After upload or select the item seller or buyer can Sell or order the
item.
Payment: After selecting item, to get that item, buyer has to make payment through
transaction process.
Logout: After payment process user can logout his/her login.
Start
User
Registration
Login
Seller Buyer
Upload Item's Info.
Sell Item
Select Item
Order Item
Payment
Transaction
Logout
End
Fork
Join
Seller & Buyer
Sell Item/Order
Item
Upload/Select Item
1) Admin: It is the admin that controls the system.
Login: Admin can directly login in the system.
Manage User: After login admin can manage user like admin can change the actor
(buyer/seller).
Manage Products: After login admin can manage products like admin can edit,
delete and update the products.
Manage Advertisements: After login admin can manage
advertisements.
Manage Feedback: After login admin can manage the feedback.
Manage Orders: After login admin can manage buyer and seller’s
orders.
Manage Customer’s Request: After login admin can manage
customer’s Requests.
Start
Login
Manage User (Seller/Buyer)
Manage Products
Manage Advertisements
Manage Feedback
Manage Orders
Manage Cust’s
Request
Logou
t
End
Admin login
Online Shopping
Product Process User Search Purchase Product
Insert
Process
Update
Process
Delete
Process
Simple
Search
Advance
Search
Credit Card
Verification
Product
Verification
Buyer Seller Admin
Login
Manage
Products
Manage
User Manage
Feedback
Manage
Orders Manage
Advertisement
Admin
Manage
Buyer
Products
Manage
Seller
Products
Manage
Buyer
Orders
Manage
Seller
Orders
After login user select as
After select product Admin approved by Adm
User
View
Products
Get
Products
Add to cart
Make
Orders
Payment
Sell
Products
Deliver
Products
Seller
Upload
Products
Buyer
Data Dictionary Data dictionary means it contains the information about all tables include details. There
are eleven tables in my project that are following:
1) ActorMaster
2) RegisteredUser
3) Products
4) Category
5) Cart
6) Feedback
7) OPCRelations
8) Order
9) Payment
10) BuyerPutReq
11) SellerProducts
1) ActorMaster:
Table Name: ActorMaster
Description: This table stores Actor’s number and name, whether he/she is Buyer or
Seller and it is used in master module of my project.
2) RegisteredUser:
Table Name: RegisteredUser
Description: This table stores personal information of User. After registration User can
direct login.
FIELD DATATYP
E
DATA
SIZE CONSTRAINTS DESCRIPTION
ActorNo Int - Primary Key Unique number of Actor
ActorName nchar 10 Not null Name of Actor
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
UserID Nchar 10 Primary Key Unique number of User ID
Password Nvarchar 50 Not null Password of User
Actor Int - Null Name of Actor
FName Nvarchar 15 Not null First name of user
MName Nvarchar 15 Null Middle name of user
LName Nvarchar 15 Not null Last name of user
Address Nvarchar 30 Null Address of User
City Nvarchar 20 Null City of user
State Nvarchar 15 Null State of user
PhoneM Nvarchar 10 Null Unique number of Mobile
3) Products:
Table Name: Products
Description: This table stores information of various products.
4) Category:
Table Name: Category
Description: This table stores ID and Name of product’s category.
PhoneR Nvarchar 15 Null Unique number of Residence
Question Nvarchar 50 Null Personal Questions for User
Answer Nvarchar 50 Null Answers of Personal Questions
Email Nvarchar 20 Not null Email Address of User
LoginDate Datetime - Not null Date & Time of Login
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
Pid Nvarchar 10 Primary Key Unique number of Product ID
PName Nvarchar 30 Not null Name of the product
PDesc Nvarchar 100 Null Description of the product
PImage Image - Not null Image of the product
PImageName Nvarchar 200 Null Name of the image
PPrice Numeric 6,0 Not null Price of the product
PCategoryID Int - Not null Unique number of Category ID
PQnty Int - Null Quantity of the product
Pflag Bit - Not null Flag for show Product
PLoaded Datetime - Not null Date & Time of loaded Product
5) Cart:
Table Name: Cart
Description: This table stores numbers of orders selected by the user (buyer/seller).
6) Feedback:
Table Name: Feedback
Description: This table stores information of user’s feedback or review.
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
SrNo Bigint - Primary Key Unique number of feedback
UserID Nchar 10 Foreign Key Unique number of User ID
Content_f Int - Not null Contents of Feedback
Design Int - Not null Design of Feedback
Usability Int - Not null Usability of Fedback
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
CatID Int - Primary Key Unique number of Category ID
CatName Nvarchar 50 Not null Name of Category
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
ID Nvarchar 50 Primary Key Unique number of Product ID
Quantity Int - Null Quantity of Product
Product Nvarchar 100 Null Name of Product
Cost Numeric 8,2 Null Cost of Product
UserID Nvarchar 50 Foreign Key Unique number of user ID
DownloadSpeed Int - Not null Speed of Download
Comments Nvarchar 500 Null Comments of Feeback
Mailid Nvarchar 50 Not null E-mail address of User
Show Bit - Not null Show the Feedback
7) OPCRelations:
Table Name: OPCRelations
Description: This table stores information of orders and category of products. This table
contains information of order, product and category tables.
8) Order:
Table Name: Order
Description: This table stores information of orders selected by the user (buyer/seller).
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
OrderID Int - Primary Key Unique number of Order ID
OrderDT Datetime - Not null Date & Time of Buying Products
UserID Nchar 10 Foreign Key Unique number of User ID
TotalPrice Numeric 8,0 Not null Total price of Orders
OrderCommit Bit - Not null Show committed Order
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
OrderID Int - Primary Key Unique number of Order ID
Pid Nvarchar 10 Foreign Key Unique number of Product ID
9) Payment:
Table Name: Payment
Description: This table stores information of payment of user’s orders that are selected by the
particular buyer or seller
10) BuyerPutReq:
Table Name: BuyerPutReq
Description: This table stores information of requests that are required by the user (buyer).
Quantity Int - Not null Quantity of product
Price Numeric 6,0 Not null Price of the product
Orderto Nvarchar 50 Null Order of Product
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
Creditcardno Nvarchar 20 Primary Key Unique number of credit card
Pinno Nvarchar 20 Not null Unique number of pin card
Bankname Nvarchar 50 Not null Name of the bank
Ownername Nvarchar 50 Not null Name of the owner
Deliveryaddr Nvarchar 200 Null Delivery address of User
Userid Nchar 10 Foreign Key Unique number of User ID
Ordered Int - Not null Unique number of Order
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
11) Seller Products:
Table Name: SellerProducts
Description: This table stores information of products that are selected by the user (seller).
Reqid Int - Primary Key Unique number of Request
Productname Nvarchar 50 Not null Name of Product
Productcategory Int - Null Category of product
Productquantity Int - Null Quantity of product
Productprice Numeric 8,2 Null Price of product
Productchars Nvarchar 150 Null Characteristic of Product
Userid Nchar 10 Foreign Key Unique number of user
Reqdatetime Datetime - Null Date & Time of Buying Products
FIELD DATATYPE DATA
SIZE CONSTRAINTS DESCRIPTION
SPid Nvarchar 10 Primary Key Unique number of Seller Product
SPName Nvarchar 30 Not null Name of Seller Product
SPDesc Nvarchar 100 Not null Description of the Seller Product
SPImage Image - Not null Image of the Seller Product
SPImageName Nvarchar 200 Not null Name of the Image
SPPrice Numeric 6,0 Not null Price of the Seller Product
SPCategoryID Int - Not null Unique number of Category ID
SPQnty Int - Not null Quantity of the Seller Product
SPflag Bit - Not null Flag for show Product
SPLoaded Datetime - Null Date & Time of loaded Product
SPDuration Int - Null Duration of Selling Product
Userid Nvarchar 50 Foreign Key Unique number of User ID
Screen Shots Admin-Side:- ActorMaster.aspx.cs
BuyerPutRequired Master.aspx.cs
CategoryMaster.aspx.cs
OrderedMaster.aspx.cs
PaymentMaster.aspx.cs
ProductMaster.aspx.cs
SellerProductMaster.aspx.cs
SubCategory.aspx.cs
Login.aspx.cs
ChangePassword.aspx.cs
ForgotPassword.aspx.cs:-
Admin Welcome.aspx.cs:-
UserSide:-
RegisteredUser.aspx.cs
Feedback Master.aspx.cs
Login.aspx.cs:-
ForgotPassword.aspx.cs:-
Test Case Form Name StepDetails
Login
Login Form
1.UserName:
2.Password:
Expected Result:
1. If UserNAme and Password Is Incorrect than the User can’t Login
into the System.
2. If UserName and Password is Correct than the User will Go on the
Welcome Page
UserName And Password Correct
Test Case Form Name StepDetails
Actor Master
Actor Master Form
1.Actor Name
Test Cases Of Admin Side
Karan
Login
Hardik
Expected Result: If a enter
Test Case Form Name StepDetails
Sub Category
Master
Sub Category Master Form
1.Sub Category Name
2.Category Name
Expected Result:
Expected Results:
Here Firstly the User has to Login Correctly than Only he/she can
Change Password
1. If Current Password entered does not match than a message is Shown.
2. If after inserting correct userpassword the newpassword and confirm
password should match.
3. If Newpassword and ConfirmPassword both matches than after
clicking on
thePassword will Successfully change
Test Case Form Name StepDetails
Change Password
ChangePasswordForm
1. If Current Password
Is Incorrect
2. New Password and
Confirm Password is
Incorrect
3. If all Fields are Correct
Telivison
Electronics
Test Case Form Name StepDetails
Register User
Register User Master
1. If in mobile No.
field instead of
number anything
else is inserted.
2. If in Dropdown box
the User wanted
field is not there.
3. If all Data are
Entered Correctly.
1. If Mobile No. Field is not entered correctlt than a message will shown as:
2. If in Qualification the required qualification is not there as per the user
Qualification than selected “Other” option from Dropdown box a textbox is
visible in that he/she can write his/her Qualification.
3. If all fields are inserted than the will be submitted Successfully.
Test Case Form Name StepDetails
Forgot Password
ForgotPasswordForm
1. On entering
UserName and
Clicking on
Forgorpassword
Link.
2. Password Shown if
Emailid and
Username is
Correct.
Expected Results:
Test Cases OfUser Side
1. On entering Username and Clicking on Forgot Password Link the User can
get his/her Password.
2. If UserName or Password is not Correct than a Message is Thrown.
7. Coding
Admin-Side:-
ActorMaster.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Admin_ActorMaster : System.Web.UI.Page { public static SqlConnection con; public static int id; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); BindControl(); } } public void BindControl() { SqlCommand cmd = new SqlCommand("ReadActor", con); cmd.CommandType = CommandType.StoredProcedure; OpenConnection(); SqlDataReader dr = cmd.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); dr.Close(); cmd.Dispose(); CloseConnection(); } public void OpenConnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); } public void CloseConnection() { con.Close(); } public void ClearData() { txtaname.Text = ""; txtaname.Focus(); } protected void btnsubmit_Click(object sender, EventArgs e) { if (btnsubmit.Text == "Submit") { SqlCommand cmd = new SqlCommand("InsertActorMaster", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter parm = new SqlParameter("@ActorName", SqlDbType.VarChar);
parm.Value = txtaname.Text; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); OpenConnection(); cmd.ExecuteNonQuery(); LeeGunn.Web.UI.MessageBox.MessageBox.Show("Data Submitted"); BindControl(); ClearData(); cmd.Dispose(); CloseConnection(); } else { SqlCommand cmd = new SqlCommand("updateActor", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter parm = new SqlParameter("@ActorNo", SqlDbType.VarChar); parm.Value = ViewState["aid"].ToString(); parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); parm = new SqlParameter("@ActorNm", SqlDbType.VarChar); parm.Value = txtaname.Text; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); OpenConnection(); cmd.ExecuteNonQuery(); LeeGunn.Web.UI.MessageBox.MessageBox.Show("Data Updated"); BindControl(); ClearData(); cmd.Dispose(); CloseConnection(); btnsubmit.Text = "Submit"; } } protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { int index = Convert.ToInt32(e.CommandArgument); GridViewRow raw = GridView1.Rows[index]; if (e.CommandName == "EditButton") { int id; id = Convert.ToInt32(raw.Cells[2].Text); ViewState["aid"] = id; SqlCommand cmd = new SqlCommand("selectActor", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter parm = new SqlParameter("@ActorNo", SqlDbType.Int); parm.Value = id; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); OpenConnection(); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read())
lnkEdit.CommandArgument = e.Row.RowIndex.ToString(); LinkButton lnkDelete = (LinkButton)e.Row.FindControl("lnkDelete"); lnkDelete.CommandArgument = e.Row.RowIndex.ToString(); } } } protected void GridView1_RowCommand1(object sender, GridViewCommandEventArgs e) { int index = Convert.ToInt32(e.CommandArgument); GridViewRow raw = GridView1.Rows[index]; if (e.CommandName == "EditButton") { int id; id = Convert.ToInt32(raw.Cells[2].Text); ViewState["aid"] = id; SqlCommand cmd = new SqlCommand("SelectBuyerPutReq", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter parm = new SqlParameter("@ReqId", SqlDbType.Int); parm.Value = id; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); openconnection(); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { txtpname.Text = dr["ProductName"].ToString(); ddlistpcatid.Text = dr["ProductCategory"].ToString(); txtpqnty.Text = dr["ProductQuentity"].ToString(); txtpprice.Text = dr["ProductPrice"].ToString(); txtpchars.Text = dr["Productchars"].ToString(); txtrdt.Text = dr["ReqDateTime"].ToString(); Label1.Text = dr["UserId"].ToString(); } dr.Close(); cmd.Dispose(); btnsubmit.Text = "Update"; CloseConnection(); } if (e.CommandName == "DeleteButton") { int id; id = Convert.ToInt32(raw.Cells[2].Text); ViewState["cid"] = id; SqlCommand cmd = new SqlCommand("DeleteBuyerPutReq", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter parm = new SqlParameter("@ReqId", SqlDbType.Int); parm.Value = id; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); openconnection(); cmd.ExecuteNonQuery();
LeeGunn.Web.UI.MessageBox.MessageBox.Show("Record Deleted Successfully"); cmd.Dispose(); BindControl(); ClearData(); CloseConnection(); } } } Store Procedure:- ALTER PROCEDURE InsertBuyerPutReq /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @ProductName nvarchar(50), @ProductCategory int, @ProductQuentity int, @ProductPrice int, @ProductChars nvarchar(200), @Userid nchar(10), @ReqDateTime date AS /* SET NOCOUNT ON */ Insert into BuyerPutReq(ProductName,ProductCategory,ProductQuentity,ProductPrice,ProductChars,Userid,ReqDateTime) values (@ProductName,@ProductCategory,@ProductQuentity,@ProductPrice,@ProductChars,@Userid,@ReqDateTime) RETURN ALTER PROCEDURE DeleteBuyerPutReq /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @ReqId int=0 AS /* SET NOCOUNT ON */ delete from BuyerPutReq where ReqId=@ReqId RETURN ALTER PROCEDURE ReadBuyerPutReq /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ select * from BuyerPutReq RETURN ALTER PROCEDURE SelectBuyerPutReq /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT )
*/ @ReqId int=0 AS /* SET NOCOUNT ON */ select * from BuyerPutReq where ReqId=@ReqId RETURN ALTER PROCEDURE UpdateBuyerPutReq /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @ReqId int=0, @ProductName nvarchar(50), @ProductCategory int, @ProductQuentity int, @ProductPrice int, @ProductChars nvarchar(200), @Userid nchar(10), @ReqDateTime date AS /* SET NOCOUNT ON */ update BuyerPutReq set ProductName=@ProductName,ProductCategory=@ProductCategory,ProductQuentity=@ProductQuentity,ProductPrice=@ProductPrice,ProductChars=@ProductChars,Userid=@Userid,ReqDateTime=@ReqDateTime where ReqId=@ReqId RETURN CategoryMaster.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Admin_CategoryMaster1 : System.Web.UI.Page { public static SqlConnection con; public static int id; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); BindControl(); } } public void BindControl() { SqlCommand cmd = new SqlCommand("ReadCategory", con); cmd.CommandType = CommandType.StoredProcedure; OpenConnection(); SqlDataReader dr = cmd.ExecuteReader();
ALTER PROCEDURE InsertCategoryMaster /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @CatName varchar(max) AS /* SET NOCOUNT ON */ Insert Into Category(CatName) values (@CatName) RETURN ALTER PROCEDURE DeleteCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @CatId int=0 AS /* SET NOCOUNT ON */ delete from Category where CatId=@CatId RETURN ALTER PROCEDURE ReadCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ Select * from Category RETURN ALTER PROCEDURE SelectCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT )
*/ @CatId int=0 AS /* SET NOCOUNT ON */ Select * from Category where CatId=@CatId RETURN ALTER PROCEDURE UpdateCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @CatId int=0, @CatName varchar(50) AS /* SET NOCOUNT ON */ Update Category set CatName=@CatName where CatId=@CatId RETURN OrderedMaster.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Admin_OrderedMaster : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e) { { if (!IsPostBack) con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); BindControl(); BindControl1(); } } public void BindControl() { SqlCommand cmd = new SqlCommand("ReadOrdered", con); cmd.CommandType = CommandType.StoredProcedure; OpenConnection(); SqlDataReader dr = cmd.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); dr.Close(); cmd.Dispose(); CloseConnection(); }
ALTER PROCEDURE InsertOrdered /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @Pid nvarchar(10), @PQuentity int, @PPrice varchar(20), @POrder nvarchar(50) AS /* SET NOCOUNT ON */ insert into Ordered (Pid,PQuentity,PPrice,POrder) values (@Pid,@PQuentity,@PPrice,@POrder) RETURN ALTER PROCEDURE DeleteOrdered /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @Orderid int=0 AS /* SET NOCOUNT ON */ delete from Ordered where Orderid=@Orderid RETURN ALTER PROCEDURE ReadOrdered /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ select * from Ordered RETURN ALTER PROCEDURE SelectOrdered /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @Orderid int =0 AS /* SET NOCOUNT ON */ Select * from Ordered where Orderid=@Orderid RETURN ALTER PROCEDURE UpdateOrdered /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT )
*/ @Orderid int=0, @Pid nvarchar(10), @PQuentity int, @PPrice varchar(20), @POrder nvarchar(50) AS /* SET NOCOUNT ON */ Update Ordered set Pid=@Pid,PQuentity=@PQuentity,PPrice=@PPrice,POrder=@POrder where Orderid=Orderid RETURN
PaymentMaster.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Admin_PaymentMaster : System.Web.UI.Page { public static SqlConnection con; public static int id; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); //Label1.Text = Session["unm"].ToString(); Label1.Text = "Karan"; BindControl(); } } public void BindControl() { SqlCommand cmd = new SqlCommand("ReadPayment", con); cmd.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); dr.Close(); cmd.Dispose(); CloseConnection(); } public void openconnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open();
ALTER PROCEDURE InsertPayment /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @PinNo nvarchar(50), @BankName nvarchar(50), @OwnerName nvarchar(50), @DeliveryAddress nvarchar(250), @UserId nchar(10), @Ordered int AS /* SET NOCOUNT ON */ Insert into Payment (PinNo,BankName,OwnerName,DeliveryAddress,UserId,Ordered) values (@PinNo,@BankName,@OwnerName,@DeliveryAddress,@UserId,@Ordered) RETURN ALTER PROCEDURE deletePayment /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @CreditCardNo int=0 AS /* SET NOCOUNT ON */ delete from Payment where CreditCardNo=@CreditCardNo RETURN ALTER PROCEDURE ReadPayment /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ Select * from Payment RETURN ALTER PROCEDURE SelectPayment /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @CreditCardNo int=0 AS /* SET NOCOUNT ON */ Select * from Payment where CreditCardNo=@CreditCardNo RETURN ALTER PROCEDURE UpdatePayment /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @CreditCardNo int=0, @PinNo nvarchar(50),
@BankName nvarchar(50), @OwnerName nvarchar(50), @DeliveryAddress nvarchar(250), @UserId nchar(10), @Ordered int AS /* SET NOCOUNT ON */ Update Payment set PinNo=@PinNo,BankName=@BankName,OwnerName=@OwnerName,DeliveryAddress=@DeliveryAddress,UserId=@UserId,Ordered=@Ordered where CreditCardNo=@CreditCardNo RETURN
ProductMaster.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; using System.IO; public partial class Admin_ProductMaster : System.Web.UI.Page { public static SqlConnection con; public static int id; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); BindControl(); BindControl1(); } } public void BindControl() { SqlCommand cmd = new SqlCommand("ReadProduct", con); cmd.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd.ExecuteReader();
ALTER PROCEDURE InsertProductMaster /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT )
*/ @PName nvarchar(30), @Pdesc nvarchar(100), @PImage nvarchar(100), @PImageName nvarchar(200), @PPrice int, @PCategoryId int, @PQnty int, @PFlag varchar, @PLoaded date AS /* SET NOCOUNT ON */ Insert Into Product(PName,Pdesc,PImage,PImageName,PPrice,PCategoryId,PQnty,PFlag,PLoaded) values (@PName,@Pdesc,@PImage,@PImageName,@PPrice,@PCategoryId,@Pqnty,@PFlag,@PLoaded) RETURN ALTER PROCEDURE DeleteProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @PId int=0 AS /* SET NOCOUNT ON */ delete from Product Where PId=@PId RETURN ALTER PROCEDURE ReadProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ select * from Product RETURN ALTER PROCEDURE SelectProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @PId int=0 AS /* SET NOCOUNT ON */ Select * From Product where PId=@PId RETURN ALTER PROCEDURE UpdateProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @PId nvarchar (10), @PName nvarchar (30), @PDesc nvarchar (100), @PImage varchar, @PImageName nvarchar (100), @PPrice numeric (6,0), @PCategoryId int, @PQnty int,
@PFlag varchar, @PLoaded datetime AS /* SET NOCOUNT ON */ Update Product set PName=@PName,PDesc=@PDesc,PImage=@PImage,PImageName=@PImageName,PPrice=@PPrice,PCategoryId=@PCategoryId,PQnty=@PQnty,PFlag=@PFLag,PLoaded=@PLoaded where PId=@PId RETURN SellerProductMaster.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; using System.IO; public partial class Admin_SellerProductMaster : System.Web.UI.Page { public static SqlConnection con; public static int id; public static string str1; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); //Label1.Text = Session["unm"].ToString(); Label1.Text = "Karan"; BindControl(); BindControl1(); } } public void BindControl() { SqlCommand cmd = new SqlCommand("ReadSellerProduct", con); cmd.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd.ExecuteReader(); GridView1.DataSource = dr; GridView1.DataBind(); dr.Close(); cmd.Dispose(); CloseConnection(); } public void BindControl1() { SqlCommand cmd1 = new SqlCommand("ReadCategory", con); cmd1.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd1.ExecuteReader(); ddlistspcatid.DataSource = dr; ddlistspcatid.DataTextField = "CatName"; ddlistspcatid.DataValueField = "CatId"; ddlistspcatid.DataBind(); dr.Close();
@SPLoaded date, @SPDuration varchar(50), @UserId Nvarchar(50) AS /* SET NOCOUNT ON */ Insert into SellerProductMaster(SPName,SPDesc,SPImage,SPImageName,SPPrice,SPCategoryId,SPQnty,SPFlag,SPLoaded,SPDuration,UserId) values (@SPName,@SPDesc,@SPImage,@SPImageName,@SPPrice,@SPCategoryId,@SPQnty,@SPFlag,@SPLoaded,@SPDuration,@UserId) RETURN ALTER PROCEDURE DeleteSellerProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @SPId int=0 AS /* SET NOCOUNT ON */ Delete from SellerProductMaster where SPId=@SPId RETURN ALTER PROCEDURE ReadSellerProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ select * from SellerProductMaster RETURN ALTER PROCEDURE SelectSellerProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @SPId int=0 AS /* SET NOCOUNT ON */ select * from SellerProductMaster where SPId=@SPId RETURN ALTER PROCEDURE UpdateSellerProduct /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @SPId nvarchar(10), @SPName nvarchar (30), @SPDesc nvarchar (100), @SPImage varchar, @SPImageName nvarchar (100), @SPPrice numeric (6,0), @SPCategoryId int, @SPQnty int, @SPFlag varchar, @SPLoaded datetime, @SPDuration varchar(50),
@UserId varchar(50) AS /* SET NOCOUNT ON */ Update SellerProductMaster set SPName=@SPName,SPDesc=@SPDesc,SPImage=@SPImage,SPImageName=@SPImageName,SPPrice=@SPPrice,SPCategoryId=@SPCategoryId,SPQnty=@SPQnty,SPFlag=@SPFlag,SPLoaded=@SPLoaded,SPDuration=@SPDuration,UserId=@UserId where SPId=@SPId RETURN
SubCategory.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; using System.IO; public partial class Admin_SubCategory : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); BindControl(); BindControl1(); } } public void BindControl() { SqlCommand cmd = new SqlCommand("ReadSubCategory", con); cmd.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd.ExecuteReader(); SubCategory.DataSource = dr; SubCategory.DataBind(); dr.Close(); cmd.Dispose(); CloseConnection(); } public void BindControl1() { SqlCommand cmd1 = new SqlCommand("ReadCategory", con); cmd1.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd1.ExecuteReader(); ddlistcatid.DataSource = dr; ddlistcatid.DataTextField = "CatName";
ALTER PROCEDURE InsertSubCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @SubCategoryName varchar(50), @CategoryId varchar(50) AS /* SET NOCOUNT ON */ Insert into SubCategoryMaster values (@SubCategoryName,@CategoryId) RETURN ALTER PROCEDURE DeleteSubCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @SubCategoryId int=0 AS /* SET NOCOUNT ON */ delete from SubCategoryMaster where SubCategoryId=@SubCategoryId RETURN ALTER PROCEDURE ReadSubCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ select * from SubCategoryMaster RETURN ALTER PROCEDURE SelectSubCategory /* ( @parameter1 int = 5,
@parameter2 datatype OUTPUT ) */ @SubCategoryId int=0 AS /* SET NOCOUNT ON */ select * from SubCategoryMaster where SubCategoryId=@SubCategoryId RETURN ALTER PROCEDURE UpdateSubCategory /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @SubCategoryId int=0, @SubCategoryName varchar(50), @CategoryId varchar(50) AS /* SET NOCOUNT ON */ Update SubCategoryMaster set SubCategoryName=@SubCategoryName,CategoryId=@CategoryId where SubCategoryId=@SubCategoryId RETURN Login.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Admin_Login : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); OpenConnection(); CloseConnection(); } public void OpenConnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); } public void CloseConnection() { con.Close(); } protected void btnlogin_Click(object sender, EventArgs e) { string strg = "select * from AdminLogin where UserName='" + txtuname.Text + "' and Password ='" + txtpasswd.Text + "'";
SqlCommand cmd = new SqlCommand(strg, con); OpenConnection(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() == true) { Session["Unm"] = txtuname.Text; Response.Redirect("Welcome.aspx"); } else { LeeGunn.Web.UI.MessageBox.MessageBox.Show("Username or password wrong"); } dr.Close(); cmd.Dispose(); CloseConnection(); { } } } ChangePassword.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Admin_ChangePassword : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); } } public void OpenConnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); } public void CloseConnection() { con.Close(); } public void ClearData()
ALTER PROCEDURE UpdateChangePassword /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @UserName varchar(50), @Password varchar(50), @ChangePassword varchar(50) AS /* SET NOCOUNT ON */ update AdminLogin set Password=@ChangePassword where UserName=@UserName and Password=@Password RETURN ForgotPassword.aspx.cs:-
using System;
using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class Admin_ForgotPassword : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); } public void OpenConnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); } public void CloseConnection() { con.Close(); } public void ClearData() { txtuname.Text = ""; txtuname.Focus(); } protected void btnsubmit_Click(object sender, EventArgs e) { try { SqlCommand cmd = new SqlCommand("ReadForgotPassword", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter parm = new SqlParameter("Username", SqlDbType.VarChar); parm.Value = txtuname.Text; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); parm = new SqlParameter("Email", SqlDbType.VarChar); parm.Value = txtremail.Text; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); OpenConnection(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.HasRows) { while (dr.Read()) { lnkpasswd.Text = dr["Password"].ToString(); } } else { lnkpasswd.Text = "Username / Email Wrong";
ALTER PROCEDURE ReadForgotPassword /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @UserName varchar(50), @Email varchar(50) AS /* SET NOCOUNT ON */ Select * From AdminLogin where UserName=@userName and Email=@Email RETURN
Admin Welcome.aspx.cs:-
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Admin_Welcome : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { LinkButton1.Text = Session["Unm"].ToString(); } protected void LinkButton1_Click(object sender, EventArgs e) { Response.Redirect("AdminLoginMaster.aspx"); } }
UserSide:-
RegisteredUser.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI;
using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class User_RegisteredUser : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); Bindcontrol(); Bindcontrol1(); } } public void Bindcontrol() { SqlCommand cmd = new SqlCommand("ReadRegisteredUser", con); cmd.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd.ExecuteReader(); dr.Close(); cmd.Dispose(); CloseConnection(); } public void Bindcontrol1() { SqlCommand cmd1 = new SqlCommand("ReadActor", con); cmd1.CommandType = CommandType.StoredProcedure; openconnection(); SqlDataReader dr = cmd1.ExecuteReader(); ddlactor.DataSource = dr; ddlactor.DataTextField = "ActorName"; ddlactor.DataValueField = "ActorNo"; ddlactor.DataBind(); dr.Close(); cmd1.Dispose(); CloseConnection(); } public void openconnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); } public void CloseConnection() { con.Close(); } public void ClearData() { txtuname.Text = ""; txtuname.Focus();
ALTER PROCEDURE InsertFeedback /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @UserId nchar(10), @ContentFeedback int, @Comments nvarchar(500), @MailId nvarchar(50) AS /* SET NOCOUNT ON */ Insert into Feedback(UserId,ContentFeedback,Comments,MailId) values (@UserId,@ContentFeedback,@Comments,@MailId) RETURN ALTER PROCEDURE ReadFeedback /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ AS /* SET NOCOUNT ON */ Select * from Feedback RETURN ALTER PROCEDURE UpdateFeedback /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @SrNo int=0, @UserId nchar(10), @ContentFeedback int, @Comments nvarchar(500), @MailId nvarchar(50) AS /* SET NOCOUNT ON */ Update Feedback set UserId=@UserId,ContentFeedback=@ContentFeedback,Comments=@Comments,MailId=@MailId where SrNo=@SrNo RETURN Login.aspx.cs:-
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class User_Login : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e)
{ con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); OpenConnection(); CloseConnection(); } public void OpenConnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); } public void CloseConnection() { con.Close(); } protected void btnLogin_Click(object sender, EventArgs e) { string strg = "select * from RegisteredUser where UserName='" + txtuname.Text + "' and Password ='" + txtpasswd.Text + "'"; SqlCommand cmd = new SqlCommand(strg, con); OpenConnection(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.Read() == true) { Session["UserName"] = txtuname.Text; Response.Redirect("Welcome.aspx"); } else { LeeGunn.Web.UI.MessageBox.MessageBox.Show("Username or password wrong"); } dr.Close(); cmd.Dispose(); CloseConnection(); { } } } ForgotPassword.aspx.cs:-
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.SqlClient; using System.Data; using System.Configuration; public partial class User_ForgotPassword : System.Web.UI.Page { public static SqlConnection con; protected void Page_Load(object sender, EventArgs e) { con = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineShoping"].ToString()); } public void OpenConnection() { if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); } public void CloseConnection() { con.Close(); } public void ClearData() { txtuname.Text = ""; txtuname.Focus(); } protected void btnsubmit_Click(object sender, EventArgs e) { try { SqlCommand cmd = new SqlCommand("ReadForgotPassword", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter parm = new SqlParameter("Username", SqlDbType.VarChar); parm.Value = txtuname.Text; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); parm = new SqlParameter("Email", SqlDbType.VarChar); parm.Value = txtregemail.Text; parm.Direction = ParameterDirection.Input; cmd.Parameters.Add(parm); OpenConnection(); SqlDataReader dr = cmd.ExecuteReader(); if (dr.HasRows) { while (dr.Read()) { lnkpassword.Text = dr["Password"].ToString(); }
} else { lnkpassword.Text = "Username / Email Wrong"; } dr.Close(); ClearData(); CloseConnection(); } catch (Exception ex) { LeeGunn.Web.UI.MessageBox.MessageBox.Show(ex.Message.ToString()); } } } Store Procedure:- ALTER PROCEDURE ReadForgotPassword /* ( @parameter1 int = 5, @parameter2 datatype OUTPUT ) */ @UserName varchar(50), @Email varchar(50) AS /* SET NOCOUNT ON */ Select * From RegisterUser where UserName=@userName and Email=@Email
8. Code Efficiency
Efficiency of code is mainly dependent on how intelligently coding is done. There is no
specific technique by which any one can say, this is the efficient code and other one is a bad
one, it all depends on the programmer that how efficiently he uses his intellect. And the other
most important thing is the way one is handling the language; which is used to develop the
code and for that one has to have proper knowledge of language.
But still there are some common techniques and structures; if any one follows that then
his/her code can become quite efficient.
E.g. Variable Naming Conventions, Properly used scope of variable, use of control structure
and looping structure in a easier and a simpler way as much as possible.
To write code in a proper order and sequence, the order and sequence again depends on the
programmer and the situation.
9. Optimization Of code
If coding is done efficiently than it should also be used or done optimistically. i.e. best use of code.
What is the reason behind this optimization?
Optimization means make best or most effective use.
E.g. there is one efficient function or efficient environment oriented language or tool is
available but if optimum use of that function or tool or language makes the whole program
more simpler, effective and user friendly also.
Now, how to optimize? Again it mostly depends on the programmer, that how intelligently he
is doing all those things, still there are some basic rules to make our code optimistic.
First thing is, develop the code which is general i.e. that code cannot be purposefully
developed only by one angle. i.e. only for current system. Programmer must be awake of all
the general usage of that code, at least he/she has to look out onto most of the probabilistic
events or conditions or specifications that can occur. The most usage of any function can also
be cleared prior to making them, then only one can develop the general purpose code which
can be said as optimization of code. So ultimately code must be reusable.
Second is, Modularization i.e. most important thing for optimization. If total code is
distributed in proper modules prior to start of the actual coding then it’s a better way of
coding. General Module i.e. Standard Module is used.
Third thing is capabilities; utilities and facilities which are provided by language or tool or
environment in which the programmer is developing the code must be properly known.
Active X Control named as EdgeCtl.ocx
The most important thing to use OCX is its Reusability.
MDI is used so, automatically it optimizes the code.
The Optimization goal is achieved by combining the OCX and MDI.
10. Validation Check
1. All text fields that take integers, as inputs will be validated so that only the digits are allowed.
2. All text fields that take inputs as alphanumeric will be validated, so that only alphabets are taken
as parameters for input.
3. All fields that are mapped to Primary key, will be validated so that the data is not stored as
NULL in the required fields.
4. All text fields max length, are set according to the mapped database fields, so that the characters
do not exceed the maximum length.
5. Before storing the data, all fields that take in NULL are store values as NULL.
6. All Date field values are stored as “dd-MMM-yyyy” format and will be consistent through the
system.
7. All database fields that take in a single value, as flag will content Digit.
8. Primary keys are IDENTITY columns, which makes then Auto-Increment value field.
9. Data Stores in the reference table / column is validated through a Visual Graphical Component
like Combo, ListViews, TreeViews, which makes the Foreign Key Value consistent and sure to
be present in the Parent table.
10. Testing
To examine critically is called Testing. Whatever we have developed whether it is properly
working or how much correctly the development has been done or what are the errors. To answer these
type of questions testing is required.
First of all the project is debugged by method of Traditional breakpoint facility. Debugging means the
process of isolating and correcting the cause of known errors.
Various testing methods are used to test the system.
System Testing
A system is tested for online responses, volume of transactions, stress, and recovery from
failure, and usability. System testing involves two kinds of activities – Integration testing and
acceptance testing.
Integration Testing
Bottom up integration is the traditional; strategy used to integrate the components of a
software system into a functioning whole. Bottom-up integration consists of unit testing,
followed by subsystem testing, followed by testing of the entire system. Unit testing has the
goal of discovering errors in the individual modules of the system.
Unit Testing
A program unit is usually small enough that the programmers who developed it can test it in
great detail and certainly in greater detail will be possible when the unit is integrated into an
evolving software product.
There are four categories of tests a programmer will typically perform on a program unit:
1. Functional Tests: specify operating conditions, input values and expected results. For
example the function Numeric written to check whether data is numeric or not the argument
can be passed as null argument.
2. Performance Tests: should be designed to verify response time, execution time,
throughput, primary and secondary memory utilization and traffic rates on data channels and
communications. A query executed takes 5 seconds to display results, is a test for response
time. Execution time is the time taken by CPU to execute a program. Throughput is the rate at
which data gets transferred from one data source to destination. Primary and secondary
memory utilization needs to be optimized. Traffic rates on data channels and communication
link testing are applicable for networks.
3. Stress Tests: are designed to overload a system in various ways. The purpose of test is to
determine the limitations of the system. During multiple query execution the available
memory can be reduced to see whether the program is able to handle the situation.
4. Structural Tests: are concerned with examining the internal processing logic of a
software system. For example, if a function is responsible for tax calculation, the verification
of the logic is a structural test.
To test the code there are two testing methods, which are very popular they mentioned below
1. White box 2. Black Box.
Database Testing
Modern Web Application does much more than present static content objects. In many application
domains, Web Application interface with sophisticated database management system and build dynamic
content object that are created in real time using the data acquired from a database.
Database Testing for Web Application is complicated by a variety of factor.
1) The original client side request for information is rarely presented in the form that can be input to a
database management system.
2) The database may be remote to the server that houses the Web application.
3) RAW data acquired from the database must be transmitted to the Web application Server and properly
formatted for subsequent transmittal to the client.
4) The dynamic content objects must be transmitted to the client in a form that can be displayed to the end
user.
Database
[Layers of interaction]
In figure testing should be ensure that
1. Valid information is passed between the client and server from the interface layer
2. The Web application process script correctly and properly extract or formats user data.
1. Queries are passed to a data management layer that communicates with database access
routines.
2. User data are passed correctly to a server side data transformation function that format
appropriate queries.
Client layer-user interface
Server layer- WebApp
Server layer-
Data transformation
Server layer - data
Management
Database layer – data access
Interface Testing
Interface design model is reviewed to ensure that generic quality criteria established for all user
interfaces have been achieved and that application specific interface design issue has been properly
addressed.
Interface testing strategy
The overall strategy for interface testing is to (1) Uncover error related to specific Interface
mechanisms (2) uncover errors in the way the interface implements the semantics of navigation, Web
Application functionality, or content display. to accomplish this strategy, a number of objectives must be
achieved:
Interface futures are tested to ensure that design rules, aesthetics, and related visual content are available
for the user without error. Individual interface mechanisms are tested in a manner that is a logous to unit
testing For example; tests are designed to exercise all forms, client-side scripting, dynamic HTML. Each
interface mechanism is tested within the context of a use-case or NSU for a specific user category the
interface is tested within a variety of environments to ensure that it will be compatible.
Compatibility Testing
Web application must operate within environment that differs from one another. Different
computer, display device, OS, browser and network connection speed can have significant on Web
application operation. Different browser some time produced slightly different results, regardless of the
degree of HTML standardization within the Web application.
The Web Engineering team derives a series of compatibility, validation tests, derived from
existing interface tests, navigation tests, performance tests and security tests.
12. Implementation & maintenance
After testing system will be implemented at the actual site.
Therefore, implementation team should be provided with a well-defined set of software
requirements, an architectural design specification and a detailed design description.
After that user training schedule will be arranged.
Whole system itself consists HELP MENU and HELP TOIPCS so; no major problem will be
encountered.
After three or four months first actual feedback will be taken.
Form that feedback necessary other tips and points will be discussed.
The maintenance is free for one year from system implementation year, after that it depends on
the management to continue or to discontinue. The maintenance-working schedule will be
discussed after three months evolutions.
System Security Measures
At the back end very powerful security is provide by SQL SERVER 2008.
Without proper username and password no one can enter in the database.
Again if user name and password is correct then that user can do only those operations, which
are granted by the administrator.
On Front end side, security is provided by unique user name and password which is known
by him or administrator no one else knows it.
So, anybody who does not know the password and username cannot use it.
The account creation for new user is done by administrator.
Star Placement Services do not want very high security in this version so, high level security
is not implemented .That will be implemented in the next version.
Cost Estimation
Here, I have roughly rounded the cost estimation:
This is just a rough estimation, so it can be predicted more or less in some cases
than actual estimation.
Total there are 20 forms in the software so designing and coding costing around