You are on page 1of 66

Gaming Accessories Website

Gaming Accessories Website


Project by
MR.AKASH SACHIDANAND PATHAK | 200105051018

AKASH SACHIDANAND PATHAK | 200105051018 | Page 2


Gaming Accessories Website 2022

Contents
A. System Documentation.................................................................................................................................4
1. Acknowledgement........................................................................................................................................5
2. Gantt Chart...................................................................................................................................................6
3. Title............................................................................................................................................................7
4. Project Overview..........................................................................................................................................8
5. Description of Present System.....................................................................................................................9
6. Existing System......................................................................................................................................... 10
7. Proposed System...................................................................................................................................... 10
8. Event List.................................................................................................................................................... 11
a. Types Of Event....................................................................................................................................... 11
b. Event List................................................................................................................................................ 11
9. Event Table............................................................................................................................................... 12
10. Entity Relationship Diagram(ER Diagram):............................................................................................ 14
11. Use Case Diagram................................................................................................................................... 17
12. Activity Data Matrix (CRUD Table).......................................................................................................... 21
13. Activity Diagram..................................................................................................................................... 22
14. Class Diagram........................................................................................................................................... 25
15. Object Diagram....................................................................................................................................... 26
16. Sequence Diagram.................................................................................................................................. 27
17. State Diagram......................................................................................................................................... 29
18. Component Diagram.............................................................................................................................. 32
19. Deployment Diagram............................................................................................................................. 34
20. Package Diagram.................................................................................................................................... 36
21. Menu Tree.............................................................................................................................................. 38
22. System Coding & Conventions................................................................................................................ 39
B. Project Documentation................................................................................................................................... 42
1. Program Source Code................................................................................................................................. 43
C. Validations..................................................................................................................................................... 59
1. Test Cases................................................................................................................................................... 61
2. Test Result................................................................................................................................................ 63
D. References................................................................................................................................................... 68

AKASH SACHIDANAND PATHAK | 200105051018 Page 3


Gaming Accessories Website 2022

A. System Documentation

AKASH SACHIDANAND PATHAK | 200105051018 Page 4


Gaming Accessories Website 2022

1. Acknowledgement

The satisfaction that accompanies the successful completion of any task would be
incomplete without the mention of people whose ceaseless cooperation made it
possible ,whose constant guidance and encouragement crown all efforts with
success.

We are grateful to our project Mrs. Sanjana Advani for guidance inspiration and
constructive suggestion that helped us in the preparation of this project.

We also thank our college and our Head Of Department Mrs. Ritika Sachdev who
has helped in successful completion of the project.

AKASH SACHIDANAND PATHAK | 200105051018 Page 5


Gaming Accessories Website 2022

3. Title
This Gaming Accessories Website allows users to check and purchase various
Gaming Product like Games, playstations, Gaming Accessories etc.
Through this website people can easily order the Gaming Accessories.
In this website we provide list of different categories from which user can
easily View and buy products.

AKASH SACHIDANAND PATHAK | 200105051018 Page 7


Gaming Accessories Website 2022

4. Project Overview

Gaming Accessories website, It is a Website through people can easily order the
Gaming Accessories.This website allows users to view and purchase various Gaming
products which are available online.In this website we provide list of various
categories.
The project is totally built at administrative end and thus only the administrator is
guaranteed the access of the database of the Gaming store.
The purpose of the project is to built the website to reduce the manual work. Website
provides fast services to our users.

AKASH SACHIDANAND PATHAK | 200105051018 Page 8


Gaming Accessories Website 2022

5. Description of Present System

Gaming Accessories Website is a local website .The Website is engaged in providing


different types of Gaming Products displayed in various categories.

The proposed system has two parts:

1).The Administrator.

2).The User.

In this website we provide the search box for searching location from that search box we inform to
our users i.e We are available at your location or not.

In Administrator section admin can add , update ,Delete Product and also View Customers And
Delete Customers etc.The Gaming Accessories Website Provides All Gaming Product in this
website, we arrange the product in Categories so according to customers needs .
The aim of the website is to provide complete information of the product and to provide products in
budget. This Website can easily accessible to the Customers and Saves their Time. Customer gets the
confirmation mail after placing order Via Email and after successful order completion website
generates bill with all information of product and customer can download the Bill in PDF format.

AKASH SACHIDANAND PATHAK | 200105051018| Roll No: Page 9


Gaming Accessories Website 2022

6. Existing System
Existing sites like Gaming Accessories website does not verify authenticity of the Service provider

1. There is no updation in existing system.


2. User have to waste their valuable time.
3. Login is mandatory which gives all our required credentials.
4. The site or the admin contact the user once after the user had visited the site.
5. In some cases user have to go places to places to find the appropriate option.
6. There was no Satisfied option in consumer Point of view.

7. Proposed System

1. In this website we provide the search box for searching location from that search box we
inform to our users. i.e we are available at your location or not .
2. Website includes All details of product properly, It Maintain Customer details,Admin can
Update Add and also Manage Products.
3. In this Project We Arrange Product in different categories so it can be easy to customers to
search for Product.
4. It prevents an unauthorized access to the system
5. The website or the admin does not contact the user once after the user had visited the
website.

AKASH SACHIDANAND PATHAK | 200105051018 Page 10


Gaming Accessories Website 2022

8. Event List

 An occurrence at specific time of place that can be described and is worth remembering is
known as event.

 It is used in system analysis and designing.

a. Types Of Event

