Esempio n. 1
0
        /// <summary>
        /// Constructor for easily creating mealProfiles.
        /// </summary>
        /// <param name="profileid">The ID for the meal.</param>
        /// <param name="mealType">The meal type  passed to the MealGoal from the casting of the (int)MealType enum..</param>  dropdownbox
        /// <param name="prepTime">The duration for the meal(in minutes).</param>
        /// <param name="mealCost">The cost for the meal  (in US Dollars).</param>
        /// <param name="mealAuthor">Person the created the meal.</param>
        /// <param name="spinachQuantity">The ID for the textbox, whose value will be assigned to spinachQuantity if checked first. on form submit</param>
        /// <param name="tomatoQuantity"></param>
        /// <param name="spinachCheckbox">The ID for the spinachCheckBox.</param>
        /// <param name="tomatoCheckbox"></param>
        /// <param name="notes">The notes for the meal .</param>
        public ProfileViewModel(int profileid, Meal.MealType mealType,
                                int prepTime, double mealCost, string mealAuthor, double spinachQuantity,
                                double tomatoQuantity,
                                bool spinachCheckbox = false, bool tomatoCheckbox = false, string notes = null)

        {
            ProfileId = profileid;
            // will return a number referencing the type of meal from a enum list.
            MealGoal        = (int)mealType;
            PrepTime        = prepTime;
            MealCost        = mealCost;
            MealAuthor      = mealAuthor;
            SpinachQuantity = spinachQuantity;
            TomatoQuantity  = tomatoQuantity;
            SpinachCheckbox = spinachCheckbox;
            TomatoCheckbox  = tomatoCheckbox;
            Notes           = notes;
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor for easily creating addMealProfiles.
        /// </summary>
        /// <param name="id">The ID for the AddMealProfile.</param>  so we can keep track of which meal profile submission is which
        /// <param name="mealType">The meal type AddMealProfile passed to the Meal_Id from the casting of the (int)MealType enum..</param>  dropdownbox
        /// <param name="prepTime">The duration for the AddMealProfile (in minutes).</param>
        /// <param name="mealCost">The duration for the AddMealProfile (in minutes).</param>
        /// <param name="mealAuthor"></param>
        /// <param name="spinachQuantity">The ID for the textbox, whose value will be assigned to spinachQuantity if checked first. on form submit</param>
        /// <param name="tomatoQuantity"></param>
        /// <param name="measurementTomato"></param>
        /// /// <param name="measurementSpinach"></param>
        /// <param name="spinachCheckbox">The ID for the spinachCheckBox.</param>
        /// <param name="tomatoCheckbox"></param>
        /// <param name="notes">The notes for the AddMealProfile.</param>
        public AddMealProfile(int id, Meal.MealType mealType,
                              int prepTime, double mealCost, string mealAuthor, double spinachQuantity,
                              double tomatoQuantity,
                              MeasurementUnit measurementTomato  = MeasurementUnit.Ounces,
                              MeasurementUnit measurementSpinach = MeasurementUnit.Ounces,
                              bool spinachCheckbox = false, bool tomatoCheckbox = false, string notes = null)

        {
            Id = id;
            // will return a number referencing the type of meal from a enum list.
            Meal_Id            = (int)mealType;
            PrepTime           = prepTime;
            MealCost           = mealCost;
            MealAuthor         = mealAuthor;
            SpinachQuantity    = spinachQuantity;
            TomatoQuantity     = tomatoQuantity;
            MeasurementTomato  = measurementTomato;
            MeasurementSpinach = measurementSpinach;
            SpinachCheckbox    = spinachCheckbox;
            TomatoCheckbox     = tomatoCheckbox;
            Notes = notes;
        }