Professional Documents
Culture Documents
Submitted by
TIRUCHIRAPPALLI-620 017
APRIL – 2020
DECLARATION
I hereby declare that the project work presented is originally done by me under
620 017 and has not been included in any other thesis/project submitted for any other
degree.
Batch : 2017-2020
Date:
CERTIFICATE
BASED ON BMI” is a bonafide record work done by S.SAMUEL MOSES DANIEL , Register
TIRUCHIRAPPALLI - 620017
Date:
CERTIFICATE
Examiners:
1.
2.
ACKNOWLEDGEMENTS
First of all, I would like to thank ALMIGHTY GOD for his abundant grace. Good health
and knowledge to do this Project.
. I record my deep sense of gratitude to my beloved parents and my friends for their
encouragement and moral support extended during the period of my project.
SYNOPSIS
The Online Food Recommendation System based on BMI about human diets. It acts as a diet
consultant similar to a real dietician. Dieticians are educated with nutrient value of foods. A
dietician consults a person based on his schedule, body type, height and weight. The system
too asks all this data from the user and processes it. It asks about how many hour the user
works, his height, weight, age etc. The system stores and processes this data and then calculates
the nutrient value needed to fill up users needs. The system then shows an appropriate diet to
the users and asks if user is ok with it, else it shows other alternate diets to fill up users needs.
Software Description
1.1 INTRODUCTION
Now a days, a human being suffering from many health problems such as fitness problem,
maintaining proper diet problem, etc. Therefore, developing this website for providing
special dietician information and proper exercise knowledge for normal persons and for
handicap peoples also. The effective personal dietary guidelines are very essential for
managing our health, preventing chronic diseases and the interactive diet planning helps a
user to adjust the plan in an easier way. The website is to be produced on Food
Recommendation System based on BMI. Here there are two persons, the admin and user.
The user fills the registration form and then login to the website. After login users have to
fill personal information including age, weight, height and gender. For calculating BMI
age, weight, height, and gender are necessary. On the basis of calculated BMI (Body Mass
Index) food recommendation system will display the proper dietician for logged user
1
1.2 EXISTING SYSTEM
The existing Dietitian System of getting a diet plan is completely manual. People need to visit
their local Dietitian physically to know the suggested diet plan. The user has to wait for their
appointment with the Dietitian. The user might have to wait for long hours some times. This
makes it very inconvenient for the users to get their diet plan. They have to wait just to get the
information about what they should eat. This is not efficient when looked from an end user’s
point of view.
2
1.3 PROPOSED SYSTEM
The proposed food recommendation system is having information of diet plans. The system
measures a user’s body mass index based on user height and weight. The user has to then enter
his eating timings and the system presents user the diet plan that would be best for that
particular user. All the food items along with the quantity are shown to the user. If the user
doesn’t like the current diet plan, the system modifies food items keeping the total nutritional
value same.
3
2. LOGICAL DEVELOPMENT
A data flow.
4
LEVEL 0
The Level 0 DFD shows how the system is divided into 'sub-systems' (processes), each
of which deals with one or more of the data flows to or from an external agent, and which
together provide all of the functionality of the system as a whole. It also identifies internal data
stores that must be present in order for the system to do its job, and shows the flow of data
between the various parts of the system.
Admin
Food
User Recommend Database
ation System
based on
BMI
Nutrition
LEVEL 1
5
The next stage is to create the Level 1 Data Flow Diagram. This highlights the main
functions carried out by the system. As a rule, to describe the system was using between two
and seven functions - two being
a simple system and seven being a complicated system. This enables us to keep the model
manageable on screen or paper.
Diet Food
Retrieving the data
details
Admin
User
details Retrieving the data
Exercise
details Retrieving the data
6
the structure, behavior, and more views of a system. An architecture description is a formal
description and representation of a system, organized in a way that supports reasoning about
the structures and behaviors of the system. System architecture can comprise system
components, the externally visible properties of those components, the relationships (e.g. the
behavior) between them. It can provide a plan from which products can be procured, and
systems developed, that will work together to implement the overall system. There have been
efforts to formalize languages to describe system architecture; collectively these are called
architecture description languages (ADLs).
Various organizations define systems architecture in different ways, including:
• Product or life-cycle process intended to satisfy the requirements of the functional
architecture and the requirements baseline.
• Architecture comprises the most important, pervasive, top-level, strategic inventions,
decisions, and their associated rationales about the overall structure (i.e., essential
elements and their relationships) and associated characteristics and behavior.
• If documented, it may include information such as a detailed inventory of current
hardware, software and networking capabilities; a description of long-range plans and
priorities for future purchases, and a plan for upgrading and/or replacing dated
equipment and software
The composite of the design architectures for products and their life-cycle processes.
7
FOOD RECOMMENDATION SYSTEM BASED
ON BMI
Query
8
2.3 SOFTWARE DESCRIPTION
DOT NET OVERVIEW VISUAL STUDIO .NET
Visual Studio .Net is the fast application improvement device for BASIC. Visual Studio
.Net offers complete mix with ASP.NET and empowers to move and customize server controls
and outline Web Forms as they ought to show up when client sees them. A percentage of
alternate points of interest of making BASIC applications in Visual Studio .Net are
• Visual Studio .Net is a Rapid Application (RAD) apparatus. Rather than adding every
control to the Web Form automatically, it serves to include these controls by utilizing tool
stash, sparing programming endeavors.
• Visual Studio .Net backings custom and composite controls. Can make custom controls
that embody a typical usefulness that may need to use in various applications.
• Visual Studio .Net makes a glorious showing of rearranging the creation and utilization
of Web Services. Mush of the software engineer neighborly stuff (making all the XML-based
reports) happens consequently, without much exertion on the developer's side.
9
ASP.NET is more than the following form of Active Server Pages (ASP); it is a brought
together Web advancement stage that gives the administrations important to designers to
fabricate undertaking class Web applications. While ASP.NET is to a great extent sentence
structure perfect with ASP, it likewise gives another programming model and foundation for
more secure, versatile, and stable applications.
ASP.NET is an assembled, .NET-based environment; you can creator applications in
any .NET perfect dialect, including VisualBasic.NET, BASIC, and JScript.NET. Furthermore,
the whole .NET Framework is accessible to any ASP.NET application. Engineers can
undoubtedly get to the regale of these advances, which incorporate oversaw normal dialect
runtime environment, sort wellbeing, legacy, et cetera.
ASP.NET has been intended to work consistently with WYSIWYG HTML editors and
other programming instruments, including Microsoft Visual Studio .NET. Does this make
Web improvement simpler, as well as gives every one of the advantages that these apparatuses
bring to the table, including a GUI that designers can use to drop server controls onto a Web
page and completely coordinated investigating backing. Engineers can browse the
accompanying two elements when making a " ASP.NET application, Web Forms and Web
administrations, or consolidate these in any capacity they see fit.
• Web Forms permits you to assemble intense structures based Web pages. At the point
when building these pages, you can utilize ASP.NET server controls to make normal Ul
components, and system them for basic assignments. These controls permit you to quickly
assemble a Web Form out of reusable implicit or custom segments, rearranging the code of a
page.
• An XML Web administration gives the intends to get to server usefulness remotely
ASP.Net Architecture:
10
Features:
➢ Intuitive C++ Based Language
Utilize code to call local Windows APIs, use pre-constructed COM parts, and influence
existing ActiveX controls to flawlessly coordinate existing applications and segments.
➢ Advanced, Component-Oriented Language
11
ASP .NET incorporates a capable remote and multi-dialect debugger, empowering
engineers to test applications and fabricate solid multi-level arrangements that compass
process limits and are composed in different programming dialects.
Net Framework Class Library :
Addition experienced and capable, constructed in usefulness, including a rich
arrangement of accumulation classes, systems administration bolster, multithreading bolster,
string and customary expression classes, and wide backing for XML, XML patterns, XML
namespaces, XSLT, XPath, and SOAP.
Powerful Web Development Environment:
Make Web-based arrangements in C# utilizing the mutual Web Forms Designer and
XML Designer. Engineers can likewise utilize IntelliSense elements and label finish or pick
the WYSIWYG manager for move and customize creating to construct intelligent Web
applications.
. NET Framework:
Microsoft planned VB from the beginning to exploit its new .NET Framework. The
.NET Framework is comprised of four sections, the Common Language Runtime, an
arrangement of class libraries, an arrangement of programming dialects, and the ASP.NET
environment. The .NET Framework was composed on account of three objectives. In the first
place, it was planned to make Windows applications considerably more solid, while likewise
furnishing an application with more prominent level of security.
Second, it was proposed to improve the advancement of Web applications and
administrations that work in the conventional sense, as well as on cell phones too. Finally, the
structure was intended to give a solitary arrangement of libraries that would work with various
dialects. The .NET Framework is the base for the new Microsoft .NET Platform. Furthermore,
it is a typical situation for building, conveying, and running Web applications and Web
Services. The .NET Framework contains a typical dialect runtime and basic class libraries -
like ADO .NET, ASP .NET and Windows Forms - to give propelled standard administrations
that can be coordinated into a mixed bag of PC frameworks. The .NET Framework gives a
component rich application environment, streamlined improvement and simple mix between
various diverse advancement dialects. The .NET Framework is dialect nonpartisan. At present
it bolsters C++, C#, Visual Basic, and Jscript. Microsoft's Visual Studio.NET is a typical
advancement environment for the new .NET Framework.
Coordinating with IIS
12
IIS is the web server is utilized here. IIS 5.0 or above is key for the ASP.NET for the
earth. This arrival of ASP.NET uses IIS 5.0 as the priKim host environment. IIS dependably
accept that an arrangement of accreditations maps to a Windows NT record and uses them to
verify a client. There are three various types of validation accessible in IIS 5.0: BASIC,
DIGEST, and INTEGRATED WINDOWS Authentication (NTLM or Kerberos). You can
choose the kind of verification to use in the IIS regulatory administrations.
On the off chance that you ask for a URL containing an ASP.NET application, the solicitation
and confirmation data are given off to the application. ASP.NET gives the two extra sorts of
verification depicted in the accompanying table.
Web Service:
Web administrations are ostensibly the most energizing and improve elements of
Microsoft's. NET activity and they are liable to significantly influence the way business
collaborate utilizing PC application. Rundown of conceivable Web administrations is as
changes as the rundown of conceivable business opportunities. Web administration would
normally perform a center business administration, for example, client confirmation, Visa
approval, valuing a derivates security, submitting a buy request for a stock or estimating a
same-day shipment.
A web administration is a part that performs a capacity or administration. A segment is
a bit of programming that has a very much characterized interface, shrouded internals, and the
ability of being found. By "found" implies that you can figure out what the part' manages
without expecting to see the code inside of it. A segment is like a strategy since we can call it
with contentions that fit an arrangement of parameters, and it has the ability of returning
results.
A web administration might likewise return data to the guest. This administration
dwells some place on the Web and can be gotten to from different areas on the Web. For this
administration to be called, there are various components that must be set up. To start with,
the guest must' know how to call the administration. Second, the call must be made over the
Web. At long last, the “web administration must know how to react”.
13
SQL Server 8.0
Social database frameworks are the most critical database frameworks utilized as a part of the
product business today. A standout amongst the most remarkable frameworks is Microsoft
SQL Server. SQL Server is a database administration framework created and showcased by
Microsoft. It runs solely under Windows NT and Windows 95/98.
• SQL Server gives information warehousing elements that as of recently have just been
accessible in Oracle and other more costly DBMSs.
• Query advancement
• Data honesty
• Concurrency control
SQL Server is a Relational Database Management System. The SQL Server social
dialect is called Transact-SQL.SQL is resource arranged dialect. This implies that SQL can
inquiry numerous lines from one or more tables utilizing only one announcement. This
component permits the utilization of this dialect at a coherently larger amount than procedural
14
dialects. Another vital property of SQL is its non-procedurally. SQL contains two sub dialects
DDL and DML.
SQL Server functions as a characteristic augmentation of Windows NT and windows
95/98.SQL Server is generally simple to oversee through the utilization of a graphical
registering environment for each undertaking of framework and database organization. SQL
Server uses administrations of Windows NT to offer new or expanded database capacities, for
example, sending and accepting messages and overseeing login security.
The SQL Server chairman's essential device for connecting with the framework is
Enterprise Manager. The Enterprise Manager has two primary purposes: Administration of
the database server and Management of database items.
• SQL Server Query Analyzer gives a graphical presentation of the execution
arrangement of a question and a programmed segment that recommends which list ought to
be utilized for a chose inquiry. This intelligent segment of SQL Server performs the
assignments like:
15
The Query Optimizer is the piece of SQL Server that chooses how to best perform a question.
It creates a few inquiry execution gets ready for the given question & chooses the arrangement
with the most minimal expense.
SQL Server can work in one of two security modes:
• Windows NT
• Mixed
Windows NT security mode solely utilizes Windows NT client records to sign into the
SQL Server framework. Blended mode permits clients to associate with SQL Server utilizing
the Windows NT security framework or the SQL Server framework. Moreover it gives three
security offices to controlling access to database objects:
• Transact-SQL explanations GRANT, DENY, and REVOKE.
• Views.
• Stored methodology
A Windows NT client record or a SQL server login name permits a client to sign into
the SQL server framework. A client who hence needs to get to a database of the framework
needs a database client record to work in the DB. In this manner clients must have a DB client
represent each DB they need to utilize. In the event that there is no such record the client may
be permitted to work in the DB under the visitor account."
Put away methods can likewise be utilized to limit information access. The confinement
of information access utilizing put away methodology is based upon the property that the
consent to execute a put away' strategy is free of any authorization for DB objects that are
referenced by the put away system.
SQL server gives an instrument called a trigger for upholding procedural respectability
requirements.
A DBMS Handles 2 Sorts Of Honesty Requirements:
➢ Declarative Integrity limitations characterized utilizing CREATE& ALTER
TABLE articulations.
A trigger is an instrument that is conjured when a specific activity happens on a specific table.
Every trigger has 3 general parts:
16
• A name
• The activity
• The execution
SQL server keeps record of every change it makes to the db amid an exchange. This is
essential in the event that a lapse happens amid the execution of the exchange. For this
situation all already executed explanations inside of the exchange must be moved back. SQL
server keeps every one of these records, specifically the previously, then after the fact values,
in one or more documents called the exchange log. Each DB of the SQL server framework
has its own particular exchange log. Concurrency in multi-client frameworks, for example,
SQL Server has chosen impact of execution. At the point when access to the information is
taken care of such that stand out project at once can utilize the information, preparing
moderates significantly. SQL Server like all different DBMSs takes care of this issue utilizing
exchanges. All announcements inside an exchange manufacture a nuclear unit. This implies
that either all announcements are executed or for the situation of disappointment, all
announcements are wiped out.
Elements of SQL Server
Microsoft SQL Server bolsters a full arrangement of elements that outcome in the
accompanying. SQL incorporates an arrangement of managerial and advancement instruments
that enhance our capacity to introduce, convey, oversee and use SQL Server over a few
locales.
➢ Adaptability
The same database motor can be utilized crosswise over stages going from smart phones
Microsoft Windows95 to substantial; multiprocessor servers running Microsoft Windows NT,
Enterprise Edition.
➢ Ease In Building Information Distribution Centers
17
Implanted SQL applications utilize the DB-library DLL to get to SQL server. The SQL
Server ODBC driver clients don't get to Microsoft SQL Server straightforwardly. They utilize
an application kept in touch with access the information in SQL Server. SQL Server can
likewise be gotten to through COM, Microsoft ActiveX, or Windows DNA (Windows
Distributed Internet Applications Architecture) parts. Applications are composed to get to
SQL Server through a database Application Programming Interface (API).
Web Clients:
A Web customer comprises of two sections:
• Dynamic Web pages containing different sorts of markup dialect which are created by
Web parts running in the Web level.
• Web program, which renders the pages got from the server.
A Web customer is now and again called a slim customer. Slim customers as a rule don't
question databases, execute complex business guidelines, or associate with legacy
applications.
HTML
HTML remains for Hyper Text Markup Language. It is a basic content designing dialect
used to make hypertext records. It is a stage free dialect not at all like most other programming
dialect. HTML is impartial and can be utilized on numerous stage or desktop. It is this
component of HTML that makes it mainstream as standard on the WWW. This adaptable
dialect permits the making of hypertext connections, otherwise called hyperlinks. These
hyperlinks can be utilized to unite reports on diverse machine, on the same system or on an
alternate system, or can even indicate purpose of content in the same record.
HTML is utilized for making archives where the accentuation is on the presence of the
record. It is likewise utilized for DTP. The records made utilizing HTML can have content
with diverse sizes, weights and hues. It can also contain graphics to make the document more effective.
18
3.DATABASE DESIGN
3.1 DATA DICTIONARY
19
3.2 TABLES DESIGN
A table is a data structure that organizes information into rows and columns. It can be
used to both store and display data in a structured format. For example, databases store data in
tables so that information can be quickly accessed from specific rows. Websites often use
tables to display multiple rows of data on page. Spreadsheets combine both purposes of a table
by storing and displaying data in a structured format.
Databases often contain multiple tables, with each one designed for a specific purpose.
For example, a company database may contain separate tables for employees, clients, and
suppliers. Each table may include its own set of fields, based on what data the table needs to
store. In database tables, each field is considered a column, while each entry (or record), is
considered a row. A specific value can be accessed from the table by requesting data from an
individual column and row.
20
Age nvarchar(50) Checked
Mobile nvarchar(50) Checked
Email nvarchar(50) Checked
Address nvarchar(50) Checked
Education nvarchar(50) Checked
Username nvarchar(50) Checked
Password nvarchar(50) Checked
21
3.3 RELATIONSHIP DIAGRAM
Email Id DOB
Address Gende
r
User Name Father
Name
Password
Name
New User
User
name
Upda Admin
te
Passwor
d
Food Nutrition
Information
Registration
Nam C_passwo
Food rd
Time
Father Name
Passwor
Range
Calori Gender User
es
Age Email id
Mobile
Number
4.PROGRAM DESIGN
22
4.1MODULES
Admin
• Login
• Add Diet Food and Exercise
User
• Register
• Login
• Diet Details
• Query
Nutrition
• Register
• Login
• Response
23
• Diet Details
In this module user can view the diet food details and exercise according to their BMI
calculation .BMI was calculated by user height and weight.
• Query
Those specializations are sorted out for the user as query-diet for posting query. The
corresponding nutrition will get the query in the inbox. In this module used to post the
doubts by user.
Nutrition
• Register
In this module, nutrition people register their details such as name, Education, address,
Phone no and mail id and so on. After that he get user name and password for enter
into the system.
• Login
Nutrition has to login before he/she can access the nutrition dashboard. The nutrition
can view all the users and can search for a particular user using name or user ID.
• Response
In this module used to answer the user query. Nutrition can view user details and their
query.
5. TESTING
Testing is a series of different tests that whose primary purpose is to fully exercise the computer
based system. Although each test has a different purpose, all work should verify that all system
24
element have been properly integrated and performed allocated function. Testing is the process
of checking whether the developed system works according to the actual requirement and
objectives of the system. The philosophy behind testing is to find the errors. A good test is one
that has a high probability of finding an undiscovered error. A successful test is one that
uncovers the undiscovered error. Test cases are devised with this purpose in mind. A test case
is a set of data that the system will process as an input.
5.1 UNIT TESTING
The first test in the development process is the unit test. The source code is normally divided
into modules, which in turn are divided into smaller units called units. These units have specific
behavior. The test done on these units of code is called unit test. Unit test depends upon the
language on which the project is developed. Unit tests ensure that each unique path of the
project performs accurately to the documented specifications and contains clearly defined
inputs and expected results. Functional and reliability testing in an Engineering environment.
Producing tests for the behavior of components (nodes and vertices) of a product to ensure their
correct behavior prior to system integration.
25
5.2INTEGRATION TESTING
Testing in which modules are combined and tested as a group. Modules are typically code
modules, individual applications, source and destination applications on a network, etc.
Integration Testing follows unit testing and precedes system testing. Testing after the product
is code complete. Betas are often widely distributed or even distributed to the public at large in
hopes that they will buy the final product when it is release.
26
5.3 VALIDATION TESTING
Valid and invalid data should be created and the program should be made to process this data
to catch errors. When the user of each module wants to enter into the page by the login page
using the use rid and password .If the user gives the wrong password or use rid then the
information is provided to the user like “you must enter user id and password”. Here the inputs
27
given by the user are validated. That is password validation, format of date are correct, textbox
validation. Changes that need to be done after result of this testing
CONCLUSION
“Food Recommendation System based on BMI” allows the user to know about his/her
actual diet information i.e. how much user had calories in their body on this basis system
displays workout and food suggestions. This software package is a strong enough to withstand
regressive facility for the Handicapped Peoples. This software reduces the time span and cost
28
for expert advices for diet. This site is exceptionally valuable to well being cares and dietician.
This product diminishes the time compass and cost for master advices for eating routine.
FUTURE ENHANCEMENTS
The future scope in this application is going to be the improved GUI of this application. A
proper workout schedule and routine will be provided to the user for a better fit life. Less use
of data base and conditioning algorithms and more use of Artificial Intelligence. This is a web
base application which can also be developed as an Android and IOS application.
REFERENCE
BOOK REFERENCE
• N.J. Belkin and W.B. Croft, “Information Filtering andInformation Retrieval: Two
Sides of the Same Coin?”Comm.
• P.J. Denning, “Electronic Junk,” Comm.
• Advanced .NET Remoting in VB.NET (Ingo Rammer, Apress, July 2002)
29
• ASP to ASP.NET Migration Handbook (Christian Nagel et al, Wrox, January 2003)
• Beginning Visual C# (Christian Nagel et al, Wrox, September 2001)
• Data-Centric .NET Programming (Christian Nagel et al, Wrox, December 2001)
• Professional .NET Network Programming 2nd Edition (Christian Nagel et al, Wrox,
September 2004)
• P.W. Foltz and S.T. Dumais, “Personalized InformationDelivery: An Analysis of
Information Filtering Methods,”Comm.
• P.S. Jacobs and L.F. Rau, “Scisor: Extracting Informationfrom On-Line News,
• S. Pollock, “A Rule-Based Message Filtering System,”ACM Trans. Office Information
Systems.
WEBSITE REFERENCE
• www.csharpcornar.com
• www. Microsoft.com/sql
• www.databasejournal.com
• www.microsoft.com/vcsharp
30
APPENDIX
SOURCE CODE
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into foodtb values('" + DropDownList2.Text + "','" +
DropDownList1.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Record Save!') </Script>");
}
protected void Button2_Click(object sender, EventArgs e)
31
{
TextBox1.Text = "";
TextBox2.Text = "";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into videotb values('" + DropDownList1.Text + "','" +
TextBox1.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
32
Response.Write("<Script> alert('Record Save!') </Script>");
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "admin" & TextBox2.Text == "admin")
{
Response.Redirect("AdminHome.aspx");
}
else
{
Response.Write("<Script> alert('Password Incirrect!') </Script>");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
34
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Answer Send!') </Script>");
cmd = new SqlCommand("select * from Quertb where Answer ='' ", con);
35
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
double a, b, c;
36
double meter = (Convert.ToDouble(TextBox3.Text) * 0.3048);
meter = meter * 2;
double bmi = (Convert.ToDouble(TextBox4.Text)) / meter;
if (bmi < 18.5)
Label4.Text = "Underweight";
else if (bmi >= 18.5 && bmi <= 24.9)
Label4.Text = "Healthyweight";
else if (bmi >= 25 && bmi <= 29.9)
Label4.Text = "Overweight";
else if (bmi >= 30)
Label4.Text = "Obese";
}
protected void Button3_Click(object sender, EventArgs e)
{
Session["typ"] = Label4.Text;
Response.Redirect("VideoPlay.aspx");
}
protected void Button4_Click(object sender, EventArgs e)
{
Session["typ"] = Label4.Text;
Response.Redirect("UserFoodInfo.aspx");
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
37
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into nutritb values('" + TextBox1.Text + "','" +
TextBox2.Text + "','" + RadioButtonList1.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text
+ "','" + TextBox8.Text + "','" + TextBox9.Text + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Record Save') </Script>");
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
38
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into regtb values('" + TextBox1.Text + "','" +
TextBox2.Text + "','" + RadioButtonList1.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text
+ "','" + TextBox8.Text + "')", con);
39
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Record Save') </Script>");
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into Quertb values('" + Session["uname"].ToString() +
"','" + TextBox1.Text + "','') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<Script> alert('Query Send!') </Script>");
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
43
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
cmd = new SqlCommand("select * from nutritb where Username='" + TextBox1.Text +
"' and Password='" + TextBox2.Text + "'", con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session["name"] = TextBox1.Text;
Response.Redirect("NutriHome.aspx");
}
else
{
}
con.Close();
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
44
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
46
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
cmd = new SqlCommand("select * from regtb where Username='" + TextBox1.Text + "'
and Password='" + TextBox2.Text + "'", con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Session["uname"] = TextBox1.Text;
Response.Redirect("UserHome.aspx");
47
}
else
{
}
con.Close();
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("NewUser.aspx");
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data;
using System.Data.SqlClient;
// ((HtmlControl)(form1.FindControl("ifrm"))).Attributes["src"] =
dr["MobileVideo"].ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
((HtmlControl)(form1.FindControl("ifrm"))).Attributes["src"] =
GridView1.SelectedRow.Cells[3].Text.ToString();
}
}
49
OUTPUT SCREENING
SCREEN SHOTS
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65