Download as pdf or txt
Download as pdf or txt
You are on page 1of 306

E-Fitness Hub

Indira Gandhi
National Open University

ACKNOWLEDGEMENT

We wish to record my heartfelt gratitude and sincere thanks to Mr. D. S. Yadav, Our
Project Guide, for his suggestions and inspirations during the project.

This project bears an imprint of many people who had helped us in numerous ways
while making this project our special thanks and appreciation goes to Center
Coordinator Mr. Brijesh for his support. We wish to thanks him for his unending
support and wide vision.

Last but not the least our sincere thanks to our parents, family members and friends for
their continuous support, inspiration and encouragement without which this project
would not have been success. We would like to express our Appreciation to all the
people who have contributed to the Successful completion of the Project. With all
Respects & Gratitude, we would like to Thanks to all the people, who have helped in the
Development of the Project

By,
Priya Joshi
Pushpendra Kukreti

Page | 1
E-Fitness Hub
Indira Gandhi
National Open University

Table of Contents
S.No Contents Page
1 INTRODUCTION
1.1 BACKGROUND 7
1.2 OBJECTIVES 7
1.3 PURPOSE & SCOPE 8
2 SURVEY OF TECHNOLOGIES 9-10
3 REQUIREMENTS AND ANALYSIS
3.1 PROBLEM DEFINATION 11
3.2 REQURIMENT SPECIICATION 11-14
3.3 PLANING &SCHEDULING 14-15
3.4 SOFTWRE &HARDWARE 16-17
REQUIREMENTS
3.5 PRELIMISARY PRODUCT 17-18
DESCRIPTIONS
3.6 CONCEPTUAL MODELS 19-27
4 SYSTEM DESIGN
4.1 BASIC MODULES 28-30

Page | 2
E-Fitness Hub
Indira Gandhi
National Open University

4.2 DATA DESGIN


4.2.1 DATA INTEGRITY & 31-33
CONSTRAINTS
4.3 PROCEDURAL DESGIN
4.3.1 LOGIC DIAGRAM 33-35
4.3.2 DATA STRUCTURES 36-41
4.3.3 ALOGRITHMS DESGIN 41-43
4.4 USER INTERFACE DESGIN 44-51
4.5 SECURITY ISSUE 51
4.6 TEST CASE DESGIN 52-62
5 IMPLEMENTATION AND TESTINGS
5.1 IMPLEMENTAION APPROACH 63
5.2 CODING 64-275
5.3 TESTING APPROACH
5.3.1 UNIT TESTING 275
5.3.2 INTEGRTD TESTING 276-277
6 RESULTS & DISCUSSIONS
6.1 TEST REPORTS 278-279
6.2 USER DOCUMENTATIONS 279-280

Page | 3
E-Fitness Hub
Indira Gandhi
National Open University

7 CONCLUSIONS
7.1 CONCLUSION 281
7.2 LIMITATIONS OF THE SYSTEM 281
7.3 FUTURE SCOPE OF THE 282
PROJECT
REFRENCES 283

SYNOPSIS

1. INTRODUCTIONS
1.1 BACKGROUND 285
1.2 OBJECTIVES 285
1.3 PURPOSE & SCOPE 286-287
2 SURVEY OF TECHNOLOGIES 288
3 REQUIREMENTS &ANALYSIS
3.1 PROBLEM DEFINATION 289-290
3.2 REQURIMENTS SPECIFICATONS 290-292
3.3 PLANNING &SCHEDULING 292

Page | 4
E-Fitness Hub
Indira Gandhi
National Open University

3.4 SOFTWARE AND HARDWARE 294-295


REQUIREMENTS
3.5 PRELIMARY PRODUCT 295-296
DESCRIPTIONS
3.6 CONCEPTUAL MODELS 296-305
4 REFRENCES 306

Page | 5
E-Fitness Hub
Indira Gandhi
National Open University

TABLE OF FIGURES

S.No Contents Page


1 GANTT CHART 14-15
2 ERD 19-25
3 DATA FLOW DIAGRAM 26-27
4 USE CASE 33-34
5 CLASS DIAGRAM 35
6 FLOW CHART 41-43

Page | 6
E-Fitness Hub
Indira Gandhi
National Open University

1. INTRODUCTION

This project "E-fitness Hub" is a web based project manages all record of gym. As it is web based so
any one can access at anywhere with having internet connection.The Fitness Hub requires a system that
will handle all the necessary and minute details easily and proper database security accordingly to the
user. They requires web Based application , in which they will store data about members, employees,
products, payroll, receipts of members etc & all transactions that occur in Gym and lock-up with
graphical user interface(GUI) and user can access and get there schedule on mobile phone.
The admin panel of this application perform various operation like add new trainer , add new supplier
,add daily expenses, inventory management ,product management, order management.

1.1 BACKGROUND

The current system is time consuming and also it is very costly, because it involves a lot of paperwork.
To manually handle the system was very difficult task. But now-a-days computerization made easy to
work Fitness Hub is a step forward towards healthy lifestyle, in day to day activities human effort
getting double and the health is getting brutally affected. This system stores employee, member,
products information and receipts, and It also provides the facility of search & advanced search for
searching the records efficiently & immediately. This system provides data storing & report generation
with graphical user interface (GUI). It is very difficult to keep a track of your activities that are
affecting our health. E-Fitness hub is an effective solution.

1.2 OBJECTIVE

The main objective of this web application is:


 Full access to other routines and charts that is out of your planning requirements, but still there.
 To design and develop a user-friendly system.
 To develop an accurate and flexible system, it will eliminate data redundancy.
 Computerization can be helpful as means of saving time & money.
 To provide better graphical user interface..
 It Can Have Maintained All Books of Accounts & Final Results.
 Less Paperwork and Save Manpower.
 Easy to operate and easy access of videos.
 Less chances of information leakage.
 Provides security to data by using login & password

Page | 7
E-Fitness Hub
Indira Gandhi
National Open University

1.3 PURPOSE & SCOPE

1.3.1 PURPOSE

 To increase efficiency with reduced cost.


 To reduce the burden of paperwork
 To save time management for recording details of each and every
 member and employee.
 To generate required reports easily.
 One can easily find a healthy routine, exercise charts for better
 and healthy life.
 E-Fitness Hub also does events and promotes those customers/followers who regularly
follow and implement these given routines in their lives.

1.3.2 SCOPE

 Storing information of members, trainer & admin.


 The proposed system is highly secured, because for login the system it requires the
username and password which make this web application more secure.
 It maintains report for all criteria and transactions.
 Stores information about regular products.
 Check validity of information provided by user.
 Storing information of members according to their id.
 It provides wide range of certain criteria in each slide the client is
 working for better and quicker solution.
 This system can run on any OS or mobile phone.Generating reports for different id.

Page | 8
E-Fitness Hub
Indira Gandhi
National Open University

2. SURVEY OF TECHNOLOGIES

HTML stands for Hypertext Markup Language, and it is the most widely used language to write Web
Pages. Hypertext refers to the way in which Web pages (HTML documents) are linked together. Thus,
the link available on a webpage is called Hypertext. As its name suggests, HTML is a Markup
Language which means you use HTML to simply "mark-up" a text document with tags that tell a Web
browser how to structure it to display.

CSS stands for Cascading Style Sheets. CSS describes how HTML elements are to be displayed on
screen, paper, or in other media. CSS saves a lot of work. It can control the layout of multiple web
pages all at once.cSS is a language that describes the style of an HTML document.CSS describes how
HTML elements should be displayed.CSS is used to define styles for your web pages, including the
design, layout and variations in display for different devices and screen sizes. CSS saves a lot of work.
It can control the layout of multiple web pages all at once External stylesheets are stored in CSS files

BOOTSTRAP is a free front-end framework for faster and easier web development. Bootstrap
includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation,
modals,image carousels and many other, as well as optional JavaScript plug-in.
Bootstrap also gives you the ability to easily create responsive designs .

C# is a simple, modern, general-purpose, object-oriented programming language developed by


Microsoft within its .NET initiative led by Anders Hejlsberg. This tutorial will teach you basic C#
programming and will also take you through various advanced concepts related to C# programming
language. C# programming is very much based on C and C++ programming languages, so if you have
a basic understanding of C or C++ programming, then it will be fun to learn C#.C# is among the
languages for Common Language Infrastructure. C# is a lot similar to Java syntactically and is easy for
users who have knowledge of C, C++ or Java.
ASP.NET is a web application framework developed and marketed by Microsoft to allow
programmers to build dynamic web sites. It allows you to use a full featured programming language
such as C# to build web applications easily. ASP.NET is an open-source[2] server-side web application
framework designed for web development to produce dynamic web pages. It was developed
by Microsoft to allow programmers to build dynamic web sites, web applications and web services.It
was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to
Microsoft's Active Server Pages(ASP) technology. ASP.NET is built on the Common Language
Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language.
The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP

Page | 9
E-Fitness Hub
Indira Gandhi
National Open University

messages.ASP.NET's successor is ASP.NET Core. It is a re-implementation of ASP.NET as a


modular web framework, together with other frameworks like Entity Framework. The new framework
uses the new open-source .NET Compiler Platform (codename "Roslyn") and is cross
platform. ASP.NET MVC, ASP.NET Web API, and ASP.NET Web Pages (a platform using
only Razor pages) have merged into a unified MVC 6

MS SQL Server is a relational database management system (RDBMS) developed by Microsoft. This
product is built for the basic function of storing retrieving data as required by other applications. It can
be run either on the same computer or on another across a network. This tutorial explains some basic
and advanced concepts of SQL Server such as how to create and restore data, create login and backup,
assign permissions, etc. Each topic is explained using examples for easy understanding. SQL Server is
Microsoft's relational database management system (RDBMS). It is a full-featured database primarily
designed to compete against competitors Oracle Database (DB) and MySQL.Like all major RBDMS,
SQL Server supports ANSI SQL, the standard SQL language. However, SQL Server also contains T-
SQL, its own SQL implemention. SQL Server Management Studio (SSMS) (previously known as
Enterprise Manager) is SQL Server's main interface tool, and it supports 32-bit and 64-bit
environments.SQL Server is sometimes referred to as MSSQL and Microsoft SQL Server.Examples of
some features include: XML data type support, dynamic management views (DMVs), full-text search
capability and database mirroring.SQL Server is offered in several editions with different feature set
and pricing options to meet a variety of user needs

Page | 10
E-Fitness Hub
Indira Gandhi
National Open University

3. REQUIREMENTS AND ANALYSIS

3.1 PROBLEM DEFINITION

Working with current system is quite tedious, complicated and time consuming task. It may
lead errors .certain operations such as surfing searching, adding, removing, entries cannot be
done efficiently. Maintaining different registers for various activities such as storing and
searching data which is tedious and time consuming task. Generating reports, bills are much
tedious task with new system. The current system is time consuming and also it is very costly,
because it involves a lot of paperwork. Lot of space required to store registers and papers which
hold valuable data. To manually handle the system was very difficult task. But now-a-days
computerization made easy to work. The following are the reasons why the current system
should be computerized:
 To increase accuracy in work (like human calculation error, wrong entering customer
details)
 To increase efficiency with reduced cost.
 To save time management for recording details of each and Every member and
employee.
 To increase security so that unauthorized user can no access of data
 To generate required reports easily.

3.2 REQUIREMENTS SPECIFICATION

3.2.1 FUNCTIONAL REQUIREMENTS

 The system runs of IIS server so it needed that server must have IIS version 10.0 available.
 We have used HTML for server side scripting so the current version of HTML must be
available on the
server.
 MS SQL Server database has been used for storing the data of the website.
 HTML has been used for creating the layout of the
web application.
 CSS has been used for creating the designing of the web pages.
 Asp.Net has been implemented on the system for
performing all of the client side server validation.

Page | 11
E-Fitness Hub
Indira Gandhi
National Open University

Also module use in this are

Trainor Admin Order

E-Fitness Hub Members


Login

Product
BMI Cal.
New Member
Admission

Login: - Used for managing the login details. In this module it also prevents form unauthorized
access. If Admin forget password, he/she can easily change the password without any problem.

New Member :- In this new member who wants to take admission they can easily register
themselves with there email id and have there password. In This Module member Data Can Be
Entered For New Members Including Name , Age , Height , Weight , Package And More
Details

Member: - In this module, Admin can see the all membership details and member
which include:

Page | 12
E-Fitness Hub
Indira Gandhi
National Open University

 Member details (like member id, name, gender, address, date Of birth, phone number,
weight ,height, image).
 Membership details (like membership type, expiration date).
 Account information (like due date, amount due, amount Paid, days late, balance).
 After processing all this information records are saved and in this
 Module itself there is a provision for report generation for viewing
 Details of all the members. There is also a provision for generating a
 Receipt for an individual member thus again giving some of his relevant details.

Admin: - This module is only access by admin. Here admin see details of Trainer, supplier and
members. Admin also get daily reports on order and see all the details of each and every things.
S/he also schedule class’s time or package cost. Admin also provide unique username and
password. Admin Also add there daily expenses and maintain that record. Admin also have
right to add product while verification the product is accurate or not

Trainor: This module is only access by Trainor . In this module Trainor get there user id and
password. In this trainor can edit there details too and mark there attendance

Inventory: - In this module all the record of inventory is here Supplier add inventory here but
without the approval of admin this product don’t shows in main panel.

Order :- In this module application keeps track all the record of order is received and which
order is not delivered till now. Which help admin to sort which order is new and old. Also it
keep track of all old order too.

BMI Calculation:- In this module the system keeps track of member BMI and tracks
improvement on get weekly and monthly reports to user and admin.

3.2.2 NON-FUNCTIONAL REQUIREMENTS

 Performance: System should be able to handle multiple users at a time using any of the web
browsers.
 Availability: The project will be deployed on a public shared server so it will be available all
the time and will be accessible anywhere of the world using internet.

Page | 13
E-Fitness Hub
Indira Gandhi
National Open University

 Security: We have implemented a lot of security mechanism to avoid hacking the system by
outer world.
 Maintainability: It is very easy to maintain the system. The system has been developed on
HTML so anyone who has the knowledge of HTML, can easily maintain the system.
 Portability: Yes this system is portable and we can switch the servers very easily.
 Browser Compatibility: The project being a web based required compatibility with at least the
popular web browsers. Microsoft Windows XP and above, Linux and Macintosh being the
current popular OS and Microsoft Internet Explorer, Mozilla Firefox, Opera, Safari and Google
Chrome being the currently popular web

3.3 PLANNING & SCHEDULING

Scheduling is an inexact process in that it tries to predict the future. While it is not possible to know
with certainty how long a project will take, there are techniques that can increase our likelihood of
being close. If we are close in our planning and estimating, we can manage the project to achieve the
schedule by accelerating some efforts or modifying approaches to meet required deadlines. One key
ingredient in the scheduling process is experience in the project
area; another is experience with scheduling in general. In every industry area there will be a body of
knowledge that associates the accomplishment of known work efforts with time duration.
Scheduling consists several functions: -
1) GANTT Chart
2) PERT Chart

3.3.1 GANTT CHART

A Gantt chart is a graphical representation of the duration of tasks against the progression of
time. A Gantt chart is a useful tool for planning and scheduling projects. It is helpful when
monitoring a project's progress. It helps plan and monitor project development or resource
allocation. In a Gantt chart, each task takes up one row. Dates run along the top in increments of
days, weeks or months. Rows of bars in the Gantt chart show the start and end dates of each
task in the project. Tasks may run sequentially, in parallel or overlapping. A Gantt chart is an
excellent tool in the hands of project managers who wish to visualize, schedule, and track
scheduled and actual progress of projects. Its graphical nature allows executives and non-
managers to
readily understand project flow, without a requiring a complete tutorial in project management.
A Gantt chart lets us see immediately what should have been achieved
at any point in time.
Page | 14
E-Fitness Hub
Indira Gandhi
National Open University

Use Gantt chart at project scheduling stage to: -


 Assess time characteristics to a project
 Show the task order
 Define resources involved
 Show links between scheduled task.

EFFORTS
PLAN/ DAYS-------------------->
ACTIVITY (PLAN
ACTUAL
DAYS)
Preliminary Plan 3
Study Actual 4
Requirements Plan 3
of Project
Actual 3
scheduling the Plan 2
project
Actual 4
Design Plan 10
Actual 10
Coding Plan 30
Actual 38
Testing Plan 15
Actual 18
Maintenance Plan 15
Actual 12

Total Planned Days => 78


Total Actual Days => 89

3.3.2 PERT CHART

Page | 15
E-Fitness Hub
Indira Gandhi
National Open University

The Program Evaluation and Review Technique (PERT) is a network model that allows for
randomness in activity completion times. It has the potential to reduce both the time and cost required
to complete a project. A pert chart is a project management tool used to schedule, organize, and
coordinate tasks within a project
Complex projects require a series of activities, some of which must be performed sequentially and
others that can be performed in parallel with other activities. This collection of series and parallel tasks
can be modeled as a network.

Benefits of PERT: -

PERT is useful because it provides the following information:

 Expected project completion time.


 Probability of completion before a specified date.

3.4 SOFTWARE AND HARDWARE REQUIREMENT

3.4.1 SOFTWARE REQUIREMENTS

S.No Name Software

1. Operating System Windows 2000, XP, 7, 8, 8.1


Upwards

2. Web Browser IE4, Netscape, IE, Chrome,


Upwards

3. Development Tools/Front End C#, HTML5, CSS3,


Bootstrap, JQuery, etc.

Page | 16
E-Fitness Hub
Indira Gandhi
National Open University

4. Back End MSSQL Server 2017

3.4.2 HARDWARE REQUIREMENTS

S.No Name Hardware

1. Processor Intel Core2 Duo

2. Motherboard DG31EC

3. RAM 1 GB

4. Hard drive 160 GB

5. Monitor 15” LCD

3.5 PRELIMINARY PRODUCT DESCRIPTION

The Proposed system is highly secured, because for login the system it requires the username and
password which is different for each department therefore providing each department a different view
of the customer information. It maintains report for all criteria and transactions. Stores information
about regular products. This system can run on any web browser so it is very poratble.it also Manages
member information separately for all exercise and employee information separately for considering
the requirements of gym.
The proposed system perform function few of them are :-

Page | 17
E-Fitness Hub
Indira Gandhi
National Open University

S.NO MODULE FUNCTION INPUT OUTPUT

Name (what module do?)

1. Login It Check Only Authorized user Enter ID & Show


can access. It will create more Password Dashboard
accuracy .User can change its Screen
password very easily.

2. Admin It Perform Various Function. Add inventory Show grid view


One of them are adding category, inventory
inventory or stock Id, inventory
Password, etc.

3. BMI Cal. It will calculate the body mass Enter body weight Show bmi
index and show corresponding and height calculation
output

4. Product This module also performs Apply search Show result


values function like adding
product, search filters etc

5. Member Take Classes According to Login from site Go to dashboard


schedule get there
schedule

6. New Add New Member and Provide Login from site Go to dashboard
Member id and password so that he/she get there
will access online schedule

7. Trainor Here Trainor login to there Login from site Go to dashboard


panel to mark attendance get there
schedule

8. Order In this it record all the new Get input from Show all the
order and old order website order records

Page | 18
E-Fitness Hub
Indira Gandhi
National Open University

3.6 CONCEPTUAL MODELS


3.6.1 DATA FLOW DIAGRAM:

A data flow (DFD) is a graphical system model that shows all of the main requirements for an
information system in one datagram: inputs and outputs, processes, and data storage. A DFD
describes what data flows rather than how it is processed. Everyone working on a development
project can see all aspects of the system working together at once with DFD.

DFD SYMBOLS:
1. Process
2. Data Flow
3. External Entity
4. Data Store

CONTEXT LEVEL DIAGRAM


The context diagram is useful for showing boundaries. The system scope is defined by what is
represented within single process and what is represented as an external agent. External agents
that supply or receive data from the system are outside of the system scope. Everything else is
inside the system scope. Data stores are not usually shown on the context diagram because all
of the system’s data stores are considered to be within the system scope. The context diagram is
simply the highest-level DFD. It is also called as Level 0 DFD. The context diagram provides a
good overview of the scope of the system, showing the system in “context” but it does not show
any detail about the processing that takes place inside the system.

Page | 19
E-Fitness Hub
Indira Gandhi
National Open University

Level 1 DFD

Context diagrams are diagrams where the whole system is represented as a single process. A
level 1 DFD notates each of the main sub-processes that together form the complete system. We
can think of a level 1 DFD as an “exploded view” of the context diagram. You may also need
some downward leveling. That is, the processes identified in the preliminary DFD may not turn
out to be primitive processes and may require downward portioning into lower-level

Level 1 DFD(ADMIN)

Page | 20
E-Fitness Hub
Indira Gandhi
National Open University

Page | 21
E-Fitness Hub
Indira Gandhi
National Open University

1st level DFD(MEMBER)

Page | 22
E-Fitness Hub
Indira Gandhi
National Open University

1st level DFD(SUPPLIER)

Page | 23
E-Fitness Hub
Indira Gandhi
National Open University

2-level DFD:
2-level DFD goes one step deeper into parts of 1-level DFD.It can be used to plan or record the
specific/necessary detail about the system’s functioning.

2ND level DFD(ADMIN)

Page | 24
E-Fitness Hub
Indira Gandhi
National Open University

Page | 25
E-Fitness Hub
Indira Gandhi
National Open University

3.6.2 ERD:

An entity-relationship diagram (ERD) is a data modeling technique that graphically illustrates


an information system’s entities and the relationships between those entities. An ERD is a
conceptual and representational model of data used to represent the entity framework
infrastructure.

The elements of an ERD are:

 Entities
 Relationships
 Attributes

Page | 26
E-Fitness Hub
Indira Gandhi
National Open University

Page | 27
E-Fitness Hub
Indira Gandhi
National Open University

4 SYSTEM DESIGN

4.1 BASIC MODULES

Modules
1. ADMIN PANEL

The main functionality of this module is to keep track of all details of happing in e-
fitness hub and manage all the submodule. Basically it is the combination of lots of sub
modules like inventory, supplier , member, daily expenses, Trainor , salary, orders.
,schedules and many more.It manage all the sub modules. which help admin to find all
records in single panel. In this module admin can also enter daily expenses that happens
in each single day. He/she also keep track no of Trainer , supplier and member and there
details too. The no order that are pending or new order are come all the records admin
find here

Forms:-
 Add New Inventory forms
 Add New supplier forms
 Add New Trainor forms
 New Order forms
 Previous Order Forms
 Daily expenses Forms
 Add new schedule forms
 Add Salary Forms
 Change Password forms
 Edit profile forms
 Login forms

Reports:-

 All Members Report


 All Suppliers Report
 Reports Of All Trainor
 Report of all new order
Page | 28
E-Fitness Hub
Indira Gandhi
National Open University

 Report of all Previous order


 Report of Daily expenses
 Report of schedule
 Report Of Salary
 Inventory Report
 Appointments Reports
 Member Membership Reports

2. SUPPLIER PANEL

In this module supplier first login with here valid and correct id & password then he/she
will add there inventory product and edit there profiles too. After adding the product
they wait for admin to approve that products . If admin approve that product the it
shows in website otherwise it will not going to show in website.

Forms
 Add new inventory forms
 Add Image Of Product forms
 Change Image Of Product forms
 Edit Profile Forms

Reports

 List Of All Product Reports


 Approval Of All Product reports
 Not Approvals of product reports

3. TRAINOR PANEL

In this module Trainor first login with here valid and correct id & password then he/she
will add there attendance and if they wants too edit there profile they will edit there
profiles too.
Forms
 Add Attendance forms
 Add Half days forms
 Add leave forms
Page | 29
E-Fitness Hub
Indira Gandhi
National Open University

Reports
 Monthly Salary reports
 Monthly Attendance reports

4. MEMBER PANEL :

This module member get there schedule and according to there schedule they get videos
. First member login with there valid and correct id and password after that they can
access there schedule and panel.
Forms :-
 BMI Calculator form
 Product Order form
 Edit Profile
 Edit Photo

Reports:-

 BMI Calculator reports


 order reports
 schedule video reports

5. SECURITY:

This module provides full Privacy from unwanted and unauthorized users. This module
works on Privacy of company and website. It protects our whole system from hackers,
externals etc. Administrator has power to change password, make as any other admin
etc. We use validation triggers and session to maintain security so un wanted and
unauthorized user can not access this.
Forms:-
 Administrator login Form
 Trainor login Form
 Supplier login Form
 user registration Form
 Password change Form

4.2 DATA DESIGN

Page | 30
E-Fitness Hub
Indira Gandhi
National Open University

4.2.1 Data Integrity And Constraints

Integrity Constraints
Integrity constraints are a set of rules. It is used to maintain the quality of information.
Integrity constraints ensure that the data insertion, updating, and other processes have to
be performed in such a way that data integrity is not affected.Thus, integrity constraint is
used to guard against accidental damage to the database.

Type of Integrity Constraints are:

Domain constraints

 Domain constraints can be defined as the definition of a valid set of values for an
attribute.
 The data type of domain includes string, character, integer, time, date, currency, etc.
The value of the attribute must be available in the corresponding domain.

Entity integrity constraints


 The entity integrity constraint states that primary key value can't be null.
 This is because the primary key value is used to identify individual rows in relation
and if the primary key has a null value, then we can't identify those rows.
 A table can contain a null value other than the primary key field.

Referential Integrity Constraints


 referential integrity constraint is specified between two tables.
 In the Referential integrity constraints, if a foreign key in Table 1 refers to the Primary
Key of Table 2, then every value of the Foreign Key in Table 1 must be null or be
available in Table 2.

Key constraints
 Keys are the entity set that is used to identify an entity within its entity set uniquely.
 An entity set can have multiple keys, but out of which one key will be the primary key.
A primary key can contain a unique and null value in the relational table.

AdminLogin

Page | 31
E-Fitness Hub
Indira Gandhi
National Open University

COLUMN NAME DATA TYPE KEY DESCRIPTION

AdminId Int Primary Key uniquely identify all


table records

Daily Expenses

ExpensesId Int Primary Key uniquely identify all


table records

Appointment

AppointmentId Int Primary Key uniquely identify all


table records

Inventory

ProductId Int Primary Key uniquely identify all


table records

SupplierId Int Foreign Key It acts as a cross-


reference between
tables because it
references the
primary key of
another table

Order

Order Id Int Primary Key uniquely identify all


table records

Schedule

Page | 32
E-Fitness Hub
Indira Gandhi
National Open University

Schedule Id Int Primary Key uniquely identify all


table records

Trainor

TrainorId Int Primary Key uniquely identify all


table records

User

UserId Int Primary Key uniquely identify all


table records

4.3 PROCEDURAL DESIGN


4.3.1 LOGIC DIAGRAMS

USE CASE DIAGRAM

The purpose of use case diagram is to capture the dynamic aspect of a system. However,
this definition is too generic to describe the purpose, as other four diagrams (activity,
sequence, collaboration, and Statechart) also have the same purpose. We will look into
some specific purpose, which will distinguish it from other four diagrams.Use case
diagrams are used to gather the requirements of a system including internal and external
influences. These requirements are mostly design requirements. Hence, when a system is
analyzed to gather its functionalities, use cases are prepared and actors are identified.

Page | 33
E-Fitness Hub
Indira Gandhi
National Open University

CLASS DIAGRAM

Page | 34
E-Fitness Hub
Indira Gandhi
National Open University

Class diagram is a static diagram. It represents the static view of an application. Class diagram
is not only used for visualizing, describing, and documenting different aspects of a system but
also for constructing executable code of the software application.

Page | 35
E-Fitness Hub
Indira Gandhi
National Open University

4.3.2 DATA STRUCTURES

Name: Admin Login


No of fields: 3
Description: Store Admin Information
Field Name Data type Constraint Description

AdminId Int Primary key It assigns the ID to the


Admin

AdminLogId Varchar(50) It assigns the Log Id

AdminPassword Varchar(50) It assigns password

Name: Appointment
No. of fields: 7
Description: Store Appointment Information
Field Name Data type Constraint Description

AppointmentId Int Primary key It assigns the ID to the


Customer

FName Varchar(50) Stores first name of


the Customer.

LName Varchar(50) Stores Last name of


the Customer.

Date Date Stores Date the


Customer

Time Time Stores Time the


Customer

Phone Int Stores Phone No the


Customer

Page | 36
E-Fitness Hub
Indira Gandhi
National Open University

Message Varchar(50) Stores Message the


Customer

Name: Daily Expenses


No. of fields: 4
Description: Store Appointment Information
Field Name Data type Constraint Description

ExpensesId Int Primary key It assigns the ID to the


Expenses

Expenses Name Varchar(50) Stores first name of


the Expenses.

Price Int Stores price of the


Expenses.

Details Varchar(50) Stores Date the


Customer

Name: Inventory
No. of fields: 7
Description: Store Appointment Information
Field Name Data type Constraint Description

ProductId Int Primary key It assigns the ID to the


Expenses

ProductName Varchar(50) Stores first name of


the Expenses.

ProductQuantity Int Stores price of the


Expenses.

ProductAmount Int Stores Date the


Customer

Page | 37
E-Fitness Hub
Indira Gandhi
National Open University

ProductStatus Varchar(50) On/Off of status

ProductImage Varchar(50) Stores Image the


Customer

SupplierId Int Foreign Key It assigns the Foreign


ID to the Expenses

Name: Order
No. of fields: 2
Description: Store Appointment Information
Field Name Data type Constraint Description

OrderId Int Primary key It assigns the ID to the


Order

ProductId Varchar(50) Foreign Key Stores Foegin key of


the Product.

Name: Schedule
No. of fields: 8
Description: Store Appointment Information
Field Name Data type Constraint Description

ScheduleId Int Primary key It assigns the ID to the


Schedule

ScheduleName Varchar(50) Stores Name of the


Schedule.

ScheduleImage Varchar(50) Stores Image of the


Schedule.

ScheduleTiming Varchar(50) Stores timing of the


Schedule.

Page | 38
E-Fitness Hub
Indira Gandhi
National Open University

ScheduleDays Varchar(50) Stores Days of the


Schedule.

ScheduleReps Int Stores Reps of the


Schedule.

ScheduleVideo Varchar(50) Stores Reps of the


Schedule.

ScheduleType Varchar(50) Stores Type of the


Schedule.

Name: Supplier
No. of fields: 7
Description: Store Appointment Information
Field Name Data type Constraint Description

SupplierId Int Primary key It assigns the ID to


the Supplier

SupplierName Varchar(50) Stores Name of the


Schedule.

SupplierAddress Varchar(50) Stores address of the


Schedule.

SupplierPhoneNumber Varchar(10) Stores number of the


Schedule.

ScheduleEmail Varchar(50) Stores Email of the


Schedule.

SchedulePassword Varchar(50) Stores Password of


the Schedule.

ScheduleDBO Varchar(50) Stores DBO of the


Schedule.

Name: Trainer

Page | 39
E-Fitness Hub
Indira Gandhi
National Open University

No. of fields: 9
Description: Store Appointment Information
Field Name Data type Constraint Description

TrainerId Int Primary key It assigns the ID to


the Trainer

TrainerName Varchar(50) Stores Name of the


Trainer.

TrainerPhone Varchar(10) Stores Phone


number of the
Trainer

TrainerGender Varchar(10) Stores Gender of the


Trainer.

TrainerImage Varchar(50) Stores Email of the


Trainer.

TrainerEmail Varchar(50) Stores Password of


the Trainer.

TrainerPassword Varchar(50) Stores DBO of the


Schedule.

TrainerAddress Varchar(50) Stores Address of the


Trainer.

TrainerDOB Date Stores DOB of the


Trainer.

Name: User
No. of fields: 8
Description: Store Appointment Information
Field Name Data type Constraint Description

UserId Int Primary key It assigns the ID to


the User

Page | 40
E-Fitness Hub
Indira Gandhi
National Open University

UserName Varchar(50) Stores Name of the


User.

UserPhone Varchar(10) Stores Phone


number of the User

UserGender Varchar(10) Stores Gender of the


User.

UserImage Varchar(50) Stores Email of the


User.

UserEmail Varchar(50) Stores Password of


the User.

UserPassword Varchar(50) Stores DBO of the


User.

UserAddress Varchar(50) Stores Address of the


User.

UserDOB Date Stores DOB of the


User.

4.3.3 ALGORITHMS DESIGN

FLOW CHART
Flow charts are required to understand the system well.With the help of these charts it becomes
easy to understand the inputs and outputs of the system which is helpful in later stages of
development of the software.

Page | 41
E-Fitness Hub
Indira Gandhi
National Open University

(FOR ADMIN PANEL)

Page | 42
E-Fitness Hub
Indira Gandhi
National Open University

Page | 43
E-Fitness Hub
Indira Gandhi
National Open University

4.4 USER INTERFACE DESIGN

INDEX.ASPX

Page | 44
E-Fitness Hub
Indira Gandhi
National Open University

Page | 45
E-Fitness Hub
Indira Gandhi
National Open University

Page | 46
E-Fitness Hub
Indira Gandhi
National Open University

PRODUCTS.ASPX

COACHES.ASPX

Page | 47
E-Fitness Hub
Indira Gandhi
National Open University

Schedule.aspx

Page | 48
E-Fitness Hub
Indira Gandhi
National Open University

ORDER.ASPX

Page | 49
E-Fitness Hub
Indira Gandhi
National Open University

CONTACT.ASPX

Page | 50
E-Fitness Hub
Indira Gandhi
National Open University

LOGIN.ASPX

Signup.aspx

4.5 SECURITY ISSUES