There are three types of events to consider when using decomposition technique to identify some
event.

 External:
 Outside the system.
 Initiated by external agent or Actor
.
 Temporal:
 Occurs as a result of reaching point in name.
 Based on system deadlines
.
 State:
 Something inside the system triggers the processing end.

b. Event List

 Admin login
 Admin view Customer details
 Add Products
 Update product
 Delete product
 Manage Customer
 User registration.
 User login
 Product Categories.
 Add to cart.
 Online Payment .
 Confirmation of ordering by E- Mail
 Download Bill.
AKASH SACHIDANAND PATHAK | 200105051018 Page 11
Gaming Accessories Website 2022

9. Event Table

A table that lists events in tabular format that is in rows and key pieces of information about
each event in columns.

Designing Of Event Table:-


1. While developing the list of events the analyst should note additional information about
each event for later use.
2. This information is entered in an event table.
3. An event table compares of rows and columns.
4. Each row in the event table records information about one event.
5. And row in the event table records information about one event.
Event table should consist of the following:-
 Event: Occurrence happening at a determinable time & place with/without human agents.
 Trigger: An occurrence that tells the system about the event.
 Source: An external agent or actor that supplies information.
 ]ctivity: Behavior that the system provides.
 Response: An output produced by the system that gives information.
 Destination: An external agent or actor that receives data from the system.

AKASH SACHIDANAND PATHAK | 200105051018 Page 12


Gaming Accessories Website 2022

Sr. Event Trigger Source Activity Response Destinati


No on
1 User register to New customer Customer customer Customer System
Website register register

2 Login Customer customer User User login System


logged in logged in

3 View Product Viewing customer Viewing Product System


Product the Viewed
product

4 Add to cart Select product customer Select Added to System


product cart
add to
cart
5 Select payment Select mode customer Cash / Bill payed System
mode of payment online

6 E-mail confirmation customer Order Ordered System


confirmation confirmed

7 Admin Login Admin logged Admin Admin Admin System


in logged in login

8 Customer details Admin view Admin View Viewing System


customer Details customer
details details

9 Add Product Admin add Admin Adding Admin System


product product adding
Product

10 Delete/update Admin Admin Delete/ Updating / System


Product delete/update update Deleting
product product Product

11 View product Viewing Admin View Product System


product Product viewed

12 Generate Bill Admin Admin Generate Admin System


Generate Bill bill Generated
BIll

AKASH SACHIDANAND PATHAK |


200105051018| RollNo:197427 Page 13
Gaming Accessories Website 2022

10. Entity Relationship Diagram(ER Diagram):

Data models are tools used in analysis to describe the data requirement and assumption in system
from a top-down perspective.They also set ther stage for design of database later on in the
SDLC. There are three basic elements in ER model :

Entities are the “things” about which we seek information.

Attributes are data we collect about the entities.

Relationship provide the structure needed to draw information from multiple entities.

Entity: It represents a collection of objects to things in real world whose individual members
or instances have the following characteristics :

 Each can be identified uniquely in some fashion.


 Each plays a necessary role in the system.
 Each can be described by one or more data elements.

Attributes : They express the properties of entities.Attribute having unique values are called
candidate keys.

Relationships: They describe the association between entities.They are characterised by cardinality
as follows :

One-To-One relationship means an instance of the first entity is associated with only one
instance of second entity.

One-To-Many relationship means that are instance of the first entity is related to many instance of
second entity, while an instance of second entity is associated with only instance of the first entity .

Many-To-Many relationship means that an instance of the first entity is related to many
instances of second entity and same is true in reverse direction also.

AKASH SACHIDANAND PATHAK | 200105051018 Page 14


Gaming Accessories Website 2022

AKASH SACHIDANAND PATHAK | 200105051018 Page 15


Gaming Accessories Website 2022

User:
Login
Registration

Add to Cart

View Product User

Confirm Password

Change Password

Search For
Location

Admin:
Login

LogOut

Generate Bills

Admin

Manages Customer
Add Product

Updates /delete /view


Product

AKASH SACHIDANAND PATHAK Page 16


Gaming Accessories Website 2022

11. Use Case Diagram


A use case diagram is a set of scenarios that describing an interaction between user and system. A
use case diagram displays the relationship among actors & use cases.

The 2 main components of use case diagram are use case and actor.
Diagrams:-

Actor Use case

Actor:-

An actor represents a user or another system will interact with the system that you are modeling.

Use Case:-
A use case is an external view of the system that represents some action that might perform in
order to complete a task.

System Boundary:-
A System boundary defines a scope of what system will be. A system cannot have infinite
functionality a system boundary defines the limitation of system.

AKASH SACHIDANAND PATHAK | 200105051018 Page 17


2022
Gaming Accessories Website
Use case Diagram:

Admin LOGIN

Add Product

Update /Delete
ADMIN Product

View customer
Details

Admin Logout

AKASH SACHIDANAND PATHAK | 200105051018 Page 18


Gaming Accessories Website 2022

Registration

Login

Views Product

USER

Add to cart

Online Payment

Logout

Page 19
AKASH SACHIDANAND PATHAK
Gaming Accessories Website 2022

User /Admin use case:

Admin/user
Login

Add to cart

Add/update
User Admin
Product

View Customer

Order
confirmation

Generated BIll

Logout

AKASH SACHIDANAND PATHAK Page 20


Gaming Accessories Website 2022

12. Activity Data Matrix (CRUD Table)

