Beispiel #1
0
 public ActionResult EditPLO(int id)
 {
     if (id > 0)
     {
         PLO PLO = PLOService.FindById(id, User.Identity.Name);
         return(View(PLO));
     }
     return(View());
 }
Beispiel #2
0
 // -------------- PLO ----------
 public ActionResult DetailsPLO(int id)
 {
     if (id > 0)
     {
         PLO PLO = PLOService.FindById(id, User.Identity.Name);
         return(PartialView("Partial/PLODetails", PLO));
     }
     return(View());
 }
Beispiel #3
0
 public ActionResult CreatePLO(PLO PLO)
 {
     if (ModelState.IsValid)
     {
         string message = PLOService.Save(PLO, User.Identity.Name);
         if (string.IsNullOrEmpty(message))
         {
             TempData["Success"] = Messages.Created;
             return(RedirectToAction("Index"));
         }
         else
         {
             ViewData["Warning"] = message;
         }
     }
     else
     {
         ViewData["Error"] = Messages.InvalidField;
     }
     return(View());
 }