In websites, there are a lot of risk to submit or save your data even the surfing is getting too much
violated because of phishing, hacking and other illegal stuffs going around the world wide web.
To tackle such situation, algorithms putted on the application so that no one can easily get into your
privacy or steal your data.
E-Fitness Hub comes along with some basic level of security aspects that will make a great impact
afterwards, like user can only access the schedule page or our secured data when he/she will get
allowed by the administrator, a session key will be generated each time he/she logged in and also will
check the status of the specific user to be allowed then only then it will be allowed to access the data.
Now, let’s discuss about the SQL Injection, an old but effective method of hacking or destroying your
data by applying some simple queries on the given textboxes or on other controls by the developer. To
get distant from there kind of illegal activities we made use of stored procedures so that a simple query
at the end will only generate an error and nothing more.

4.6 TEST CASES DESIGN

Page | 51
E-Fitness Hub
Indira Gandhi
National Open University

CASE 1: TEST FOR USER LOGIN

SCENARIO -1 : SUCCESSFUL LOGIN


USER : MEMBER

Test Condition : If member enter correct id & password both then system authenticated that the
user is valid user or not and after authentication it redirect to the Member panel

SCENARIO -2 : UNSUCCESSFUL LOGIN


USER : MEMBER

Page | 52
E-Fitness Hub
Indira Gandhi
National Open University

Test Condition : If member enter incorrect id & password vice versa then system authenticated
that the user is valid user or not and show alert message to user that password and id is incorect

CASE 2: TEST FOR ADD DAILY EXPENSES

SCENARIO -1 : DATA IS SUCCESSFUL SAVED


USER : ADMIN

Test Condition : Admin enter valid and correct data according to data type of column then data
is saved to the table

Page | 53
E-Fitness Hub
Indira Gandhi
National Open University

SCENARIO -2 : DATA IS NOT SUCCESSFUL SAVED


USER : ADMIN

Test Condition : Admin enter invalid and incorrect input then data is saved to the table

CASE 3: TEST FOR SIGN UP

SCENARIO -1 : USER REGISTRATION SUCCESSFUL


USER : MEMBER

Page | 54
E-Fitness Hub
Indira Gandhi
National Open University

Test Condition : If member enter valid and correct input in respective fields then he/she will
register Successful and access there panel easily

SCENARIO -2 : USER REGISTRATION IS UNSUCCESSFUL


USER : MEMBER

Test Condition : If member enter invalid and incorrect input in respective fields then he/she
will not register Successful and can’t have access to there panel. Eg - At phone number fields
user enter data like ‘sdadsad’ then is invalid data and he/she will not register successfully
Page | 55
E-Fitness Hub
Indira Gandhi
National Open University

Case 4: Test For Add Inventory

Scenario -1 : Inventory is not Added Successful to Supplier panel

User : Supplier

Test Condition : If inventory is not successful added then supplier give invalid or incorrect
input .

Scenario -2 : Inventory Added Successful to Supplier panel but not showing in website
User : Supplier

Page | 56
E-Fitness Hub
Indira Gandhi
National Open University

Test Condition : If Supplier added inventory successfully but it is not showing in website
because the inventory status is not get approval from admin .Once it get approval by admin
then it will show

Scenario -3 : Inventory Added Successful to Supplier panel and showing in website also
User : Supplier , Admin

Page | 57
E-Fitness Hub
Indira Gandhi
National Open University

Test Condition : If Supplier added inventory successfully then admin give approval to those
inventory then it will show in website too.

Page | 58
E-Fitness Hub
Indira Gandhi
National Open University

Case 5: Test For Admin Password Change

Scenario -1 : Admin Password Not Change Successful


User : Admin

Test Condition : If Old password and new Password is same the password can’t be change

Scenario -2 : Admin Password Change Successful


User : Admin

Test Condition : If Old password and new Password is not same the password can be change
Page | 59
E-Fitness Hub
Indira Gandhi
National Open University

Case 6: Test For BMI Calculator

Scenario -1 : BMI Calculator not showing desired output


User : Admin , Member , Supplier ,Trainor

Test Condition : If user enter incorrect weight, height, age input or invalid input the it will
show in give wrong output

Scenario -2 : BMI Calculator showing desired output


User : Admin , Member , Supplier ,Trainor

Page | 60
E-Fitness Hub
Indira Gandhi
National Open University

Test Condition : If user enter correct weight, height, age input or valid input the it will show in
give desired output

Case 7: Test For Schedule

Scenario -1 : Schedule not showing in website


User : Member

Test Condition : If member is not login with there valid id and password then schedule will not
going to show

Scenario -2 : Schedule showing in website


User : Member

Page | 61
E-Fitness Hub
Indira Gandhi
National Open University

Test Condition If member is login with there valid id and password then schedule will not
going to show at schedule tab.

Page | 62
E-Fitness Hub
Indira Gandhi
National Open University

5.0 IMPLEMENTATION AND TESTING

5.1 Implementation Approaches


The development strategy that encompasses the process, methods, and tools and the generic
phases is called Software Engineering Paradigm. The main paradigm for software is chosen based on
the nature of the project and application, the method and tools to be used, and the controls and
deliverables that are required. In this project Iterative model suggests a systematic sequential approach
to s/w the development that begin at the system level and support as shown in below figure. The
sequence of activities performed in a software development project with the Iterative model is
feasibility study, requirement analysis and specification, designing, coding and unit testing, integration
and system testing, maintenance and then randomly previous stages according to requirements, coding,
testing in a loop. All phases listed once in an Iterative model must be performed for making a
successful project.

5.2 Coding Details and Code Efficiency


Page | 63
E-Fitness Hub
Indira Gandhi
National Open University

5.2.1 Code Efficiency

Site1.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs"


Inherits="Fitness_Hub.Site1" %>

<!DOCTYPE html>
<html lang="en">
<head>
<title>E-Fitness Hub</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<link
href="https://fonts.googleapis.com/css?family=Barlow+Semi+Condensed:100,200,200i,300,300i,400,4
00i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">

<link rel="stylesheet" href="css/open-iconic-bootstrap.min.css">


<link rel="stylesheet" href="css/animate.css">

<link rel="stylesheet" href="css/owl.carousel.min.css">


<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/magnific-popup.css">

<link rel="stylesheet" href="css/aos.css">

<link rel="stylesheet" href="css/ionicons.min.css">

<link rel="stylesheet" href="css/bootstrap-datepicker.css">


<link rel="stylesheet" href="css/jquery.timepicker.css">

<link rel="stylesheet" href="css/flaticon.css">


<link rel="stylesheet" href="css/icomoon.css">
<link rel="stylesheet" href="css/style.css">
Page | 64
E-Fitness Hub
Indira Gandhi
National Open University

<style>
#lblsession{
color:white !important;
}
#btnlogout:hover{
cursor:pointer !important;
}
</style>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark ftco_navbar bg-dark ftco-navbar-light" id="ftco-
navbar">
<div class="container">
<a class="navbar-brand py-2 px-4" href="index.aspx">
<h6 class="text-center pt-3"><b>E-FITNESS<br />
HUB</b></h6>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#ftco-nav"
aria-controls="ftco-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="oi oi-menu"></span>Menu
</button>
<form id="form1" runat="server" autocomplete="off">
<div class="collapse navbar-collapse" id="ftco-nav">
<ul class="navbar-nav ml-auto">
<li class="nav-item"><a href="index.aspx" class="nav-link">Home</a></li>
<li class="nav-item"><a href="products.aspx" class="nav-link">Products</a></li>
<li class="nav-item"><a href="coaches.aspx" class="nav-link">Coaches</a></li>
<li class="nav-item"><asp:LinkButton ID="schedule" runat="server" CssClass="nav-link"
Text="Schedule" OnClick="schedule_Click"></asp:LinkButton></li>
<li class="nav-item"><a href="order.aspx" class="nav-link">Order</a></li>
<li class="nav-item"><a href="about.aspx" class="nav-link">About</a></li>
<li class="nav-item"><a href="contact.aspx" class="nav-link">Contact</a></li>
<asp:PlaceHolder ID="NotLoggedIn" runat="server">
<li class="nav-item"><a href="signup.aspx" class="nav-link">Sign Up</a></li>
<li class="nav-item"><a href="Login.aspx" class="nav-link">Sign In</a></li>

Page | 65
E-Fitness Hub
Indira Gandhi
National Open University

</asp:PlaceHolder>

<asp:PlaceHolder ID="LoggedIn" runat="server">


<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle waves-effect pro-pic" href="" data-
toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="../../asset/assets/images/users/1.jpg" alt="user" class="rounded-circle"
width="31"></a>
<div class="dropdown-menu dropdown-menu-right animated" style="width:
auto;">
<asp:Label ID="lblsession" runat="server" Text="" Font-Size="Large"
CssClass="dropdown-item text-center pt-3 text-white bg-white"></asp:Label>
<span style="width: 80%;">
<asp:Button ID="btnlogout" runat="server" CssClass="dropdown-item text-
center text-white" Font-Size="Larger" Text="Logout" OnClick="btnlogout_Click"/>
</span>
</div>
</li>
</asp:PlaceHolder>
</ul>
</div>
<script>
$(document).ready(function () {
$("p").click(function () {
$(this).hide();
});
});
</script>
</div>
</nav>
<!-- END nav -->
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</form>

<footer class="ftco-footer ftco-section img">


<div class="overlay"></div>

Page | 66
E-Fitness Hub
Indira Gandhi
National Open University

<div class="container">
<div class="row mb-5">
<div class="col-lg-3 col-md-6 mb-5 mb-md-5">
<div class="ftco-footer-widget mb-4">
<h2 class="ftco-heading-2">About Us</h2>
<p>Far far away, behind the word mountains, far from the countries Vokalia and
Consonantia, there live the blind texts.</p>
<ul class="ftco-footer-social list-unstyled float-md-left float-lft mt-5">
<li class="ftco-animate"><a href="#"><span class="icon-twitter"></span></a></li>
<li class="ftco-animate"><a href="#"><span class="icon-
facebook"></span></a></li>
<li class="ftco-animate"><a href="#"><span class="icon-
instagram"></span></a></li>
</ul>
</div>
</div>
<div class="col-lg-3 col-md-6 mb-5 mb-md-5">
<div class="ftco-footer-widget mb-4 ml-md-4 text-center">
<h2 class="ftco-heading-2">Services</h2>
<ul class="list-unstyled">
<li><a href="index.aspx" class="py-2 d-block">HOME</a></li>
<li><a href="products.aspx" class="py-2 d-block">OUR PRODUCTS</a></li>
<li><a href="order.aspx" class="py-2 d-block">PLACE ORDER</a></li>
<li><a href="schedule.aspx" class="py-2 d-block">SCHEDULE</a></li>
</ul>
</div>
</div>
<div class="col-lg-2 col-md-6 mb-5 mb-md-5">
<div class="ftco-footer-widget mb-4 ml-md-4 text-center">
<h2 class="ftco-heading-2">Pages</h2>
<ul class="list-unstyled">
<li><a href="coaches.aspx" class="py-2 d-block">COACHES</a></li>
<li><a href="about.aspx" class="py-2 d-block">ABOUT US</a></li>
<li><a href="signup.aspx" class="py-2 d-block">SIGN UP</a></li>
<li><a href="contact.aspx" class="py-2 d-block">CONTACT US</a></li>
</ul>
</div>

Page | 67
E-Fitness Hub
Indira Gandhi
National Open University

</div>
<div class="col-lg-1"></div>
<div class="col-lg-3 col-md-6 mb-5 mb-md-5">
<div class="ftco-footer-widget mb-4">
<h2 class="ftco-heading-2">Have a Questions?</h2>
<div class="block-23 mb-3">
<ul>
<li><span class="icon icon-map-marker"></span><span class="text">203 Fake St.
Mountain View, San Francisco, California, USA</span></li>
<li><a href="#"><span class="icon icon-phone"></span><span class="text">+2
392 3929 210</span></a></li>
<li><a href="#"><span class="icon icon-envelope"></span><span
class="text">info@yourdomain.com</span></a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">

<p>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
Copyright &copy;<script>document.write(new Date().getFullYear());</script>
All rights reserved | This template is made with <i class="icon-heart" aria-
hidden="true"></i>by <a href="https://colorlib.com" target="_blank">PK</a>
<!-- Link back to Colorlib can't be removed. Template is licensed under CC BY 3.0. -->
</p>
</div>
</div>
</div>
</footer>

<!-- loader -->


<div id="ftco-loader" class="show fullscreen">

Page | 68
E-Fitness Hub
Indira Gandhi
National Open University

<svg class="circular" width="48px" height="48px">


<circle class="path-bg" cx="24" cy="24" r="22" fill="none" stroke-width="4"
stroke="#eeeeee" />
<circle class="path" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke-
miterlimit="10" stroke="#F96D00" />
</svg>
</div>

<script src="js/jquery.min.js"></script>
<script src="js/jquery-migrate-3.0.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/jquery.stellar.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/aos.js"></script>
<script src="js/jquery.animateNumber.min.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/jquery.timepicker.min.js"></script>
<script src="js/scrollax.min.js"></script>
<script
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBVWaKrjvy3MaE7SQ74_uJiULgl1JY0H2
s&sensor=false"></script>
<script src="js/google-map.js"></script>
<script src="js/main.js"></script>
<asp:ContentPlaceHolder ID="script" runat="server">
</asp:ContentPlaceHolder>
</body>
</html>

Site1.Master.cs

using System;
using System.Collections.Generic;

Page | 69
E-Fitness Hub
Indira Gandhi
National Open University

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

namespace Fitness_Hub
{
public partial class Site1 : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["id"] == null)
{
LoggedIn.Visible = false;
NotLoggedIn.Visible = true;
}
else
{
lblsession.Text = "<h5>Hi, " + Session["id"].ToString() + "</h5>";
LoggedIn.Visible = true;
NotLoggedIn.Visible = false;
}
}

protected void schedule_Click(object sender, EventArgs e)


{
if (Session["id"] == null)
{
Response.Redirect("Login.aspx");
}
else
{
Response.Redirect("schedule.aspx");
}
}

protected void btnlogout_Click(object sender, EventArgs e)


{
Session.RemoveAll();
if (Session["id"] == null)
{
Response.Redirect("Login.aspx");
}
Page | 70
E-Fitness Hub
Indira Gandhi
National Open University

}
}
}

index.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="index.aspx.cs" Inherits="Fitness_Hub.index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<section class="home-slider js-fullheight owl-carousel ftco-degree-bottom">


<div class="slider-item js-fullheight" style="background-image: url(images/bg_1.jpg);">
<div class="overlay"></div>
<div class="container">
<div class="row slider-text js-fullheight justify-content-center align-items-center" data-
scrollax-parent="true">

<div class="col-sm-6 ftco-animate text-center">


<h1 class="mb-4">Fuel Your Body Fitness</h1>
<h2 class="subheading">Be One Of Us</h2>
</div>
</div>
</div>
</div>

<div class="slider-item js-fullheight" style="background-image: url(images/bg_2.jpg);">


<div class="overlay"></div>
<div class="container">
<div class="row slider-text js-fullheight justify-content-center align-items-center" data-
scrollax-parent="true">

<div class="col-sm-7 ftco-animate text-center">


<h1 class="mb-4">Challenge Yourself</h1>
<h2 class="subheading">Get Your Body Fit</h2>

Page | 71
E-Fitness Hub
Indira Gandhi
National Open University

</div>

</div>
</div>
</div>
</section>

<section class="ftco-section-services ftco-degree">


<div class="container">
<div class="row d-flex align-items-center">
<div class="col-xl-12 align-self-stretch pt-2">
<div class="row justify-content-center mb-3 text-center">
<div class="col-md-12 heading-section ftco-animate">
<h3 class="subheading">Measure Your Body Mass Index</h3>
<h2 class="mb-4">Are Fit or Not?</h2>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="icon d-flex justify-content-center align-items-center" style="width:20%;
margin-left:28%;">
<span class="flaticon-ruler"></span>
</div>
<div class="text ml-5">
<h3>Enter Your Height</h3>
<h3><asp:TextBox ID="txtheight" runat="server" CssClass="pl-4 form-control"
placeholder="Feets" Font-Size="Larger" Width="50%"></asp:TextBox></h3>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="icon d-flex justify-content-center align-items-center" style="width:20%;
margin-left:28%;">
<span class="flaticon-ruler"></span>
</div>
<div class="text ml-5">
<h3>Enter Your Weight</h3>

Page | 72
E-Fitness Hub
Indira Gandhi
National Open University

<h3><asp:TextBox ID="txtweight" runat="server" CssClass="pl-4 form-control"


placeholder="In KGs" Font-Size="Larger" Width="50%"></asp:TextBox></h3>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="text pl-5" style="margin-left:40%;">
<h3><asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="btn btn-
danger" Font-Size="X-Large" Width="30%" OnClick="btnSubmit_Click"/></h3>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="text pl-5" style="margin-left:43%;">
<h3><asp:Label ID="lblResult" runat="server" Text=""
ForeColor="Red"></asp:Label></h3>
</div>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-section bg-light" style="padding-top:5%; padding-bottom: 0px;">


<div class="container-fluid">
<div class="row justify-content-center mb-5">
<div class="col-md-7 heading-section text-center ftco-animate">
<h3 class="subheading">Shape Your Body</h3>
<h2 class="mb-1">Our Coaches</h2>
</div>
</div>
<div class="row">
<asp:Repeater ID="rpCoachesList" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<div class="col-lg-3 d-flex text-center">
<div class="coach align-items-stretch">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#
Eval("TrainerImage","../Upload/images/{0}") %>' CssClass="pl-3 pr-3 img" />
<div class="text bg-white p-4 ftco-animate">

Page | 73
E-Fitness Hub
Indira Gandhi
National Open University

<span class="subheading">Trainer</span>
<h3><a href="#"><%#Eval("TrainerName") %></a></h3>
<h2 style="font-size: smaller">Date of Birth: <%#Eval("TrainerDOB","{0:d}")
%></h2>
<h4 style="font-size: medium;"><b>Contact:</b><%#Eval("TrainerPhone")
%></h4>
<p>Email ID: <%#Eval("TrainerEmail") %></p>
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT top 8 * FROM
[Trainer]"></asp:SqlDataSource>
</div>
</section>

<section class="ftco-section" style="padding-top: 2%; padding-bottom: 0px;">


<div class="container-fluid">
<div class="row justify-content-center mb-5 pb-3">
<div class="col-md-7 heading-section ftco-animate text-center">
<h3 class="subheading">Schedules List</h3>
<h2 class="mb-1">Our Schedules</h2>
</div>
</div>
</div>
<div class="container-fluid" runat="server" id="divcategory">
<div class="row">
<div class="col-md-6 col-lg-4 text-center">
<div class="package-program ftco-animate">
<a href="#" class="img d-flex justify-content-center align-items-center">
<img src="Upload/begin.jpg" height="350" width="100%" class="text-center
primary-image">
<span style="position: absolute; margin-left: 0%; width: 93%; height: 55%; opacity:
0.5; font-size: 45pt; color: white;">BEGINNERS</span>

Page | 74
E-Fitness Hub
Indira Gandhi
National Open University

</a>
<div class="text mt-3">
<h2>BEGINNER</h2>
<p style="font-size: large;">
This panel is for the <b>BEGINNERS</b> who joined
<br />
our Beginner's Plan. Click it to view more if you are a beginner otherwise select
only the schedule you have applied for, Good Luck!
</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 text-center">
<div class="package-program ftco-animate">
<a href="order.aspx" class="img d-flex justify-content-center align-items-center">
<img src="Upload/advance.jpg" height="350" width="100%" class="text-center
primary-image">
<span style="position: absolute; margin-left: 0%; width: 93%; height: 55%; opacity:
0.5; font-size: 45pt; color: white;">ADVANCED</span>
</a>
<div class="text mt-3">
<h2>ADVANCED</h2>
<p style="font-size: large;">
This panel is for the <b>ADVANCED</b> who joined
<br />
our Advanced Plan. Click it to view more if you are a Advanced otherwise select
only the schedule you have applied for, Good Luck!
</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 text-center">
<div class="package-program ftco-animate">
<a href="order.aspx" class="img d-flex justify-content-center align-items-center">
<img src="Upload/profess.jpg" height="350" width="100%" class="text-center
primary-image">

Page | 75
E-Fitness Hub
Indira Gandhi
National Open University

<span style="position: absolute; margin-left: 0%; width: 93%; height: 55%; opacity:
0.5; font-size: 45pt; color: white;">PROFESSIONALS</span>
</a>
<div class="text mt-3">
<h2>PROFESSIONAL</h2>
<p style="font-size: large;">
This panel is for the <b>PROFESSIONAL</b> who joined
<br />
our Professional Plan. Click it to view more if you are a Professional otherwise
select only the schedule you have applied for, Good Luck!
</p>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row mt-4 justify-content-center ftco-animate">
<div class="col-md-4 text-center">
<a href="schedule.aspx" class="btn-custom py-4">View More Program <span class="ion-
ios-arrow-down ml-2"></span></a>
</div>
</div>
</div>
</section>

<section class="ftco-section bg-light">


<div class="container">
<div class="row justify-content-center mb-5 pb-3">
<div class="col-md-7 heading-section ftco-animate text-center">
<h3 class="subheading">Pricing Tables</h3>
<h2 class="mb-1">Membership Plans</h2>
</div>
</div>
<div class="row">
<div class="col-md-4 ftco-animate">

Page | 76
E-Fitness Hub
Indira Gandhi
National Open University

<div class="block-7">
<div class="text-center">
<h2 class="heading">One Day Training</h2>
<span class="price"><sup>₹</sup> <span class="number">100</span></span>
<span class="excerpt d-block">Just for 1 Day</span>
<a href="signup.aspx" class="btn btn-primary d-block px-2 py-4 mb-4">Get
Started</a>

<h3 class="heading-2 mb-4">Enjoy All The Features</h3>

<ul class="pricing-text">
<li>Onetime Access To All Club</li>
<li>Group Trainer</li>
<li>Book A Group Class</li>
<li>Fitness Orientation</li>
</ul>
</div>
</div>
</div>
<div class="col-md-4 ftco-animate">
<div class="block-7">
<div class="text-center">
<h2 class="heading">Pay Every Month</h2>
<span class="price"><sup>₹</sup> <span class="number">700</span></span>
<span class="excerpt d-block">All features are included</span>
<a href="signup.aspx" class="btn btn-primary d-block px-3 py-4 mb-4">Get
Started</a>

<h3 class="heading-2 mb-4">Enjoy All The Features</h3>

<ul class="pricing-text">
<li>Group Classes</li>
<li>Discuss Fitness Goals</li>
<li>Group Trainer</li>
<li>Fitness Orientation</li>
</ul>
</div>

Page | 77
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
<div class="col-md-4 ftco-animate">
<div class="block-7">
<div class="text-center">
<h2 class="heading">1 Year Membership</h2>
<span class="price"><sup>₹</sup> <span class="number">7100</span></span>
<span class="excerpt d-block">All features are included</span>
<a href="signup.aspx" class="btn btn-primary d-block px-3 py-4 mb-4">Get
Started</a>

<h3 class="heading-2 mb-4">Enjoy All The Features</h3>

<ul class="pricing-text">
<li>Group Classes</li>
<li>Discuss Fitness Goals</li>
<li>Group Trainer</li>
<li>Fitness Orientation</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-appointment">
<div class="overlay"></div>
<div class="container-wrap">
<div class="row no-gutters d-md-flex align-items-center">
<div class="col-md-6 d-flex align-self-stretch img" style="background-image:
url(images/about-3.jpg);">
</div>
<div class="col-md-6 appointment ftco-animate">
<h3 class="mb-3">Book a Appointment</h3>
<div class="appointment-form">
<div class="d-md-flex">

Page | 78
E-Fitness Hub
Indira Gandhi
National Open University

<div class="form-group">
<asp:TextBox ID="txtfname" runat="server" CssClass="form-control"
placeholder="First Name"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtlname" runat="server" CssClass="form-control"
placeholder="Last Name"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<div class="input-wrap">
<div class="icon"><span class="ion-md-calendar"></span></div>
<asp:TextBox ID="txtdate" runat="server" CssClass="form-control"
placeholder="Date" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group ml-md-4">
<div class="input-wrap">
<div class="icon"><span class="ion-ios-clock"></span></div>
<asp:TextBox ID="txttime" runat="server" CssClass="form-control"
placeholder="Time" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtphone" runat="server" CssClass="form-control"
placeholder="Phone" TextMode="Phone"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtmsg" Columns="30" Rows="2" runat="server"
CssClass="form-control" placeholder="Message" TextMode="MultiLine"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:Button ID="appointment" runat="server" CssClass="btn btn-primary py-3 px-
4" Text="Book" OnClick="appointment_Click" />

Page | 79
E-Fitness Hub
Indira Gandhi
National Open University

<br />
<asp:Label ID="lblmsg" runat="server" Text=""></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

index.aspx

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;

namespace Fitness_Hub
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
txtdate.Text = DateTime.Now.ToString("dd-MM-yyyy");
txttime.Text = DateTime.Now.ToShortTimeString();
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

Page | 80
E-Fitness Hub
Indira Gandhi
National Open University

protected void appointment_Click(object sender, EventArgs e)


{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spAppointment", con);
cmd.CommandType = CommandType.StoredProcedure;

try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@FName", txtfname.Text);
SqlParameter p3 = new SqlParameter("@LName", txtlname.Text);
SqlParameter p4 = new SqlParameter("@Date", txtdate.Text);
SqlParameter p5 = new SqlParameter("@Time", txttime.Text);
SqlParameter p6 = new SqlParameter("@Phone", txtphone.Text);
SqlParameter p7 = new SqlParameter("@Message", txtmsg.Text);
SqlParameter p8 = new SqlParameter("@AppointmentId", lblmsg.Text);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);

int k = cmd.ExecuteNonQuery();
if (k != 0)
{
lblmsg.Text = "<h2 style='color:white'>Appointment Booked Succesfully!!</h2>";
txtfname.Text = "";
txtlname.Text = "";
txtmsg.Text = "";
txtphone.Text = "";
}
}
catch (Exception ex)
{
lblmsg.Text = ex.ToString();
lblmsg.ForeColor = System.Drawing.Color.Red;
Page | 81
E-Fitness Hub
Indira Gandhi
National Open University

}
}
}

protected void btnSubmit_Click(object sender, EventArgs e)


{
try
{
double meter = (Convert.ToDouble(txtheight.Text) * 0.3048);
meter = meter * 2;
double bmi = (Convert.ToDouble(txtweight.Text)) / meter;
if (bmi < 18.5)
{
lblResult.Text = "Underweight";
}
else if (bmi >= 18.5 && bmi <= 24.9)
{
lblResult.Text = "Normal";
}
else if (bmi >= 25 && bmi <= 29.9)
{
lblResult.Text = "Overweight";
}
else if (bmi >= 30)
{
lblResult.Text = "Obese";
}
}
catch
{
lblResult.Text = "Wrong Input/ BMI cannot be calculated for these Info's";
}
}
}
}

about.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="about.aspx.cs" Inherits="Fitness_Hub.about" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
Page | 82
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<section class="hero-wrap js-fullheight" style="background-image: url('images/bg_2.jpg');">


<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-center justify-content-center">
<div class="col-md-9 ftco-animate text-center">
<h1 class="mb-3 bread">About us</h1>
<p class="breadcrumbs"><span class="mr-2"><a href="index.aspx">Home</a></span>
<span>About Us</span></p>
</div>
</div>
</div>
</section>

<section class="ftco-section-services ftco-degree">


<div class="container">
<div class="row d-flex align-items-center">
<div class="col-xl-6 d-flex align-self-stretch">
<div class="align-self-stretch">
<img src="images/about.jpg" class="img-fluid" alt=""></div>
</div>
<div class="col-xl-6 align-self-stretch pt-5">
<div class="row justify-content-center mb-3">
<div class="col-md-12 heading-section ftco-animate">
<h3 class="subheading">Shape Your Body</h3>
<h2 class="mb-4">What We Do?</h2>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-ruler"></span>
</div>
<div class="text ml-5">
<h3>Analyze Your Goal</h3>

Page | 83
E-Fitness Hub
Indira Gandhi
National Open University

<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country</p>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-gym"></span>
</div>
<div class="text ml-5">
<h3>Work Hard On It</h3>
<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country</p>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-tools-and-utensils"></span>
</div>
<div class="text ml-5">
<h3>Improve Your Performance</h3>
<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country</p>
</div>
</div>
<div class="services d-flex ftco-animate">
<div class="icon d-flex justify-content-center align-items-center">
<span class="flaticon-abs"></span>
</div>
<div class="text ml-5">
<h3>Achieve Your Perfect Body</h3>
<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country</p>
</div>
</div>
</div>
</div>
</div>

Page | 84
E-Fitness Hub
Indira Gandhi
National Open University

</section>

<section class="ftco-counter ftco-bg-dark img" id="section-counter" style="background-image:


url(images/bg_2.jpg);" data-stellar-background-ratio="0.5">
<div class="overlay"></div>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
<div class="row">
<div class="col-md-6 col-lg-3 d-flex justify-content-center counter-wrap ftco-animate">
<div class="block-18 text-center">
<div class="text">
<strong class="number" data-number="5000">0</strong>
<span>Happy Customers</span>
</div>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex justify-content-center counter-wrap ftco-animate">
<div class="block-18 text-center">
<div class="text">
<strong class="number" data-number="4560">0</strong>
<span>Perfect Bodies</span>
</div>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex justify-content-center counter-wrap ftco-animate">
<div class="block-18 text-center">
<div class="text">
<strong class="number" data-number="570">0</strong>
<span>Working Hours</span>
</div>
</div>
</div>
<div class="col-md-6 col-lg-3 d-flex justify-content-center counter-wrap ftco-animate">
<div class="block-18 text-center">
<div class="text">
<strong class="number" data-number="900">0</strong>

Page | 85
E-Fitness Hub
Indira Gandhi
National Open University

<span>Success Stories</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-about d-md-flex bg-light">


<div class="one-half img" style="background-image: url(images/about-2.jpg);">
<a href="https://vimeo.com/45830194" class="icon popup-vimeo d-flex justify-content-center
align-items-center">
<span class="icon-play"></a>
</a>
</div>
<div class="one-half ftco-animate">
<div class="heading-section ftco-animate ">
<h3 class="subheading">About Muscle</h3>
<h2 class="mb-5">Welcome
<br>
To Our Gym</h2>
</div>
<div>
<p>On her way she met a copy. The copy warned the Little Blind Text, that where it came
from it would have been rewritten a thousand times and everything that was left from its origin would
be the word "and" and the Little Blind Text should turn around and return to its own, safe country. But
nothing the copy said could convince her and so it didn’t take long until a few insidious Copy Writers
ambushed her, made her drunk with Longe and Parole and dragged her into their agency, where they
abused her for their.</p>
</div>
</div>
</section>

<section class="ftco-section bg-light">


<div class="container-fluid">

Page | 86
E-Fitness Hub
Indira Gandhi
National Open University

<div class="row justify-content-center mb-5">


<div class="col-md-7 heading-section text-center ftco-animate">
<h3 class="subheading">Shape Your Body</h3>
<h2 class="mb-1">Our Coaches</h2>
</div>
</div>
<div class="row">
<div class="col-lg-3 d-flex">
<div class="coach align-items-stretch">
<div class="img" style="background-image: url(images/trainer-1.jpg);"></div>
<div class="text bg-white p-4 ftco-animate">
<span class="subheading">Owner / Head Coach</span>
<h3><a href="#">Mark Brook</a></h3>
<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your
mouth.</p>
<ul class="ftco-social-media d-flex mt-4">
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-twitter"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-facebook"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-instagram"></span></a></li>
</ul>
<p></p>
</div>
</div>
</div>
<div class="col-lg-3 d-flex">
<div class="coach d-md-flex flex-column-reverse align-items-stretch">
<div class="img" style="background-image: url(images/trainer-2.jpg);"></div>
<div class="text bg-white p-4 ftco-animate">
<span class="subheading">Owner / Head Coach</span>
<h3><a href="#">Sarah Henderson</a></h3>
<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your
mouth.</p>

Page | 87
E-Fitness Hub
Indira Gandhi
National Open University

<ul class="ftco-social-media d-flex mt-4">


<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-twitter"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-facebook"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-instagram"></span></a></li>
</ul>
<p></p>
</div>
</div>
</div>
<div class="col-lg-3 d-flex">
<div class="coach align-items-stretch">
<div class="img" style="background-image: url(images/trainer-3.jpg);"></div>
<div class="text bg-white p-4 ftco-animate">
<span class="subheading">Owner / Head Coach</span>
<h3><a href="#">George Hump</a></h3>
<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your
mouth.</p>
<ul class="ftco-social-media d-flex mt-4">
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-twitter"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-facebook"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-instagram"></span></a></li>
</ul>
<p></p>
</div>
</div>
</div>
<div class="col-lg-3 d-flex">
<div class="coach d-md-flex flex-column-reverse align-items-stretch">
<div class="img" style="background-image: url(images/trainer-4.jpg);"></div>
<div class="text bg-white p-4 ftco-animate">

Page | 88
E-Fitness Hub
Indira Gandhi
National Open University

<span class="subheading">Owner / Head Coach</span>


<h3><a href="#">Victor Hump</a></h3>
<p>A small river named Duden flows by their place and supplies it with the
necessary regelialia. It is a paradisematic country, in which roasted parts of sentences fly into your
mouth.</p>
<ul class="ftco-social-media d-flex mt-4">
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-twitter"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-facebook"></span></a></li>
<li class="ftco-animate"><a href="#" class="mr-2 d-flex justify-content-center
align-items-center"><span class="icon-instagram"></span></a></li>
</ul>
<p></p>
</div>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-section testimony-section">


