Exemple #1
0
        public ActionResult ViewWorkOutPlan(int id)
        {
            WorkOutPlan_BLL workoutbll = new WorkOutPlan_BLL();

            WorkoutPlan wp = workoutbll.getWorkPlanDetails(id);

            return(View(wp));
        }
Exemple #2
0
        public ActionResult EditWorkoutPlan(int planId)
        {
            WorkOutPlan_BLL workoutbll  = new WorkOutPlan_BLL();
            WorkoutPlan     workoutPlan = workoutbll.getWorkPlanDetails(planId);

            Session["WorkoutSetList"] = workoutPlan.WorkoutSet;
            Session["WorkoutPlanId"]  = planId;
            return(View(workoutPlan));
        }
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";


            WorkOutPlan_BLL StrokesBllObj = new WorkOutPlan_BLL();

            ViewBag.listOfWorkOutPlanIDs = StrokesBllObj.getWorkOutPlanIDsList();

            return(View());
        }
Exemple #4
0
        public ActionResult SaveWorkoutPlan()
        {
            WorkOutPlan_BLL plan_dll    = new WorkOutPlan_BLL();
            WorkoutPlan     workoutPlan = new WorkoutPlan();

            workoutPlan.WorkoutSet = Session["WorkoutSetList"] as List <WorkoutSet>;
            workoutPlan.Date       = Session["WorkoutPlanDate"] as String;
            plan_dll.insertWorkoutPlan(workoutPlan);
            Session["WorkoutSetList"] = null;


            return(JavaScript(String.Format("window.location = '{0}'", Url.Action("Index", "Home"))));
        }
Exemple #5
0
        public ActionResult PrintWorkoutPlan(int planId)
        {
            WorkOutPlan_BLL workoutbll  = new WorkOutPlan_BLL();
            WorkoutPlan     workoutPlan = new WorkoutPlan();

            workoutPlan = workoutbll.getWorkPlanDetails(planId);

            if (workoutPlan != null)
            {
                PrintToPDF printToPdf = new PrintToPDF();
                printToPdf.PrintWorkoutPlan(workoutPlan);
            }
            else
            {
                //TO-DO: return error
            }


            return(View());
        }