Professional Documents
Culture Documents
Starefitness
Starefitness
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
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
Page | 5
E-Fitness Hub
Indira Gandhi
National Open University
TABLE OF FIGURES
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
Page | 7
E-Fitness Hub
Indira Gandhi
National Open University
1.3.1 PURPOSE
1.3.2 SCOPE
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 .
Page | 9
E-Fitness Hub
Indira Gandhi
National Open University
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
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.
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
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.
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
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
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
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
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: -
Page | 16
E-Fitness Hub
Indira Gandhi
National Open University
2. Motherboard DG31EC
3. RAM 1 GB
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
3. BMI Cal. It will calculate the body mass Enter body weight Show bmi
index and show corresponding and height calculation
output
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
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
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
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
Page | 22
E-Fitness Hub
Indira Gandhi
National Open University
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.
Page | 24
E-Fitness Hub
Indira Gandhi
National Open University
Page | 25
E-Fitness Hub
Indira Gandhi
National Open University
3.6.2 ERD:
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
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:-
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
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:-
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
Page | 30
E-Fitness Hub
Indira Gandhi
National Open University
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.
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.
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
Daily Expenses
Appointment
Inventory
Order
Schedule
Page | 32
E-Fitness Hub
Indira Gandhi
National Open University
Trainor
User
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
Name: Appointment
No. of fields: 7
Description: Store Appointment Information
Field Name Data type Constraint Description
Page | 36
E-Fitness Hub
Indira Gandhi
National Open University
Name: Inventory
No. of fields: 7
Description: Store Appointment Information
Field Name Data type Constraint Description
Page | 37
E-Fitness Hub
Indira Gandhi
National Open University
Name: Order
No. of fields: 2
Description: Store Appointment Information
Field Name Data type Constraint Description
Name: Schedule
No. of fields: 8
Description: Store Appointment Information
Field Name Data type Constraint Description
Page | 38
E-Fitness Hub
Indira Gandhi
National Open University
Name: Supplier
No. of fields: 7
Description: Store Appointment Information
Field Name Data type Constraint Description
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
Name: User
No. of fields: 8
Description: Store Appointment Information
Field Name Data type Constraint Description
Page | 40
E-Fitness Hub
Indira Gandhi
National Open University
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
Page | 42
E-Fitness Hub
Indira Gandhi
National Open University
Page | 43
E-Fitness Hub
Indira Gandhi
National Open University
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
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.
Page | 51
E-Fitness Hub
Indira Gandhi
National Open University
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
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
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
Test Condition : Admin enter invalid and incorrect input then data is saved to the table
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
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
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
Test Condition : If Old password and new Password is same the password can’t be change
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
Test Condition : If user enter incorrect weight, height, age input or invalid input the it will
show in give wrong output
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
Test Condition : If member is not login with there valid id and password then schedule will not
going to show
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
Site1.Master
<!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">
<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>
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 ©<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>
Page | 68
E-Fitness Hub
Indira Gandhi
National Open University
<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;
}
}
}
}
}
index.aspx
Page | 71
E-Fitness Hub
Indira Gandhi
National Open University
</div>
</div>
</div>
</div>
</section>
Page | 72
E-Fitness Hub
Indira Gandhi
National Open University
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>
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>
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>
<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>
<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>
<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
try
{
con.Open();
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
}
}
}
about.aspx
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>
Page | 85
E-Fitness Hub
Indira Gandhi
National Open University
<span>Success Stories</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
Page | 86
E-Fitness Hub
Indira Gandhi
National Open University
Page | 87
E-Fitness Hub
Indira Gandhi
National Open University
Page | 88
E-Fitness Hub
Indira Gandhi
National Open University
Page | 89
E-Fitness Hub
Indira Gandhi
National Open University
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>
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>
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 | 93
E-Fitness Hub
Indira Gandhi
National Open University
</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">
Page | 94
E-Fitness Hub
Indira Gandhi
National Open University
Page | 95
E-Fitness Hub
Indira Gandhi
National Open University
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
</asp:Content>
contact.aspx
Page | 96
E-Fitness Hub
Indira Gandhi
National Open University
Page | 97
E-Fitness Hub
Indira Gandhi
National Open University
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
Page | 99
E-Fitness Hub
Indira Gandhi
National Open University
</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
Session["myval"] = cmd2.ExecuteScalar();
lblmsg.Text = Convert.ToString(Session["myval"]);
cmd.CommandType = CommandType.StoredProcedure;
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
{
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;
}
}
cmd.CommandType = CommandType.StoredProcedure;
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 | 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;
}
try
{
con.Open();
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 | 108
E-Fitness Hub
Indira Gandhi
National Open University
<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="#"><</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="#">></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: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;
}
try
{
con.Open();
Page | 112
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);
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 | 113
E-Fitness Hub
Indira Gandhi
National Open University
<%--<section class="ftco-section">
</section>--%>
Page | 114
E-Fitness Hub
Indira Gandhi
National Open University
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;
}
signup.aspx
Page | 120
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;
}
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
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
{
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"
});
}
}
}
}
web.config
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=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>
</configuration>
Page | 127
E-Fitness Hub
Indira Gandhi
National Open University
Admin/index.aspx
<!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
.card-body {
border-top-left-radius: 50px !important;
border-bottom-right-radius: 50px !important;
}
<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>
</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;
}
}
}
Page | 133
E-Fitness Hub
Indira Gandhi
National Open University
}
Response.Cookies["UserName"].Value = txtUserName.Text.Trim();
Response.Cookies["Password"].Value = txtPassword.Text.Trim();
con.Open();
cmd.CommandType = CommandType.StoredProcedure;
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();
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";
}
}
}
Admin/Admin.Master
<!DOCTYPE html>
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
</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
<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">
Page | 139
E-Fitness Hub
Indira Gandhi
National Open University
<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 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>";
}
}
Admin/AddSupplier.aspx
Page | 144
E-Fitness Hub
Indira Gandhi
National Open University
</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;
}
try
{
con.Open();
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 | 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
<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>
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 | 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
<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: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 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 | 156
E-Fitness Hub
Indira Gandhi
National Open University
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: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
}
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 | 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: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
}
}
}
Admin/AllTrainer.aspx
<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
<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>
</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>
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)
{
Page | 168
E-Fitness Hub
Indira Gandhi
National Open University
Admin/AllUsers.aspx
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
</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
<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)
{
Page | 172
E-Fitness Hub
Indira Gandhi
National Open University
Admin/Appointments.aspx
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>
</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
</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: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 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
<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;
}
{
using (SqlConnection con = new SqlConnection(GetConnectionString()))
{
con.Open();
cmd.CommandType = CommandType.StoredProcedure;
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";
}
}
}
Admin/Dashboard.aspx
</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
<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
<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)
{
{
Response.Redirect("Deleted.aspx");
}
}
}
}
Admin/Expenses.aspx
<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
</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;
}
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;
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();
}
Response.Redirect("Expenses.aspx");
}
}
}
Admin/LatestOrder.aspx
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>
</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
</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 | 203
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(₹)</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;
}
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);
try
{
con.Open();
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 | 209
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;
}
Page | 212
E-Fitness Hub
Indira Gandhi
National Open University
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);
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 | 214
E-Fitness Hub
Indira Gandhi
National Open University
Page | 216
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;
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
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
supplier/Site1.Master
<!DOCTYPE html>
<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
</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
</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
<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>";
}
}
Page | 225
E-Fitness Hub
Indira Gandhi
National Open University
Response.Redirect("index.aspx");
}
}
}
supplier/index.aspx
<!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;
}
Page | 228
E-Fitness Hub
Indira Gandhi
National Open University
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>
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;
}
}
Response.Cookies["UserName"].Value = txtUserName.Text.Trim();
Response.Cookies["Password"].Value = txtPassword.Text.Trim();
con.Open();
cmd.CommandType = CommandType.StoredProcedure;
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();
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";
}
}
}
Page | 233
E-Fitness Hub
Indira Gandhi
National Open University
supplier/AddProduct.aspx
Page | 234
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;
}
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
try
{
con.Open();
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 | 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: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
</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();
cmd.CommandType = CommandType.StoredProcedure;
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";
}
}
}
supplier/Dashboard.aspx
<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
<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
<!DOCTYPE html>
<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
<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
</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>";
}
}
user/index.aspx
<!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;
}
<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
</div>
</div>
</div>
</div>
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;
}
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();
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(p1);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
SqlDataReader rd = cmd.ExecuteReader();
if (rd.HasRows)
{
rd.Read();
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";
}
}
}
user/Dashboard.aspx
Page | 264
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
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: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
<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();
cmd.CommandType = CommandType.StoredProcedure;
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";
}
}
}
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.
Unit Tests, when integrated with build gives the quality of the build as well.
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
Page | 277
E-Fitness Hub
Indira Gandhi
National Open University
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
Page | 278
E-Fitness Hub
Indira Gandhi
National Open University
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
16. REGISTRATION ENTER NEW POPUP ALERT POPUP ALERT DATA PASS
MEMBER DETAILS DATA IS SAVED IS SAVED
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.
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
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.
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
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
Page | 285
E-Fitness Hub
Indira Gandhi
National Open University
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
Page | 286
E-Fitness Hub
Indira Gandhi
National Open University
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
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
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.
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.
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
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.
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.
1) GANTT Chart
2) PERT 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.
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
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: -
SOFTWARE REQUIREMENTS
Page | 294
E-Fitness Hub
Indira Gandhi
National Open University
HARDWARE REQUIREMENTS
2. Motherboard DG31EC
3. RAM 1 GB
Page | 295
E-Fitness Hub
Indira Gandhi
National Open University
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”.
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
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
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
Page | 306