<div class="container">
<div class="row justify-content-center mb-5 pb-3">
<div class="col-md-7 heading-section ftco-animate text-center">
<h3 class="subheading">Testimony</h3>
<h2 class="mb-1">Successful Stories</h2>
</div>
</div>
<div class="row ftco-animate">
<div class="col-md-12">
<div class="carousel-testimony owl-carousel">
<div class="item">
<div class="testimony-wrap p-4 pb-5">
<div class="text">
<p class="mb-4 pb-1 pl-4 line">Far far away, behind the word mountains, far
from the countries Vokalia and Consonantia, there live the blind texts.</p>

Page | 89
E-Fitness Hub
Indira Gandhi
National Open University

<div class="d-flex align-items-center">


<div class="user-img" style="background-image: url(images/person_1.jpg)">
<span class="quote d-flex align-items-center justify-content-center">
<i class="icon-quote-left"></i>
</span>
</div>
<div class="ml-4">
<p class="name">Gabby Smith</p>
<span class="position">Customer</span>
</div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="testimony-wrap p-4 pb-5">
<div class="text">
<p class="mb-4 pb-1 pl-4 line">Far far away, behind the word mountains, far
from the countries Vokalia and Consonantia, there live the blind texts.</p>

<div class="d-flex align-items-center">


<div class="user-img" style="background-image: url(images/person_2.jpg)">
<span class="quote d-flex align-items-center justify-content-center">
<i class="icon-quote-left"></i>
</span>
</div>
<div class="ml-4">
<p class="name">Floyd Weather</p>
<span class="position">Customer</span>
</div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="testimony-wrap p-4 pb-5">

Page | 90
E-Fitness Hub
Indira Gandhi
National Open University

<div class="text">
<p class="mb-4 pb-1 pl-4 line">Far far away, behind the word mountains, far
from the countries Vokalia and Consonantia, there live the blind texts.</p>

<div class="d-flex align-items-center">


<div class="user-img" style="background-image: url(images/person_3.jpg)">
<span class="quote d-flex align-items-center justify-content-center">
<i class="icon-quote-left"></i>
</span>
</div>
<div class="ml-4">
<p class="name">James Dee</p>
<span class="position">Customer</span>
</div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="testimony-wrap p-4 pb-5">
<div class="text">
<p class="mb-4 pb-1 pl-4 line">Far far away, behind the word mountains, far
from the countries Vokalia and Consonantia, there live the blind texts.</p>

<div class="d-flex align-items-center">


<div class="user-img" style="background-image: url(images/person_1.jpg)">
<span class="quote d-flex align-items-center justify-content-center">
<i class="icon-quote-left"></i>
</span>
</div>
<div class="ml-4">
<p class="name">Lance Roger</p>
<span class="position">Customer</span>
</div>
</div>
</div>
</div>

Page | 91
E-Fitness Hub
Indira Gandhi
National Open University

</div>
<div class="item">
<div class="testimony-wrap p-4 pb-5">
<div class="text">
<p class="mb-4 pb-1 pl-4 line">Far far away, behind the word mountains, far
from the countries Vokalia and Consonantia, there live the blind texts.</p>

<div class="d-flex align-items-center">


<div class="user-img" style="background-image: url(images/person_2.jpg)">
<span class="quote d-flex align-items-center justify-content-center">
<i class="icon-quote-left"></i>
</span>
</div>
<div class="ml-4">
<p class="name">Kenny Bufer</p>
<span class="position">Customer</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

about.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
Page | 92
E-Fitness Hub
Indira Gandhi
National Open University

namespace Fitness_Hub
{
public partial class about : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
}

coaches.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="coaches.aspx.cs" Inherits="Fitness_Hub.coaches" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style>
@media only screen and (max-width:700px){
.col-lg-3>.coach>.img{
width:80% !important;
}
}
b{
color:#fd0054 !important;
font-weight:normal !important;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<section class="hero-wrap js-fullheight" style="background-image: url('images/bg_2.jpg');">


<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-center justify-content-center">
<div class="col-md-9 ftco-animate text-center">
<h1 class="mb-3 bread">Gym Trainer</h1>
<p class="breadcrumbs"><span class="mr-2"><a href="index.aspx">Home</a></span>
<span>Coaches</span></p>
</div>

Page | 93
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
</section>

<section class="ftco-section bg-light">


<div class="container-fluid">
<div class="row justify-content-center mb-5">
<div class="col-md-7 heading-section text-center ftco-animate">
<h3 class="subheading">Shape Your Body</h3>
<h2 class="mb-1">Our Coaches</h2>
</div>
</div>
<div class="row">
<asp:Repeater ID="rpCoachesList" runat="server">
<ItemTemplate>
<div class="col-lg-3 d-flex text-center">
<div class="coach align-items-stretch">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#
Eval("TrainerImage","../Upload/images/{0}") %>' CssClass="pl-3 pr-3 img"/>
<div class="text bg-white p-4 ftco-animate">
<span class="subheading">Trainer</span>
<h3><a href="#"><%#Eval("TrainerName") %></a></h3>
<h2 style="font-size:smaller">Date of Birth: <%#Eval("TrainerDOB","{0:d}")
%></h2>
<h4 style="font-size:medium;"><b>Contact:</b><%#Eval("TrainerPhone")
%></h4>
<p>Email ID: <%#Eval("TrainerEmail") %></p>
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM
[Trainer]"></asp:SqlDataSource>
</div>
</section>

<section class="ftco-appointment">
<div class="overlay"></div>
<div class="container-wrap">
<div class="row no-gutters d-md-flex align-items-center">
Page | 94
E-Fitness Hub
Indira Gandhi
National Open University

<div class="col-md-6 d-flex align-self-stretch img" style="background-image:


url(images/about-3.jpg);">
</div>
<div class="col-md-6 appointment ftco-animate">
<h3 class="mb-3">Book a Appointment</h3>
<div class="appointment-form">
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtfname" runat="server" CssClass="form-control"
placeholder="First Name"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtlname" runat="server" CssClass="form-control"
placeholder="Last Name"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<div class="input-wrap">
<div class="icon"><span class="ion-md-calendar"></span></div>
<asp:TextBox ID="txtdate" runat="server" CssClass="form-control"
placeholder="Date" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group ml-md-4">
<div class="input-wrap">
<div class="icon"><span class="ion-ios-clock"></span></div>
<asp:TextBox ID="txttime" runat="server" CssClass="form-control"
placeholder="Time" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtphone" runat="server" CssClass="form-control"
placeholder="Phone" TextMode="Phone"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtmsg" Columns="30" Rows="2" runat="server"
CssClass="form-control" placeholder="Message" TextMode="MultiLine"></asp:TextBox>
</div>
<div class="form-group ml-md-4">

Page | 95
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Button ID="appointment" runat="server" CssClass="btn btn-primary py-3 px-


4" Text="Book" OnClick="appointment_Click" />
<br />
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:Label ID="lblmsg" runat="server" Text=""></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

contact.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="contact.aspx.cs" Inherits="Fitness_Hub.contact" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<section class="hero-wrap js-fullheight" style="background-image: url('images/bg_2.jpg');">


<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-center justify-content-center">
<div class="col-md-9 ftco-animate text-center">
<h1 class="mb-3 bread">Contact Us</h1>
<p class="breadcrumbs"><span class="mr-2"><a href="index.aspx">Home</a></span>
<span>Contact</span></p>
</div>
</div>
</div>
</section>

Page | 96
E-Fitness Hub
Indira Gandhi
National Open University

<section class="ftco-section contact-section">


<div class="container">
<div class="row block-9">
<div class="col-md-4 contact-info ftco-animate bg-light p-4">
<div class="row">
<div class="col-md-12 mb-4">
<h2 class="h4">Contact Information</h2>
</div>
<div class="col-md-12 mb-3">
<p><span>Address:</span> 198 West 21th Street, Suite 721 New York NY
10016</p>
</div>
<div class="col-md-12 mb-3">
<p><span>Phone:</span> <a href="tel://1234567920">+ 1235 2355 98</a></p>
</div>
<div class="col-md-12 mb-3">
<p><span>Email:</span> <a
href="mailto:info@yoursite.com">info@yoursite.com</a></p>
</div>
<div class="col-md-12 mb-3">
<p><span>Website:</span> <a href="#">yoursite.com</a></p>
</div>
</div>
</div>
<div class="col-md-1"></div>
<div class="col-md-6 ftco-animate">
<div class="contact-form">
<div class="row">
<div class="col-md-6">
<div class="form-group pl-3" style="border:1px solid #fd0054;">
<asp:TextBox ID="txtname" runat="server" CssClass="form-control"
placeholder="Your Name"></asp:TextBox>
</div>
</div>
<div class="col-md-6">
<div class="form-group pl-3" style="border:1px solid #fd0054;">
<asp:TextBox ID="txtemail" runat="server" CssClass="form-control"
placeholder="Your Email" TextMode="Email"></asp:TextBox>
</div>
</div>
</div>
<div class="form-group pl-3" style="border:1px solid #fd0054;">

Page | 97
E-Fitness Hub
Indira Gandhi
National Open University

<asp:TextBox ID="txtsubject" runat="server" CssClass="form-control"


placeholder="Your Subject"></asp:TextBox>
</div>
<div class="form-group pl-3 pt-2" style="border:1px solid #fd0054;">
<asp:TextBox ID="txtmsg" Columns="30" Rows="7" runat="server"
CssClass="form-control" placeholder="Message" TextMode="MultiLine"></asp:TextBox>
</div>
<div class="form-group text-center">
<asp:Button ID="btnsubmit" runat="server" CssClass="btn btn-primary py-3 px-5"
Text="Send Message" OnClick="btnsubmit_Click"/>
</div>
</div>
</div>
</div>
</div>
</section>

<div id="map" class="map"></div>


</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

contact.aspx.cs

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

namespace Fitness_Hub
{
public partial class contact : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

Page | 98
E-Fitness Hub
Indira Gandhi
National Open University

protected void btnsubmit_Click(object sender, EventArgs e)


{
using (MailMessage mm = new MailMessage("sender@gmail.com", "receiver@gmail.com"))
{
mm.Subject = txtsubject.Text;
mm.Body = "Name = "+txtname.Text+ "<br> Email Id = "+txtemail.Text+ "<br>Message =
" +txtmsg.Text;
mm.IsBodyHtml = false;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.EnableSsl = true;
NetworkCredential NetworkCred = new NetworkCredential("sender@gmail.com",
"senderpassword");
smtp.UseDefaultCredentials = true;
smtp.Credentials = NetworkCred;
smtp.Port = 587;
smtp.Send(mm);
ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Email sent.');", true);
}
}
}
}
login.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="Login.aspx.cs" Inherits="Fitness_Hub.Login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<section class="hero-wrap js-fullheight" style="background-image: url('images/bg_2.jpg'); opacity:
0.7;">
<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-center justify-content-center">
<div class="col-md-12 ftco-animate text-center pt-5" style="padding-top:100px;">
<h1 class="text-white font-weight-bold mb-3" style="-webkit-text-stroke: 2px #fd0054;
font-size:55pt;">Login Form</h1>

Page | 99
E-Fitness Hub
Indira Gandhi
National Open University

<asp:TextBox ID="txtemail" runat="server" CssClass="col-md-12 mt-5 mb-3"


TextMode="Email" Width="250" placeholder="Enter Email Id" Font-Size="Larger"></asp:TextBox>
<div class="col-12"></div>
<asp:TextBox ID="txtpass" runat="server" CssClass="col-md-12" TextMode="Password"
Width="250" placeholder="Enter Password" Font-Size="Larger"></asp:TextBox>
</div>
<div class="col-md-12 ftco-animate text-center" style="margin-top:-10%;">
<asp:Button ID="btnPage" runat="server" CssClass="btn btn-success mr-5"
Text="Normal Login" Width="200" Font-Size="Larger" OnClick="btnPage_Click"/>
<asp:Button ID="btnpanel" runat="server" CssClass="btn btn-danger" Text="Panel
Login" Width="200" Font-Size="Larger" OnClick="btnpanel_Click"/>
<div class="col-md-12"></div>
<asp:Label ID="lblmsg" runat="server" Text="" Font-Size="30px" Font-
Bold="true"></asp:Label>
</div>
</div>
</div>
</section>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

login.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.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub
{

Page | 100
E-Fitness Hub
Indira Gandhi
National Open University

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


{
protected void Page_Load(object sender, EventArgs e)
{
Session.RemoveAll();
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnPage_Click(object sender, EventArgs e)


{
try
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
con.Open();

SqlCommand cmd2 = new SqlCommand("select UserStatus from [User]", con);

Session["myval"] = cmd2.ExecuteScalar();

lblmsg.Text = Convert.ToString(Session["myval"]);

SqlCommand cmd = new SqlCommand("spUserLog", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "SELECTLOG");

SqlParameter p3 = new SqlParameter("@UserEmail", txtemail.Text);

SqlParameter p4 = new SqlParameter("@UserPassword", txtpass.Text);

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p3);

cmd.Parameters.Add(p4);

SqlDataReader rd = cmd.ExecuteReader();
Page | 101
E-Fitness Hub
Indira Gandhi
National Open University

if (rd.HasRows && lblmsg.Text=="True")

{
rd.Read();

Session["id"] = txtemail.Text;

FormsAuthentication.RedirectFromLoginPage(txtemail.Text, true);

Response.Redirect("index.aspx");

Session.RemoveAll();
}

else
{
lblmsg.ForeColor = System.Drawing.Color.Red;
lblmsg.Text = "Invalid Username or Password";
}
}
}
catch (Exception ex)
{
lblmsg.Text = ex.Message;
}
}

protected void btnpanel_Click(object sender, EventArgs e)


{
try
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
con.Open();

SqlCommand cmd = new SqlCommand("spUserLog", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "SELECTLOG");

SqlParameter p3 = new SqlParameter("@UserEmail", txtemail.Text);


Page | 102
E-Fitness Hub
Indira Gandhi
National Open University

SqlParameter p4 = new SqlParameter("@UserPassword", txtpass.Text);

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p3);

cmd.Parameters.Add(p4);

SqlDataReader rd = cmd.ExecuteReader();

if (rd.HasRows)

{
rd.Read();

Session["id"] = txtemail.Text;

FormsAuthentication.RedirectFromLoginPage(txtemail.Text, true);

Response.Redirect("user/Dashboard.aspx");

Session.RemoveAll();

else
{
lblmsg.ForeColor = System.Drawing.Color.Yellow;
lblmsg.Text = "Invalid Username or Password";
}
}
}
catch (Exception ex)
{
lblmsg.Text = ex.Message;
}
}
}
}

Order.aspx

Page | 103
E-Fitness Hub
Indira Gandhi
National Open University

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="order.aspx.cs" Inherits="Fitness_Hub.order" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>
#ContentPlaceHolder1_genderDDlist > tbody > tr > td {
font-size: 11pt;
line-height: 10pt;
width: 50pt !important;
padding-left: 2% !important;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper pt-5" style="background:linear-gradient(141deg, #9fb8ad 0%, #1fc8db
51%, #2cb5e8 75%);">
<div class="page-breadcrumb pt-5">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title"></h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.aspx">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Order</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">
<label for="fname" class="col-sm-5 text-right control-label col-form-label"
style="font-size:22pt;">Order Name</label>
<div class="col-sm-7">
Page | 104
E-Fitness Hub
Indira Gandhi
National Open University

<asp:TextBox ID="txtprname" runat="server" CssClass="form-control pl-3"


placeholder="Order Name Here" Width="350"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-5 text-right control-label col-form-label"
style="font-size:22pt;">Your Number</label>
<div class="col-sm-7">
<asp:TextBox ID="txtnum" runat="server" CssClass="form-control pl-3"
placeholder="User Number Here" Width="350" TextMode="Number"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-5 text-right control-label col-form-label"
style="font-size:22pt;">Order Date</label>
<div class="col-sm-7">
<asp:TextBox ID="txtdate" runat="server" CssClass="form-control pl-3"
placeholder="Order Date Here" Width="350" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-5 text-right control-label col-form-label"
style="font-size:22pt;">Select Product</label>
<div class="col-sm-7">
<asp:DropDownList ID="ddsup" runat="server" CssClass="form-control"
Width="350">
</asp:DropDownList>
</div>
</div>
</div>
<div class="">
<div class="card-body text-center">
<asp:Button ID="btnsub" runat="server" Text="Submit" CssClass="btn btn-
primary" Font-Size="Larger" Width="150" OnClick="btnsub_Click"/>
<br />
<asp:Label ID="lblmsg" runat="server" Text="" Font-
Size="Large"></asp:Label>
</div>
</div>
</div>
</div>
</div>

Page | 105
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
<br /><br /><br /><br /><br />
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

order.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub
{
public partial class order : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetProduct();
}
txtdate.Text = DateTime.Now.ToString("dd-MM-yyyy");
}
public void GetProduct()
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
string com = "Select * from Inventory";
con.Open();
SqlDataAdapter adpt = new SqlDataAdapter(com, con);
DataTable dt = new DataTable();
adpt.Fill(dt);

Page | 106
E-Fitness Hub
Indira Gandhi
National Open University

ddsup.DataSource = dt;
ddsup.DataBind();
ddsup.DataTextField = "ProductName";
ddsup.DataValueField = "ProductId";
ddsup.DataBind();
}
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnsub_Click(object sender, EventArgs e)


{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spOrder", con);
cmd.CommandType = CommandType.StoredProcedure;

try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@OrderName", txtprname.Text);
SqlParameter p3 = new SqlParameter("@OrderId", lblmsg.Text);
SqlParameter p4 = new SqlParameter("@Phone", txtnum.Text);
SqlParameter p5 = new SqlParameter("@ProductId", ddsup.SelectedItem.Value);
SqlParameter p6 = new SqlParameter("@OrderDate", txtdate.Text);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);

int k = cmd.ExecuteNonQuery();
if (k != 0)
{
Response.Write("<script>var str = 'Order has been Placed Successfully!!'; var result =
str.fontcolor(green); alert(str)</script>");
txtprname.Text = "";
Page | 107
E-Fitness Hub
Indira Gandhi
National Open University

txtnum.Text = "";
ddsup.SelectedIndex = -1;
}
}
catch (Exception ex)
{
lblmsg.Text = ex.ToString();
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
}
}
}

product.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="products.aspx.cs" Inherits="Fitness_Hub.program" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


<style>
@media only screen and (min-width:800px) {
#Image1 {
margin-left: 0% !important;
padding-left: 0% !important;
}
}
.text>p>b{
color:#fd0054 !important;
font-weight:normal !important;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<section class="hero-wrap js-fullheight" style="background-image: url('images/bg_2.jpg');">


<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-center justify-content-center">
<div class="col-md-9 ftco-animate text-center">
<h1 class="mb-1 bread">Our Products</h1>

Page | 108
E-Fitness Hub
Indira Gandhi
National Open University

<p class="breadcrumbs"><span class="mr-2"><a href="index.aspx">Home</a></span>


<span>Products</span></p>
</div>
</div>
</div>
</section>

<section class="ftco-section">
<div class="container-fluid">
<div class="row">
<asp:Repeater ID="rpProductList" runat="server">
<ItemTemplate>
<div class="col-md-6 col-lg-4 text-center">
<div class="package-program ftco-animate">
<a href="order.aspx" class="img d-flex justify-content-center align-items-center">
<asp:Image ID="Image1" runat="server" ImageUrl='<%#
Eval("ProductImage","../Upload/images/{0}") %>' CssClass="text-center primary-image"
Width="100%" Height="350"/>
<span style="position:absolute; margin-left:0%;">Order Now</span>
</a>
<div class="text mt-3">
<h2><a href="#"><%#Eval("ProductName") %></a></h2>
<h4>PRICE: <%#Eval("ProductAmount") %></h4>
<span>(ID: <%#Eval("ProductId") %>)</span>
<p style="font-size:large;">Our selling partner <b><%#Eval("SupplierName")
%></b> has supplied us <br />
<b><%#Eval("ProductName") %></b> to provide users a good quality of
proteins/ natural supplements needed.</p>
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT ProductId, ProductName, ProductImage,
ProductAmount, ProductQuantity, SupplierName FROM [Inventory] inner join [Supplier] on
Inventory.SupplierId=Supplier.SupplierId WHERE ([ProductStatus] = @ProductStatus)">
<SelectParameters>
<asp:Parameter DefaultValue="True" Name="ProductStatus" Type="Boolean" />
</SelectParameters>
</asp:SqlDataSource>

Page | 109
E-Fitness Hub
Indira Gandhi
National Open University

</div>
<div class="row mt-5">
<div class="col text-center">
<div class="block-27">
<ul>
<li><a href="#">&lt;</a></li>
<li class="active"><span>1</span></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&gt;</a></li>
</ul>
</div>
</div>
</div>
</div>
</section>

<section class="ftco-appointment">
<div class="overlay"></div>
<div class="container-wrap">
<div class="row no-gutters d-md-flex align-items-center">
<div class="col-md-6 d-flex align-self-stretch img" style="background-image:
url(images/about-3.jpg);">
</div>
<div class="col-md-6 appointment ftco-animate">
<h3 class="mb-3">Book a Appointment</h3>
<div class="appointment-form">
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtfname" runat="server" CssClass="form-control"
placeholder="First Name"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtlname" runat="server" CssClass="form-control"
placeholder="Last Name"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<div class="input-wrap">
<div class="icon"><span class="ion-md-calendar"></span></div>
Page | 110
E-Fitness Hub
Indira Gandhi
National Open University

<asp:TextBox ID="txtdate" runat="server" CssClass="form-control"


placeholder="Date" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group ml-md-4">
<div class="input-wrap">
<div class="icon"><span class="ion-ios-clock"></span></div>
<asp:TextBox ID="txttime" runat="server" CssClass="form-control"
placeholder="Time" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtphone" runat="server" CssClass="form-control"
placeholder="Phone" TextMode="Phone"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtmsg" Columns="30" Rows="2" runat="server"
CssClass="form-control" placeholder="Message" TextMode="MultiLine"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:Button ID="appointment" runat="server" CssClass="btn btn-primary py-3 px-
4" Text="Book" OnClick="appointment_Click1" />
<br />
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:Label ID="lblmsg" runat="server" Text=""></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

Page | 111
E-Fitness Hub
Indira Gandhi
National Open University

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

namespace Fitness_Hub
{
public partial class program : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
rpProductList.DataSource = SqlDataSource1;
rpProductList.DataBind();
txtdate.Text = DateTime.Now.ToString("dd-MM-yyyy");
txttime.Text = DateTime.Now.ToShortTimeString();
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void appointment_Click1(object sender, EventArgs e)


{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spAppointment", con);
cmd.CommandType = CommandType.StoredProcedure;

try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@FName", txtfname.Text);

Page | 112
E-Fitness Hub
Indira Gandhi
National Open University

SqlParameter p3 = new SqlParameter("@LName", txtlname.Text);


SqlParameter p4 = new SqlParameter("@Date", txtdate.Text);
SqlParameter p5 = new SqlParameter("@Time", txttime.Text);
SqlParameter p6 = new SqlParameter("@Phone", txtphone.Text);
SqlParameter p7 = new SqlParameter("@Message", txtmsg.Text);
SqlParameter p8 = new SqlParameter("@AppointmentId", lblmsg.Text);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);

int k = cmd.ExecuteNonQuery();
if (k != 0)
{
lblmsg.Text = "<h2 style='color:white'>Appointment Booked Succesfully!!</h2>";
txtfname.Text = "";
txtlname.Text = "";
txtmsg.Text = "";
txtphone.Text = "";
}
}
catch (Exception ex)
{
lblmsg.Text = ex.ToString();
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
}
}
}

Schedule.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="schedule.aspx.cs" Inherits="Fitness_Hub.schedule" %>

Page | 113
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<%--<section class="ftco-section">

</section>--%>

<section class="hero-wrap js-fullheight" style="background-image: url('images/bg_2.jpg');">


<div class="overlay"></div>
<div class="container">
<div class="row no-gutters slider-text js-fullheight align-items-center justify-content-center">
<div class="col-md-9 ftco-animate text-center">
<h1 class="mb-3 bread">Class Schedule</h1>
<p class="breadcrumbs"><span class="mr-2"><a href="index.aspx">Home</a></span>
<span>Schedule</span></p>
</div>
</div>
</div>
</section>

<section class="ftco-section mt-4" style="padding: 0px !important;">


<div class="container-fluid" runat="server" id="divcategory">
<div class="row">
<div class="col-md-6 col-lg-4 text-center">
<div class="package-program ftco-animate">
<a href="#" class="img d-flex justify-content-center align-items-center">
<img src="Upload/begin.jpg" height="350" width="100%" class="text-center
primary-image">
<span style="position: absolute; margin-left: 0%; width: 93%; height: 55%; opacity:
0.5; font-size: 45pt; color: white;">BEGINNERS</span>
</a>
<div class="text mt-3">
<h2>

Page | 114
E-Fitness Hub
Indira Gandhi
National Open University

<asp:LinkButton ID="btnbegin" runat="server" Text="BEGINNER"


OnClick="btnbegin_Click"></asp:LinkButton></h2>
<p style="font-size: large;">
This panel is for the <b>BEGINNERS</b> who joined
<br />
our Beginner's Plan. Click it to view more if you are a beginner otherwise select
only the schedule you have applied for, Good Luck!
</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 text-center">
<div class="package-program ftco-animate">
<a href="order.aspx" class="img d-flex justify-content-center align-items-center">
<img src="Upload/advance.jpg" height="350" width="100%" class="text-center
primary-image">
<span style="position: absolute; margin-left: 0%; width: 93%; height: 55%; opacity:
0.5; font-size: 45pt; color: white;">ADVANCED</span>
</a>
<div class="text mt-3">
<h2>
<asp:LinkButton ID="btnadvance" runat="server" Text="ADVANCED"
OnClick="btnadvance_Click"></asp:LinkButton></h2>
<p style="font-size: large;">
This panel is for the <b>ADVANCED</b> who joined
<br />
our Advanced Plan. Click it to view more if you are a Advanced otherwise select
only the schedule you have applied for, Good Luck!
</p>
</div>
</div>
</div>
<div class="col-md-6 col-lg-4 text-center">
<div class="package-program ftco-animate">
<a href="order.aspx" class="img d-flex justify-content-center align-items-center">
<img src="Upload/profess.jpg" height="350" width="100%" class="text-center
primary-image">

Page | 115
E-Fitness Hub
Indira Gandhi
National Open University

<span style="position: absolute; margin-left: 0%; width: 93%; height: 55%; opacity:
0.5; font-size: 45pt; color: white;">PROFESSIONALS</span>
</a>
<div class="text mt-3">
<h2>
<asp:LinkButton ID="btnprofess" runat="server" Text="PROFESSIONAL"
OnClick="btnprofess_Click"></asp:LinkButton></h2>
<p style="font-size: large;">
This panel is for the <b>PROFESSIONAL</b> who joined
<br />
our Professional Plan. Click it to view more if you are a Professional otherwise
select only the schedule you have applied for, Good Luck!
</p>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid" runat="server" id="divbeginner">
<div class="row">
<asp:Repeater ID="rpBeginnerList" runat="server">
<ItemTemplate>
<div class="col-md-4 col-lg-6 col-sm-6 text-center">
<div class="package-program ftco-animate">
<a class="img d-flex justify-content-center align-items-center">
<video id="mevideo" runat="server" controls width="100%">
<source src="<%#Eval("ScheduleVideos","../Upload/videos/{0}") %>">
</video>
</a>
<div class="text mt-0" style="margin-top:0%;">
<h2><a href="#"><%#Eval("ScheduleName") %></a></h2>
<p style="font-size: large;">
<b>Day: </b> <%#Eval("ScheduleDay") %><br />
<b>Reps/Set: <%#Eval("ScheduleReps") %></b> Reps with break of 1
Minute/Set <br />
<b>Excercise Type: </b> <%#Eval("ScheduleType") %>
</p>

Page | 116
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Schedule] WHERE
([ScheduleType] = @ScheduleType)">
<SelectParameters>
<asp:Parameter DefaultValue="Beginner" Name="ScheduleType" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</div>
<div class="container-fluid" runat="server" id="divadvance">
<div class="row">
<asp:Repeater ID="rpAdvancedList" runat="server">
<ItemTemplate>
<div class="col-md-4 col-lg-6 col-sm-6 text-center">
<div class="package-program ftco-animate">
<a class="img d-flex justify-content-center align-items-center">
<video id="mevideo" runat="server" controls width="100%">
<source src="<%#Eval("ScheduleVideos","../Upload/videos/{0}") %>">
</video>
</a>
<div class="text mt-0" style="margin-top:0%;">
<h2><a href="#"><%#Eval("ScheduleName") %></a></h2>
<p style="font-size: large;">
<b>Day: </b> <%#Eval("ScheduleDay") %><br />
<b>Reps/Set: <%#Eval("ScheduleReps") %></b> Reps with break of 1
Minute/Set <br />
<b>Excercise Type: </b> <%#Eval("ScheduleType") %>
</p>
</div>
</div>
</div>
</ItemTemplate>

Page | 117
E-Fitness Hub
Indira Gandhi
National Open University

</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Schedule] WHERE
([ScheduleType] = @ScheduleType) order by ScheduleDay">
<SelectParameters>
<asp:Parameter DefaultValue="Advanced" Name="ScheduleType" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</div>
<div class="container-fluid" runat="server" id="divprofessional">
<div class="row">
<asp:Repeater ID="rpProfessionalList" runat="server">
<ItemTemplate>
<div class="col-md-4 col-lg-6 col-sm-6 text-center">
<div class="package-program ftco-animate">
<a class="img d-flex justify-content-center align-items-center">
<video id="mevideo" runat="server" controls width="100%">
<source src="<%#Eval("ScheduleVideos","../Upload/videos/{0}") %>">
</video>
</a>
<div class="text mt-0" style="margin-top:0%;">
<h2><a href="#"><%#Eval("ScheduleName") %></a></h2>
<p style="font-size: large;">
<b>Day: </b> <%#Eval("ScheduleDay") %><br />
<b>Reps/Set: <%#Eval("ScheduleReps") %></b> Reps with break of 1
Minute/Set <br />
<b>Excercise Type: </b> <%#Eval("ScheduleType") %>
</p>
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Schedule] WHERE
([ScheduleType] = @ScheduleType)">

Page | 118
E-Fitness Hub
Indira Gandhi
National Open University

<SelectParameters>
<asp:Parameter DefaultValue="Professional" Name="ScheduleType" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</div>
</section>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

Schedule.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub
{
public partial class schedule : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
rpBeginnerList.DataSource = SqlDataSource1;
rpAdvancedList.DataSource = SqlDataSource2;
rpProfessionalList.DataSource = SqlDataSource3;
rpAdvancedList.DataBind();
rpBeginnerList.DataBind();
rpProfessionalList.DataBind();

if (!IsPostBack)
{
divbeginner.Visible = false;
divadvance.Visible = false;
divprofessional.Visible = false;
}
Page | 119
E-Fitness Hub
Indira Gandhi
National Open University

if (Session["id"] == null)
{
Response.Redirect("Login.aspx");
}
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnbegin_Click(object sender, EventArgs e)


{
divadvance.Visible = false;
divprofessional.Visible = false;
divcategory.Visible = false;
divbeginner.Visible = true;
}

protected void btnadvance_Click(object sender, EventArgs e)


{
divbeginner.Visible = false;
divadvance.Visible = true;
divprofessional.Visible = false;
divcategory.Visible = false;
}

protected void btnprofess_Click(object sender, EventArgs e)


{
divbeginner.Visible = false;
divadvance.Visible = false;
divprofessional.Visible = true;
divcategory.Visible = false;
}
}
}

signup.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"


CodeBehind="signup.aspx.cs" Inherits="Fitness_Hub.signup" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

Page | 120
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<section class="ftco-appointment pt-4 pb-0 pl-1 pr-1" style="background: linear-gradient(45deg,


#fd6b00 0%, #808080 40%);">
<div class="overlay"></div>
<div class="container-wrap pt-0">
<div class="row no-gutters d-md-flex align-items-center pt-1">
<div class="col-md-3"></div>
<div class="col-md-7 appointment ftco-animate fadeInUp ftco-animated">
<h1 class="mb-4 text-white text-center font-weight-normal">Register Here</h1>
<div class="appointment-form">
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtname" runat="server" CssClass="form-control"
placeholder="Username" Font-Size="13pt"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtDOB" runat="server" CssClass="form-control"
placeholder="D.O.B" TextMode="Date" Font-Size="13pt"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:RadioButtonList runat="server" class="form-control" ID="genderDDlist"
RepeatDirection="Horizontal" Font-Size="13pt" CellSpacing="10">
<asp:ListItem Value="Male">Male</asp:ListItem>
<asp:ListItem Value="Female">Female</asp:ListItem>
</asp:RadioButtonList>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtPhone" runat="server" CssClass="form-control"
placeholder="Phone" TextMode="Phone" Font-Size="13pt"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:FileUpload id="filephoto" runat="server" CssClass="form-control" Font-
Size="13pt"/>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtHeight" runat="server" CssClass="form-control"
placeholder="Height" Font-Size="13pt"></asp:TextBox>
</div>
Page | 121
E-Fitness Hub
Indira Gandhi
National Open University

