예제 #1
0
 public ActionResult EditPLO(int id)
 {
     if (id > 0)
     {
         PLO PLO = PLOService.FindById(id, User.Identity.Name);
         return(View(PLO));
     }
     return(View());
 }
예제 #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());
 }
예제 #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());
 }