CRUD Table (Activity Data Matrix)


A table that describes data entities the location from which they are accessed and the nature of
access is called as CRUD.
C: Create new Data.
R:Read existing Data.
U:Update existing Data.
D:Delete Existing File.

Sr Activity Entities
No
1 2 3 4
1. Registration C C
2. Login C C
3. Details of Customer C CU C
4. Receive Customer R C
Order
5. Process Customer RU U R
Order
6. Maintain Customer RU
Record
7. Terminate customer UD
record
8. Invoice customer RU
9. Maintain Invoice RU

Entities:
1) Admin
2) User
3) Product
4) Order

AKASH SACHIDANAND PATHAK | 200105051018 Page 21


Gaming Accessories Website 2022

13. Activity Diagram


A. Activity diagram describes the workflow behavior of the system.
B. Activity diagram are similar to state diagram because activities are the state of
doing something.
C. The diagram describes the state of activities by showing the sequence of activities performed.
D. Activity diagram can resolve activities that are conditional or parallel.
E. Activity diagram should be used in conjunction with other modeling techniques such
as interaction diagram & state diagram.
F. Main reason to use the activity diagram is to model workflow behind the system
being designed.

Components of Activity Diagram:-

Represents the activity.


1

Merge
2

3 Fork and Join


4  Initial Activity

AKASH SACHIDANAND PATHAK | 200105051018 Page 22


Gaming Accessories Website 2022

Customer

Admin

Add Product Delete Product

Update /View Product

AKASH SACHIDANAND PATHAK | 200105051018 Page 23


Gaming Accessories Website
2022

User

User

View Search for Location


Categories/Product

Add to cart

Page 24
Gaming Accessories Website 2022

14. Class Diagram


A class diagram is an illustration of the relationships and source code
dependencies in the Unified Modelling Language (UML). In this context, a class
defines among class
the methods and variables in an object, which is a specific entity in a program or the unit of
code representing that entity. Class diagrams are useful in all forms of object-oriented
programming (OOP). The concept is several years old but has been refined as OOP modelling
paradigms have evolved

Class Diagram

Admin Login
+ Id: Int
1…* 1
+first Name: + Contact No : int
varchar(50) -Password : varchar(10)
+last Name:varcahr(50) + confirm Password: varchar(10)
+ Contact_No:Int 1 +Email-id:varcahr(50)
+ Email-Id: varchar(50)
+Address:varchar(50)
1….* + Forget Password ()
+ Add ()
+ Update ()
+ Delete ()

Customer
+ Id: Int 1…*
+ first Name: varchar(50)
+ last Name:varcahr(50)
+ Contact_No:Int
+ Email-Id: varchar(50)
+ Address:varchar(50)

+ Add ()
+ Update ()
+ Delete ()

AKASH SACHIDANAND PATHAK | 200105051018 Page 25


Gaming Accessories Website 2022

15. Object Diagram


• The Object Diagrams describe an instantiation of Class Diagram at a particular instance of
time. They may be used to explore different configurations of objects. These configurations
when combined can be generalized into relevant Class Diagrams.
• Object Diagrams provide a snapshot of the instances in a system, and the relationships
between the instances. It is a structural diagram that shows the instances of the classifiers
in models.
• Objects too may have other compartments as defined by their classes. However, usually
attributes (along with values) are mentioned and operations are not mentioned.

Object Diagrams are different from Class Diagrams


– This is because many objects of same class may exist in the Object Diagram.

Object Diagrams can be used:


– to test Class Diagrams for accuracy
– to verify system performance at given instance
– to optimize performance (especially useful for server objects)

Object Diagram

Customer
Admin
+ Id: 1 + Id: 101
+ Name: Harish +Name: ABC
+ Contact_No: 8375545805 + Email: ABC@gmail.com
+ Contact-No: 1245726589
+ Email-Id: + Password: ng124
pratif@gmail.com

AKASH SACHIDANAND PATHAK | 200105051018 Page 26


Gaming Accessories Website 2022

16. Sequence Diagram

Sequence diagram demonstrates the behavior of the objects in a use- case by describing the
objects and the messages they pass. The diagrams are read left to right & descending.

Components of Sequence Diagram:-

Represents objects activation.

Represents the objects of case


2 study.

--------- Represents life of objects.


3

Represents end of objects.


4

AKASH SACHIDANAND PATHAK | 200105051018 Page 27


Gaming Accessories Website 2022

Login Admin
Customer

Log in Add, Update


Log in
,Delete

View
Product

AKASH SACHIDANAND PATHAK | 200105051018 Page 28


Gaming Accessories Website 2022

17. State Diagram

a) State diagram are used to describe the behavior of the system.

b) State diagram describe all of the possible state of an object as an event occurs.

c) Each diagram usually represents objects of single class and track the different state of
its object through the system.

d) We use the state diagram to demonstrate the behavior of an object through many use
cases of the system.

e) We use the state diagram for classes where it is necessary to understand the
behavior of the object through the entire system.

Diagram:-

State Diagram

Activity

Transitions

AKASH SACHIDANAND PATHAK | 200105051018 Page 29


Gaming Accessories Website 2022

1. admin

Log in

Add Product

Update Product

Delete Product

Log Out

AKASH SACHDANAND PATHAK| Roll No: 197427 Page 30


Gaming Accessories Website 2022

1. User

Log in

Search Location

View Product

Add to cart

Payment

Logout