</div>
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtWeight" runat="server" CssClass="form-control"
placeholder="Weight" TextMode="Number" Font-Size="13pt"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtmail" runat="server" CssClass="form-control"
placeholder="Email" TextMode="Email" Font-Size="13pt"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:TextBox ID="txtpass" runat="server" CssClass="form-control"
placeholder="Enter Password" TextMode="Password" Font-Size="13pt"></asp:TextBox>
</div>
<div class="form-group ml-md-4">
<asp:TextBox ID="txtconpass" runat="server" CssClass="form-control"
placeholder="Confirm Password" TextMode="Password" Font-Size="13pt"></asp:TextBox>
</div>
</div>
<div class="d-md-flex">
<div class="form-group">
<asp:Button id="btnSubmit" runat="server" CssClass="btn btn-primary py-3 px-4"
OnClick="btnSubmit_Click" Text="Submit"/>
</div>
</div>
<div class="d-md-flex">
<div class="form-group text-center">
<asp:Label ID="lblmsg" runat="server" Text="" Font-Size="20pt"></asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
<asp:Label ID="lblresult" runat="server" Text="" Font-Size="0.001"></asp:Label>
</section>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>

Page | 122
E-Fitness Hub
Indira Gandhi
National Open University

signup.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub
{
public partial class signup : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnSubmit_Click(object sender, EventArgs e)


{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spUser", con);
cmd.CommandType = CommandType.StoredProcedure;

string ImageFile = "";


if (filephoto.HasFile)
{
string imgPath = "~/Upload/images/";
string thumbPath = "~/Upload/thumbnails/";

ImageFile = Path.GetFileName(Server.MapPath(filephoto.PostedFile.FileName));
ImageFile = ImageFile.Replace(" ", "-");
ImageFile = System.DateTime.Now.ToString("yyyyMMddHHmmss") + "-" + ImageFile;

Page | 123
E-Fitness Hub
Indira Gandhi
National Open University

thumbPath = thumbPath + ImageFile;


//System.Drawing.Image objImage = ScaleImage(bmpUploadedImage, 170);

imgPath = imgPath + ImageFile;


filephoto.SaveAs(MapPath(imgPath));
}
else
{
ImageFile = "";
ImageFile = "";
}
try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "INSERT");


SqlParameter p2 = new SqlParameter("@UserName", txtname.Text);
SqlParameter p3 = new SqlParameter("@UserDOB",
Convert.ToDateTime(txtDOB.Text.ToString()));
SqlParameter p4 = new SqlParameter("@UserEmail", txtmail.Text);
SqlParameter p5 = new SqlParameter("@UserGender", genderDDlist.SelectedItem.Value);
SqlParameter p6 = new SqlParameter("@UserPhone", txtPhone.Text);
SqlParameter p7 = new SqlParameter("@UserImage", ImageFile);
SqlParameter p8 = new SqlParameter("@UserHeight",
Convert.ToDecimal(txtHeight.Text));
SqlParameter p9 = new SqlParameter("@UserWeight",txtWeight.Text);
SqlParameter p10 = new SqlParameter("@UserId", lblmsg.Text);
SqlParameter p11 = new SqlParameter("@UserPassword", txtconpass.Text);
SqlParameter p12 = new SqlParameter("@UserStatus", lblresult.Text);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);
cmd.Parameters.Add(p9);
cmd.Parameters.Add(p10);
cmd.Parameters.Add(p11);
cmd.Parameters.Add(p12);

Page | 124
E-Fitness Hub
Indira Gandhi
National Open University

int k = cmd.ExecuteNonQuery();

if (k != 0)
{
lblmsg.Text = "You are Successfully Registered";
lblmsg.ForeColor = System.Drawing.Color.LightGreen;
}
}
catch (Exception)
{
lblmsg.Text = "Wrong Input/ All Columns Must Be Filled!!";
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
}
}
}

Global.asax.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Routing;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.UI;

namespace Fitness_Hub
{
public class Global : System.Web.HttpApplication
{

protected void Application_Start(object sender, EventArgs e)


{
RouteConfig.RegisterRoutes(System.Web.Routing.RouteTable.Routes);
ScriptManager.ScriptResourceMapping.AddDefinition("jquery",
new ScriptResourceDefinition
{
Path = "~/js/jquery.min.js",

Page | 125
E-Fitness Hub
Indira Gandhi
National Open University

DebugPath = "~/js/jquery.min.js",
CdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.min.js",
CdnDebugPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.1.js"
});
}

protected void Session_Start(object sender, EventArgs e)


{

protected void Application_BeginRequest(object sender, EventArgs e)


{

protected void Application_AuthenticateRequest(object sender, EventArgs e)


{

protected void Application_Error(object sender, EventArgs e)


{

protected void Session_End(object sender, EventArgs e)


{

protected void Application_End(object sender, EventArgs e)


{

}
}
}

web.config

<?xml version="1.0" encoding="utf-8"?>

Page | 126
E-Fitness Hub
Indira Gandhi
National Open University

<!--
For more information on how to configure your ASP.NET application, please visit
https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648"/>
</requestFiltering>
</security>
</system.webServer>
<system.web>
<compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime maxRequestLength="1048576" />
</system.web>
<connectionStrings>
<add name="GymCon" connectionString="Data Source=PK\SQLEXPRESS;Initial
Catalog=efitness;Integrated Security=True;Connect
Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFa
ilover=False" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider,
Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider,
Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
warningLevel="4" compilerOptions="/langversion:default /nowarn:41008
/define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
</compilers>
</system.codedom>

</configuration>

Page | 127
E-Fitness Hub
Indira Gandhi
National Open University

Admin/index.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs"


Inherits="Fitness_Hub.admin.index" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Login</title>
<!--favicon-->
<link rel="icon" href="assets\images\favicon.ico" type="image/x-icon" />
<!-- Bootstrap core CSS-->
<link href="assets\css\bootstrap.min.css" rel="stylesheet" />
<!-- animate CSS-->
<link href="assets\css\animate.css" rel="stylesheet" type="text/css" />
<!-- Icons CSS-->
<link href="assets\css\icons.css" rel="stylesheet" type="text/css" />
<!-- Custom Style-->
<link href="assets\css\app-style.css" rel="stylesheet" />
<style type="text/css">
body {
background-size: 1400px !important;
background-image: url('assets/images/gallery/gym.jpg');
margin-top: -35px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.9);
border-radius: 0px;
background-color: #f4f4f4;
}

::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5;
}

Page | 128
E-Fitness Hub
Indira Gandhi
National Open University

::-webkit-scrollbar-thumb {
border-radius: 0px;
background-color: #303952;
background-image: -webkit-linear-gradient(90deg,transparent,rgba(888, 888, 0, 0.4)
50%,transparent,transparent)
}

.animated {
animation-duration: 1.5s !important;
}

.resultt {
background-color: white;
width: 400px;
margin-left: 35%;
}

.chand {
border-top-left-radius: 20px;
border-bottom-right-radius: 20px;
width: 40%;
margin-top: 15px;
margin-left: 30%
}

#wrapper {
margin-top: -58px !important;
margin-top: -15px !important;
background-size: auto;
height: 500px;
width: 100% !important;
position: absolute;
opacity: 0.6;
background-repeat: no-repeat;
}

#card101 {
margin-top: 7%;
}

.card {
border-top-left-radius: 50px !important;
Page | 129
E-Fitness Hub
Indira Gandhi
National Open University

border-bottom-right-radius: 50px !important;


opacity: 0.9 !important;
}

.card-body {
border-top-left-radius: 50px !important;
border-bottom-right-radius: 50px !important;
}

@media only screen and (max-width:800px) {


#card101 {
margin-top: 17% !important;
}
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="wrapper">
</div>
<!--wrapper-->
<div id="card101" class="text-center">
<div class="card card-authentication1 mx-auto my-5 animated bounceInDown">
<div class="card-body" style="background: linear-gradient(20deg, #682a2a, #302a68); color:
white;">
<div class="card-content p-2">
<div class="text-center">
<img src="assets\images\logo-icon.png">
</div>
<div class="card-title text-uppercase text-center py-3" style="color: white; font-family:
arial;">ADMIN (Sign In)</div>
<div class="form-group">
<div class="position-relative has-icon-right">
<label for="exampleInputUsername" class="sr-only">Username</label>
<asp:TextBox ID="txtUserName" runat="server" CssClass="form-control form-
control-rounded" placeholder="Username"></asp:TextBox>
<%--<input type="text" id="exampleInputUsername" class="form-control form-
control-rounded" placeholder="Username">--%>
<div class="form-control-position">
<i class="icon-user"></i>
</div>
</div>
</div>
Page | 130
E-Fitness Hub
Indira Gandhi
National Open University

<div class="form-group">
<div class="position-relative has-icon-right">
<label for="exampleInputPassword" class="sr-only">Password</label>
<asp:TextBox ID="txtPassword" TextMode="Password" runat="server"
CssClass="form-control form-control-rounded" placeholder="Password"></asp:TextBox>
<%--<input type="password" id="exampleInputPassword" class="form-control
form-control-rounded" placeholder="Password">--%>
<div class="form-control-position">
<i class="icon-lock"></i>
</div>
</div>
</div>
<div class="form-row mr-0 ml-0">
<div class="form-group col-6">
<div class="">
<style>
label {
padding-top: 2px !important;
color: white !important;
font-size: 13px;
margin-left: 57%;
width: 100%;
}

div.card-body {
color: black !important;
}
.chk-col-primary{
width:120% !important;
color:white !important;
border:1px solid white !important;
}
.chk-col-primary{
border:none !important;
}
.chk-col-primary > label{
font-size:12pt !important;
}
</style>
<asp:CheckBox ID="chkRememberMe" CssClass="filled-in chk-col-primary"
Font-Size="X-Large" runat="server" Text="Remember Me" ForeColor="Yellow" Checked="true"/>
</div>
</div>
Page | 131
E-Fitness Hub
Indira Gandhi
National Open University

</div>
<%--<button type="button" class="btn btn-primary btn-round btn-block waves-
effect waves-light" style="background-color: #36A047; border-color: #36A047;">Sign In</button>--
%>
<asp:Button ID="Button2" runat="server" Text="Login" CssClass="btn btn-
primary btn-round btn-block waves-effect waves-light" style="background-color: #36A047; border-
color: #36A047;" OnClick="Button2_Click"/>
<hr />
<a href="../index.aspx" style="font-size:13pt; font-weight:bold;">HOME</a>
<div class="text-center pt-3">
<asp:Label ID="lblMessage" runat="server" Text="" style="font-
size:16px;"></asp:Label>
<br/>
<a href="javascript:void()" class="btn-social btn-social-circle btn-facebook waves-
effect waves-light m-1"><i class="fa fa-facebook"></i></a>
<a href="javascript:void()" class="btn-social btn-social-circle btn-google-plus
waves-effect waves-light m-1"><i class="fa fa-google-plus"></i></a>
<a href="javascript:void()" class="btn-social btn-social-circle btn-twitter waves-
effect waves-light m-1"><i class="fa fa-twitter"></i></a>

</div>
</div>

</div>

</div>

<asp:Label ID="lblsessionname" runat="server" Font-Size="0.02px" Text=""></asp:Label>


<!--Start Back To Top Button-->
<a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i></a>
<!--End Back To Top Button-->
</div>
<!--<div class="row badge text-center" style="background-color: #34495e; width: 100%; height:
40px; opacity: 0.8; position: absolute;">
<span class="comment" style="color: white; opacity: 0.7">Enter Your
Credentials to get Access</span>
</div>--->
<!-- Bootstrap core JavaScript-->
<script src="assets\js\jquery.min.js"></script>
<script src="assets\js\popper.min.js"></script>
<script src="assets\js\bootstrap.min.js"></script>
</form>
Page | 132
E-Fitness Hub
Indira Gandhi
National Open University

</body>
</html>

Admin/index.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.IO;
using System.Drawing;

namespace Fitness_Hub.admin
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Session.RemoveAll();
if (!IsPostBack)
{
if (Request.Cookies["UserName"] != null && Request.Cookies["Password"] != null)
{
txtUserName.Text = Request.Cookies["UserName"].Value;
txtPassword.Attributes["value"] = Request.Cookies["Password"].Value;
}
}
}

public string GetConnectionString()


{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

Page | 133
E-Fitness Hub
Indira Gandhi
National Open University

protected void Button2_Click(object sender, EventArgs e)


{
try
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
if (chkRememberMe.Checked)
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(30);
Response.Cookies["Password"].Expires = DateTime.Now.AddDays(30);
}
else
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1);
Response.Cookies["Password"].Expires = DateTime.Now.AddDays(-1);

}
Response.Cookies["UserName"].Value = txtUserName.Text.Trim();
Response.Cookies["Password"].Value = txtPassword.Text.Trim();

con.Open();

SqlCommand cmd = new SqlCommand("spCheckUser", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action","Select");

SqlParameter p2 = new SqlParameter("@username", txtUserName.Text);

SqlParameter p3 = new SqlParameter("@password", txtPassword.Text);

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p2);

cmd.Parameters.Add(p3);

SqlDataReader rd = cmd.ExecuteReader();

if (rd.HasRows)

{
Page | 134
E-Fitness Hub
Indira Gandhi
National Open University

rd.Read();

lblMessage.Text = "You are Authorized.";

Session["id"] = txtUserName.Text;

FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, true);

Response.Redirect("Dashboard.aspx");

Session.RemoveAll();

else
{
lblMessage.ForeColor = System.Drawing.Color.Red;
lblMessage.Text = "Invalid Username or Password";
}
}
}

catch (Exception ex)


{
lblMessage.Text = ex.Message;
}
}
}
}

Admin/Admin.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Admin.master.cs"


Inherits="Fitness_Hub.admin.Admin" %>

<!DOCTYPE html>

<html dir="ltr" lang="en">

Page | 135
E-Fitness Hub
Indira Gandhi
National Open University

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- Favicon icon -->
<link rel="icon" type="image/png" sizes="16x16" href="../../asset/assets/images/favicon.png">
<title>E-Fitness Hub</title>
<!-- Custom CSS -->
<link href="../../asset/assets/libs/flot/css/float-chart.css" rel="stylesheet">
<link href="../../asset/dist/css/style.min.css" rel="stylesheet">
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<!-- ============================================================== -->
<!-- Preloader - style you can find in spinners.css -->
<!-- ============================================================== -->
<div class="preloader">
<div class="lds-ripple">
<div class="lds-pos"></div>
<div class="lds-pos"></div>
</div>
</div>
<div id="main-wrapper">
<!-- ============================================================== -->
<!-- Topbar header - style you can find in pages.scss -->
<!-- ============================================================== -->
<header class="topbar" data-navbarbg="skin5">
<nav class="navbar top-navbar navbar-expand-md navbar-dark">
<div class="navbar-header" data-logobg="skin5">
<!-- This is for the sidebar toggle which is visible on mobile only -->

Page | 136
E-Fitness Hub
Indira Gandhi
National Open University

<a class="nav-toggler waves-effect waves-light d-block d-md-none"


href="javascript:void(0)"><i class="ti-menu ti-close"></i></a>
<a class="navbar-brand" href="Dashboard.aspx">
<!-- Logo icon -->
<b class="logo-icon p-l-10">
<img src="../../asset/assets/images/logo-icon.png" alt="homepage" class="light-
logo" />

</b>
<span class="logo-text">
<!-- dark Logo text -->
<h3 class="light-logo mt-2 pt-1">E-Fitness Hub</h3>

</span>
</a>
<a class="topbartoggler d-block d-md-none waves-effect waves-light"
href="javascript:void(0)" data-toggle="collapse" data-target="#navbarSupportedContent" aria-
controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><i
class="ti-more"></i></a>
</div>
<div class="navbar-collapse collapse" id="navbarSupportedContent" data-
navbarbg="skin5">
<ul class="navbar-nav float-left mr-auto">
<li class="nav-item d-none d-md-block"><a class="nav-link sidebartoggler waves-
effect waves-light" href="javascript:void(0)" data-sidebartype="mini-sidebar"><i class="mdi mdi-
menu font-24"></i></a></li>

</ul>
<style>
.dropdown-item:hover{
color:#1F262D !important;
cursor:pointer;
}
.dropdown-item:focus
{
color:white !important;
background-color:#1F262D !important;

Page | 137
E-Fitness Hub
Indira Gandhi
National Open University

}
.dropdown-item:visited
{
color:white !important;
background-color:#1F262D !important;
}
.dropdown-item::after
{
color:white !important;
background-color:#1F262D !important;
}
</style>
<ul class="navbar-nav float-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-muted waves-effect waves-dark pro-pic"
href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="../../asset/assets/images/users/1.jpg" alt="user" class="rounded-circle"
width="31"></a>
<div class="dropdown-menu dropdown-menu-right animated bg-inverse"
style="width:auto;">
<asp:Label ID="lblsession" runat="server" Text="" Font-Size="Larger"
CssClass="dropdown-item text-center pt-3 text-white"></asp:Label>
<span style="width:100%;">
<asp:Button ID="btnlogout" runat="server" CssClass="dropdown-item text-center
text-white" Font-Size="Larger" Text="Logout" OnClick="btnlogout_Click"/>
</span>
</div>
</li>
</ul>
</div>
</nav>
</header>
<aside class="left-sidebar" data-sidebarbg="skin5">
<!-- Sidebar scroll-->
<div class="scroll-sidebar">
<!-- Sidebar navigation-->
<nav class="sidebar-nav">

Page | 138
E-Fitness Hub
Indira Gandhi
National Open University

<ul id="sidebarnav" class="p-t-30">


<li class="sidebar-item"><a class="sidebar-link waves-effect waves-dark sidebar-
link" href="Dashboard.aspx" aria-expanded="false"><i class="mdi mdi-view-dashboard"></i><span
class="hide-menu">Dashboard</span></a></li>

<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Trainer</span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Trainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Add Trainer </span></a></li>
<li class="sidebar-item"><a href="AllTrainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">All Trainer </span></a></li>
</ul>
</li>

<%--<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Product </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Product.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Add New Product </span></a></li>
<li class="sidebar-item"><a href="AllProduct.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">All Product </span></a></li>
</ul>
</li>--%>

<li class="sidebar-item"><a href="Expenses.aspx" class="sidebar-link"><i


class="mdi mdi-note-plus"></i><span class="hide-menu">Daily Expenses </span></a></li>

<%--<li class="sidebar-item">

Page | 139
E-Fitness Hub
Indira Gandhi
National Open University

<a class="sidebar-link has-arrow waves-effect waves-dark"


href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Payment </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Trainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Due Payment </span></a></li>
<li class="sidebar-item"><a href="AllTrainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">Payment History </span></a></li>
</ul>
</li>--%>

<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="AllUsers.aspx" aria-
expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-menu">Members </span></a>
</li>

<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Supplier </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="AddSupplier.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Add Supplier </span></a></li>
<li class="sidebar-item"><a href="AllSupplier.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">All Supplier </span></a></li>

</ul>
</li>
<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Inventory </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Products.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Add New Inventory </span></a></li>

Page | 140
E-Fitness Hub
Indira Gandhi
National Open University

<li class="sidebar-item"><a href="AllProduct.aspx" class="sidebar-link"><i


class="mdi mdi-note-plus"></i><span class="hide-menu">Approve Inventory </span></a></li>
<li class="sidebar-item"><a href="Approved.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">All Inventory </span></a></li>
</ul>
</li>

<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Order </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="AllOrder.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Total Order</span></a></li>
<li class="sidebar-item"><a href="LatestOrder.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">New Order</span></a></li>

</ul>
</li>

<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Schedule </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Schedule.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Add Schedule</span></a></li>
<li class="sidebar-item"><a href="AllSchedule.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">All Schedule</span></a></li>
</ul>
</li>
<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="Appointments.aspx" aria-
expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-menu">Appointments
</span></a>
</li>

Page | 141
E-Fitness Hub
Indira Gandhi
National Open University

<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Setting </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="ChangePassword.aspx" class="sidebar-
link"><i class="mdi mdi-note-outline"></i><span class="hide-menu">Change Password
</span></a></li>
<li class="sidebar-item"><a href="Deleted.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">History </span></a></li>
<li class="sidebar-item"><a href="index.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Logout </span></a></li>
</ul>
</li>

</ul>
</nav>
<!-- End Sidebar navigation -->
</div>
<!-- End Sidebar scroll-->
</aside>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<script src="../../asset/assets/libs/jquery/dist/jquery.min.js"></script>
<script src="../../asset/assets/libs/popper.js/dist/umd/popper.min.js"></script>
<script src="../../asset/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../../asset/assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
<script src="../../asset/assets/extra-libs/sparkline/sparkline.js"></script>
<script src="../../asset/dist/js/waves.js"></script>
<script src="../../asset/dist/js/sidebarmenu.js"></script>
<script src="../../asset/dist/js/custom.min.js"></script>
<script src="../../asset/assets/libs/flot/excanvas.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.pie.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.time.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.stack.js"></script>

Page | 142
E-Fitness Hub
Indira Gandhi
National Open University

<script src="../../asset/assets/libs/flot/jquery.flot.crosshair.js"></script>
<script src="../../asset/assets/libs/flot.tooltip/js/jquery.flot.tooltip.min.js"></script>
<script src="../../asset/dist/js/pages/chart/chart-page-init.js"></script>
<asp:ContentPlaceHolder ID="scripts" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>

Admin/Admin.Master.cs

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

namespace Fitness_Hub.admin
{
public partial class Admin : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["id"] == null)
{
Response.Redirect("index.aspx");
}
else
{
lblsession.Text = "<h4>Welcome, "+Session["id"].ToString()+ "</h4>";
}
}

protected void btnlogout_Click(object sender, EventArgs e)


{
Session.RemoveAll();
Response.Redirect("index.aspx");
}
}
Page | 143
E-Fitness Hub
Indira Gandhi
National Open University

Admin/AddSupplier.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeFile="AddSupplier.aspx.cs"
Inherits="Fitness_Hub.admin.AddSupplier" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">

Page | 144
E-Fitness Hub
Indira Gandhi
National Open University

<label for="fname" class="col-sm-3 text-right control-label col-form-


label">Name</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtname" class="form-control"
placeholder="Name Here" Width="350"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">D.O.B</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtage" class="form-control"
placeholder="Age Here" Width="350" TextMode="Date"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Phone</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtphone" class="form-control"
placeholder="Phone Here" Width="350" TextMode="Number"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Address</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtaddress" class="form-control"
placeholder="Address Here" Width="350" TextMode="MultiLine"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Email</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtemail" class="form-control"
placeholder="Email Here" Width="350" TextMode="Email"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Enter Password</label>
<div class="col-sm-9">
Page | 145
E-Fitness Hub
Indira Gandhi
National Open University

<asp:TextBox runat="server" ID="txtpass" class="form-control"


placeholder="Password Here" Width="350" TextMode="Password"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Confirm Password</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtpassconf" class="form-control"
placeholder="Confirm Password" Width="350" TextMode="Password"></asp:TextBox>
</div>
</div>
</div>
<div class="border-top">
<div class="card-body text-center">
<asp:Button ID="Button1" runat="server" Text="Next" class="btn btn-primary"
Width="100" OnClick="Button1_Click"/>
<br />
<asp:Label ID="lblmessage" runat="server" Text="" Font-Size="Large">
</asp:Label>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/AddSupplier.aspx.cs

using System;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

Page | 146
E-Fitness Hub
Indira Gandhi
National Open University

namespace Fitness_Hub.admin
{
public partial class AddSupplier : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void Button1_Click(object sender, EventArgs e)


{
lblmessage.Text = "";
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spSupplier", con);
cmd.CommandType = CommandType.StoredProcedure;

try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@SupplierName", txtname.Text);
SqlParameter p3 = new SqlParameter("@SupplierDOB", txtage.Text);
SqlParameter p4 = new SqlParameter("@SupplierEmail", txtemail.Text);
SqlParameter p6 = new SqlParameter("@SupplierPhone", txtphone.Text);
SqlParameter p8 = new SqlParameter("@SupplierAddress", txtaddress.Text);
SqlParameter p9 = new SqlParameter("@SupplierPassword", txtpassconf.Text);
SqlParameter p10 = new SqlParameter("@SupplierId", lblmessage.Text);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p8);
cmd.Parameters.Add(p9);
cmd.Parameters.Add(p10);
Page | 147
E-Fitness Hub
Indira Gandhi
National Open University

int k = cmd.ExecuteNonQuery();
if (k != 0)
{
string str = "Supplier has been successfully added!!";
Response.Write("<script language=javascript>alert('" + str + "');</script>");
txtaddress.Text = "";
txtage.Text = "";
txtemail.Text = "";
txtname.Text = "";
txtpass.Text = "";
txtpassconf.Text = "";
txtphone.Text = "";
lblmessage.Text = "";
}
}
catch (Exception)
{
lblmessage.Text = "Trainer is not added/ Wrong Inputs!!";
lblmessage.ForeColor = System.Drawing.Color.CornflowerBlue;
}
}
}
}
}

Admin/AllOrder.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="AllOrder.aspx.cs" Inherits="Fitness_Hub.admin.AllOrder"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">

Page | 148
E-Fitness Hub
Indira Gandhi
National Open University

<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Product</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="OrderId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:BoundField DataField="OrderName" HeaderText="OrderName"
SortExpression="OrderName">
<ItemStyle Width="200" />
</asp:BoundField>
<asp:TemplateField HeaderText=" Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>

Page | 149
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Image ID="Image1" ImageUrl='<%#


Eval("ProductImage","../Upload/images/{0}") %>' Height="25.4%" Width="80%" CssClass="text-
center" runat="server" />
<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"
Text="Download" CommandArgument='<%# Eval("ProductImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile" Width="80%"></asp:LinkButton>
</ItemTemplate>

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="ProductName" HeaderText="ProductName"
SortExpression="ProductName">
<ItemStyle Width="150" />
</asp:BoundField>
<asp:TemplateField HeaderText="Order Date" ItemStyle-CssClass="text-center pds"
SortExpression="OrderDate">
<ItemTemplate>
<asp:Label ID="lbldate" runat="server" Text='<%#Eval("OrderDate","{0:dd
MMM yyyy}") %>' Width="150"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdateedit" runat="server" TextMode="Date"
Text='<%#Bind("OrderDate") %>' Width="100"></asp:TextBox>
</EditItemTemplate>
<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone"
/>
<asp:CommandField ShowDeleteButton="True" DeleteText="Discard">
<ItemStyle Font-Size="12pt" ForeColor="Red" Width="100px"></ItemStyle>
</asp:CommandField>
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

Page | 150
E-Fitness Hub
Indira Gandhi
National Open University

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT OrderId, OrderDate, OrderName, Phone,
ProductName, ProductImage FROM [Order] inner join Inventory on
[Order].ProductId=Inventory.ProductId" DeleteCommand="DELETE FROM [Order] WHERE
[OrderId] = @OrderId" InsertCommand="INSERT INTO [Order] ([OrderName], [ProductId], [Phone])
VALUES (@OrderName, @ProductId, @Phone)" UpdateCommand="UPDATE [Order] SET
[OrderName] = @OrderName, [OrderDate]=@OrderDate, [Phone] = @Phone WHERE [OrderId] =
@OrderId">
<DeleteParameters>
<asp:Parameter Name="OrderId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="OrderName" Type="String" />
<asp:Parameter Name="Phone" Type="String" />
<asp:Parameter Name="OrderDate" Type="DateTime" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="OrderName" Type="String" />
<asp:Parameter Name="Phone" Type="String" />
<asp:Parameter Name="OrderDate" Type="DateTime" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/AllOrder.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;

Page | 151
E-Fitness Hub
Indira Gandhi
National Open University

using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class AllOrder : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}

Admin/AllProduct.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeFile="AllProduct.aspx.cs" Inherits="Fitness_Hub.admin.AllProduct"
%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Product</li>
</ol>

Page | 152
E-Fitness Hub
Indira Gandhi
National Open University

</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ProductId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:CommandField HeaderText="Edit" ShowDeleteButton="True"
ShowEditButton="True" />
<asp:BoundField DataField="ProductName" HeaderText="Product Name"
SortExpression="ProductName">
</asp:BoundField>
<asp:TemplateField HeaderText=" Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("ProductImage","../Upload/images/{0}") %>' Height="200" Width="300" CssClass="text-center"
runat="server" />

Page | 153
E-Fitness Hub
Indira Gandhi
National Open University

<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"


Text="Download" CommandArgument='<%# Eval("ProductImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile" Width="80%"></asp:LinkButton>
</ItemTemplate>

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="ProductQuantity" HeaderText="Quantity"
SortExpression="ProductQuantity">
</asp:BoundField>
<asp:BoundField DataField="ProductAmount" HeaderText="Amount"
SortExpression="ProductAmount">
</asp:BoundField>
<asp:CheckBoxField DataField="ProductStatus" HeaderText="Status"
SortExpression="ProductStatus" />

<asp:BoundField DataField="SupplierName" HeaderText="Supplier Name"


SortExpression="SupplierName" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT ProductId, ProductName, ProductImage,
ProductQuantity, ProductAmount, ProductStatus, SupplierName FROM [Inventory] inner join Supplier
on Inventory.SupplierId=Supplier.SupplierId WHERE ([ProductStatus] = @ProductStatus)"
DeleteCommand="DELETE FROM [Inventory] WHERE [ProductId] = @ProductId"
InsertCommand="INSERT INTO [Inventory] ([ProductName], [ProductQuantity], [ProductAmount],
[ProductStatus]) VALUES (@ProductName, @ProductQuantity, @ProductAmount, @ProductStatus)"
UpdateCommand="UPDATE [Inventory] SET [ProductName] = @ProductName, [ProductQuantity] =
@ProductQuantity, [ProductAmount] = @ProductAmount, [ProductStatus] = @ProductStatus WHERE
[ProductId] = @ProductId">
<DeleteParameters>
<asp:Parameter Name="ProductId" Type="Int32" />
Page | 154
E-Fitness Hub
Indira Gandhi
National Open University

</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductQuantity" Type="Int32" />
<asp:Parameter Name="ProductAmount" Type="Int32" />
<asp:Parameter Name="ProductStatus" Type="Boolean" />
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="false" Name="ProductStatus" Type="Boolean" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductQuantity" Type="Int32" />
<asp:Parameter Name="ProductAmount" Type="Int32" />
<asp:Parameter Name="ProductStatus" Type="Boolean" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/AllProduct.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class AllProduct : System.Web.UI.Page
{

Page | 155
E-Fitness Hub
Indira Gandhi
National Open University

protected void Page_Load(object sender, EventArgs e)


{

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}
Admin/AllSchedule.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="AllSchedule.aspx.cs"
Inherits="Fitness_Hub.admin.AllSchedule" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Schedule</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card {

Page | 156
E-Fitness Hub
Indira Gandhi
National Open University

background-color: #eeeeee !important;


}

table {
background-color: none !important;
margin: 0% !important;
}

tbody {
text-align: center !important;
}

.overflowgrid {
overflow-x: auto !important;
}

.table td {
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ScheduleId"
DataSourceID="SqlDataSource2" Width="80%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:BoundField DataField="ScheduleName" HeaderText="Schedule Name"
SortExpression="ScheduleName"></asp:BoundField>
<asp:TemplateField HeaderText="Schedule Image" ItemStyle-CssClass="text-center
pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("ScheduleImage","../Upload/images/{0}") %>' Height="100" Width="200" CssClass="text-
center" runat="server" />
<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"
Text="Download" CommandArgument='<%# Eval("ScheduleImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile"></asp:LinkButton>
</ItemTemplate>

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
Page | 157
E-Fitness Hub
Indira Gandhi
National Open University

<asp:BoundField DataField="ScheduleTiming" HeaderText="ScheduleTiming"


SortExpression="ScheduleTiming"></asp:BoundField>
<asp:BoundField DataField="ScheduleDay" HeaderText="ScheduleDay"
SortExpression="ScheduleDay"></asp:BoundField>
<asp:BoundField DataField="ScheduleReps" HeaderText="ScheduleReps"
SortExpression="ScheduleReps"></asp:BoundField>
<asp:TemplateField HeaderText="Videos">
<ItemTemplate>
<video width="200" height="100" controls>
<source src='<%#Eval("ScheduleVideos","../Upload/videos/{0}")%>'
type="video/mp4">
</video>
<asp:LinkButton ID="lnkDownload1" CssClass="text-success font-bold font-
18" Text="Download" CommandArgument='<%# Eval("ScheduleVideos","../Upload/videos/{0}") %>'
runat="server" OnClick="DownloadFile1"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="ScheduleType" HeaderText="Schedule Type"
SortExpression="ScheduleType" />
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True"
HeaderText="Edit" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Schedule]"
DeleteCommand="DELETE FROM [Schedule] WHERE [ScheduleId] = @ScheduleId"
InsertCommand="INSERT INTO [Schedule] ([ScheduleName], [ScheduleImage], [ScheduleTiming],
[ScheduleDay], [ScheduleReps], [ScheduleVideoss], [ScheduleType]) VALUES (@ScheduleName,
@ScheduleImage, @ScheduleTiming, @ScheduleDay, @ScheduleReps, @ScheduleVideoss,
@ScheduleType)" UpdateCommand="UPDATE [Schedule] SET [ScheduleName] = @ScheduleName,
[ScheduleTiming] = @ScheduleTiming, [ScheduleDay] = @ScheduleDay, [ScheduleReps] =
@ScheduleReps, [ScheduleType] = @ScheduleType WHERE [ScheduleId] = @ScheduleId">
Page | 158
E-Fitness Hub
Indira Gandhi
National Open University

