public ActionResult Create()
        {
            ViewBag.trainerList = ManagerTrainer.GetTrainers().ToList();
            ViewBag.planList    = ManagerPlan.Getplans().ToList();

            return(View());
        }
Exemplo n.º 2
0
 public ActionResult Details(string id)
 {
     if (string.IsNullOrEmpty(id))
     {
         return(RedirectToAction("Index", "plan", null));
     }
     return(View(ManagerPlan.Detailplan(id)));
 }
        public ActionResult Edit(string id)
        {
            ViewBag.trainerList = ManagerTrainer.GetTrainers().ToList();
            ViewBag.planList    = ManagerPlan.Getplans().ToList();

            if (string.IsNullOrEmpty(id))
            {
                return(RedirectToAction("Index", "Customer", null));
            }
            return(View(ManagerCustomer.DetailCustomer(id)));
        }
Exemplo n.º 4
0
        public ActionResult DeletePlan(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(RedirectToAction("Index", "Plan", null));
            }
            bool result = ManagerPlan.Delplan(id);

            if (result == true)
            {
                return(RedirectToAction("Index", "Plan", null));
            }
            else
            {
                return(Content("Error deleting Record,, Plan found to planing customer Please modify customer Record First"));
            }
        }
Exemplo n.º 5
0
 public ActionResult Saveplan(PlanEntity detail)
 {
     ManagerPlan.Saveplan(detail);
     return(RedirectToAction("Index", "plan", null));
 }
Exemplo n.º 6
0
 // GET: Food
 public ActionResult Index()
 {
     return(View(ManagerPlan.Getplans()));
 }