示例#1
0
        internal static void AddDietPlan(string dietPlanName)
        {
            DietPlan dietPlan = new DietPlan();

            dietPlan.Name             = dietPlanName;
            dietPlan.FoodType         = UserInterface.EnterNewDietPlanFoodType();
            dietPlan.FoodAmountInCups = UserInterface.EnterNewDietPlanFoodAmountInCups();
            db.DietPlans.InsertOnSubmit(dietPlan);
            db.SubmitChanges();
        }