<DeleteParameters>
<asp:Parameter Name="ScheduleId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ScheduleName" Type="String" />
<asp:Parameter Name="ScheduleTiming" Type="String" />
<asp:Parameter Name="ScheduleDay" Type="String" />
<asp:Parameter Name="ScheduleReps" Type="Int32" />
<asp:Parameter Name="ScheduleType" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ScheduleName" Type="String" />
<asp:Parameter Name="ScheduleTiming" Type="String" />
<asp:Parameter Name="ScheduleDay" Type="String" />
<asp:Parameter Name="ScheduleReps" Type="Int32" />
<asp:Parameter Name="ScheduleType" Type="String" />
<asp:Parameter Name="ScheduleId" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/AllSchedule.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{

Page | 159
E-Fitness Hub
Indira Gandhi
National Open University

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


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

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
protected void DownloadFile1(object sender, EventArgs e)
{
string filePath1 = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath1));
Response.WriteFile(filePath1);
Response.End();
}
}
}

Admin/AllSupplier.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeFile="AllSupplier.aspx.cs" Inherits="Fitness_Hub.admin.AllSupplier"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">

Page | 160
E-Fitness Hub
Indira Gandhi
National Open University

<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="SupplierId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:BoundField DataField="SupplierName" HeaderText="Supplier Name"
SortExpression="SupplierName">
<ControlStyle Width="120" />
</asp:BoundField>
<asp:BoundField DataField="SupplierAddress" HeaderText="Address"
SortExpression="SupplierAddress">
<ControlStyle Width="120" />
</asp:BoundField>
Page | 161
E-Fitness Hub
Indira Gandhi
National Open University

<asp:BoundField DataField="SupplierPhone" HeaderText="Phone"


SortExpression="SupplierPhone">
<ControlStyle Width="120" />
</asp:BoundField>
<asp:BoundField DataField="SupplierEmail" HeaderText="Email"
SortExpression="SupplierEmail">
<ControlStyle Width="150" />
</asp:BoundField>
<asp:BoundField DataField="SupplierPassword" HeaderText="Password"
SortExpression="SupplierPassword">
<ControlStyle Width="120" />
</asp:BoundField>
<asp:TemplateField HeaderText="D.O.B">
<ItemTemplate>
<asp:Label ID="DOB" runat="server" Text='<%#
Eval("SupplierDOB", "{0:d MMM yyyy}") %>' Height="2.8%"
Width="65pt" Font-Size="9pt"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText="Edit" ShowDeleteButton="True"
ShowEditButton="True" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Supplier]"
DeleteCommand="DELETE FROM [Supplier] WHERE [SupplierId] = @SupplierId"
InsertCommand="INSERT INTO [Supplier] ([SupplierName], [SupplierAddress], [SupplierPhone],
[SupplierEmail], [SupplierPassword], [SupplierDOB]) VALUES (@SupplierName,
@SupplierAddress, @SupplierPhone, @SupplierEmail, @SupplierPassword, @SupplierDOB)"
UpdateCommand="UPDATE [Supplier] SET [SupplierName] = @SupplierName, [SupplierAddress] =
@SupplierAddress, [SupplierPhone] = @SupplierPhone, [SupplierEmail] = @SupplierEmail,
[SupplierPassword] = @SupplierPassword WHERE [SupplierId] = @SupplierId">
Page | 162
E-Fitness Hub
Indira Gandhi
National Open University

<DeleteParameters>
<asp:Parameter Name="SupplierId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="SupplierName" Type="String" />
<asp:Parameter Name="SupplierAddress" Type="String" />
<asp:Parameter Name="SupplierPhone" Type="String" />
<asp:Parameter Name="SupplierEmail" Type="String" />
<asp:Parameter Name="SupplierPassword" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="SupplierName" Type="String" />
<asp:Parameter Name="SupplierAddress" Type="String" />
<asp:Parameter Name="SupplierPhone" Type="String" />
<asp:Parameter Name="SupplierEmail" Type="String" />
<asp:Parameter Name="SupplierPassword" Type="String" />
<asp:Parameter Name="SupplierId" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/AllSupplier.aspx.cs

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

namespace Fitness_Hub.admin
{

Page | 163
E-Fitness Hub
Indira Gandhi
National Open University

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


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

}
}
}

Admin/AllTrainer.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeFile="AllTrainer.aspx.cs" Inherits="Fitness_Hub.admin.AllTrainer"
%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;

Page | 164
E-Fitness Hub
Indira Gandhi
National Open University

margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="TrainerId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:BoundField DataField="TrainerName" HeaderText=" Name"
SortExpression="TrainerName">
<HeaderStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ItemStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ControlStyle Font-Size="7pt" Width="80px" CssClass="text-center" />
</asp:BoundField>
<asp:BoundField DataField="TrainerPhone" HeaderText=" Phone"
SortExpression="TrainerPhone">
<HeaderStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ItemStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ControlStyle Font-Size="7pt" Width="80px" CssClass="text-center" />
</asp:BoundField>
<asp:BoundField DataField="TrainerGender" HeaderText=" Gender"
SortExpression="TrainerGender">
<HeaderStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ItemStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ControlStyle Font-Size="7pt" Width="80px" CssClass="text-center" />
</asp:BoundField>
<asp:TemplateField HeaderText=" Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("TrainerImage","../Upload/images/{0}") %>' Height="75pt" Width="100%" CssClass="text-
center" runat="server" />
Page | 165
E-Fitness Hub
Indira Gandhi
National Open University

<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"


Text="Download" CommandArgument='<%# Eval("TrainerImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile"></asp:LinkButton>
</ItemTemplate>

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="TrainerEmail" HeaderText=" Email"
SortExpression="TrainerEmail">
<HeaderStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ItemStyle Font-Size="12pt" Width="10px" CssClass="text-center" />
<ControlStyle Font-Size="7pt" Width="140px" CssClass="text-center" />
</asp:BoundField>
<asp:BoundField DataField="TrainerPassword" HeaderText=" Password"
SortExpression="TrainerPassword">
<HeaderStyle Font-Size="12pt" Width="10px" CssClass="text-center"/>
<ItemStyle Font-Size="12pt" Width="10px" CssClass="text-center"/>
<ControlStyle Font-Size="7pt" Width="80px" CssClass="text-center" />
</asp:BoundField>
<asp:BoundField DataField="TrainerAddress" HeaderText=" Address"
SortExpression="TrainerAddress">
<HeaderStyle Font-Size="12pt" Width="10px" CssClass="text-center"/>
<ItemStyle Font-Size="12pt" Width="10px" CssClass="text-center"/>
<ControlStyle Font-Size="7pt" Width="80px" CssClass="text-center" />
</asp:BoundField>
<asp:TemplateField HeaderText="D.O.B">
<ItemTemplate>
<asp:Label ID="DateAddedLabel" runat="server" Text='<%#
Eval("TrainerDOB", "{0:d MMM yyyy}") %>' Height="2.8%"
Width="75pt" Font-Size="12pt"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText="Edit" ShowDeleteButton="True"
ShowEditButton="True" >
<ControlStyle Font-Size="12pt" />
<HeaderStyle Font-Size="12pt" />
<ItemStyle Font-Size="8pt" />
</asp:CommandField>
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
Page | 166
E-Fitness Hub
Indira Gandhi
National Open University

<RowStyle BackColor="White" />


<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Trainer]"
DeleteCommand="DELETE FROM [Trainer] WHERE [TrainerId] = @TrainerId"
InsertCommand="INSERT INTO [Trainer] ([TrainerName], [TrainerPhone], [TrainerGender],
[TrainerImage], [TrainerEmail], [TrainerPassword], [TrainerAddress], [TrainerDOB]) VALUES
(@TrainerName, @TrainerPhone, @TrainerGender, @TrainerImage, @TrainerEmail,
@TrainerPassword, @TrainerAddress, @TrainerDOB)" UpdateCommand="UPDATE [Trainer] SET
[TrainerName] = @TrainerName, [TrainerPhone] = @TrainerPhone, [TrainerGender] =
@TrainerGender, [TrainerEmail] = @TrainerEmail, [TrainerPassword] = @TrainerPassword,
[TrainerAddress] = @TrainerAddress WHERE [TrainerId] = @TrainerId">
<DeleteParameters>
<asp:Parameter Name="TrainerId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="TrainerName" Type="String" />
<asp:Parameter Name="TrainerPhone" Type="String" />
<asp:Parameter Name="TrainerGender" Type="String" />
<asp:Parameter Name="TrainerEmail" Type="String" />
<asp:Parameter Name="TrainerPassword" Type="String" />
<asp:Parameter Name="TrainerAddress" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="TrainerName" Type="String" />
<asp:Parameter Name="TrainerPhone" Type="String" />
<asp:Parameter Name="TrainerGender" Type="String" />
<asp:Parameter Name="TrainerEmail" Type="String" />
<asp:Parameter Name="TrainerPassword" Type="String" />
<asp:Parameter Name="TrainerAddress" Type="String" />
<asp:Parameter Name="TrainerId" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>
Page | 167
E-Fitness Hub
Indira Gandhi
National Open University

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">


</asp:Content>

Admin/AllTrainer.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class AllTrainer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void DownloadFile(object sender, EventArgs e)


{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}

Page | 168
E-Fitness Hub
Indira Gandhi
National Open University

Admin/AllUsers.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="AllUsers.aspx.cs" Inherits="Fitness_Hub.admin.AllUsers"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>

Page | 169
E-Fitness Hub
Indira Gandhi
National Open University

<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="UserId"
DataSourceID="SqlDataSource2" Width="70%" BackColor="#CCCCCC" BorderColor="#999999"
BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:BoundField DataField="UserName" HeaderText="User Name"
SortExpression="UserName">
</asp:BoundField>
<asp:BoundField DataField="UserGender" HeaderText="Gender"
SortExpression="UserGender">
</asp:BoundField>
<asp:BoundField DataField="UserPhone" HeaderText="Phone"
SortExpression="UserPhone">
</asp:BoundField>
<asp:TemplateField HeaderText="Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("UserImage","../Upload/images/{0}") %>' Height="80" Width="100%" CssClass="text-center"
runat="server" />
<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"
Text="Download" CommandArgument='<%# Eval("UserImage","../Upload/images/{0}") %>'
runat="server" OnClick="lnkDownload_Click"></asp:LinkButton>
</ItemTemplate>

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="UserHeight" HeaderText="Height"
SortExpression="UserHeight">
</asp:BoundField>
<asp:BoundField DataField="UserWeight" HeaderText="Weight"
SortExpression="UserWeight" />
<asp:BoundField DataField="UserEmail" HeaderText="Email"
SortExpression="UserEmail" />
<asp:BoundField DataField="UserPassword" HeaderText="Password"
SortExpression="UserPassword" />
<asp:CheckBoxField DataField="UserStatus" HeaderText="Status"
SortExpression="UserStatus" />
<asp:TemplateField HeaderText="D.O.B">
<ItemTemplate>
<asp:Label ID="DateAddedLabel" runat="server" Text='<%#
Page | 170
E-Fitness Hub
Indira Gandhi
National Open University

Eval("UserDOB", "{0:d MMM yyyy}") %>' Height="2.8%"


Width="65pt" Font-Size="9pt"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText="Edit" ShowDeleteButton="True"
ShowEditButton="True" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [User]"
DeleteCommand="DELETE FROM [User] WHERE [UserId] = @UserId" InsertCommand="INSERT
INTO [User] ([UserName], [UserGender], [UserPhone], [UserImage], [UserHeight], [UserWeight],
[UserEmail], [UserPassword], [UserStatus], [UserDOB]) VALUES (@UserName, @UserGender,
@UserPhone, @UserImage, @UserHeight, @UserWeight, @UserEmail, @UserPassword,
@UserStatus, @UserDOB)" UpdateCommand="UPDATE [User] SET [UserName] = @UserName,
[UserGender] = @UserGender, [UserPhone] = @UserPhone, [UserHeight] = @UserHeight,
[UserWeight] = @UserWeight, [UserEmail] = @UserEmail, [UserPassword] = @UserPassword,
[UserStatus] = @UserStatus WHERE [UserId] = @UserId">
<DeleteParameters>
<asp:Parameter Name="UserId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="UserGender" Type="String" />
<asp:Parameter Name="UserPhone" Type="String" />
<asp:Parameter Name="UserHeight" Type="Decimal" />
<asp:Parameter Name="UserWeight" Type="Decimal" />
<asp:Parameter Name="UserEmail" Type="String" />
<asp:Parameter Name="UserPassword" Type="String" />
<asp:Parameter Name="UserStatus" Type="Boolean" />
</InsertParameters>
<UpdateParameters>
Page | 171
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Parameter Name="UserName" Type="String" />


<asp:Parameter Name="UserGender" Type="String" />
<asp:Parameter Name="UserPhone" Type="String" />
<asp:Parameter Name="UserHeight" Type="Decimal" />
<asp:Parameter Name="UserWeight" Type="Decimal" />
<asp:Parameter Name="UserEmail" Type="String" />
<asp:Parameter Name="UserPassword" Type="String" />
<asp:Parameter Name="UserStatus" Type="Boolean" />
<asp:Parameter Name="UserId" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/AllUsers.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class AllUsers : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void lnkDownload_Click(object sender, EventArgs e)


{

Page | 172
E-Fitness Hub
Indira Gandhi
National Open University

string filePath = (sender as LinkButton).CommandArgument;


Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}

Admin/Appointments.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="Appointments.aspx.cs"
Inherits="Fitness_Hub.admin.Appointments" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}

Page | 173
E-Fitness Hub
Indira Gandhi
National Open University

tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="AppointmentId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="White"
BorderColor="#999999" BorderWidth="1px" CellPadding="3" ForeColor="Black"
GridLines="Vertical">
<AlternatingRowStyle BackColor="#CCCCCC" />
<Columns>
<asp:BoundField DataField="FName" HeaderText="FName"
SortExpression="FName">
</asp:BoundField>
<asp:BoundField DataField="Lname" HeaderText="Lname"
SortExpression="Lname">
</asp:BoundField>
<asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date"
DataFormatString="{0:dd MMM yyyy}">
<ItemStyle Width="250" />
</asp:BoundField>
<asp:BoundField DataField="Time" HeaderText="Time" SortExpression="Time">
<ItemStyle Width="150" />
</asp:BoundField>
<asp:BoundField DataField="Phone" HeaderText="Phone"
SortExpression="Phone">
</asp:BoundField>
<asp:BoundField DataField="Message" HeaderText="Message"
SortExpression="Message" />
<asp:CommandField HeaderText="Delete" ShowDeleteButton="True" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
Page | 174
E-Fitness Hub
Indira Gandhi
National Open University

<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />


<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Appointment] ORDER BY
[Date]" DeleteCommand="DELETE FROM [Appointment] WHERE [AppointmentId] =
@AppointmentId" InsertCommand="INSERT INTO [Appointment] ([FName], [Lname], [Date],
[Time], [Phone], [Message]) VALUES (@FName, @Lname, @Date, @Time, @Phone, @Message)"
UpdateCommand="UPDATE [Appointment] SET [FName] = @FName, [Lname] = @Lname, [Date]
= @Date, [Time] = @Time, [Phone] = @Phone, [Message] = @Message WHERE [AppointmentId] =
@AppointmentId">
<DeleteParameters>
<asp:Parameter Name="AppointmentId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="FName" Type="String" />
<asp:Parameter Name="Lname" Type="String" />
<asp:Parameter Name="Date" DbType="Date" />
<asp:Parameter Name="Time" Type="String" />
<asp:Parameter Name="Phone" Type="String" />
<asp:Parameter Name="Message" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="FName" Type="String" />
<asp:Parameter Name="Lname" Type="String" />
<asp:Parameter Name="Date" DbType="Date" />
<asp:Parameter Name="Time" Type="String" />
<asp:Parameter Name="Phone" Type="String" />
<asp:Parameter Name="Message" Type="String" />
<asp:Parameter Name="AppointmentId" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
Page | 175
E-Fitness Hub
Indira Gandhi
National Open University

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/Appointments.aspx.cs

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

namespace Fitness_Hub.admin
{
public partial class Appointments : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
Admin/Approved.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeFile="Approved.aspx.cs" Inherits="Fitness_Hub.admin.Approved" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Product</li>
Page | 176
E-Fitness Hub
Indira Gandhi
National Open University

</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ProductId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="ProductName" HeaderText="Product Name"
SortExpression="ProductName">
</asp:BoundField>
<asp:TemplateField HeaderText=" Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("ProductImage","../Upload/images/{0}") %>' Height="200" Width="300" CssClass="text-center"
runat="server" />

Page | 177
E-Fitness Hub
Indira Gandhi
National Open University

<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"


Text="Download" CommandArgument='<%# Eval("ProductImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile" Width="80%"></asp:LinkButton>
</ItemTemplate>
<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="ProductQuantity" HeaderText="Quantity"
SortExpression="ProductQuantity">
</asp:BoundField>
<asp:BoundField DataField="ProductAmount" HeaderText="Amount"
SortExpression="ProductAmount">
</asp:BoundField>
<asp:CheckBoxField DataField="ProductStatus" HeaderText="Status"
SortExpression="ProductStatus" />

<asp:BoundField DataField="SupplierName" HeaderText="Supplier Name"


SortExpression="SupplierName" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT ProductId, ProductName, ProductImage,
ProductQuantity, ProductAmount, ProductStatus, SupplierName FROM [Inventory] inner join Supplier
on Inventory.SupplierId=Supplier.SupplierId WHERE ([ProductStatus] = @ProductStatus)"
DeleteCommand="DELETE FROM [Inventory] WHERE [ProductId] = @ProductId"
InsertCommand="INSERT INTO [Inventory] ([ProductName], [ProductQuantity], [ProductAmount],
[ProductStatus]) VALUES (@ProductName, @ProductQuantity, @ProductAmount, @ProductStatus)"
UpdateCommand="UPDATE [Inventory] SET [ProductName] = @ProductName, [ProductQuantity] =
@ProductQuantity, [ProductAmount] = @ProductAmount, [ProductStatus] = @ProductStatus WHERE
[ProductId] = @ProductId">
<DeleteParameters>
<asp:Parameter Name="ProductId" Type="Int32" />
</DeleteParameters>
Page | 178
E-Fitness Hub
Indira Gandhi
National Open University

<InsertParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductQuantity" Type="Int32" />
<asp:Parameter Name="ProductAmount" Type="Int32" />
<asp:Parameter Name="ProductStatus" Type="Boolean" />
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="true" Name="ProductStatus" Type="Boolean" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductQuantity" Type="Int32" />
<asp:Parameter Name="ProductAmount" Type="Int32" />
<asp:Parameter Name="ProductStatus" Type="Boolean" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/Approved.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class Approved : System.Web.UI.Page
{
Page | 179
E-Fitness Hub
Indira Gandhi
National Open University

protected void Page_Load(object sender, EventArgs e)


{

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}

Admin/ChangePassword.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs"
Inherits="Fitness_Hub.admin.ChangePassword" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
Page | 180
E-Fitness Hub
Indira Gandhi
National Open University

<div class="col-md-2"></div>
<div class="col-md-8">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">
<label for="lname" class="col-sm-4 text-right control-label col-form-
label">Enter User-Id</label>
<div class="col-sm-8">
<asp:TextBox ID="txtuser" runat="server" CssClass="form-control"
placeholder="UserId Here" Width="300"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-4 text-right control-label col-form-
label">Enter Password</label>
<div class="col-sm-8">
<asp:TextBox runat="server" ID="txtpass" class="form-control"
placeholder="Password Here" Width="300" TextMode="Password"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-4 text-right control-label col-form-
label">Confirm Password</label>
<div class="col-sm-8">
<asp:TextBox runat="server" ID="txtpassconf" class="form-control"
placeholder="Confirm Password" Width="300" TextMode="Password"></asp:TextBox>
</div>
</div>
</div>
<div class="border-top">
<div class="card-body text-center">
<asp:Button ID="Button1" runat="server" Text="Next" class="btn btn-primary"
Width="100" OnClick="Button1_Click"/>
<br />
<br />
<asp:Label ID="lblmessage" runat="server" Text="" Font-Size="Large">
</asp:Label>
</div>
</div>
</div>
Page | 181
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>

</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/ChangePassword.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.IO;
using System.Drawing;

namespace Fitness_Hub.admin
{
public partial class ChangePassword : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void Button1_Click(object sender, EventArgs e)


{
try
Page | 182
E-Fitness Hub
Indira Gandhi
National Open University

{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
con.Open();

SqlCommand cmd = new SqlCommand("spCheckUser", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "Update");

SqlParameter p2 = new SqlParameter("@username", txtuser.Text);

SqlParameter p3 = new SqlParameter("@password", txtpassconf.Text);

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p2);

cmd.Parameters.Add(p3);

int k = cmd.ExecuteNonQuery();

if (k != 0)
{
lblmessage.ForeColor = System.Drawing.Color.Green;
lblmessage.Text = "Password Updated Successfully!!";
}

else
{
lblmessage.ForeColor = System.Drawing.Color.Red;
lblmessage.Text = "Invalid Username or Password";
}
}
}

catch (Exception ex)


{
lblmessage.Text = ex.Message;
}
}
}
Page | 183
E-Fitness Hub
Indira Gandhi
National Open University

Admin/Dashboard.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="Dashboard.aspx.cs" Inherits="Fitness_Hub.admin.Dashboard"
%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h2 class="page-title">Dashboard</h2>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Library</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="AllUsers.aspx">
<div class="card card-hover">
<div class="box bg-danger text-center">
<h1 class="font-light text-white"><i class="mdi mdi-account"></i></h1>
<h3 class="font-bold text-white">Total Users</h3>
<h3 class="text-white">
<asp:Label ID="lblUser" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
Page | 184
E-Fitness Hub
Indira Gandhi
National Open University

</div>
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="AllSupplier.aspx">
<div class="card card-hover">
<div class="box bg-success text-center">
<h1 class="font-light text-white"><i class="mdi mdi-factory"></i></h1>
<h3 class="font-bold text-white">Total Suppliers</h3>
<h3 class="text-white">
<asp:Label ID="lblSupplier" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="AllTrainer.aspx">
<div class="card card-hover">
<div class="box bg-info text-center">
<h1 class="font-light text-white"><i class="mdi mdi-account-card-
details"></i></h1>
<h3 class="font-bold text-white">Total Trainers</h3>
<h3 class="text-white">
<asp:Label ID="lblTrainer" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="Approved.aspx">
<div class="card card-hover">
<div class="box bg-warning text-center">
<h1 class="font-light text-white"><i class="mdi mdi-cart"></i></h1>
<h3 class="font-bold text-white">Total Products</h3>
<h3 class="text-white">
<asp:Label ID="lblProduct" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
Page | 185
E-Fitness Hub
Indira Gandhi
National Open University

<div class="col-md-6 col-lg-4 col-xlg-3">


<a href="AllOrder.aspx">
<div class="card card-hover">
<div class="box bg-secondary text-center">
<h1 class="font-light text-white"><i class="mdi mdi-basket"></i></h1>
<h3 class="font-bold text-white">Total Orders</h3>
<h3 class="text-white">
<asp:Label ID="lblOrder" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="Appointments.aspx">
<div class="card card-hover">
<div class="box bg-primary text-center">
<h1 class="font-light text-white"><i class="mdi mdi-dumbbell"></i></h1>
<h3 class="font-bold text-white">Total Appointments</h3>
<h3 class="text-white">
<asp:Label ID="lblAppointment" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from [User]"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Inventory"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Trainer"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Supplier"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from [Order]"></asp:SqlDataSource>
Page | 186
E-Fitness Hub
Indira Gandhi
National Open University

<br />
<asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from
Appointment"></asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/Dashboard.aspx.cs

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class Dashboard : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
GetAppointment();
GetOrder();
GetUser();
GetSupplier();
GetProduct();
GetTrainer();
}
public void GetUser()
{
System.Data.DataView dv =
(DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
lblUser.Text = dv.Count.ToString();
}
public void GetSupplier()
{
System.Data.DataView dv1 =
(DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
lblSupplier.Text = dv1.Count.ToString();

Page | 187
E-Fitness Hub
Indira Gandhi
National Open University

}
public void GetTrainer()
{
System.Data.DataView dv2 =
(DataView)SqlDataSource3.Select(DataSourceSelectArguments.Empty);
lblTrainer.Text = dv2.Count.ToString();
}
public void GetProduct()
{
System.Data.DataView dv3 =
(DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty);
lblProduct.Text = dv3.Count.ToString();
}
public void GetOrder()
{
System.Data.DataView dv4 =
(DataView)SqlDataSource5.Select(DataSourceSelectArguments.Empty);
lblOrder.Text = dv4.Count.ToString();
}
public void GetAppointment()
{
System.Data.DataView dv5 =
(DataView)SqlDataSource6.Select(DataSourceSelectArguments.Empty);
lblAppointment.Text = dv5.Count.ToString();
}
}
}

Admin/Deleted.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="Deleted.aspx.cs" Inherits="Fitness_Hub.admin.Deleted" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
Page | 188
E-Fitness Hub
Indira Gandhi
National Open University

<div class="col-12 d-flex no-block align-items-center">


<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="col-lg-6 col-md-6 col-6 p-2">
<asp:DropDownList ID="ddselect" runat="server" Font-Size="Large">
<asp:ListItem Value="0">--Select Here--</asp:ListItem>
<asp:ListItem Value="1">User History</asp:ListItem>
<asp:ListItem Value="2">Trainer History</asp:ListItem>
<asp:ListItem Value="3">Inventory History</asp:ListItem>
<asp:ListItem Value="4">Appointment History</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-lg-6 col-md-6 col-6">
Page | 189
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Button ID="btnsubmission" runat="server" CssClass="btn btn-danger float-right"


Text="Filter Data" OnClick="btnsubmission_Click"/>
</div>
<div class="card">
<asp:GridView ID="GridView1" runat="server" BackColor="#CCCCCC"
BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2"
ForeColor="Black">
<FooterStyle BackColor="#CCCCCC" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />
</asp:GridView>
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [User_Test_Audit]">
</asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Trainer_Test_Audit]">
</asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Inventory_Test_Audit]">
</asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [Appointment_Test_Audit]">
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Page | 190
E-Fitness Hub
Indira Gandhi
National Open University

Admin/Deleted.aspx.cs

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

namespace Fitness_Hub.admin
{
public partial class Deleted : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

protected void btnsubmission_Click(object sender, EventArgs e)


{
if (ddselect.SelectedIndex == 1)
{
GridView1.DataSource = SqlDataSource2;
GridView1.DataBind();
}
else if (ddselect.SelectedIndex == 2)
{
GridView1.DataSource = SqlDataSource3;
GridView1.DataBind();
}
else if (ddselect.SelectedIndex == 3)
{
GridView1.DataSource = SqlDataSource4;
GridView1.DataBind();
}
else if (ddselect.SelectedIndex == 4)
{
GridView1.DataSource = SqlDataSource5;
GridView1.DataBind();
}
else
Page | 191
E-Fitness Hub
Indira Gandhi
National Open University

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

Admin/Expenses.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="Expenses.aspx.cs" Inherits="Fitness_Hub.admin.Expenses"
%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">

<div class="form-horizontal">
<div class="card-body">
<h4 class="card-title">Add Informations</h4>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Expenses Name</label>
Page | 192
E-Fitness Hub
Indira Gandhi
National Open University

<div class="col-sm-9">
<asp:Label ID="lblid" runat="server" Text=""></asp:Label>
<asp:TextBox runat="server" ID="txtname" class="form-control"
placeholder="Expenses Name Here"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Amount</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtamt" class="form-control"
placeholder="Amount Here"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Descp</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtdesc" class="form-control"
placeholder="Descc ere"></asp:TextBox>
</div>
</div>
<div class="border-top">
<div class="card-body">
<asp:Button ID="Button1" runat="server" Text="Save"
OnClick="Button1_Click" CssClass="btn btn-primary" />
</div>
</div>
<div class="border-top" style="margin-left: 80%; position: absolute; margin-top: -
7%;">
<div class="card-body">
<asp:Button ID="Button2" runat="server" Text="Refresh"
OnClick="Button2_Click" CssClass="btn btn-primary" />
</div>
</div>
<asp:Label runat="server" ID="lbl"></asp:Label>
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" DataKeyNames="ExpenseId"
DataSourceID="SqlDataSource1" Width="100%" AllowPaging="True" AllowSorting="True"
CellPadding="4" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
Page | 193
E-Fitness Hub
Indira Gandhi
National Open University

<asp:BoundField DataField="ExpenseName" HeaderText="Name"


SortExpression="ExpenseName" ItemStyle-Width="150" ItemStyle-CssClass="text-center"
HeaderStyle-CssClass="text-center"/>
<asp:BoundField DataField="ExpensePrice" HeaderText="Expense Price"
SortExpression="ExpensePrice" ItemStyle-Width="150" ItemStyle-CssClass="text-center"
HeaderStyle-CssClass="text-center"/>
<asp:BoundField DataField="ExpenseDetail" HeaderText="Expense
Description" SortExpression="ExpenseDetail" HeaderStyle-CssClass="text-center" ItemStyle-
CssClass="text-center"/>
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center"
/>
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True"
ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [DailyExpense]"
DeleteCommand="DELETE FROM [DailyExpense] WHERE [ExpenseId] = @ExpenseId"
InsertCommand="INSERT INTO [DailyExpense] ([ExpenseName], [ExpensePrice], [ExpenseDetail])
VALUES (@ExpenseName, @ExpensePrice, @ExpenseDetail)" UpdateCommand="UPDATE
[DailyExpense] SET [ExpenseName] = @ExpenseName, [ExpensePrice] = @ExpensePrice,
[ExpenseDetail] = @ExpenseDetail WHERE [ExpenseId] = @ExpenseId">
<DeleteParameters>
<asp:Parameter Name="ExpenseId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ExpenseName" Type="String" />
<asp:Parameter Name="ExpensePrice" Type="Decimal" />
<asp:Parameter Name="ExpenseDetail" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ExpenseName" Type="String" />
<asp:Parameter Name="ExpensePrice" Type="Decimal" />
<asp:Parameter Name="ExpenseDetail" Type="String" />
<asp:Parameter Name="ExpenseId" Type="Int32" />
Page | 194
E-Fitness Hub
Indira Gandhi
National Open University

</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/Expenses.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;

namespace Fitness_Hub.admin
{
public partial class Expenses : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lbl.Text = "";
GridView1.Visible = true;
}
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

public void Insert()

Page | 195
E-Fitness Hub
Indira Gandhi
National Open University

{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
con.Open();
SqlCommand cmd = new SqlCommand("spDailyExpense", con);
cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@ExpenseId", lblid.Text);
SqlParameter p3 = new SqlParameter("@ExpenseName", txtname.Text);
SqlParameter p4 = new SqlParameter("@ExpensePrice", txtamt.Text);
SqlParameter p5 = new SqlParameter("@ExpenseDetail", txtdesc.Text);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);

try
{
cmd.ExecuteNonQuery();
lbl.Text = "Record Inserted Succesfully into the Database";
lbl.ForeColor = System.Drawing.Color.CornflowerBlue;
txtname.Text = "";
txtamt.Text = "";
txtdesc.Text = "";

}
catch (Exception ex)
{
lbl.Text = ex.ToString();
lbl.ForeColor = System.Drawing.Color.Red;
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
Insert();
}

protected void Button2_Click(object sender, EventArgs e)


{
Page | 196
E-Fitness Hub
Indira Gandhi
National Open University

Response.Redirect("Expenses.aspx");
}
}
}

Admin/LatestOrder.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="LatestOrder.aspx.cs"
Inherits="Fitness_Hub.admin.LatestOrder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Product</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;
margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;

Page | 197
E-Fitness Hub
Indira Gandhi
National Open University

}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="OrderId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:BoundField DataField="OrderName" HeaderText="OrderName"
SortExpression="OrderName">
<ItemStyle Width="200" />
</asp:BoundField>
<asp:TemplateField HeaderText=" Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("ProductImage","../Upload/images/{0}") %>' Height="25.4%" Width="80%" CssClass="text-
center" runat="server" />
<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"
Text="Download" CommandArgument='<%# Eval("ProductImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile" Width="80%"></asp:LinkButton>
</ItemTemplate>

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="ProductName" HeaderText="ProductName"
SortExpression="ProductName">
<ItemStyle Width="150" />
</asp:BoundField>
<asp:TemplateField HeaderText="Order Date" ItemStyle-CssClass="text-center pds"
SortExpression="OrderDate">
<ItemTemplate>
<asp:Label ID="lbldate" runat="server" Text='<%#Eval("OrderDate","{0:dd
MMM yyyy}") %>' Width="150"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtdateedit" runat="server" TextMode="Date"
Text='<%#Bind("OrderDate") %>' Width="100"></asp:TextBox>
</EditItemTemplate>
Page | 198
E-Fitness Hub
Indira Gandhi
National Open University

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone"
/>
<asp:CommandField ShowDeleteButton="True" DeleteText="Discard">
<ItemStyle Font-Size="12pt" ForeColor="Red" Width="100px"></ItemStyle>
</asp:CommandField>
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT OrderId, OrderDate, OrderName, Phone,
ProductName, ProductImage FROM [Order] inner join Inventory on
[Order].ProductId=Inventory.ProductId order by OrderDate desc" DeleteCommand="DELETE FROM
[Order] WHERE [OrderId] = @OrderId" InsertCommand="INSERT INTO [Order] ([OrderName],
[ProductId], [Phone]) VALUES (@OrderName, @ProductId, @Phone)" UpdateCommand="UPDATE
[Order] SET [OrderName] = @OrderName, [OrderDate]=@OrderDate, [Phone] = @Phone WHERE
[OrderId] = @OrderId">
<DeleteParameters>
<asp:Parameter Name="OrderId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="OrderName" Type="String" />
<asp:Parameter Name="Phone" Type="String" />
<asp:Parameter Name="OrderDate" Type="DateTime" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="OrderName" Type="String" />
<asp:Parameter Name="Phone" Type="String" />
<asp:Parameter Name="OrderDate" Type="DateTime" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
Page | 199
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/LatestOrder.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class LatestOrder : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}

