public ActionResult List() { if (!CurUser.HasAccess(AdGroup.ServiceClaimContractorAccess, AdGroup.ServiceControler)) { RedirectToAction("AccessDenied", "Error"); } //var list = UserList.GetUserSelectionList(AdGroup.ZipClaimClient); var list = ContractorAccess.GetList().OrderBy(x => x.City).ThenBy(x => x.OrgName).ThenBy(x => x.Name); return(View(list)); }
public void Delete(int id) { if (!CurUser.HasAccess(AdGroup.ServiceClaimContractorAccess)) { RedirectToAction("AccessDenied", "Error"); } try { ResponseMessage responseMessage; bool complete = ContractorAccess.Delete(id, out responseMessage); if (!complete) { throw new Exception(responseMessage.ErrorMessage); } } catch (Exception ex) { TempData["error"] = ex.Message; } }
public ActionResult New(ContractorAccess model) { if (!CurUser.HasAccess(AdGroup.ServiceClaimContractorAccess)) { RedirectToAction("AccessDenied", "Error"); } try { ResponseMessage responseMessage; bool complete = model.Save(out responseMessage); if (!complete) { throw new Exception(responseMessage.ErrorMessage); } return(RedirectToAction("List")); } catch (Exception ex) { TempData["error"] = ex.Message; return(View("New", model)); } }
public ActionResult AccessSheet(int id) { var model = new ContractorAccess(id); return(View(model)); }