Ejemplo n.º 1
0
 public ActionResult Update(PointModel point)
 {
     try
     {
         if (ModelState.IsValid && MgtPoint.GetInstance().UpdatePoint(point.ToBo()))
         {
             return(RedirectToAction("Index", new { id = point.IdCourse }));
         }
         else
         {
             return(View());
         }
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 2
0
 public ActionResult Create(PointModel point)
 {
     try
     {
         if (ModelState.IsValid && MgtPoint.GetInstance().AddPoint(point.ToBo()))
         {
             return(RedirectToAction("Index", new { id = point.IdCourse }));
         }
         else
         {
             point.ListTypePointOptions = MgtTypePoint.GetInstance().GetAllItems();
             return(View(point));
         }
     }
     catch
     {
         point.ListTypePointOptions = MgtTypePoint.GetInstance().GetAllItems();
         return(View(point));
     }
 }