Foodolini.BusinessLogic.Diet Class Reference
A diet.
More...
List of all members.
Public Member Functions |
| Diet (string name, double proteinPercentage, double carbPercentage, double fatPercentage, double calorieFactor) |
void | Save () |
| Saves changes to the database.
|
void | Delete () |
| Deletes a diet permanently.
|
int | GetRequiredCalories (Person person) |
| Calculates the total daily calorie needs of a person based on the activity factor and the goal of the diet.
|
Static Public Member Functions |
static Diet | DefaultDiet () |
Properties |
internal long | DietId [get] |
| Id of the diet.
|
string | Name [get, set] |
| The name of the diet.
|
double | ProteinPercentage [get, set] |
| Protein percentage of the diet.
|
double | CarbPercentage [get, set] |
| Carbohydrate percentage of the diet.
|
double | FatPercentage [get, set] |
| Fat percentage of the diet.
|
double | CalorieFactor [get, set] |
| Factor to add to the baseline caloric needs of a person.
|
Private Member Functions |
internal | Diet (long dietId) |
| Loads a diet from the supplied diet id.
|
Private Attributes |
DietRow | dietRow |
bool | modified = true |
Static Private Attributes |
static Diet | defaultDiet = null |
Detailed Description
A diet.
Definition at line 12 of file Diet.cs.
Constructor & Destructor Documentation
internal Foodolini.BusinessLogic.Diet.Diet |
( |
long |
dietId |
) |
[private] |
Loads a diet from the supplied diet id.
- Parameters:
-
Definition at line 21 of file Diet.cs.
Foodolini.BusinessLogic.Diet.Diet |
( |
string |
name, |
|
|
double |
proteinPercentage, |
|
|
double |
carbPercentage, |
|
|
double |
fatPercentage, |
|
|
double |
calorieFactor | |
|
) |
| | |
Member Function Documentation
static Diet Foodolini.BusinessLogic.Diet.DefaultDiet |
( |
|
) |
[static] |
void Foodolini.BusinessLogic.Diet.Delete |
( |
|
) |
|
Deletes a diet permanently.
Definition at line 151 of file Diet.cs.
int Foodolini.BusinessLogic.Diet.GetRequiredCalories |
( |
Person |
person |
) |
|
Calculates the total daily calorie needs of a person based on the activity factor and the goal of the diet.
- Parameters:
-
- Returns:
Definition at line 164 of file Diet.cs.
void Foodolini.BusinessLogic.Diet.Save |
( |
|
) |
|
Saves changes to the database.
Definition at line 140 of file Diet.cs.
Member Data Documentation
Property Documentation
double Foodolini.BusinessLogic.Diet.CalorieFactor [get, set] |
Factor to add to the baseline caloric needs of a person.
Definition at line 128 of file Diet.cs.
double Foodolini.BusinessLogic.Diet.CarbPercentage [get, set] |
Carbohydrate percentage of the diet.
Definition at line 96 of file Diet.cs.
internal long Foodolini.BusinessLogic.Diet.DietId [get, private] |
Id of the diet.
Definition at line 53 of file Diet.cs.
double Foodolini.BusinessLogic.Diet.FatPercentage [get, set] |
Fat percentage of the diet.
Definition at line 112 of file Diet.cs.
string Foodolini.BusinessLogic.Diet.Name [get, set] |
The name of the diet.
Definition at line 64 of file Diet.cs.
double Foodolini.BusinessLogic.Diet.ProteinPercentage [get, set] |
Protein percentage of the diet.
Definition at line 80 of file Diet.cs.
The documentation for this class was generated from the following file:
- Foodolini.BusinessLogic/Model/Diet.cs
Foodolini 1.0.0 Documentation, generated with DoxyGen.