Page 31
Gaming Accessories Website 2022

18. Component Diagram


a) The component diagram contains component & dependencies.

b) Component represents the physical packaging of the module of the code.

c) The dependencies between the components show how changes made to one component
may affect each other components in the system.

d) Dependencies in a component system are represented by dashed lines between 2 or


more components.

e) Component diagram can also show the interface used by the component to communicate
with each other.

Diagram:-

AKASH SACHIDANAND PATHAK | 200105051018 Page 32


Gaming Accessories Website 2022

ADMIN
Login()
Add Product()
Update Product()
Logout()

Login()
Add Product()
Updates product()

User
Search()
View()
Add()
Update()

Page 33
Gaming Accessories Website 2022

19. Deployment Diagram


a) The deployment diagram contains nodes & connections.

b) A node usually represents a piece of hardware in the system.

c) A connection depicts the communication path used by the hardware to


communicate & usually indicates a method such as TCP/IP.

Diagram:-

AKASH SACHIDANAND PATHAK | 200105051018 Page 34


Gaming Accessories Website 2022

Deployment Diagram

Admin login

Customer

Printer

AKASH SACHIDANAND PATHAK | 200105051018 Page 35


Gaming Accessories Website 2022

20. Package Diagram


In addition to standard UML dependency relationship there are two special types dependcies
defined between packages:
 Package Import
 Package Merge
A package imports a relationship between an import namespace and a package indicating
that importing namespace adds the names of members an unlabeled dependency between two
packages an interpreted as a package import relationship. In this relationship elements within
the target package will be imported in source package.

A package merge is a directed relationship between two packages that indicates that the
contents of two packages that are to be combined. It is very similar to generalization.

Elements of package Diagram:-

1) Package: It is a general purpose mechanism for organizing model contains elements is


designed diagrams into groups. It provides an encapsulated namespace within which
all names must be unique.

2) Class: It is representation of objects that reflects their structure and behavior of system.

3) Interface:It is specification of behavior. By implementing interface classes are required


to support the behavior

4) Object: It is instance of class. It often used in analysis to represent numerous artifacts


and item that exist.

5) Table: It is stereotyped class.

AKASH SACHIDANAND PATHAK | 200105051018 Page 36


Gaming Accessories Website 2022

Gaming Accessories Website

Admin

customer Database

AKASH SACHIDANAND PATHAK | 200105051018 Page 37


Gaming Accessories Website 2022

21. Menu Tree


 Login:

Forgot Password

Change password
 Main:
 Add and Manage

Product

 Activities:

Add Product
 customer

Sign up

Search Location

Change Password

View Product

Add to cart

Menu Tree

Login Registration Customer Admin

Admin customer View Add


Select location
User
Change Password Update
Delete
Add

AKASH SACHIDANAND PATHAK Page 38


Gaming Accessories Website 2022

22. System Coding & Conventions

Control
Lable
TextBox
Form
Button
Drop Down List
Fileupload
ImageButton
Image
Hyperlink
Compare validator
RegularExpressionValidator
RequiredFieldValidator
RangeValidator

AKASH SACHIDANAND PATHAK | 200105051018 Page 39


Gaming Accessories Website 2022

Program flow charts


 Form Description:

 Home: This Form show about the shop


 About Us:-This Form show about the shop and developer name
 Search :This tool is used for searching Location.
 LogIn:- This Form is used for login into the system.
 SignUp: -This Form is used for new customer.
 Forgot Password:- This Form is used to reset the password.

AKASH SACHIDANAND PATHAK | 200105051018 Page 40


Gaming Accessories Website 2022

List of tables with Attributes & Constraints


Name Of Database: test

1. login