Admin/Package.aspx

Page | 200
E-Fitness Hub
Indira Gandhi
National Open University

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeFile="Package.aspx.cs" Inherits="Fitness_Hub.admin.Package" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="Dashboard.aspx">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Category</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="form-horizontal">
<div class="card-body">
<h4 class="card-title">Add Informations</h4>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Package Name</label>
<div class="col-sm-9">
<asp:Textbox runat="server" ID="txtname" class="form-control"
placeholder="Package Name Here"></asp:Textbox>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Amount Name</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtamt" class="form-control"
placeholder="Package Amount Here"></asp:TextBox>
Page | 201
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Package Type</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtpackage" class="form-control"
placeholder="Package Type Here"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Package Desc </label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtdesc" class="form-control"
placeholder="Package Desc Here"></asp:TextBox>
</div>
</div>
</div>
<div class="border-top">
<div class="card-body">
<asp:button runat="server" text="Save" OnClick="Unnamed1_Click" class="btn
btn-primary" />
</div>
<asp:Label runat="server" ID="lbl"></asp:Label>
</div>
</div>

</div>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/Package.aspx.cs

Page | 202
E-Fitness Hub
Indira Gandhi
National Open University

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

namespace Fitness_Hub.admin
{
public partial class Package : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
}
}

Admin/Products.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="Products.aspx.cs" Inherits="Fitness_Hub.admin.Products" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>
#ContentPlaceHolder1_genderDDlist > tbody > tr > td {
font-size: 11pt;
line-height: 10pt;
width: 50pt !important;
padding-left: 2% !important;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>

Page | 203
E-Fitness Hub
Indira Gandhi
National Open University

<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>


</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Product Name</label>
<div class="col-sm-9">
<asp:TextBox ID="txtprname" runat="server" CssClass="form-control"
placeholder="Product Name Here" Width="350"></asp:TextBox>
</div>
</div>

<div class="form-group row">


<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Quantity</label>
<div class="col-sm-9">
<asp:TextBox ID="txtqty" runat="server" CssClass="form-control"
placeholder="Quantity Here" Width="350" TextMode="Number"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Product Image</label>
<div class="col-sm-9">
<asp:FileUpload ID="filephoto" runat="server" CssClass="form-control"
Width="350" />
<asp:RegularExpressionValidator id="regexValidator" runat="server"
ControlToValidate="filephoto" ErrorMessage="Only JPG, JPEG and PNG Allowed"
ValidationExpression="(.*\.([Jj][Pp][Gg])|.*\.([Jj][Pp][Ee][Gg])|.*\.([Pp][Nn][Gg])$)"></asp:RegularE
xpressionValidator>
Page | 204
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Supplier</label>
<div class="col-sm-9">
<asp:DropDownList ID="ddsup" runat="server" CssClass="form-control"
Width="350">
</asp:DropDownList>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Product Price(&#8377;)</label>
<div class="col-sm-9">
<asp:TextBox ID="txtprice" runat="server" CssClass="form-control"
placeholder="Price Here" Width="350" TextMode="Number"></asp:TextBox>
</div>
</div>
</div>
<div class="border-top">
<div class="card-body text-center">
<asp:Button ID="btnsub" runat="server" Text="Submit" CssClass="btn btn-
primary" Width="100" OnClick="btnsub_Click" />
<br />
<asp:Label ID="lblmsg" runat="server" Text="" Font-
Size="Large"></asp:Label>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Page | 205
E-Fitness Hub
Indira Gandhi
National Open University

Admin/Products.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class Products : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetProduct();
}
}
public void GetProduct()
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
string com = "Select * from Supplier";
con.Open();
SqlDataAdapter adpt = new SqlDataAdapter(com, con);
DataTable dt = new DataTable();
adpt.Fill(dt);
ddsup.DataSource = dt;
ddsup.DataBind();
ddsup.DataTextField = "SupplierName";
ddsup.DataValueField = "SupplierId";
ddsup.DataBind();
}
}
public string GetConnectionString()
{

Page | 206
E-Fitness Hub
Indira Gandhi
National Open University

return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnsub_Click(object sender, EventArgs e)


{
GetProduct();
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spInventory", con);
cmd.CommandType = CommandType.StoredProcedure;

string ImageFile = "";


if (filephoto.HasFile)
{
string imgPath = "~/Upload/images/";
string thumbPath = "~/Upload/thumbnails/";

ImageFile = Path.GetFileName(Server.MapPath(filephoto.PostedFile.FileName));
ImageFile = ImageFile.Replace(" ", "-");
ImageFile = System.DateTime.Now.ToString("yyyyMMddHHmmss") + "-" + ImageFile;
thumbPath = thumbPath + ImageFile;
System.Drawing.Bitmap bmpUploadedImage = new
System.Drawing.Bitmap(filephoto.PostedFile.InputStream);

imgPath = imgPath + ImageFile;


filephoto.SaveAs(MapPath(imgPath));
}
else
{
ImageFile = "";
ImageFile = "";
}

try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@ProductName", txtprname.Text);
SqlParameter p3 = new SqlParameter("@ProductQuantity", txtqty.Text);
SqlParameter p4 = new SqlParameter("@ProductAmount", txtprice.Text);
SqlParameter p5 = new SqlParameter("@ProductImage", ImageFile);
SqlParameter p6 = new SqlParameter("@ProductId", lblmsg.Text);
Page | 207
E-Fitness Hub
Indira Gandhi
National Open University

SqlParameter p7 = new SqlParameter("@ProductStatus", lblmsg.Text);


SqlParameter p8 = new SqlParameter("@SupplierId",ddsup.SelectedItem.Value);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);

int k = cmd.ExecuteNonQuery();
if (k != 0)
{
Response.Write("<script>var str = 'Order has been Placed Successfully!!'; var result =
str.fontcolor(green); alert(str)</script>");
//lblmsg.Text = "Record Inserted Succesfully into the Database";
//lblmsg.ForeColor = System.Drawing.Color.Green;
txtprname.Text = "";
txtprice.Text = "";
txtqty.Text = "";
ImageFile = "";
lblmsg.Text = "";
ddsup.SelectedIndex = -1;
}
}
catch (Exception ex)
{s
lblmsg.Text = ex.ToString();
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
}
}
}

Page | 208
E-Fitness Hub
Indira Gandhi
National Open University

Admin/Schedule.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeBehind="Schedule.aspx.cs" Inherits="Fitness_Hub.admin.Schedule"
%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-7">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Schedule Name</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtname" class="form-control"
placeholder="Name Here" Width="300"></asp:TextBox>
</div>
</div>

Page | 209
E-Fitness Hub
Indira Gandhi
National Open University

<div class="form-group row">


<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Schedule Image</label>
<div class="col-sm-9">
<asp:FileUpload ID="filephoto" runat="server" CssClass="form-control"
Width="300"/>
<asp:RegularExpressionValidator ID="regexValidator" runat="server"
ControlToValidate="filephoto" ErrorMessage="Only JPG, JPEG and PNG Allowed"
ValidationExpression="(.*\.([Jj][Pp][Gg])|.*\.([Jj][Pp][Ee][Gg])|.*\.([Pp][Nn][Gg])$)">
</asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Schedule Video</label>
<div class="col-sm-9">
<asp:FileUpload ID="filevideo" runat="server" CssClass="form-control"
Width="300"/>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="filevideo" ErrorMessage="Only MP4, MKV and 3GP Allowed"
ValidationExpression="(.*\.([3][Gg][Pp])|.*\.([Mm][Pp][4])|.*\.([Mm][Kk][Vv])$)">
</asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Schedule Timing</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtTiming" class="form-control"
placeholder="Timing Here" Width="150" TextMode="Time"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Schedule Day</label>
<div class="col-sm-9">
<asp:DropDownList ID="ddDay" runat="server" CssClass="form-control"
Width="150">
<asp:ListItem Value="-1">--Select Day--</asp:ListItem>
<asp:ListItem Value="0">MONDAY</asp:ListItem>
<asp:ListItem Value="1">TUESDAY</asp:ListItem>
<asp:ListItem Value="2">WEDNESDAY</asp:ListItem>
Page | 210
E-Fitness Hub
Indira Gandhi
National Open University

<asp:ListItem Value="3">THURSDAY</asp:ListItem>
<asp:ListItem Value="4">FRIDAY</asp:ListItem>
<asp:ListItem Value="5">SATURDAY</asp:ListItem>
<asp:ListItem Value="6">SUNDAY</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Excercise Reps</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtReps" class="form-control"
placeholder="Reps Here" Width="150" TextMode="Number" min="1"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Schedule Type</label>
<div class="col-sm-9">
<asp:DropDownList ID="ddType" runat="server" CssClass="form-control"
Width="150">
<asp:ListItem Value="-1">--Select Type--</asp:ListItem>
<asp:ListItem Value="0">BEGINNER</asp:ListItem>
<asp:ListItem Value="1">ADVANCED</asp:ListItem>
<asp:ListItem Value="2">PROFESSIONAL</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="border-top">
<div class="card-body text-center">
<asp:Button ID="Button1" runat="server" Text="Next" class="btn btn-primary"
Width="100" OnClick="Button1_Click"/>
<br />
<asp:Label ID="lblmessage" runat="server" Text="" Font-Size="Large">
</asp:Label>
</div>
</div>
</div>
</div>
</div>

</div>
Page | 211
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/Schedule.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.admin
{
public partial class Schedule : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void Button1_Click(object sender, EventArgs e)


{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
lblmessage.Text = "";
SqlCommand cmd = new SqlCommand("spSchedule", con);
cmd.CommandType = CommandType.StoredProcedure;

Page | 212
E-Fitness Hub
Indira Gandhi
National Open University

string ImageFile = "";


string VideoFile = "";
if (filephoto.HasFile && filevideo.HasFile)
{
string imgPath = "~/Upload/images/";
string videoPath = "~/Upload/videos/";
string thumbPath = "~/Upload/thumbnails/";

ImageFile = Path.GetFileName(Server.MapPath(filephoto.PostedFile.FileName));
VideoFile = Path.GetFileName(Server.MapPath(filevideo.PostedFile.FileName));
ImageFile = ImageFile.Replace(" ", "-");
VideoFile = VideoFile.Replace(" ", "-");
ImageFile = System.DateTime.Now.ToString("yyyyMMddHHmmss") + "-" + ImageFile;
VideoFile = System.DateTime.Now.ToString("yyyyMMddHHmmss") + "-" + VideoFile;
thumbPath = thumbPath + ImageFile;
System.Drawing.Bitmap bmpUploadedImage = new
System.Drawing.Bitmap(filephoto.PostedFile.InputStream);
//System.Drawing.Image objImage = ScaleImage(bmpUploadedImage, 170);

imgPath = imgPath + ImageFile;


videoPath = videoPath + VideoFile;
filephoto.SaveAs(MapPath(imgPath));
filevideo.SaveAs(MapPath(videoPath));
}
else
{
ImageFile = "";
ImageFile = "";
VideoFile = "";
}
try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@ScheduleName", txtname.Text);
SqlParameter p3 = new SqlParameter("@ScheduleTiming", txtTiming.Text);
SqlParameter p4 = new SqlParameter("@ScheduleDay", ddDay.SelectedItem.Text);
SqlParameter p5 = new SqlParameter("@ScheduleReps", txtReps.Text);
SqlParameter p6 = new SqlParameter("@ScheduleVideos", VideoFile);
SqlParameter p7 = new SqlParameter("@ScheduleType", ddType.SelectedItem.Text);
SqlParameter p8 = new SqlParameter("@ScheduleImage", ImageFile);
SqlParameter p10 = new SqlParameter("@ScheduleId", lblmessage.Text);
Page | 213
E-Fitness Hub
Indira Gandhi
National Open University

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);
cmd.Parameters.Add(p10);

int k = cmd.ExecuteNonQuery();
if (k != 0)
{
string str = "Schedule has been successfully added!!";
Response.Write("<script language=javascript>alert('" + str + "');</script>");
txtname.Text = "";
txtReps.Text = "";
txtTiming.Text = "";
lblmessage.Text = "";
ddDay.SelectedIndex = -1;
ddType.SelectedIndex = -1;
VideoFile = "";
ImageFile = "";
}
}
catch (Exception ex)
{
lblmessage.Text = ex.ToString();
lblmessage.ForeColor = System.Drawing.Color.Red;
}
}
}
}
}

Admin/Trainer.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master"


AutoEventWireup="true" CodeFile="Trainer.aspx.cs" Inherits="Fitness_Hub.admin.Trainer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>

Page | 214
E-Fitness Hub
Indira Gandhi
National Open University

#ContentPlaceHolder1_genderDDlist > tbody > tr > td {


font-size: 11pt;
line-height: 10pt;
width: 50pt !important;
padding-left: 2% !important;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Name</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtname" class="form-control"
placeholder="Name Here" Width="350"></asp:TextBox>
</div>
</div>
<div class="form-group row">
Page | 215
E-Fitness Hub
Indira Gandhi
National Open University

<label for="lname" class="col-sm-3 text-right control-label col-form-


label">D.O.B</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtage" class="form-control"
placeholder="Age Here" Width="350" TextMode="Date"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="fname" class="col-sm-3 text-right control-label col-form-
label">Gender</label>
<div class="col-sm-9 mt-2">
<asp:RadioButtonList runat="server" class="fradio" ID="genderDDlist"
RepeatDirection="Horizontal">
<asp:ListItem Value="Male">Male</asp:ListItem>
<asp:ListItem Value="Female">Female</asp:ListItem>
</asp:RadioButtonList>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Phone</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtphone" class="form-control"
placeholder="Phone Here" Width="350" TextMode="Number"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Photograph</label>
<div class="col-sm-9">
<asp:FileUpload ID="filephoto" runat="server" CssClass="form-control"
Width="350"/>
<asp:RegularExpressionValidator ID="regexValidator" runat="server"
ControlToValidate="filephoto" ErrorMessage="Only JPG, JPEG and PNG Allowed"
ValidationExpression="(.*\.([Jj][Pp][Gg])|.*\.([Jj][Pp][Ee][Gg])|.*\.([Pp][Nn][Gg])$)">
</asp:RegularExpressionValidator>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Address</label>
<div class="col-sm-9">

Page | 216
E-Fitness Hub
Indira Gandhi
National Open University

<asp:TextBox runat="server" ID="txtaddress" class="form-control"


placeholder="Address Here" Width="350" TextMode="MultiLine"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Email</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtemail" class="form-control"
placeholder="Email Here" Width="350" TextMode="Email"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Enter Password</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtpass" class="form-control"
placeholder="Password Here" Width="350" TextMode="Password"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Confirm Password</label>
<div class="col-sm-9">
<asp:TextBox runat="server" ID="txtpassconf" class="form-control"
placeholder="Confirm Password" Width="350" TextMode="Password"></asp:TextBox>
</div>
</div>
</div>
<div class="border-top">
<div class="card-body text-center">
<asp:Button ID="Button1" runat="server" Text="Next" class="btn btn-primary"
Width="100" OnClick="Button1_Click"/>
<br />
<asp:Label ID="lblmessage" runat="server" Text="" Font-Size="Large">
</asp:Label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Page | 217
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

Admin/Trainer.aspx.cs

using System;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI;
using System.Configuration;

namespace Fitness_Hub.admin
{
public partial class Trainer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}
protected void Button1_Click(object sender, EventArgs e)
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spTrainer", con);
cmd.CommandType = CommandType.StoredProcedure;

string ImageFile = "";


if (filephoto.HasFile)
{
string imgPath = "~/Upload/images/";
string thumbPath = "~/Upload/thumbnails/";

ImageFile = Path.GetFileName(Server.MapPath(filephoto.PostedFile.FileName));
ImageFile = ImageFile.Replace(" ", "-");
ImageFile = System.DateTime.Now.ToString("yyyyMMddHHmmss") + "-" + ImageFile;

Page | 218
E-Fitness Hub
Indira Gandhi
National Open University

thumbPath = thumbPath + ImageFile;


System.Drawing.Bitmap bmpUploadedImage = new
System.Drawing.Bitmap(filephoto.PostedFile.InputStream);
//System.Drawing.Image objImage = ScaleImage(bmpUploadedImage, 170);

imgPath = imgPath + ImageFile;


filephoto.SaveAs(MapPath(imgPath));
}
else
{
ImageFile = "";
ImageFile = "";
}
try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action", "Insert");


SqlParameter p2 = new SqlParameter("@TrainerName", txtname.Text);
SqlParameter p3 = new SqlParameter("@TrainerDOB", txtage.Text);
SqlParameter p4 = new SqlParameter("@TrainerEmail", txtemail.Text);
SqlParameter p5 = new SqlParameter("@TrainerGender",
genderDDlist.SelectedItem.Value);
SqlParameter p6 = new SqlParameter("@TrainerPhone", txtphone.Text);
SqlParameter p7 = new SqlParameter("@TrainerImage", ImageFile);
SqlParameter p8 = new SqlParameter("@TrainerAddress", txtaddress.Text);
SqlParameter p9 = new SqlParameter("@TrainerPassword", txtpassconf.Text);
SqlParameter p10 = new SqlParameter("@TrainerId", lblmessage.Text);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);
cmd.Parameters.Add(p9);
cmd.Parameters.Add(p10);

int k = cmd.ExecuteNonQuery();
if (k!=0)
{
Page | 219
E-Fitness Hub
Indira Gandhi
National Open University

string str = "Trainer has been successfully added!!";


Response.Write("<script language=javascript>alert('" + str + "');</script>");
txtaddress.Text = "";
txtage.Text = "";
txtemail.Text = "";
txtname.Text = "";
txtpass.Text = "";
txtpassconf.Text = "";
txtphone.Text = "";
genderDDlist.SelectedIndex = -1;
ImageFile = "";
lblmessage.Text = "";
}
}
catch (Exception)
{
lblmessage.Text = "Trainer is not added/ Wrong Inputs!!";
lblmessage.ForeColor = System.Drawing.Color.CornflowerBlue;
}
}
}
}
}

supplier/Site1.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs"


Inherits="Fitness_Hub.supplier.Site1" %>

<!DOCTYPE html>

<html dir="ltr" lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- Favicon icon -->
Page | 220
E-Fitness Hub
Indira Gandhi
National Open University

<link rel="icon" type="image/png" sizes="16x16" href="../../asset/assets/images/favicon.png">


<title>E-Fitness Hub</title>
<!-- Custom CSS -->
<link href="../../asset/assets/libs/flot/css/float-chart.css" rel="stylesheet">
<link href="../../asset/dist/css/style.min.css" rel="stylesheet">
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<!-- ============================================================== -->
<!-- Preloader - style you can find in spinners.css -->
<!-- ============================================================== -->
<div class="preloader">
<div class="lds-ripple">
<div class="lds-pos"></div>
<div class="lds-pos"></div>
</div>
</div>
<div id="main-wrapper">
<!-- ============================================================== -->
<!-- Topbar header - style you can find in pages.scss -->
<!-- ============================================================== -->
<header class="topbar" data-navbarbg="skin5">
<nav class="navbar top-navbar navbar-expand-md navbar-dark">
<div class="navbar-header" data-logobg="skin5">
<!-- This is for the sidebar toggle which is visible on mobile only -->
<a class="nav-toggler waves-effect waves-light d-block d-md-none"
href="javascript:void(0)"><i class="ti-menu ti-close"></i></a>
<a class="navbar-brand" href="Dashboard.aspx">
<!-- Logo icon -->
<b class="logo-icon p-l-10">
<img src="../../asset/assets/images/logo-icon.png" alt="homepage" class="light-
logo" />

</b>
<span class="logo-text">
<!-- dark Logo text -->
<h3 class="light-logo mt-2 pt-1">E-Fitness Hub</h3>

</span>
</a>

Page | 221
E-Fitness Hub
Indira Gandhi
National Open University

<a class="topbartoggler d-block d-md-none waves-effect waves-light"


href="javascript:void(0)" data-toggle="collapse" data-target="#navbarSupportedContent" aria-
controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><i
class="ti-more"></i></a>
</div>
<div class="navbar-collapse collapse" id="navbarSupportedContent" data-
navbarbg="skin5">
<ul class="navbar-nav float-left mr-auto">
<li class="nav-item d-none d-md-block"><a class="nav-link sidebartoggler waves-
effect waves-light" href="javascript:void(0)" data-sidebartype="mini-sidebar"><i class="mdi mdi-
menu font-24"></i></a></li>

</ul>
<style>
.dropdown-item:hover {
color: #1F262D !important;
cursor: pointer;
}

.dropdown-item:focus {
color: white !important;
background-color: #1F262D !important;
}

.dropdown-item:visited {
color: white !important;
background-color: #1F262D !important;
}

.dropdown-item::after {
color: white !important;
background-color: #1F262D !important;
}
</style>
<ul class="navbar-nav float-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-muted waves-effect waves-dark pro-pic"
href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="../../asset/assets/images/users/1.jpg" alt="user" class="rounded-circle"
width="31"></a>
<div class="dropdown-menu dropdown-menu-right animated bg-inverse"
style="width: auto;">

Page | 222
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Label ID="lblsession" runat="server" Text="" Font-Size="Larger"


CssClass="dropdown-item text-center pt-3 text-white"></asp:Label>
<span style="width: 100%;">
<asp:Button ID="logout" runat="server" CssClass="dropdown-item text-
center text-white" Font-Size="Larger" Text="Logout" OnClick="logout_Click" />
</span>
</div>
</li>
</ul>
</div>
</nav>
</header>
<aside class="left-sidebar" data-sidebarbg="skin5">
<!-- Sidebar scroll-->
<div class="scroll-sidebar">
<!-- Sidebar navigation-->
<nav class="sidebar-nav">
<ul id="sidebarnav" class="p-t-30">
<li class="sidebar-item"><a class="sidebar-link waves-effect waves-dark sidebar-
link" href="Dashboard.aspx" aria-expanded="false"><i class="mdi mdi-view-dashboard"></i><span
class="hide-menu">Dashboard</span></a></li>

<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="AddProduct.aspx" aria-
expanded="false"><i class="mdi mdi-basket"></i><span class="hide-menu">Add
Products</span></a>
</li>

<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="AllProducts.aspx" aria-
expanded="false"><i class="mdi mdi-basket"></i><span class="hide-menu">All Products</span></a>
</li>

<%--<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Product </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Product.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Add New Product </span></a></li>
<li class="sidebar-item"><a href="AllProduct.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">All Product </span></a></li>
</ul>
Page | 223
E-Fitness Hub
Indira Gandhi
National Open University

</li>--%>

<%--<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Payment </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Trainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Due Payment </span></a></li>
<li class="sidebar-item"><a href="AllTrainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">Payment History </span></a></li>
</ul>
</li>--%>

<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="ChangePassword.aspx"
aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-menu">Change
Password</span></a>
</li>

<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="index.aspx" aria-
expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-menu">Logout</span></a>
</li>

</ul>
</nav>
<!-- End Sidebar navigation -->
</div>
<!-- End Sidebar scroll-->
</aside>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<script src="../../asset/assets/libs/jquery/dist/jquery.min.js"></script>
<script src="../../asset/assets/libs/popper.js/dist/umd/popper.min.js"></script>
<script src="../../asset/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../../asset/assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
<script src="../../asset/assets/extra-libs/sparkline/sparkline.js"></script>
<script src="../../asset/dist/js/waves.js"></script>
<script src="../../asset/dist/js/sidebarmenu.js"></script>
<script src="../../asset/dist/js/custom.min.js"></script>
Page | 224
E-Fitness Hub
Indira Gandhi
National Open University

<script src="../../asset/assets/libs/flot/excanvas.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.pie.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.time.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.stack.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.crosshair.js"></script>
<script src="../../asset/assets/libs/flot.tooltip/js/jquery.flot.tooltip.min.js"></script>
<script src="../../asset/dist/js/pages/chart/chart-page-init.js"></script>
<asp:ContentPlaceHolder ID="scripts" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>

Supplier/Site1.Master.cs

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

namespace Fitness_Hub.supplier
{
public partial class Site1 : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["id"] == null)
{
Response.Redirect("index.aspx");
}
else
{
lblsession.Text = "<h4>" + Session["id"].ToString() + "</h4>";
}
}

protected void logout_Click(object sender, EventArgs e)


{
Session.RemoveAll();

Page | 225
E-Fitness Hub
Indira Gandhi
National Open University

Response.Redirect("index.aspx");
}
}
}

supplier/index.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs"


Inherits="Fitness_Hub.supplier.index" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Login</title>
<!--favicon-->
<link rel="icon" href="assets\images\favicon.ico" type="image/x-icon" />
<!-- Bootstrap core CSS-->
<link href="assets\css\bootstrap.min.css" rel="stylesheet" />
<!-- animate CSS-->
<link href="assets\css\animate.css" rel="stylesheet" type="text/css" />
<!-- Icons CSS-->
<link href="assets\css\icons.css" rel="stylesheet" type="text/css" />
<!-- Custom Style-->
<link href="assets\css\app-style.css" rel="stylesheet" />
<style type="text/css">
body {
background-size: 1400px !important;
background-image: url('assets/images/gallery/carousel-img-5.png');
margin-top: -35px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.9);
border-radius: 0px;
background-color: #f4f4f4;
}
Page | 226
E-Fitness Hub
Indira Gandhi
National Open University

::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5;
}

::-webkit-scrollbar-thumb {
border-radius: 0px;
background-color: #303952;
background-image: -webkit-linear-gradient(90deg,transparent,rgba(888, 888, 0, 0.4)
50%,transparent,transparent)
}

.animated {
animation-duration: 1.5s !important;
}

.resultt {
background-color: white;
width: 400px;
margin-left: 35%;
}

.chand {
border-top-left-radius: 20px;
border-bottom-right-radius: 20px;
width: 40%;
margin-top: 15px;
margin-left: 30%
}

#wrapper {
margin-top: -58px !important;
margin-top: -15px !important;
background-size: auto;
height: 500px;
width: 100% !important;
position: absolute;
opacity: 0.6;
background-repeat: no-repeat;
}

#card101 {
Page | 227
E-Fitness Hub
Indira Gandhi
National Open University

margin-top: 7%;
}

.card {
border-top-left-radius: 50px !important;
border-bottom-right-radius: 50px !important;
opacity: 0.9 !important;
}

.card-body {
border-top-left-radius: 50px !important;
border-bottom-right-radius: 50px !important;
}

@media only screen and (max-width:800px) {


#card101 {
margin-top: 17% !important;
}
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="wrapper">
</div>
<!--wrapper-->
<div id="card101" class="text-center">
<div class="card card-authentication1 mx-auto my-5 animated bounceInDown">
<div class="card-body" style="background: linear-gradient(20deg, #682a2a, #302a68); color:
white;">
<asp:Label ID="lblusername" runat="server" Text="" Font-Size="0.02"></asp:Label>
<div class="card-content p-2">
<div class="text-center">
<img src="assets\images\logo-icon.png">
</div>
<div class="card-title text-uppercase text-center py-3" style="color: white; font-family:
arial;">SUPPLIER (Sign In)</div>
<div class="form-group">
<div class="position-relative has-icon-right">
<label for="exampleInputUsername" class="sr-only">Username</label>
<asp:TextBox ID="txtUserName" runat="server" CssClass="form-control form-
control-rounded" placeholder="Username"></asp:TextBox>

Page | 228
E-Fitness Hub
Indira Gandhi
National Open University

<%--<input type="text" id="exampleInputUsername" class="form-control form-


control-rounded" placeholder="Username">--%>
<div class="form-control-position">
<i class="icon-user"></i>
</div>
</div>
</div>
<div class="form-group">
<div class="position-relative has-icon-right">
<label for="exampleInputPassword" class="sr-only">Password</label>
<asp:TextBox ID="txtPassword" TextMode="Password" runat="server"
CssClass="form-control form-control-rounded" placeholder="Password"></asp:TextBox>
<%--<input type="password" id="exampleInputPassword" class="form-control
form-control-rounded" placeholder="Password">--%>
<div class="form-control-position">
<i class="icon-lock"></i>
</div>
</div>
</div>
<div class="form-row mr-0 ml-0">
<div class="form-group col-6">
<div class="">
<style>
label {
padding-top: 2px !important;
color: white !important;
font-size: 13px;
margin-left: 57%;
width: 100%;
}

div.card-body {
color: black !important;
}
.chk-col-primary{
width:120% !important;
color:white !important;
border:1px solid white !important;
}
.chk-col-primary{
border:none !important;
}
.chk-col-primary > label{
Page | 229
E-Fitness Hub
Indira Gandhi
National Open University

font-size:12pt !important;
}
</style>
<asp:CheckBox ID="chkRememberMe" CssClass="filled-in chk-col-primary"
Font-Size="X-Large" runat="server" Text="Remember Me" ForeColor="Yellow" Checked="true"/>
</div>
</div>

</div>
<style>
.stylebtn{
background-color: #36A047;
border-color: #36A047;
}
</style>
<%--<button type="button" class="btn btn-primary btn-round btn-block waves-
effect waves-light" style="background-color: #36A047; border-color: #36A047;">Sign In</button>--
%>
<asp:Button ID="btnlog" runat="server" Text="Login" CssClass="btn btn-primary
btn-round btn-block waves-effect waves-light stylebtn" OnClick="btnlog_Click"/>
<hr />
<a href="../index.aspx" style="font-size:13pt; font-weight:bold;">HOME</a>
<div class="text-center pt-3">
<asp:Label ID="lblMessage" runat="server" Text="" style="font-
size:16px;"></asp:Label>
<br/>
<a href="javascript:void()" class="btn-social btn-social-circle btn-facebook waves-
effect waves-light m-1"><i class="fa fa-facebook"></i></a>
<a href="javascript:void()" class="btn-social btn-social-circle btn-google-plus
waves-effect waves-light m-1"><i class="fa fa-google-plus"></i></a>
<a href="javascript:void()" class="btn-social btn-social-circle btn-twitter waves-
effect waves-light m-1"><i class="fa fa-twitter"></i></a>

</div>
</div>

</div>

</div>

<asp:Label ID="lblsessionname" runat="server" Font-Size="0.02px" Text=""></asp:Label>


<!--Start Back To Top Button-->
<a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i></a>
Page | 230
E-Fitness Hub
Indira Gandhi
National Open University

<!--End Back To Top Button-->


</div>
<!--<div class="row badge text-center" style="background-color: #34495e; width: 100%; height:
40px; opacity: 0.8; position: absolute;">
<span class="comment" style="color: white; opacity: 0.7">Enter Your
Credentials to get Access</span>
</div>--->
<!-- Bootstrap core JavaScript-->
<script src="assets\js\jquery.min.js"></script>
<script src="assets\js\popper.min.js"></script>
<script src="assets\js\bootstrap.min.js"></script>
</form>
</body>
</html>

supplier/index.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.IO;
using System.Drawing;

namespace Fitness_Hub.supplier
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Session.RemoveAll();
if (!IsPostBack)
{
if (Request.Cookies["UserName"] != null && Request.Cookies["Password"] != null)

Page | 231
E-Fitness Hub
Indira Gandhi
National Open University

{
txtUserName.Text = Request.Cookies["UserName"].Value;
txtPassword.Attributes["value"] = Request.Cookies["Password"].Value;
}
}
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnlog_Click(object sender, EventArgs e)


{
try
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
if (chkRememberMe.Checked)
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(30);
Response.Cookies["Password"].Expires = DateTime.Now.AddDays(30);
}
else
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1);
Response.Cookies["Password"].Expires = DateTime.Now.AddDays(-1);

}
Response.Cookies["UserName"].Value = txtUserName.Text.Trim();
Response.Cookies["Password"].Value = txtPassword.Text.Trim();

con.Open();

SqlCommand cmd = new SqlCommand("spSupplierLog", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "SELECTLOG");

SqlParameter p3 = new SqlParameter("@SupplierEmail", txtUserName.Text);

SqlParameter p4 = new SqlParameter("@SupplierPassword", txtPassword.Text);

Page | 232
E-Fitness Hub
Indira Gandhi
National Open University

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p3);

cmd.Parameters.Add(p4);

SqlDataReader rd = cmd.ExecuteReader();

if (rd.HasRows)

{
rd.Read();

lblMessage.Text = "You are Authorized.";

Session["id"] = txtUserName.Text;

FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, true);

Response.Redirect("Dashboard.aspx");

Session.RemoveAll();

else
{
lblMessage.ForeColor = System.Drawing.Color.Red;
lblMessage.Text = "Invalid Username or Password";
}
}
}

catch (Exception ex)


{
lblMessage.Text = ex.Message;
}
}
}
}

Page | 233
E-Fitness Hub
Indira Gandhi
National Open University

supplier/AddProduct.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/supplier/Site1.Master"


AutoEventWireup="true" CodeBehind="AddProduct.aspx.cs"
Inherits="Fitness_Hub.supplier.AddProduct" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style>
#ContentPlaceHolder1_genderDDlist > tbody > tr > td {
font-size: 11pt;
line-height: 10pt;
width: 50pt !important;
padding-left: 2% !important;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">

Page | 234
E-Fitness Hub
Indira Gandhi
National Open University

<label for="fname" class="col-sm-3 text-right control-label col-form-


label">Product Name</label>
<div class="col-sm-9">
<asp:TextBox ID="txtprname" runat="server" CssClass="form-control"
placeholder="Product Name Here" Width="350"></asp:TextBox>
</div>
</div>

<div class="form-group row">


