public ActionResult EditPLO(int id) { if (id > 0) { PLO PLO = PLOService.FindById(id, User.Identity.Name); return(View(PLO)); } return(View()); }
// -------------- PLO ---------- public ActionResult DetailsPLO(int id) { if (id > 0) { PLO PLO = PLOService.FindById(id, User.Identity.Name); return(PartialView("Partial/PLODetails", PLO)); } return(View()); }
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()); }