public ActionResult AddRoleAction(string RoleId = "", string ActionId = "") { try { Init("cabinet_role"); if (RoleId == "") { return(RedirectToAction("RoleAction", "Cabinet")); } if (ActionId == "") { return(RedirectToAction("RoleAction", "Cabinet")); } RoleAction roleAction = new RoleAction(shared); roleAction.InsertRoleAction(RoleId, ActionId); if (shared.error.AnyError()) { return(RedirectToAction("RoleAction", "Cabinet")); } return(RedirectToAction("RoleAction", "Cabinet", new { RoleId = RoleId })); } catch (Exception ex) { return(ShowError(ex)); } }