Beispiel #1
0
        public ActionResult PlanDetails(int id)
        {
            MealPlanSqlDAL planDetails = new MealPlanSqlDAL(connectionString);
            //List<MealPlan> model = planDetails.GetPlanDetails(int.Parse(Session["userID"].ToString()));
            List <MealPlan> model = planDetails.GetPlanDetails(id);

            ViewBag.Item = id;

            return(View("PlanDetails", model));
        }
Beispiel #2
0
        public ActionResult AddPlan(string id)
        {
            MealPlan newPlan = new MealPlan();

            newPlan.PlanName = id;

            MealPlanSqlDAL add = new MealPlanSqlDAL(connectionString);

            add.AddPlan(newPlan, int.Parse(Session["userID"].ToString()));

            return(RedirectToAction("DisplayPlans"));
        }