<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Quantity</label>
<div class="col-sm-9">
<asp:TextBox ID="txtqty" runat="server" CssClass="form-control"
placeholder="Quantity Here" Width="350" TextMode="Number"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Product Image</label>
<div class="col-sm-9">
<asp:FileUpload ID="filephoto" runat="server" CssClass="form-control"
Width="350" />
<asp:RegularExpressionValidator id="regexValidator" runat="server"
ControlToValidate="filephoto" ErrorMessage="Only JPG, JPEG and PNG Allowed"
ValidationExpression="(.*\.([Jj][Pp][Gg])|.*\.([Jj][Pp][Ee][Gg])|.*\.([Pp][Nn][Gg])$)"></asp:RegularE
xpressionValidator>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Supplier</label>
<div class="col-sm-9">
<asp:DropDownList ID="ddsup" runat="server" CssClass="form-control"
Width="350">
</asp:DropDownList>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-3 text-right control-label col-form-
label">Product Price(&#8377;)</label>
<div class="col-sm-9">
<asp:TextBox ID="txtprice" runat="server" CssClass="form-control"
placeholder="Price Here" Width="350" TextMode="Number"></asp:TextBox>
Page | 235
E-Fitness Hub
Indira Gandhi
National Open University

</div>
</div>
</div>
<div class="border-top">
<div class="card-body text-center">
<asp:Button ID="btnsub" runat="server" Text="Submit" CssClass="btn btn-
primary" Width="100" OnClick="btnsub_Click" />
<br />
<asp:Label ID="lblmsg" runat="server" Text="" Font-
Size="Large"></asp:Label>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT [SupplierName] FROM
[Supplier]"></asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

supplier/AddProduct.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

Page | 236
E-Fitness Hub
Indira Gandhi
National Open University

namespace Fitness_Hub.supplier
{
public partial class AddProduct : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(GetConnectionString());
string com = "Select * from Supplier where SupplierEmail='"+ Session["id"] + "'";
SqlDataAdapter adpt = new SqlDataAdapter(com, con);
DataTable dt = new DataTable();
adpt.Fill(dt);
ddsup.DataSource = dt;
ddsup.DataBind();
ddsup.DataTextField = "SupplierName";
ddsup.DataValueField = "SupplierId";
ddsup.DataBind();
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnsub_Click(object sender, EventArgs e)


{
lblmsg.Text = "";
using (SqlConnection con=new SqlConnection(GetConnectionString()))
{
SqlCommand cmd = new SqlCommand("spInventory",con);
cmd.CommandType = CommandType.StoredProcedure;

string ImageFile = "";


if (filephoto.HasFile)
{
string imgPath = "~/Upload/images/";
string thumbPath = "~/Upload/thumbnails/";

ImageFile = Path.GetFileName(Server.MapPath(filephoto.PostedFile.FileName));
ImageFile = ImageFile.Replace(" ", "-");
ImageFile = System.DateTime.Now.ToString("yyyyMMddHHmmss") + "-" + ImageFile;
thumbPath = thumbPath + ImageFile;
System.Drawing.Bitmap bmpUploadedImage = new
System.Drawing.Bitmap(filephoto.PostedFile.InputStream);
Page | 237
E-Fitness Hub
Indira Gandhi
National Open University

imgPath = imgPath + ImageFile;


filephoto.SaveAs(MapPath(imgPath));
}
else
{
ImageFile = "";
ImageFile = "";
}

try
{
con.Open();

SqlParameter p1 = new SqlParameter("@Action","Insert");


SqlParameter p2 = new SqlParameter("@ProductName", txtprname.Text);
SqlParameter p3 = new SqlParameter("@ProductQuantity",txtqty.Text);
SqlParameter p4 = new SqlParameter("@ProductAmount",txtprice.Text);
SqlParameter p5 = new SqlParameter("@ProductImage",ImageFile);
SqlParameter p6 = new SqlParameter("@ProductId", lblmsg.Text);
SqlParameter p7 = new SqlParameter("@ProductStatus", lblmsg.Text);
SqlParameter p8 = new SqlParameter("@SupplierId",ddsup.SelectedItem.Value);

cmd.Parameters.Add(p1);
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);

int k = cmd.ExecuteNonQuery();
if (k != 0)
{
string str = "Product has been successfully added!!";
Response.Write("<script language=javascript>alert('" + str + "');</script>");
txtprice.Text = "";
txtprname.Text = "";
txtqty.Text = "";
ImageFile = "";
ddsup.SelectedIndex = -1;
lblmsg.Text = "";
Page | 238
E-Fitness Hub
Indira Gandhi
National Open University

}
}
catch(Exception)
{
lblmsg.Text = "Product is not added/ Wrong Inputs!!";
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
}
}
}

supplier/AllProducts.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/supplier/Site1.Master"


AutoEventWireup="true" CodeFile="AllProducts.aspx.cs"
Inherits="Fitness_Hub.supplier.AllProducts" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card{
background-color:#eeeeee !important;
}
table{
background-color:none !important;

Page | 239
E-Fitness Hub
Indira Gandhi
National Open University

margin:0% !important;
}
tbody{
text-align:center !important;
}
.overflowgrid {
overflow-x: auto !important;
}
.table td{
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ProductId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="ProductName" HeaderText="Product Name"
SortExpression="ProductName">
<ItemStyle Width="200" />
</asp:BoundField>
<asp:TemplateField HeaderText=" Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("ProductImage","../Upload/images/{0}") %>' Height="200" Width="300" CssClass="text-center"
runat="server" />
<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"
Text="Download" CommandArgument='<%# Eval("ProductImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile" Width="80%"></asp:LinkButton>
</ItemTemplate>

<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:BoundField DataField="ProductQuantity" HeaderText="Product Quantity"
SortExpression="ProductQuantity">
</asp:BoundField>
<asp:BoundField DataField="ProductAmount" HeaderText="Product Amount"
SortExpression="ProductAmount">
</asp:BoundField>
Page | 240
E-Fitness Hub
Indira Gandhi
National Open University

<asp:CheckBoxField DataField="ProductStatus" HeaderText="Product Status"


SortExpression="ProductStatus" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT ProductId, ProductName, ProductImage,
ProductQuantity, ProductAmount, ProductStatus, SupplierEmail FROM [Inventory] inner join Supplier
on Inventory.SupplierId=Supplier.SupplierId where SupplierEmail=@SupplierEmail"
DeleteCommand="DELETE FROM [Inventory] WHERE [ProductId] = @ProductId"
InsertCommand="INSERT INTO [Inventory] ([ProductName], [ProductAmount]) VALUES
(@ProductName, @ProductAmount)" UpdateCommand="UPDATE [Inventory] SET [ProductName]
= @ProductName, [ProductAmount] = @ProductAmount WHERE [ProductId] = @ProductId">
<DeleteParameters>
<asp:Parameter Name="ProductId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductAmount" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="ProductAmount" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:SessionParameter Name="SupplierEmail" SessionField="id" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

Page | 241
E-Fitness Hub
Indira Gandhi
National Open University

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

supplier/AllProducts.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.supplier
{
public partial class AllProducts : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}

supplier/ChangePassword.aspx

Page | 242
E-Fitness Hub
Indira Gandhi
National Open University

<%@ Page Title="" Language="C#" MasterPageFile="~/supplier/Site1.Master"


AutoEventWireup="true" CodeBehind="ChangePassword.aspx.cs"
Inherits="Fitness_Hub.supplier.ChangePassword1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="card">
<div class="form-horizontal">
<div class="card-body text-center">
<h3 class="card-title">Add Informations</h3>
<br />
<div class="form-group row">
<label for="lname" class="col-sm-4 text-right control-label col-form-
label">Enter User-Id</label>
<div class="col-sm-8">
<asp:TextBox ID="txtsupplier" runat="server" CssClass="form-control"
placeholder="SupplierID Here" Width="300"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-4 text-right control-label col-form-
label">Enter Password</label>
<div class="col-sm-8">
Page | 243
E-Fitness Hub
Indira Gandhi
National Open University

<asp:TextBox ID="txtpassword" runat="server" CssClass="form-control"


placeholder="Password Here" Width="300"></asp:TextBox>
</div>
</div>
<div class="form-group row">
<label for="lname" class="col-sm-4 text-right control-label col-form-
label">Confirm Password</label>
<div class="col-sm-8">
<asp:TextBox ID="txtpasswordconf" runat="server" CssClass="form-control"
placeholder="Confirm Password" Width="300"></asp:TextBox>
</div>
</div>
</div>
<div class="border-top">
<div class="card-body text-center">
<asp:Button ID="btn1" runat="server" Text="Next" CssClass="btn btn-primary"
Width="100" OnClick="btn1_Click" />
<br />
<br />
<asp:Label ID="lblmsg" runat="server" Text="" Font-
Size="Large"></asp:Label>
</div>
</div>
</div>
</div>
</div>

</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

supplier/ChangePassword.aspx.cs

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
Page | 244
E-Fitness Hub
Indira Gandhi
National Open University

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

namespace Fitness_Hub.supplier
{
public partial class ChangePassword1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}
protected void Button1_Click(object sender, EventArgs e)
{

}
protected void btn1_Click(object sender, EventArgs e)
{
try
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
con.Open();

SqlCommand cmd = new SqlCommand("spSupplierLog", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "UPDATE");

SqlParameter p2 = new SqlParameter("@SupplierEmail", txtsupplier.Text);

SqlParameter p3 = new SqlParameter("@SupplierPassword", txtpasswordconf.Text);

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p2);

Page | 245
E-Fitness Hub
Indira Gandhi
National Open University

cmd.Parameters.Add(p3);

int k = cmd.ExecuteNonQuery();

if (k != 0)
{
lblmsg.ForeColor = System.Drawing.Color.Green;
lblmsg.Text = "Password Updated Successfully!!";
}

else
{
lblmsg.ForeColor = System.Drawing.Color.Red;
lblmsg.Text = "Invalid Username or Password";
}
}
}

catch (Exception ex)


{
lblmsg.Text = ex.Message;
}
}
}
}

supplier/Dashboard.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/supplier/Site1.Master"


AutoEventWireup="true" CodeBehind="Dashboard.aspx.cs"
Inherits="Fitness_Hub.supplier.Dashboard" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h2 class="page-title">Dashboard</h2>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
Page | 246
E-Fitness Hub
Indira Gandhi
National Open University

<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Library</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-danger text-center">
<h1 class="font-light text-white"><i class="mdi mdi-account"></i></h1>
<h3 class="font-bold text-white">Total Users</h3>
<h3 class="text-white">
<asp:Label ID="lblUser" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-success text-center">
<h1 class="font-light text-white"><i class="mdi mdi-factory"></i></h1>
<h3 class="font-bold text-white">Total Suppliers</h3>
<h3 class="text-white">
<asp:Label ID="lblSupplier" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
Page | 247
E-Fitness Hub
Indira Gandhi
National Open University

<div class="box bg-info text-center">


<h1 class="font-light text-white"><i class="mdi mdi-account-card-
details"></i></h1>
<h3 class="font-bold text-white">Total Trainers</h3>
<h3 class="text-white">
<asp:Label ID="lblTrainer" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="AllProducts.aspx">
<div class="card card-hover">
<div class="box bg-warning text-center">
<h1 class="font-light text-white"><i class="mdi mdi-cart"></i></h1>
<h3 class="font-bold text-white">Total Products</h3>
<h3 class="text-white">
<asp:Label ID="lblProduct" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-secondary text-center">
<h1 class="font-light text-white"><i class="mdi mdi-basket"></i></h1>
<h3 class="font-bold text-white">Total Orders</h3>
<h3 class="text-white">
<asp:Label ID="lblOrder" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-primary text-center">
<h1 class="font-light text-white"><i class="mdi mdi-dumbbell"></i></h1>
<h3 class="font-bold text-white">Total Appointments</h3>
Page | 248
E-Fitness Hub
Indira Gandhi
National Open University

<h3 class="text-white">
<asp:Label ID="lblAppointment" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from [User]"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Inventory"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Trainer"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Supplier"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from [Order]"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from
Appointment"></asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

supplier/Dashboard.aspx.cs

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
Page | 249
E-Fitness Hub
Indira Gandhi
National Open University

namespace Fitness_Hub.supplier
{
public partial class Dashboard : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
GetAppointment();
GetOrder();
GetUser();
GetSupplier();
GetProduct();
GetTrainer();
}
public void GetUser()
{
System.Data.DataView dv =
(DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
lblUser.Text = dv.Count.ToString();
}
public void GetSupplier()
{
System.Data.DataView dv1 =
(DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
lblSupplier.Text = dv1.Count.ToString();
}
public void GetTrainer()
{
System.Data.DataView dv2 =
(DataView)SqlDataSource3.Select(DataSourceSelectArguments.Empty);
lblTrainer.Text = dv2.Count.ToString();
}
public void GetProduct()
{
System.Data.DataView dv3 =
(DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty);
lblProduct.Text = dv3.Count.ToString();
}
public void GetOrder()
{
System.Data.DataView dv4 =
(DataView)SqlDataSource5.Select(DataSourceSelectArguments.Empty);
lblOrder.Text = dv4.Count.ToString();
Page | 250
E-Fitness Hub
Indira Gandhi
National Open University

}
public void GetAppointment()
{
System.Data.DataView dv5 =
(DataView)SqlDataSource6.Select(DataSourceSelectArguments.Empty);
lblAppointment.Text = dv5.Count.ToString();
}
}
}

user/Site1.Master

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site1.master.cs"


Inherits="Fitness_Hub.user.Site1" %>

<!DOCTYPE html>

<html dir="ltr" lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<!-- Favicon icon -->
<link rel="icon" type="image/png" sizes="16x16" href="../../asset/assets/images/favicon.png">
<title>E-Fitness Hub</title>
<!-- Custom CSS -->
<link href="../../asset/assets/libs/flot/css/float-chart.css" rel="stylesheet">
<link href="../../asset/dist/css/style.min.css" rel="stylesheet">
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<!-- ============================================================== -->
<!-- Preloader - style you can find in spinners.css -->
<!-- ============================================================== -->
<div class="preloader">
<div class="lds-ripple">

Page | 251
E-Fitness Hub
Indira Gandhi
National Open University

<div class="lds-pos"></div>
<div class="lds-pos"></div>
</div>
</div>
<div id="main-wrapper">
<!-- ============================================================== -->
<!-- Topbar header - style you can find in pages.scss -->
<!-- ============================================================== -->
<header class="topbar" data-navbarbg="skin5">
<nav class="navbar top-navbar navbar-expand-md navbar-dark">
<div class="navbar-header" data-logobg="skin5">
<!-- This is for the sidebar toggle which is visible on mobile only -->
<a class="nav-toggler waves-effect waves-light d-block d-md-none"
href="javascript:void(0)"><i class="ti-menu ti-close"></i></a>
<a class="navbar-brand" href="Dashboard.aspx">
<!-- Logo icon -->
<b class="logo-icon p-l-10">
<img src="../../asset/assets/images/logo-icon.png" alt="homepage" class="light-
logo" />

</b>
<span class="logo-text">
<!-- dark Logo text -->
<h3 class="light-logo mt-2 pt-1">E-Fitness Hub</h3>

</span>
</a>
<a class="topbartoggler d-block d-md-none waves-effect waves-light"
href="javascript:void(0)" data-toggle="collapse" data-target="#navbarSupportedContent" aria-
controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><i
class="ti-more"></i></a>
</div>
<div class="navbar-collapse collapse" id="navbarSupportedContent" data-
navbarbg="skin5">
<ul class="navbar-nav float-left mr-auto">
<li class="nav-item d-none d-md-block"><a class="nav-link sidebartoggler waves-
effect waves-light" href="javascript:void(0)" data-sidebartype="mini-sidebar"><i class="mdi mdi-
menu font-24"></i></a></li>

</ul>
<style>
.dropdown-item:hover {
color: #1F262D !important;
Page | 252
E-Fitness Hub
Indira Gandhi
National Open University

cursor: pointer;
}

.dropdown-item:focus {
color: white !important;
background-color: #1F262D !important;
}

.dropdown-item:visited {
color: white !important;
background-color: #1F262D !important;
}

.dropdown-item::after {
color: white !important;
background-color: #1F262D !important;
}
</style>
<ul class="navbar-nav float-right">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle text-muted waves-effect waves-dark pro-pic"
href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="../../asset/assets/images/users/1.jpg" alt="user" class="rounded-circle"
width="31"></a>
<div class="dropdown-menu dropdown-menu-right animated bg-inverse"
style="width: auto;">
<asp:Label ID="lblsession" runat="server" Text="" Font-Size="Larger"
CssClass="dropdown-item text-center pt-3 text-white"></asp:Label>
<span style="width: 100%;">
<asp:Button ID="logout" runat="server" CssClass="dropdown-item text-
center text-white" Font-Size="Larger" Text="Logout" OnClick="logout_Click" />
</span>
</div>
</li>
</ul>
</div>
</nav>
</header>
<aside class="left-sidebar" data-sidebarbg="skin5">
<!-- Sidebar scroll-->
<div class="scroll-sidebar">
<!-- Sidebar navigation-->
<nav class="sidebar-nav">
Page | 253
E-Fitness Hub
Indira Gandhi
National Open University

<ul id="sidebarnav" class="p-t-30">


<li class="sidebar-item"><a class="sidebar-link waves-effect waves-dark sidebar-
link" href="Dashboard.aspx" aria-expanded="false"><i class="mdi mdi-view-dashboard"></i><span
class="hide-menu">Dashboard</span></a></li>

<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="Profile.aspx" aria-
expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-menu">Profile</span></a>
</li>

<%--<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Product </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Product.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Add New Product </span></a></li>
<li class="sidebar-item"><a href="AllProduct.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">All Product </span></a></li>
</ul>
</li>--%>

<%--<li class="sidebar-item">
<a class="sidebar-link has-arrow waves-effect waves-dark"
href="javascript:void(0)" aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-
menu">Payment </span></a>
<ul aria-expanded="false" class="collapse first-level">
<li class="sidebar-item"><a href="Trainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-outline"></i><span class="hide-menu">Due Payment </span></a></li>
<li class="sidebar-item"><a href="AllTrainer.aspx" class="sidebar-link"><i
class="mdi mdi-note-plus"></i><span class="hide-menu">Payment History </span></a></li>
</ul>
</li>--%>

<li class="sidebar-item">
<a class="sidebar-link waves-effect waves-dark" href="ChangePassword.aspx"
aria-expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-menu">Change
Password</span></a>
</li>

<li class="sidebar-item">
Page | 254
E-Fitness Hub
Indira Gandhi
National Open University

<a class="sidebar-link waves-effect waves-dark" href="index.aspx" aria-


expanded="false"><i class="mdi mdi-receipt"></i><span class="hide-menu">Logout</span></a>
</li>

</ul>
</nav>
<!-- End Sidebar navigation -->
</div>
<!-- End Sidebar scroll-->
</aside>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
<script src="../../asset/assets/libs/jquery/dist/jquery.min.js"></script>
<script src="../../asset/assets/libs/popper.js/dist/umd/popper.min.js"></script>
<script src="../../asset/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../../asset/assets/libs/perfect-scrollbar/dist/perfect-scrollbar.jquery.min.js"></script>
<script src="../../asset/assets/extra-libs/sparkline/sparkline.js"></script>
<script src="../../asset/dist/js/waves.js"></script>
<script src="../../asset/dist/js/sidebarmenu.js"></script>
<script src="../../asset/dist/js/custom.min.js"></script>
<script src="../../asset/assets/libs/flot/excanvas.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.pie.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.time.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.stack.js"></script>
<script src="../../asset/assets/libs/flot/jquery.flot.crosshair.js"></script>
<script src="../../asset/assets/libs/flot.tooltip/js/jquery.flot.tooltip.min.js"></script>
<script src="../../asset/dist/js/pages/chart/chart-page-init.js"></script>
<asp:ContentPlaceHolder ID="scripts" runat="server">
</asp:ContentPlaceHolder>
</form>
</body>
</html>

user/Site1.Master.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

Page | 255
E-Fitness Hub
Indira Gandhi
National Open University

using System.Web.UI.WebControls;

namespace Fitness_Hub.user
{
public partial class Site1 : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["id"] == null)
{
Response.Redirect("index.aspx");
}
else
{
lblsession.Text = "<h4>" + Session["id"].ToString() + "</h4>";
}
}

protected void logout_Click(object sender, EventArgs e)


{
Session.RemoveAll();
Response.Redirect("index.aspx");
}
}
}

user/index.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs"


Inherits="Fitness_Hub.user.index" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Login</title>
Page | 256
E-Fitness Hub
Indira Gandhi
National Open University

<!--favicon-->
<link rel="icon" href="assets\images\favicon.ico" type="image/x-icon" />
<!-- Bootstrap core CSS-->
<link href="assets\css\bootstrap.min.css" rel="stylesheet" />
<!-- animate CSS-->
<link href="assets\css\animate.css" rel="stylesheet" type="text/css" />
<!-- Icons CSS-->
<link href="assets\css\icons.css" rel="stylesheet" type="text/css" />
<!-- Custom Style-->
<link href="assets\css\app-style.css" rel="stylesheet" />
<style type="text/css">
body {
background-size: 1400px !important;
background-image: url('assets/images/gallery/carousel-img-4.png');
margin-top: -35px;
}

::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.9);
border-radius: 0px;
background-color: #f4f4f4;
}

::-webkit-scrollbar {
width: 12px;
background-color: #F5F5F5;
}

::-webkit-scrollbar-thumb {
border-radius: 0px;
background-color: #303952;
background-image: -webkit-linear-gradient(90deg,transparent,rgba(888, 888, 0, 0.4)
50%,transparent,transparent)
}

.animated {
animation-duration: 1.5s !important;
}

.resultt {
background-color: white;
width: 400px;
margin-left: 35%;
Page | 257
E-Fitness Hub
Indira Gandhi
National Open University

.chand {
border-top-left-radius: 20px;
border-bottom-right-radius: 20px;
width: 40%;
margin-top: 15px;
margin-left: 30%
}

#wrapper {
margin-top: -58px !important;
margin-top: -15px !important;
background-size: auto;
height: 500px;
width: 100% !important;
position: absolute;
opacity: 0.6;
background-repeat: no-repeat;
}

#card101 {
margin-top: 7%;
}

.card {
border-top-left-radius: 50px !important;
border-bottom-right-radius: 50px !important;
opacity: 0.9 !important;
}

.card-body {
border-top-left-radius: 50px !important;
border-bottom-right-radius: 50px !important;
}

@media only screen and (max-width:800px) {


#card101 {
margin-top: 17% !important;
}
}
</style>
</head>
Page | 258
E-Fitness Hub
Indira Gandhi
National Open University

<body>
<form id="form1" runat="server">
<div id="wrapper">
</div>
<!--wrapper-->
<div id="card101" class="text-center">
<div class="card card-authentication1 mx-auto my-5 animated bounceInDown">
<div class="card-body" style="background: linear-gradient(20deg, #682a2a, #302a68); color:
white;">
<asp:Label ID="lblusername" runat="server" Text="" Font-Size="0.02"></asp:Label>
<div class="card-content p-2">
<div class="text-center">
<img src="assets\images\logo-icon.png">
</div>
<div class="card-title text-uppercase text-center py-3" style="color: white; font-family:
arial;">USER (Sign In)</div>
<div class="form-group">
<div class="position-relative has-icon-right">
<label for="exampleInputUsername" class="sr-only">Username</label>
<asp:TextBox ID="txtUserName" runat="server" CssClass="form-control form-
control-rounded" placeholder="Username"></asp:TextBox>
<%--<input type="text" id="exampleInputUsername" class="form-control form-
control-rounded" placeholder="Username">--%>
<div class="form-control-position">
<i class="icon-user"></i>
</div>
</div>
</div>
<div class="form-group">
<div class="position-relative has-icon-right">
<label for="exampleInputPassword" class="sr-only">Password</label>
<asp:TextBox ID="txtPassword" TextMode="Password" runat="server"
CssClass="form-control form-control-rounded" placeholder="Password"></asp:TextBox>
<%--<input type="password" id="exampleInputPassword" class="form-control
form-control-rounded" placeholder="Password">--%>
<div class="form-control-position">
<i class="icon-lock"></i>
</div>
</div>
</div>
<div class="form-row mr-0 ml-0">
<div class="form-group col-6">
<div class="">
Page | 259
E-Fitness Hub
Indira Gandhi
National Open University

<style>
label {
padding-top: 2px !important;
color: white !important;
font-size: 13px;
margin-left: 57%;
width: 100%;
}

div.card-body {
color: black !important;
}
.chk-col-primary{
width:120% !important;
color:white !important;
border:1px solid white !important;
}
.chk-col-primary{
border:none !important;
}
.chk-col-primary > label{
font-size:12pt !important;
}
</style>
<asp:CheckBox ID="chkRememberMe" CssClass="filled-in chk-col-primary"
Font-Size="X-Large" runat="server" Text="Remember Me" ForeColor="Yellow" Checked="true"/>
</div>
</div>

</div>
<%--<button type="button" class="btn btn-primary btn-round btn-block waves-
effect waves-light" style="background-color: #36A047; border-color: #36A047;">Sign In</button>--
%>
<asp:Button ID="btnlogin" runat="server" Text="Login" CssClass="btn btn-
primary btn-round btn-block waves-effect waves-light" style="background-color: #36A047; border-
color: #36A047;" OnClick="btnlogin_Click"/>
<hr />
<a href="../index.aspx" style="font-size:13pt; font-weight:bold;">HOME</a>
<div class="text-center pt-3">
<asp:Label ID="lblMessage" runat="server" Text="" style="font-
size:16px;"></asp:Label>
<br/>

Page | 260
E-Fitness Hub
Indira Gandhi
National Open University

<a href="javascript:void()" class="btn-social btn-social-circle btn-facebook waves-


effect waves-light m-1"><i class="fa fa-facebook"></i></a>
<a href="javascript:void()" class="btn-social btn-social-circle btn-google-plus
waves-effect waves-light m-1"><i class="fa fa-google-plus"></i></a>
<a href="javascript:void()" class="btn-social btn-social-circle btn-twitter waves-
effect waves-light m-1"><i class="fa fa-twitter"></i></a>

</div>
</div>

</div>

</div>

<asp:Label ID="lblsessionname" runat="server" Font-Size="0.02px" Text=""></asp:Label>


<!--Start Back To Top Button-->
<a href="javaScript:void();" class="back-to-top"><i class="fa fa-angle-double-up"></i></a>
<!--End Back To Top Button-->
</div>
<!--<div class="row badge text-center" style="background-color: #34495e; width: 100%; height:
40px; opacity: 0.8; position: absolute;">
<span class="comment" style="color: white; opacity: 0.7">Enter Your
Credentials to get Access</span>
</div>--->
<!-- Bootstrap core JavaScript-->
<script src="assets\js\jquery.min.js"></script>
<script src="assets\js\popper.min.js"></script>
<script src="assets\js\bootstrap.min.js"></script>
</form>
</body>
</html>

user/index.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;

Page | 261
E-Fitness Hub
Indira Gandhi
National Open University

using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.IO;
using System.Drawing;

namespace Fitness_Hub.user
{
public partial class index : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Session.RemoveAll();
if (!IsPostBack)
{
if (Request.Cookies["UserName"] != null && Request.Cookies["Password"] != null)
{
txtUserName.Text = Request.Cookies["UserName"].Value;
txtPassword.Attributes["value"] = Request.Cookies["Password"].Value;
}
}
}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}

protected void btnlogin_Click(object sender, EventArgs e)


{
try
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
if (chkRememberMe.Checked)
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(30);
Response.Cookies["Password"].Expires = DateTime.Now.AddDays(30);
}
else
{
Response.Cookies["UserName"].Expires = DateTime.Now.AddDays(-1);
Response.Cookies["Password"].Expires = DateTime.Now.AddDays(-1);

Page | 262
E-Fitness Hub
Indira Gandhi
National Open University

}
Response.Cookies["UserName"].Value = txtUserName.Text.Trim();
Response.Cookies["Password"].Value = txtPassword.Text.Trim();

con.Open();

SqlCommand cmd = new SqlCommand("spUserLog", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "SELECTLOG");

SqlParameter p3 = new SqlParameter("@UserEmail", txtUserName.Text);

SqlParameter p4 = new SqlParameter("@UserPassword", txtPassword.Text);

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p3);

cmd.Parameters.Add(p4);

SqlDataReader rd = cmd.ExecuteReader();

if (rd.HasRows)

{
rd.Read();

lblMessage.Text = "You are Authorized.";

Session["id"] = txtUserName.Text;

FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, true);

Response.Redirect("Dashboard.aspx");

Session.RemoveAll();

else
{
Page | 263
E-Fitness Hub
Indira Gandhi
National Open University

lblMessage.ForeColor = System.Drawing.Color.Red;
lblMessage.Text = "Invalid Username or Password";
}
}
}

catch (Exception ex)


{
lblMessage.Text = ex.Message;
}
}
}
}

user/Dashboard.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/user/Site1.Master" AutoEventWireup="true"


CodeBehind="Dashboard.aspx.cs" Inherits="Fitness_Hub.user.Dashboard" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h2 class="page-title">Dashboard</h2>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Library</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<!-- Column -->

Page | 264
E-Fitness Hub
Indira Gandhi
National Open University

<div class="col-md-6 col-lg-4 col-xlg-3">


<a href="#">
<div class="card card-hover">
<div class="box bg-danger text-center">
<h1 class="font-light text-white"><i class="mdi mdi-account"></i></h1>
<h3 class="font-bold text-white">Total Users</h3>
<h3 class="text-white">
<asp:Label ID="lblUser" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-success text-center">
<h1 class="font-light text-white"><i class="mdi mdi-factory"></i></h1>
<h3 class="font-bold text-white">Total Suppliers</h3>
<h3 class="text-white">
<asp:Label ID="lblSupplier" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<!-- Column -->
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-info text-center">
<h1 class="font-light text-white"><i class="mdi mdi-account-card-
details"></i></h1>
<h3 class="font-bold text-white">Total Trainers</h3>
<h3 class="text-white">
<asp:Label ID="lblTrainer" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
Page | 265
E-Fitness Hub
Indira Gandhi
National Open University

<a href="#">
<div class="card card-hover">
<div class="box bg-warning text-center">
<h1 class="font-light text-white"><i class="mdi mdi-cart"></i></h1>
<h3 class="font-bold text-white">Total Products</h3>
<h3 class="text-white">
<asp:Label ID="lblProduct" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-secondary text-center">
<h1 class="font-light text-white"><i class="mdi mdi-basket"></i></h1>
<h3 class="font-bold text-white">Total Orders</h3>
<h3 class="text-white">
<asp:Label ID="lblOrder" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
<div class="col-md-6 col-lg-4 col-xlg-3">
<a href="#">
<div class="card card-hover">
<div class="box bg-primary text-center">
<h1 class="font-light text-white"><i class="mdi mdi-dumbbell"></i></h1>
<h3 class="font-bold text-white">Total Appointments</h3>
<h3 class="text-white">
<asp:Label ID="lblAppointment" runat="server"></asp:Label>
</h3>
</div>
</div>
</a>
</div>
</div>
</div>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from [User]"></asp:SqlDataSource>
Page | 266
E-Fitness Hub
Indira Gandhi
National Open University

<br />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Inventory"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Trainer"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from Supplier"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from [Order]"></asp:SqlDataSource>
<br />
<asp:SqlDataSource ID="SqlDataSource6" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="select * from
Appointment"></asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

user/Dashboard.aspx.cs

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.user
{
public partial class Dashboard : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
GetAppointment();
GetOrder();
GetUser();
GetSupplier();
GetProduct();
Page | 267
E-Fitness Hub
Indira Gandhi
National Open University

GetTrainer();
}
public void GetUser()
{
System.Data.DataView dv =
(DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
lblUser.Text = dv.Count.ToString();
}
public void GetSupplier()
{
System.Data.DataView dv1 =
(DataView)SqlDataSource2.Select(DataSourceSelectArguments.Empty);
lblSupplier.Text = dv1.Count.ToString();
}
public void GetTrainer()
{
System.Data.DataView dv2 =
(DataView)SqlDataSource3.Select(DataSourceSelectArguments.Empty);
lblTrainer.Text = dv2.Count.ToString();
}
public void GetProduct()
{
System.Data.DataView dv3 =
(DataView)SqlDataSource4.Select(DataSourceSelectArguments.Empty);
lblProduct.Text = dv3.Count.ToString();
}
public void GetOrder()
{
System.Data.DataView dv4 =
(DataView)SqlDataSource5.Select(DataSourceSelectArguments.Empty);
lblOrder.Text = dv4.Count.ToString();
}
public void GetAppointment()
{
System.Data.DataView dv5 =
(DataView)SqlDataSource6.Select(DataSourceSelectArguments.Empty);
lblAppointment.Text = dv5.Count.ToString();
}
}
}

Page | 268
E-Fitness Hub
Indira Gandhi
National Open University

user/Profile.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/user/Site1.Master" AutoEventWireup="true"


CodeBehind="Profile.aspx.cs" Inherits="Fitness_Hub.user.Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="page-wrapper">
<div class="page-breadcrumb">
<div class="row">
<div class="col-12 d-flex no-block align-items-center">
<h4 class="page-title">Form Basic</h4>
<div class="ml-auto text-right">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Add Trainer</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<style>
.card {
background-color: #eeeeee !important;
}

table {
background-color: none !important;
margin: 0% !important;
}

tbody {
text-align: center !important;
}

.overflowgrid {
overflow-x: auto !important;
}

Page | 269
E-Fitness Hub
Indira Gandhi
National Open University

