public ActionResult FollowUpStatusEdit(int id, FollowUpStatusEdit model) { if (!ModelState.IsValid) { return(View(model)); } if (model.FollowUpStatusTypeID != id) { ModelState.AddModelError("", "Id Mismatch"); return(View(model)); } var userId = Guid.Parse(User.Identity.GetUserId()); var service = new FollowUpStatusService(userId); if (service.UpdateFollowUpStatus(model)) { TempData["SaveResult"] = "Your Status Type was updated."; return(RedirectToAction("FollowUpStatusIndex")); } ModelState.AddModelError("", "Your Status Type could not be updated."); return(View(model)); }
public ActionResult Delete(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new FollowUpStatusService(userId); var model = service.GetFollowUpStatusById(id); return(View(model)); }
// GET: FollowUpStatus public ActionResult FollowUpStatusIndex() { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new FollowUpStatusService(userId); var model = service.GetFollowUpStatus(); return(View(model)); }
public ActionResult DeleteSourceType(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new FollowUpStatusService(userId); service.DeleteFollowUpStatusType(id); TempData["SaveResult"] = "Your Status Type was deleted"; return(RedirectToAction("FollowUpStatusIndex")); }
public ActionResult FollowUpStatusCreate(FollowUpStatusCreate model) { if (!ModelState.IsValid) { return(View(model)); } var userId = Guid.Parse(User.Identity.GetUserId()); var service = new FollowUpStatusService(userId); service.CreateFollowUpStatus(model); return(RedirectToAction("FollowUpStatusIndex")); }
public ActionResult FollowUpStatusEdit(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new FollowUpStatusService(userId); var detail = service.GetFollowUpStatusById(id); var model = new FollowUpStatusEdit { FollowUpStatusTypeID = detail.FollowUpStatusTypeID, Status = detail.Status, Description = detail.Description }; return(View(model)); }