Fields Varchar(Datatypes Description


E-mail Varchar(20) E-mail
Password Varchar(20) Password

2. registraion

Fields Datatypes Description


Name Varchar(50) First name of user
Email Varchar(50) Email id of user
Address Varchar(20) Address of user
Contact no BigInt Phone number of user
City Varchar(50) City of user
Password Varchar(20) Password
confirm Password Varchar(20) confirm Password

3. Product

Fields Datatypes Description


Product id Int Product id
Product Type Varchar(50) Product Type
Product Name Varchar(50) Product Name
Product Description Varchar(200) Description of product
Price int Price
Image Varchar(500) Image of Product

AKASH SACHIDANAND PATHAK | 200105051018 Page 41


Gaming Accessories Website 2022

B. Project Documentation

AKASH SACHIDANAND PATHAK | 200105051018 Page 42


Gaming Accessories Website 2022

1. Program Source Code

AKASH SACHIDANAND PATHAK | 200105051018 Page 43


Gaming Accessories Website 2022

Login Screen:

Default.aspx.cs
using System;
using System.Collections;
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;

public partial class _Default : System.Web.UI.Page


{
SqlConnection con = new SqlConnection();
SqlDataAdapter sda = new SqlDataAdapter();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)

{
Label3.Font.Size = FontUnit.XLarge;
Label1.Font.Size = FontUnit.Large;
Label2.Font.Size = FontUnit.Large;

if (Session["user"] != null)
{
Response.Redirect("Home.aspx");
}
else
{
con.ConnectionString = "Data Source=admin-PC\\
SQLEXPRESS;Initial Catalog=test;Integrated Security=True";
con.Open(); ;
}

protected void TextBox1_TextChanged(object sender, EventArgs e)


{

protected void Button1_Click(object sender, EventArgs e)


{
if (TextBox1.Text=="" || TextBox2.Text== "")
{
Label3.Text = "Enter the credentials";
}
else if (TextBox1.Text == "harikadam101@gmail.com" && TextBox2.Text == "admin")
{
//string user = TextBox1.Text.Trim();

Response.Redirect("adminpage.aspx");
}
else
{

AKASH SACHIDANAND PATHAK | 200105051018 Page 44


Gaming Accessories Website 2022

string user = TextBox1.Text.Trim();


SqlCommand cmd = new SqlCommand("select email,password from reg
where email=@email and password=@password", con);
cmd.Parameters.AddWithValue("email", TextBox1.Text);
cmd.Parameters.AddWithValue("password",
TextBox2.Text); SqlDataAdapter sda = new
SqlDataAdapter(cmd); DataTable dt = new DataTable();
cmd.Connection = con;
sda.SelectCommand = cmd;
sda.Fill(ds, "reg");

if (ds.Tables[0].Rows.Count > 0)
{

Session["user"] = user;
Response.Redirect("Home.aspx");
Session.RemoveAll();
}
else
{
Label3.Text = "You Should Register First";

}
}
}

//protected void Button2_Click(object sender, EventArgs e)


//{
/ string[] arr= new string[] { "Badlapur", "Ambernath", "Pune", "Mumbai",
"Kalyan","Ulhasnagar" };
/ string b = TextBox3.Text;

/ foreach (string a in arr)


/ {
/ if (arr.Contains(b))

/ {

// Label4.Text = "We are available at your location: " +


TextBox3.Text;
// Label4.Font.Size = FontUnit.XLarge;

/ }

/ else
/ {
// Label4.Text = "We are not available at your location: " +
TextBox3.Text;
// Label4.Font.Size = FontUnit.XLarge;

/ }
/ }

//}

protected void TextBox3_TextChanged2(object sender, EventArgs e)


{

AKASH SACHIDANAND PATHAK | 200105051018 Page 45


Gaming Accessories Website 2022

protected void TextBox3_TextChanged3(object sender, EventArgs e)


{

protected void TextBox2_TextChanged(object sender, EventArgs e)


{

protected void ImageButton4_Click(object sender, ImageClickEventArgs e)


{

protected void ImageButton7_Click(object sender, ImageClickEventArgs e)


{

protected void Button2_Click(object sender, EventArgs e)


{
string[] arr = new string[] { "Badlapur", "Ambernath", "Pune",
"Mumbai", "Kalyan", "Ulhasnagar" };
string b = TextBox3.Text;

foreach (string a in arr)


{
if (arr.Contains(b))

{
Label4.Text = "We are available at your location: " +
TextBox3.Text;
Label4.Font.Size = FontUnit.XLarge;

else
{
Label4.Text = "We are not available at your location: " +
TextBox3.Text;
Label4.Font.Size = FontUnit.XLarge;

}
}
}
}

AKASH SACHIDANAND PATHAK | 200105051018 Page 46


Gaming Accessories Website 2022

Home Screen:

Home.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;

public partial class Home : System.Web.UI.Page


{
SqlCommand cmd = new SqlCommand();
SqlDataAdapter sda = new SqlDataAdapter();
SqlConnection con = new SqlConnection();
DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["user"] == null)
{
Response.Redirect("default.aspx");
}
else
{
con.ConnectionString = "Data Source=admin-PC\\
SQLEXPRESS;Initial Catalog=test;Integrated Security=True";
con.Open();
showdata();
con.Close();
}
if (!IsPostBack)
{
SetImageUrl();
}
}
public void showdata()
{
cmd.CommandText="select * from [reg] where email='"+Session["user"]+"'";
cmd.Connection = con;
sda.SelectCommand = cmd;
sda.Fill(ds);
Label1.Text=ds.Tables[0].Rows[0]["name"].ToString()+",welcome To Our
Site!!"; Label1.Font.Size = FontUnit.XXLarge;
}

protected void Button1_Click(object sender, EventArgs e)


{

protected void Button1_Click1(object sender, EventArgs e)


{

AKASH SACHIDANAND PATHAK | 200105051018 Page 47


Gaming Accessories Website 2018-19

protected void Button2_Click(object sender, EventArgs e)


{

protected void Timer1_Tick(object sender, EventArgs e)


{
/ This event is raised every one second as we have set
/ the interval to 1000 milliseconds

SetImageUrl();

}
private void SetImageUrl()
{
/ Create an instance of Random
class Random _rand = new Random();
/ Generate a random number between 1 and
8 int i = _rand.Next(1, 8);
/ Set ImageUrl using the generated random number
ImageButton1.ImageUrl = "~/images/" + i.ToString() + ".jpg";
}

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)


{
if (ImageButton1.ImageUrl == "~/images/1.jpg")
{
Response.Redirect("xbox.aspx");
}
else if (ImageButton1.ImageUrl == "~/images/2.jpg")
{
Response.Redirect("gamea.aspx");
}
else
{
Response.Redirect("games.aspx");
}
}
}

Register.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;
using System.Data.SqlClient;
using System.Net.Mail;
using System.Net;

public partial class register : System.Web.UI.Page


{
SqlCommand cmd = new SqlCommand();

AKASH SACHIDANAND PATHAK | 200105051018 Page 48


Gaming Accessories Website 2022
protected void Page_Load(object sender, EventArgs e)
{

}
public string GeneratePassword()
{

string PasswordLength = "4";


string NewPassword = "";

string allowedChars = "";


allowedChars = "1,2,3,4,5,6,7,8,9,0";
allowedChars += "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,";
allowedChars += "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,";

char[] sep = {
','
};
string[] arr = allowedChars.Split(sep);

string IDString = "";


string temp = "";

Random rand = new Random();

for (int i = 0; i < Convert.ToInt32(PasswordLength); i++)


{
temp = arr[rand.Next(0, arr.Length)];
IDString += temp;
NewPassword = IDString;

}
return NewPassword;
}

private void getotp()


{
string strNewPassword = GeneratePassword().ToString();
/ to send the random password in email
MailMessage msg = new MailMessage(); msg.From =
new MailAddress("ABC101@gmail.com");
msg.To.Add(TextBox2.Text);
msg.Subject = "ONETIME PASSWORD";
msg.Body = "Thanks for registering on our site, Your OTP is " + strNewPassword
+ " from GAming land.";
msg.IsBodyHtml = true;

SmtpClient smt = new SmtpClient();


smt.Host = "smtp.gmail.com";
System.Net.NetworkCredential ntwd = new NetworkCredential();
ntwd.UserName = "ABC101@gmail.com"; //Your Email ID
ntwd.Password = "ABC"; // Your Password
smt.UseDefaultCredentials = true;
smt.Credentials = ntwd;
smt.Port = 587;
smt.EnableSsl = true;
smt.Send(msg);
Label1.Text = "Email Sent Successfully";
Label1.ForeColor = System.Drawing.Color.ForestGreen;
Session["OTP"] = strNewPassword;

AKASH SACHIDANAND PATHAK | 200105051018 Page 49


Gaming Accessories Website 2022
Response.Redirect("otp.aspx");
}

private void enterdata()


{

}
protected void Button1_Click(object sender, EventArgs e)
{
Session["name"] = TextBox1.Text;
Session["email"] = TextBox2.Text;
Session["password"] = TextBox3.Text;
Session["phone"] = TextBox4.Text;
Session["city"] = TextBox5.Text;

getotp();

protected void TextBox1_TextChanged(object sender, EventArgs e)


{

}
}

signOut.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 signout : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
Session.Abandon();
Response.Redirect("Default.aspx");
}

protected void Button2_Click(object sender, EventArgs e)


{
Response.Redirect("Home.aspx");
}
}

AKASH SACHIDANAND PATHAK | 200105051018 Page 50


Gaming Accessories Website 2022

Contact.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class contact : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button2_Click(object sender, EventArgs e)


{
sendMail("ABC101@gmail.com", "ABC", "ABC101@gmail.com", "Contact Request",
TextBox3.Text);
}
public String sendMail(String from, String pass, String to, String subject, String
body)
{
String msg = "Mail Send Successfully";
try
{
String a = TextBox2.Text;
MailMessage Msg = new MailMessage();
/ Sender e-mail address. Msg.From
= new MailAddress(from);
/ Recipient e-mail
address. Msg.To.Add(to);
Msg.Subject = subject;
Msg.Body ="Feedback:"+ body+" "+"From:"+a;
/ your remote SMTP server IP.
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new System.Net.NetworkCredential(from, pass);
smtp.EnableSsl = true;
smtp.Send(Msg);
System.Threading.Thread.Sleep(10000);
Msg = null;
Label4.Visible = true;
Label4.Text = "Message sent Successfully";

}
catch (Exception ex)
{
msg = "Error While Sending Mail";
Label4.Visible = true;
Label4.Text = "Error While Sending Mail";
}
return msg;
}
}

AKASH SACHIDANAND PATHAK | 200105051018 Page 51


Gaming Accessories Website 2022

changePassword.aspx.cs:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class changepassword : System.Web.UI.Page


{
//string strConnString =
ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString;
string str = null;
SqlCommand com;
byte up;
protected void Page_Load(object sender, EventArgs e)
{

protected void btn_update_Click_Click(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection("Data Source=admin-PC\\
SQLEXPRESS;Initial Catalog=test;Integrated Security=True");
con.Open();
str = "select * from reg ";
com = new SqlCommand(str, con);
SqlDataReader reader = com.ExecuteReader();
while (reader.Read())
{
if (txtemail.Text == reader["email"].ToString())
{
up = 1;
}
else
{
lbl.Text = "You should register first";
}
}
reader.Close();
con.Close();
if (up == 1)
{
con.Open();

str = "update reg set password=@password where email=@email";


com = new SqlCommand(str, con);
com.Parameters.Add(new SqlParameter("@password", SqlDbType.VarChar,
50));

com.Parameters.Add(new SqlParameter("@email", SqlDbType.VarChar, 50));


com.Parameters["@password"].Value = txt_npassword.Text;

com.Parameters["@email"].Value = txtemail.Text;

com.ExecuteNonQuery();

AKASH SACHIDANAND PATHAK | 200105051018 Page 52


Gaming Accessories Website 2022
con.Close();
lbl.Text = "Password changed Successfully";
}
else
{
lbl.Text = "Please enter correct password";
}

}
}

ForgetPassword.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class forgetpassword : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GeneratePassword()
{

string PasswordLength = "4";


string NewPassword = "";

string allowedChars = "";


allowedChars = "1,2,3,4,5,6,7,8,9,0";
allowedChars += "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,";
allowedChars += "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,";

char[] sep = {
','
};
string[] arr = allowedChars.Split(sep);

string IDString = "";


string temp = "";

Random rand = new Random();

for (int i = 0; i < Convert.ToInt32(PasswordLength); i++)


{
temp = arr[rand.Next(0, arr.Length)];
IDString += temp;
NewPassword = IDString;

}
return NewPassword;
}

protected void Getotp_Click(object sender, EventArgs e)

AKASH SACHIDANAND PATHAK | 200105051018 Page 53


Gaming Accessories Website 2022
{
string strNewPassword = GeneratePassword().ToString();
/ to send the random password in email
MailMessage msg = new MailMessage(); msg.From =
new MailAddress("ABC101@gmail.com");
msg.To.Add(Email.Text);
msg.Subject = "ONETIME PASSWORD";
msg.Body = "Your Random password is " + strNewPassword + " from Gaming
land.";
msg.IsBodyHtml = true;

SmtpClient smt = new SmtpClient();


smt.Host = "smtp.gmail.com";
System.Net.NetworkCredential ntwd = new NetworkCredential();
ntwd.UserName = "ABC101@gmail.com"; //Your Email ID
ntwd.Password = "ABC"; // Your Password
smt.UseDefaultCredentials = true;
smt.Credentials = ntwd;
smt.Port = 587;
smt.EnableSsl = true;
smt.Send(msg);
Label1.Text = "Email Sent Successfully";
Label1.ForeColor = System.Drawing.Color.ForestGreen;
Session["OTP"] = strNewPassword;
}

protected void Changepassword_Click(object sender, EventArgs e)


{
if (otp1.Text == Session["OTP"].ToString())
{

Response.Redirect("changepassword.aspx");

}
else
{
Label1.Text = "Invalid OTP";
Label1.ForeColor = System.Drawing.Color.Red;
}
}

AKASH SACHIDANAND PATHAK | 200105051018 Page 54


Gaming Accessories Website 2022

PlaceOrder.aspx.cs:
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;

using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class placeorder : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable dt = new DataTable();
DataRow dr;
dt.Columns.Add("sno");
dt.Columns.Add("productid");
dt.Columns.Add("productname");
dt.Columns.Add("pprice");
dt.Columns.Add("quantity");
dt.Columns.Add("productimage");
dt.Columns.Add("description");
//dt.Columns.Add("cost");
dt.Columns.Add("totalprice");

if (Request.QueryString["id"] != null)
{
if (Session["Buyitems"] == null)
{

dr = dt.NewRow();
String mycon = "Data Source=admin-PC\\
SQLEXPRESS;Initial Catalog=test;Integrated Security=True";
SqlConnection scon = new SqlConnection(mycon);
String myquery = "select * from gamea1 where productid=" +
Request.QueryString["id"];
SqlCommand cmd = new SqlCommand();
cmd.CommandText = myquery;
cmd.Connection = scon;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
dr["sno"] = 1;
dr["productid"] =
ds.Tables[0].Rows[0]["productid"].ToString();
dr["productname"] =
ds.Tables[0].Rows[0]["productname"].ToString();
dr["productimage"] =
ds.Tables[0].Rows[0]["productimage"].ToString();
dr["pprice"] = ds.Tables[0].Rows[0]["pprice"].ToString();
dr["description"] =
ds.Tables[0].Rows[0]["description"].ToString();
dr["quantity"] =
Request.QueryString["quantity"]; int price =
Convert.ToInt32(ds.Tables[0].Rows[0]["pprice"].ToString());

AKASH SACHIDANAND PATHAK | 200105051018 Page 55


Gaming Accessories Website 2022
int quantity =
Convert.ToInt16(Request.QueryString["quantity"].ToString());
int totalprice = price * quantity;
dr["totalprice"] = totalprice;

dt.Rows.Add(dr);
GridView1.DataSource = dt;
GridView1.DataBind();
Session["buyitems"] = dt;
GridView1.FooterRow.Cells[5].Text = "Total Amount";
GridView1.FooterRow.Cells[6].Text =
grandtotal().ToString();
Response.Redirect("placeorder.aspx");
}
else
{

dt = (DataTable)Session["buyitems"];
int sr;
sr = dt.Rows.Count;

dr = dt.NewRow();
String mycon = "Data Source=admin-PC\\
SQLEXPRESS;Initial Catalog=test;Integrated Security=True";
SqlConnection scon = new SqlConnection(mycon);
String myquery = "select * from gamea1 where productid=" +
Request.QueryString["id"];
SqlCommand cmd = new SqlCommand();
cmd.CommandText = myquery;
cmd.Connection = scon;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds);
dr["sno"] = sr + 1;
dr["productid"] =
ds.Tables[0].Rows[0]["productid"].ToString();
dr["productname"] =
ds.Tables[0].Rows[0]["productname"].ToString();
dr["productimage"] =
ds.Tables[0].Rows[0]["productimage"].ToString();
dr["pprice"] = ds.Tables[0].Rows[0]["pprice"].ToString();
dr["description"] =
ds.Tables[0].Rows[0]["description"].ToString();
int pprice =
Convert.ToInt32(ds.Tables[0].Rows[0]["pprice"].ToString());
int quantity =
Convert.ToInt16(Request.QueryString["quantity"].ToString());
int totalprice = pprice * quantity;
dr["totalprice"] = totalprice;

dt.Rows.Add(dr);
GridView1.DataSource = dt;
GridView1.DataBind();
Session["buyitems"] = dt;
GridView1.FooterRow.Cells[5].Text = "Total Amount";
GridView1.FooterRow.Cells[6].Text =
grandtotal().ToString();
Response.Redirect("placeorder.aspx");

AKASH SACHIDANAND PATHAK | 200105051018 Page 56


Gaming Accessories Website 2022
}
else
{
dt = (DataTable)Session["buyitems"];
GridView1.DataSource = dt;
GridView1.DataBind();
if (GridView1.Rows.Count > 0)
{
GridView1.FooterRow.Cells[5].Text = "Total
Amount"; GridView1.FooterRow.Cells[6].Text =
grandtotal().ToString();

}
Label2.Text = DateTime.Now.ToShortDateString();
findorderid();
}
public int grandtotal()
{
DataTable dt = new DataTable();
dt = (DataTable)Session["buyitems"];
int nrow = dt.Rows.Count;
int i = 0;
int gtotal = 0;
while (i < nrow)
{
gtotal = gtotal + Convert.ToInt32(dt.Rows[i]["totalprice"].ToString());

i = i + 1;
}
return gtotal;
}
public void findorderid()
{
String pass = "abcdefghijklmnopqrstuvwxyz123456789";
Random r = new Random();
char[] mypass = new char[5];
for (int i = 0; i < 5; i++)
{
mypass[i] = pass[(int)(35 * r.NextDouble())];

}
String orderid;
orderid = "Order" + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() +
DateTime.Now.Second.ToString() + DateTime.Now.Day.ToString()
+ DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString() + new string(mypass);

Label1.Text = orderid;

protected void Button1_Click(object sender, EventArgs e)


{

AKASH SACHIDANAND PATHAK | 200105051018 Page 57


Gaming Accessories Website 2022
//DataTable dt;
//dt = (DataTable)Session["Buyitems"];
//DataTable dt = new DataTable();
//dt = (DataTable)Session["buyitems"];
//for (int i = 0; i <= dt.Rows.Count - 1; i++)
//{
/ String updatepass = "insert into
Orders(Orderid,sno,productid,productname,price,quantity,dateoforder,address,Mobilenumber)valu
es('" + Label1.Text + "'," + dt.Rows[i]["sno"] + "," + dt.Rows[i]["productid"] + ",'" +
dt.Rows[i]["productname"] + "'," + dt.Rows[i]["pprice"] + "," + dt.Rows[i]["quantity"] + ",'"
+ Label2.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "')";
/ String mycon1 = "Data Source=HARRY\\
HARRY;Initial Catalog=test;Integrated Security=True";
/ SqlConnection s = new SqlConnection(mycon1);
/ s.Open();
/ SqlCommand cmd1 = new SqlCommand();
/ cmd1.CommandText = updatepass;
/ cmd1.Connection = s;
/ cmd1.ExecuteNonQuery();
/ s.Close();

DataTable dt;
dt = (DataTable)Session["buyitems"];

for (int i = 0; i <= dt.Rows.Count - 1; i++)


//int i = 0;
//if(i <= dt.Rows.Count)
{
String updatepass = "insert into
Orders1(Orderid,sno,productid,productname,price,quantity,dateoforder,address,Mobilenumber)val
ues('" + Label1.Text + "'," + dt.Rows[i]["sno"] + "," + dt.Rows[i]["productid"] + ",'" +
dt.Rows[i]["productname"] + "'," + dt.Rows[i]["pprice"] + "," + dt.Rows[i]["quantity"] + ",'"
+ Label2.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "')";
String mycon1 = "Data Source=admin-PC\\SQLEXPRESS;Initial
Catalog=test;Integrated Security=True";
SqlConnection s = new SqlConnection(mycon1);
s.Open();
SqlCommand cmd1 = new SqlCommand();
cmd1.CommandText = updatepass;
cmd1.Connection = s;
cmd1.ExecuteNonQuery();
s.Close();

}
Response.Redirect("payment.aspx?orderid=" + Label1.Text);

AKASH SACHIDANAND PATHAK | 200105051018 Page 58


Gaming Accessories Website 2022

C. Validations

AKASH SACHIDANAND PATHAK | 200105051018 Page 59


Gaming Accessories Website 2022

User Registration:

UserLogin:

AKASH SACHIDANAND PATHAK | 200105051018 Page 60


Gaming Accessories Website 2022

1. Test Cases

AKASH SACHIDANAND PATHAK | 200105051018 Page 61


Gaming Accessories Website 2022

SearchForLocation:

Registration:

AKASH SACHIDANAND PATHAK | 200105051018 Page 62


Gaming Accessories Website 2022

2. Test Result

AKASH SACHIDANAND PATHAK | 200105051018 Page 63


Gaming Accessories Website 2022

Homepage:

Gaming store:

AKASH SACHIDANAND PATHAK | 200105051018 Page 64


Gaming Accessories Website 2022

AboutUs:

ContactUs:

AKASH SACHIDANAND PATHAK | 200105051018 Page 65


Gaming Accessories Website 2022

AddtoCart

PaymentSystem:

AKASH SACHIDANAND PATHAK | 200105051018 Page 66


Gaming Accessories Website

Bill Generated:

AKASH SACHIDANAND PATHAK | 200105051018 Page 67


Gaming Accessories Website 2018-19

D. References
Websites

1. www.w3school.com
2. www.tutorialspoint.com
3. https://stackoverflow.com

AKASH SACHIDANAND PATHAK | 200105051018 Page 68

You might also like