.table td {
vertical-align: middle !important;
}
</style>
<div class="container-fluid">
<div class="row overflowgrid">
<div class="card">
<asp:GridView ID="GridView1" CssClass="table" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="UserId"
DataSourceID="SqlDataSource2" Width="100%" BorderStyle="Solid" BackColor="#CCCCCC"
BorderColor="#999999" BorderWidth="3px" CellPadding="4" CellSpacing="2" ForeColor="Black">
<Columns>
<asp:BoundField DataField="UserName" HeaderText="Name"
SortExpression="UserName"></asp:BoundField>
<asp:BoundField DataField="UserGender" HeaderText="Gender"
SortExpression="UserGender"></asp:BoundField>
<asp:BoundField DataField="UserPhone" HeaderText="Phone"
SortExpression="UserPhone"></asp:BoundField>
<asp:TemplateField HeaderText=" Image" ItemStyle-CssClass="text-center pds">
<ItemTemplate>
<asp:Image ID="Image1" ImageUrl='<%#
Eval("UserImage","../Upload/images/{0}") %>' Height="300" Width="400" CssClass="text-center"
runat="server" />
<asp:LinkButton ID="lnkDownload" CssClass="text-success font-bold font-18"
Text="Download" CommandArgument='<%# Eval("UserImage","../Upload/images/{0}") %>'
runat="server" OnClick="DownloadFile" Width="80%"></asp:LinkButton>
</ItemTemplate>
<ItemStyle CssClass="text-center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Height">
<ItemTemplate>
<asp:Label ID="lblHeight" runat="server" Text='<%#Eval("UserHeight")
%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtHeight" runat="server" Text='<%#Bind("UserHeight")
%>' TextMode="SingleLine"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="UserWeight" HeaderText="UserWeight"
SortExpression="UserWeight" />
<asp:TemplateField HeaderText="D.O.B">
<ItemTemplate>
Page | 270
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Label ID="DateAddedLabel" runat="server" Text='<%#


Eval("UserDOB", "{0:d MMM yyyy}") %>'
Height="2.8%" Width="105pt" Font-Size="12pt"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText="Edit" ShowEditButton="True" />
</Columns>

<FooterStyle BackColor="#CCCCCC" />


<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<RowStyle BackColor="White" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#808080" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#383838" />

</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$
ConnectionStrings:GymCon %>" SelectCommand="SELECT * FROM [User] WHERE ([UserEmail]
= @UserEmail)" DeleteCommand="DELETE FROM [User] WHERE [UserId] = @UserId"
InsertCommand="INSERT INTO [User] ([UserName], [UserGender], [UserPhone], [UserHeight],
[UserWeight], [UserDOB]) VALUES (@UserName, @UserGender, @UserPhone, @UserHeight,
@UserWeight)" UpdateCommand="UPDATE [User] SET [UserName] = @UserName, [UserGender]
= @UserGender, [UserPhone] = @UserPhone, [UserHeight] = @UserHeight, [UserWeight] =
@UserWeight WHERE [UserId] = @UserId">
<DeleteParameters>
<asp:Parameter Name="UserId" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="UserGender" Type="String" />
<asp:Parameter Name="UserPhone" Type="String" />
<asp:Parameter Name="UserHeight" Type="Decimal" />
<asp:Parameter Name="UserWeight" Type="Decimal" />
</InsertParameters>
<SelectParameters>
<asp:SessionParameter Name="UserEmail" SessionField="id" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="UserGender" Type="String" />
Page | 271
E-Fitness Hub
Indira Gandhi
National Open University

<asp:Parameter Name="UserPhone" Type="String" />


<asp:Parameter Name="UserHeight" Type="Decimal" />
<asp:Parameter Name="UserWeight" Type="Decimal" />
</UpdateParameters>
</asp:SqlDataSource>
</div>
</div>
</div>
</div>

<script src="../../assets/libs/jquery/dist/jquery.min.js"></script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="scripts" runat="server">
</asp:Content>

user/Profile.aspx.cs

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.user
{
public partial class Profile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Page | 272
E-Fitness Hub
Indira Gandhi
National Open University

Response.WriteFile(filePath);
Response.End();
}
}
}

user/ChangePassword.aspx

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fitness_Hub.user
{
public partial class Profile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void DownloadFile(object sender, EventArgs e)
{
string filePath = (sender as LinkButton).CommandArgument;
Response.ContentType = ContentType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" +
Path.GetFileName(filePath));
Response.WriteFile(filePath);
Response.End();
}
}
}

user/ChangePassword.aspx.cs

Page | 273
E-Fitness Hub
Indira Gandhi
National Open University

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.IO;
using System.Drawing;

namespace Fitness_Hub.user
{
public partial class ChangePassword : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
public string GetConnectionString()
{
return ConfigurationManager.ConnectionStrings["GymCon"].ConnectionString;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
con.Open();

SqlCommand cmd = new SqlCommand("spUserLog", con);

cmd.CommandType = CommandType.StoredProcedure;

SqlParameter p1 = new SqlParameter("@Action", "UPDATE");

SqlParameter p2 = new SqlParameter("@UserEmail", txtuser.Text);

SqlParameter p3 = new SqlParameter("@UserPassword", txtpassconf.Text);


Page | 274
E-Fitness Hub
Indira Gandhi
National Open University

cmd.Parameters.Add(p1);

cmd.Parameters.Add(p2);

cmd.Parameters.Add(p3);

int k = cmd.ExecuteNonQuery();

if (k != 0)
{
lblmessage.ForeColor = System.Drawing.Color.Green;
lblmessage.Text = "Password Updated Successfully!!";
}

else
{
lblmessage.ForeColor = System.Drawing.Color.Red;
lblmessage.Text = "Invalid Username or Password";
}
}
}

catch (Exception ex)


{
lblmessage.Text = ex.Message;
}
}
}
}

5.3 TESTING APPROACH

5.3.1 UNIT TESTING

Unit testing is a level of software testing where individual units/ components of a


software are tested. The purpose is to validate that each unit of the software performs as
designed. A unit is the smallest testable part of any software. It usually has one or a few
inputs and usually a single output. In procedural programming, a unit may be an
individual program, function, procedure, etc. In object-oriented programming, the

Page | 275
E-Fitness Hub
Indira Gandhi
National Open University

smallest unit is a method, which may belong to a base/ super class, abstract class or
derived/ child class. (some treat a module of an application as a unit. This is to be
discouraged as there will probably be many individual units within that module.) Unit
testing frameworks, drivers, stubs, and mock/ fake objects are used to assist in unit
testing. Unit testing, a testing technique using which individual modules are tested to
determine if there are any issues by the developer himself. It is concerned with functional
correctness of the standalone modules.

 The main aim is to isolate each unit of the system to identify, analyze and fix the
defects. Reduces Defects in the Newly developed features or reduces bugs when
changing the existing functionality.

 Reduces Cost of Testing as defects are captured in very early phase.

 Improves design and allows better refactoring of code.

 Unit Tests, when integrated with build gives the quality of the build as well.

5.3.2 INTEGRATION TESTING

Integration testing is a level of software testing where individual units are combined and
tested as a group. The purpose of this level of testing is to expose faults in the
interaction between integrated units. Test drivers and test stubs are used to assist in
Integration Testing. integration testing is the process of testing the interface between
two software units or module. It’s focus on determining the correctness of the interface.
The purpose of the integration testing is to expose faults in the interaction between
integrated units. Once all the modules have been unit tested, integration testing is
performed.
Integration test approaches –There are four types of integration testing approaches.
Those approaches are the following:
1. Big-Bang Integration Testing –
It is the simplest integration testing approach, where all the modules are combining and
verifying the functionality after the completion of individual module testing. In simple
words, all the modules of the system are simply put together and tested. This approach is
practicable only for very small systems. If once an error is found during the integration
testing, it is very difficult to localize the error as the error may potentially belong to any
of the modules being integrated. So, debugging errors reported during big bang
integration testing are very expensive to fix.
Page | 276
E-Fitness Hub
Indira Gandhi
National Open University

2. Bottom-Up Integration Testing –


In bottom-up testing, each module at lower levels is tested with higher modules until all
modules are tested. The primary purpose of this integration testing is, each subsystem is
to test the interfaces among various modules making up the subsystem. This integration
testing uses test drivers to drive and pass appropriate data to the lower level modules.

3. Top-Down Integration Testing –


Top-down integration testing technique used in order to simulate the behaviour of the
lower-level modules that are not yet integrated.In this integration testing, testing takes
place from top to bottom. First high-level modules are tested and then low-level
modules and finally integrating the low-level modules to a high level to ensure the
system is working as intended.

4. Mixed Integration Testing –


A mixed integration testing is also called sandwiched integration testing. A mixed
integration testing follows a combination of top down and bottom-up testing approaches.
In top-down approach, testing can start only after the top-level module have been coded
and unit tested. In bottom-up approach, testing can start only after the bottom level
modules are ready. This sandwich or mixed approach overcomes this shortcoming of the
top-down and bottom-up approaches. A mixed integration testing is also called
sandwiched integration testing.

Page | 277
E-Fitness Hub
Indira Gandhi
National Open University

6.0 RESULTS AND DISCUSSION

6.1 TEST REPORTS


This are following test we have done in our project

SR. ACTION INPUT DATA OUPUT DATA EXPECTED DATA PASS/FAIL


NO.

1. PRESS SIGN UP ENTER WRONG ID ERROR MESSAGE ERROR MESSAGE PASS


BUTTON & PASSWORD

2. PRESS SIGN UP ENTER ID & REDIRECT TO REDIRECT TO PANEL PASS


BUTTON PASSWORD PANEL

3. SAVE PRODUCT (AT ENTER PRODUCT DATA IS NOT DATA IS FAIL


ADMIN PANEL) DETAILS SAVED SUCESSFULLY SAVED

4. PRESS ENTER NAME, NOT POPUP POPUP ALERT FOR FAIL


APPOINTMENT PHONE NO,EMAIL ALERT FOR SUCCESSFUL MSG
BUTTON(AT MAIN SUCCESSFUL MSG
WEBISTE)

5. ADD SUPPLIER(AT ENTER SUPPLIER POPUP ALERT POPUP ALERT DATA PASS
ADMIN PANEL) REQUIRED DETAILS DATA IS SAVED IS SAVED

6. ADD DAILY ENTER NAME POPUP ALERT POPUP ALERT DATA PASS
EXPENSES(AT ,AMOUNT,DESC OF DATA IS SAVED IS SAVED
ADMIN PANEL) EXPENSES

7. NEW ORDER(AT CLICK ON FLITER SHOWING OLD SHOWING NEW GRID FAIL
ADMIN PANEL) NEW ORDER GRID WITH NEW ORDER
RECORD

8. NEW CLICK ON SHOWING NEW SHOWING NEW GRID PASS


APPOINTMENT(AT APPOINTMENT GRID WITH NEW WITH NEW
ADMIN PANEL) APPOINTMNET APPOINTMNET DATE
DATE

Page | 278
E-Fitness Hub
Indira Gandhi
National Open University

9. ADD SALARY(AT ENTER TRAINOR ID POPUP ALERT POPUP ALERT PASS


ADMIN PANEL) , NAME,SALARY SALARY IS SAVED SALARY IS SAVED

10. ADD ENTER DATA IS SAVED DATA IS SAVED AND FAIL


INVENTORY(AT NAME,IMAGE, AND SHOW IN NOT SHOWING IN
SUPPLIER PANEL) DESC, MAIN WEBSITE WEBSITE
AMOUNT,ETC TOO

11. EDIT UPDATE REQUIRED POPUP ALERT POPUP ALERT DATA PASS
PROFILE(TRAINOR DETAILS DATA IS SAVED IS SAVED
PANEL)

12. BMI CALCULTOR ENTER WEIGHT, SHOW CORRECT SHOW CORRECT BMI PASS
HEIGHT,AGE BMI

13. SCHEDULE WITHOT USER ID OPEN LOGIN OPEN LOGIN FORM PASS
LOGIN TRY TO FORM
ACCESS THE
SCHEDULE

14. CHANGE ENTER OLD ERROR “OLD ERROR “OLD PASSS


PASSWORD PASSWORD AND PASSWORD AND PASSWORD AND
NEW PASSWORD NEW PASSWORD NEW PASSWORD
SAME AS OLD CANT BE SAME” CANT BE SAME”
PASSWORD

15. CHANGE ENTER OLD POPUP ALERT POPUP ALERT FAIL


PASSWORD PASSWORD AND PASSWORD IS PASSWORD IS
NEW PASSWORD NOT CHANGE CHANGE
DIFFERENT FROM SUCCESFULLY SUCCESFULLY
OLD PASSWORD

16. REGISTRATION ENTER NEW POPUP ALERT POPUP ALERT DATA PASS
MEMBER DETAILS DATA IS SAVED IS SAVED

6.2 USER DOCUMENTATION

The users of the system should have knowledge of computer , internet and have internet connection too.
The system will support four types of users admin, member, tranior and supplier. Member will have

Page | 279
E-Fitness Hub
Indira Gandhi
National Open University

access to member functions similarly supplier will have access to member functions and tranior will have
access to there functions and the admin will have access to any functions.

The Member should be able to do the following functions:


 Calculate bmi
 Edit profile
 Get schedule
 Give order
 Edit profile

The admin should be able to do the following functions:


 Get order
 Add tranior
 Add supplier
 Add expenses
 Change password
 Add inventory
 Check appointments
 Check new order
 edit profile

The supplier should be able to do the following functions:


 Get inventory
 Update inventory
 Delete inventory
 edit profile

The tranior should be able to do the following functions:


 mark attendance
 edit profile

Page | 280
E-Fitness Hub
Indira Gandhi
National Open University

CHAPTER 7: CONCLUSIONS

7.1 CONCLUSION

This system has been developed with much care that it is free from error and at the same time
its efficient and less time consuming. The important thing is that the system is robust .the entire
system is secured .also provision is provided for future development in the system. The entire
system is secured and anyone can access this at any where with there login id and passwords.
The database approach of developing the system helped in
 Reduce Redundancy
 Improving data consistency
 Developing a specific error free and flexible system
Thus the e-fitness hub system was implemented successfully. this will help the manager to get
all record in one basket and also help user to watch online videos sitting at home

7.2 LIMITATIONS OF THE SYSTEM

We have tried to give more and more facilities in a given time, but many things are untouched
which can be added in future. In the following section are:-
 Our system have no payment gateway.
 Receptionist or a staff member should be always present to enter the data of the
customer.
 Generation of new passwords is not possible.
 Supplier always need approval for add new inventory
 Too many details to be filled for some entities.

7.3 FUTURE SCOPE OF THE APPLICATION

The software has been developed in such a way that it can accept modifications and further
changes. The software is very user friendly and future any changes can be done easily. Software
restructuring is carried out. Software restructuring modifies source code in an effort to make it
amenable to future changes. In general, restructuring does not modify the overall program
architecture. It tends to focus on the design details of individual modules and on local data
structure defined within modules. Every system should allow scope for further development or
enhancement. The system can be adapted for any further development. The system is so flexible
Page | 281
E-Fitness Hub
Indira Gandhi
National Open University

to allow any modification need for the further functioning of programs. Since the objectives
may be brought broad in future, the system can be easily modified accordingly, as the system
has been modularized. The future expansion can be done in a concise manner in order to
improve the efficiently of the system.

Page | 282
E-Fitness Hub
Indira Gandhi
National Open University

REFERENCES

 Reference Site(“ https://www.fitnessfirst.net.in/”)


 Reference Site(“https://www.worldgym.com/”)
 Google
 Wikipedia
BOOK NAME AUTHOR NAME Publisher’s Name

1. Understanding .NET David Chappell Pearson

2. Professional .NET Joe Duffy Wiley


Framework 2.0

3. An Introduction to DBMS Bipin C Desai Tata Graw Hills


Approach

Page | 283
E-Fitness Hub
Indira Gandhi
National Open University

SYNOPSIS

Page | 284
E-Fitness Hub
Indira Gandhi
National Open University

1. INTRODUCTION

This project "E-fitness Hub" is a web based project manages all record of gym. As it is web based so
any one can access at anywhere with having internet connection.The Fitness Hub requires a system that
will handle all the necessary and minute details easily and proper database security accordingly to the
user. They requires web Based application , in which they will store data about members, employees,
products, payroll, receipts of members etc & all transactions that occur in Gym and lock-up with
graphical user interface(GUI) and user can access and get there schedule on mobile phone.
The admin panel of this application perform various operation like add new trainer , add new supplier
,add daily expenses, inventory management ,product management, order management.

a. BACKGROUND

We have done a project one-fitness hub. E-Fitness Hub is a step forward towards healthy lifestyle, in
day to day activities human effort getting double and the health is getting brutally affected. This
system stores employee, member, and payroll, receipts, and products information. It also provides the
facility of search & advanced search for searching the records efficiently & immediately. This system
provides data storing & report generation with graphical user interface (GUI). It is very difficult to
keep a track of your activities that are affecting our health; E-Fitness hub is an effective solution
The current system is time consuming and also it is very costly, because it involves a lot of paperwork.
To manually handle the system was very difficult task. But now-a-days computerization made easy to
work.

b. OBJECTIVE

The main objective of this web application is:


 Full access to other routines and charts that is out of your planning requirements, but still there.
 To design and develop a user-friendly system.
 To develop an accurate and flexible system, it will eliminate
data redundancy.
 Computerization can be helpful as means of saving time &
money.
 It Can Have Maintained All Books of Accounts & Final Results.
 To provide better graphical user interface..
 Less Paperwork and Save Manpower.
 Easy to operate and easy access of videos.

Page | 285
E-Fitness Hub
Indira Gandhi
National Open University

 Less chances of information leakage.


 Provides security to data by using login & password

c. PURPOSE & SCOPE

i. PURPOSE

The following are the purpose why the current system should be computerized/ made
 To reduce the burden of paper work
 To increase efficiency with reduced cost.
 To save time management for recording details of each and every member and
employee.
 To generate required reports easily.
 Sell online products
 One can easily find a healthy routine, exercise charts for better and healthy life.
 Availability of good stuffs like Gym tools, Supplements (Natural), Diet Charts, etc. You
can choose any of the given routines and follow on your daily life to get 3 times better
result of your regular dieting plan.
 There are hundreds of motivational videos and also a list of tutorials by the Professional
trainers.
 E-Fitness Hub also does events and promotes those customers/ followers who regularly
follow and implement these given routines in their lives.
 Provide global platform to e-fitness hub
ii. Scope

 Storing information of members, trainer & admin.


 The proposed system is highly secured, because for login the system it requires the
username and password which make this web application more secure.
 It maintains report for all criteria and transactions.
 Stores information about regular products.
 Check validity of information provided by user.
 Storing information of members according to their id.
 It provides wide range of certain criteria in each slide the client is working for better and
quicker solution.
 . Manages member information separately for all exercise and employee information
separately for considering the requirements of gym.

Page | 286
E-Fitness Hub
Indira Gandhi
National Open University

 This system can run on any OS or mobile phone.


 Generating reports for different id.

Page | 287
E-Fitness Hub
Indira Gandhi
National Open University

2. SURVEY OF TECHNOLOGIES

HTML stands for Hypertext Markup Language, and it is the most widely used language to write
Web Pages. Hypertext refers to the way in which Web pages (HTML documents) are linked together.
Thus, the link available on a webpage is called Hypertext.

As its name suggests, HTML is a Markup Language which means you use HTML to simply "mark-
up" a text document with tags that tell a Web browser how to structure it to display.

CSS stands for Cascading Style Sheets. It decides how HTML elements are to be displayed on screen,
paper, or in other media. It saves a lot of work. It can control the layout of multiple web pages all at
once.

JQuery is a fast and concise JavaScript library created by John Resig in 2006. JQuery simplifies
HTML document traversing, event handling, animating, and Ajax interactions for Rapid Web
Development.

Bootstrap is a free front-end framework for faster and easier web development. Bootstrap includes
HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals,
image carousels and many other, as well as optional JavaScript plug-in. Bootstrap also gives you the
ability to easily create responsive designs

C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and


approved by European Computer Manufacturers Association (ECMA) and International Standards
Organization (ISO). It is designed for Common Language Infrastructure (CLI), which consists of the
executable code and runtime environment that allows use of various high-level languages on different
computer platforms and architectures.

ASP.NET is a web application framework developed and marketed by Microsoft to allow


programmers to build dynamic web sites. It allows you to use a full featured programming language
such as C# or VB.NET to build web applications easily. This tutorial covers all the basic elements of
ASP.NET that a beginner would require to get started.

MS SQL Server is a relational database management system (RDBMS) developed by Microsoft. This
product is built for the basic function of storing retrieving data as required by other applications. It can
be run either on the same computer or on another across a network. This tutorial explains some basic
and advanced concepts of SQL Server such as how to create

Page | 288
E-Fitness Hub
Indira Gandhi
National Open University

3. REQUIREMENTS AND ANALYSIS

3.1 PROBLEM DEFINITION

3.1.1 SYSTEM STUDY


It is always important to study and recognize the problems of existing system, which will help
in finding out the requirements for the new system. System study helps in finding different
alternatives for better solution.
The project study basically deals with different operations and different steps we take like
1. Data gathering.
2. Study of existing system.
3. Analysing problem.
4. Studying various documents.
5. Feasibility study for further improvements.
First, we collected all the information, what they want.
Then we studied the working of the current system which is done
manually. We noted the limitation of that system which motivated
us to have new system. With the help of these documents we got basic ideas about the system as
well as input output of the developed system.

3.1.2 PROBLEM WITH EXISTING SYSTEM


The fitness hub is working manually. The current system is time consuming and also it is very
costly, because it involves a lot of paperwork. Lot of space required to store registers and papers
which hold valuable data.To manually handle the system was very difficult task. But now-a-
days computerization made easy to work.The following are the reasons why the current system
should be computerized:
 To increase accuracy in work (like human calculation error, wrong entering customer
details)
 To increase efficiency with reduced cost.
 To reduce the burden of paper work.
 To save time management for recording details of each and
 Every member and employee.
 To increase security so that UNAUTHORIZED USER CAN NO ACCESS OUR DATA
 To generate required reports easily.

3.1.3 Limitations of existing system:


Page | 289
E-Fitness Hub
Indira Gandhi
National Open University

 Time consumption: As the records are to be manually maintained it consumes a lot of time.
 No reminder for customer and Purchaser.
 Lastly, it was not offers a user friendly work environment.
 A large amount of data cannot be viewed at a glance.
 No security as data can be misplaced or damaged.
 Paper work: Lot of paper work is involved as the records are maintained in the files &
registers.
 Storage requirements: As files and registers are used the storage space requirement is
increased.
 Less reliable: Use of papers for storing valuable data information is not at all reliable.
 No Accuracy: As the system is in manual there are lot many chances of human errors. These
can cause errors in calculating mechanism or maintaining customer details.

3.1.4 NEED OF NEW SYSTEM

Working with current system is quite tedious, complicated and time consuming task. It may lead errors
.certain operations such as surfing searching, adding, removing, entries cannot be done efficiently.
Maintaining different registers for various activities such as storing and searching data which is tedious
and time consuming task.Generating reports, bills are much tedious task with new system.

3.2 REQUIREMENTS SPECIFICATION

3.2.1 FUNCTIONAL REQUIREMENTS

I. The system runs of IIS server so it needed that server must have IIS version 10.0
available.
II. We have used HTML for server side scripting so the current version of HTML must
be available on the server.
III. MS SQL Server database has been used for storing the data of the website.
IV. HTML has been used for creating the layout of the web application.
V. CSS has been used for creating the designing of the web pages.
VI. Asp.Net has been implemented on the system for performing all of the client side
server validation.
Also module use in this are

Page | 290
E-Fitness Hub
Indira Gandhi
National Open University

Admin

Members
Login E-Fitness Hub

Product
BMI Cal.
Gym Admission

Login: - Used for managing the login details. In this module it also prevents form unauthorized access.
If we forget password, we can easily change the password without any problem.

Member: - In this module, Admin can see the membership details which include:
 MEMBER DETAILS (like Member id, Name, Gender, Address, Date of birth, Phone number).
 MEMBERSHIP DETAILS (like Membership type, Expiration date).
 ACCOUNT INFORMATION (like Due date, Amount Due, Amount Paid, Days late, Balance).
After processing all this information records are saved and in this module itself there is a provision for
report generation for viewing details of all the members. There is also a provision for generating a
receipt for an individual member thus again giving some of his relevant details.

Admin: - This module is only access by admin .Here admin see details of Trainer, supplier and members.
Admin also get daily reports on order and see all the details of each and every things. S/he also schedule
class’s time or package cost. Admin also provide unique username and password.

BMI Calculation:- In this module the system keeps track of member BMI and tracks improvement on
get weekly and monthly reports to user and admin.

Page | 291
E-Fitness Hub
Indira Gandhi
National Open University

Gym Admission:- In This Module User Data Can Be Entered For New Members Including Name ,
Age , Height , Weight , Package And More Details

3.2.2 Non-Functional Requirements

 Performance: System should be able to handle multiple users at a time using any of the web
browsers.
 Availability: The project will be deployed on a public shared server so it will be available all
the time and will be accessible anywhere of the world using internet.
 Security: We have implemented a lot of security mechanism to avoid hacking the system by
outer world.
 Maintainability: It is very easy to maintain the system. The system has been developed on
HTML so anyone who has the knowledge of HTML, can easily maintain the system.
 Portability: Yes this system is portable and we can switch the servers very easily.
 Browser Compatibility: The project being a web based required compatibility with at least the
popular web browsers. Microsoft Windows XP and above, Linux and Macintosh being the
current popular OS and Microsoft Internet Explorer, Mozilla Firefox, Opera, Safari and Google
Chrome being the currently popular web browser.

3.3 PLANNING AND SCHEDULING

Scheduling is an inexact process in that it tries to predict the future. While it is not possible to know with
certainty how long a project will take, there are techniques that can increase our likelihood of being close.
If we are close in our planning and estimating, we can manage the project to achieve the schedule by
accelerating some efforts or modifying approaches to meet required deadlines.

One key ingredient in the scheduling process is experience in the project area; another is experience with
scheduling in general. In every industry area there will be a body of knowledge that associates the
accomplishment of known work efforts with time duration.

Scheduling consists several functions: -

1) GANTT Chart
2) PERT Chart

3.3.1 GANTT CHART

Page | 292
E-Fitness Hub
Indira Gandhi
National Open University

A Gantt chart is a graphical representation of the duration of tasks against the progression of time. A
Gantt chart is a useful tool for planning and scheduling projects. It is helpful when monitoring a
project's progress. It helps plan and monitor project development or resource allocation. In a Gantt
chart, each task takes up one row. Dates run along the top in increments of days, weeks or months.
Rows of bars in the Gantt chart show the start and end dates of each task in the project. Tasks may run
sequentially, in parallel or overlapping.

A Gantt chart is an excellent tool in the hands of project managers who wish to visualize, schedule, and
track scheduled and actual progress of projects. Its graphical nature allows executives and non-
managers to readily understand project flow, without a requiring a complete tutorial in project
management.

A Gantt chart lets us see immediately what should have been achieved at any point in time.

Use Gantt chart at project scheduling stage to: -

 Assess time characteristics to a project


 Show the task order
 Define resources involved
 Show links between scheduled task.

EFFORTS
(PLAN DAYS-------------------->
ACTIVITY PLAN/ DAYS)
ACTUA
L
Preliminary Study Plan 3
Actual 4
Requirements of Plan 3
Project
Actual 3
scheduling the Plan 2
project
Actual 4
Design Plan 10
Actual 10
Coding Plan 30

Page | 293
E-Fitness Hub
Indira Gandhi
National Open University

Actual 38
Testing Plan 15
Actual 18
Maintenance Plan 15
Actual 12

Total Planned Days => 78


Total Actual Days => 89

3.3.2 PERT CHART

The Program Evaluation and Review Technique (PERT) is a network model that allows for
randomness in activity completion times. It has the potential to reduce both the time and cost required
to complete a project. A PERT chart is a project management tool used to schedule, organize, and
coordinate tasks within a project
Complex projects require a series of activities, some of which must be performed sequentially and
others that can be performed in parallel with other activities. This collection of series and parallel tasks
can be modeled as a network.

Benefits of PERT: -

PERT is useful because it provides the following information:

 Expected project completion time.


 Probability of completion before a specified date.

 3.4 Software and Hardware Requirement

SOFTWARE REQUIREMENTS

S.No Name Software

1. Operating System Windows 2000, XP, 7, 8, 8.1


Upwards

Page | 294
E-Fitness Hub
Indira Gandhi
National Open University

2. Web Browser IE4, Netscape, IE, Chrome,


Upwards

3. Development Tools/Front End C#, HTML5, CSS3,


Bootstrap, JQuery, etc.

4. Back End MSSQL Server 2017

HARDWARE REQUIREMENTS

S.No Name Hardware

1. Processor Intel Core2 Duo

2. Motherboard DG31EC

3. RAM 1 GB

4. Hard drive 160 GB


5.
Monitor 15” LCD

3.5 PRELIMINARY PRODUCT DESCRIPTION


The current system is time consuming and also it is very costly, because it involves a lot of paperwork.
To manually handle the system was very difficult task. But now-a-days computerization made easy to
work. The proposed system is developed to overcome the problem of existing system.
This system is highly secured, because for login the system it requires the username and password
which is different for each department therefore providing each department a different view of the
customer information. It maintains report for all criteria and transactions. Stores information about
regular products. This system can run on any web browser so it is very poratble.it also Manages
member information separately for all exercise and employee information separately for considering
the requirements of gym.

Page | 295
E-Fitness Hub
Indira Gandhi
National Open University

The proposed system perform my function few of them are :-


S.NO MODULE FUNCTION INPUT OUTPUT
Name (what module do?)
1. Login It Check Only Authorized user Enter ID & Show
can access. It will create more Password Dashboard
accuracy .User can change its Screen
password very easily.
2. Admin It Perform Various Function. Add inventory Show grid view
One of them are adding category, inventory
inventory or stock Id, inventory
Password, etc.
3. BMI Cal. It will calculate the body mass Enter body weight Show bmi
index and show corresponding and height calculation
output
4. Product This module also performs Apply search Show result
values function like adding
product, search filters etc
5. Member Take Classes According to Login from site Go to dashboard
schedule get there
schedule

3.6 CONCEPTUAL MODEL

3.6.1 ENTITY RELATIONSHIP DIAGRAM

The entity-relationship (ER) data model allows us to describe the data involved in a real world
enterprise in terms of object and their relationships and is widely used to develop an initial database
design.

The ER model is important primarily for its role in database design. It provides useful concepts that
allow us to move from an informal description of what users want from their database to a more
detailed and precise description that can be implemented in a DBMS. The ER
model is used in a phase called “Conceptual Database Design”.

Entity:ER modeling is something regarded as a complete approach to design a logical database


schema. An entity is an object in the real world that is distinguishable from other objects. Examples
include the following: The address of the manager of the institution, a Person with unique name etc.
Page | 296
E-Fitness Hub
Indira Gandhi
National Open University

Attributes: An entity is described using a set of attributes. All entities in a given entity set have the
same attributes; this essentially what we mean by similar. For e.g. The Admission entity set would use
the name, age, and qualification of the students as the attributes.

Key:Further, for each entity set we choose a key. A key is a minimal set of attributed whose values
uniquely identify an entity in the set.

Page | 297
E-Fitness Hub
Indira Gandhi
National Open University

Page | 298
E-Fitness Hub
Indira Gandhi
National Open University

DATA FLOW DIAGRAMS

Data Flow Diagram:


A data flow (DFD) is a graphical system model that shows all of the main requirements for an
information system in one datagram: inputs and outputs, processes, and data storage. A DFD describes
what data flows rather than how it is processed. Everyone working on a development project can see all
aspects of the system working together at once with DFD.

DFD SYMBOLS:
1. Process
2. Data Flow
3. External Entity
4. Data Store

ZERO LEVEL

Page | 299
E-Fitness Hub
Indira Gandhi
National Open University

FIRST LEVEL

Page | 300
E-Fitness Hub
Indira Gandhi
National Open University

Page | 301
E-Fitness Hub
Indira Gandhi
National Open University

Page | 302
E-Fitness Hub
Indira Gandhi
National Open University

Page | 303
E-Fitness Hub
Indira Gandhi
National Open University

SECOND LEVEL

Page | 304
E-Fitness Hub
Indira Gandhi
National Open University

FUTURE SCOPE OF THE APPLICATION


The software has been developed in such a way that it can accept modifications and further changes.
The software is very user friendly and future any changes can be done easily. Software restructuring is
carried out. Software restructuring modifies source code in an effort to make it amenable to future
changes.

In general, restructuring does not modify the overall program architecture. It tends to focus on the
design details of individual modules and on local data structure defined within modules. Every system
should allow scope for further development or enhancement. The system can be adapted for any further
development. The system is so flexible to allow any modification need for the further functioning of
programs. Since the objectives may be brought broad in future, the system can be easily modified
accordingly, as the system has been modularized. The future expansion can be done in a concise
manner in order to improve the efficiently of the system.

Page | 305
E-Fitness Hub
Indira Gandhi
National Open University

REFERENCES

 Reference Site(“ https://www.fitnessfirst.net.in/”)


 Reference Site(“https://www.worldgym.com/”)
 Google
 Wikipedia
BOOK NAME AUTHOR NAME Publisher’s Name

1. Understanding .NET David Chappell Pearson

2. Professional .NET Joe Duffy Wiley


Framework 2.0

3. An Introduction to DBMS Bipin C Desai Tata Graw Hills


Approach

Page | 306

You might also like