public ActionResult Delete(string id) { if (MenuRestrictionBusinessLogic.getInstance().DeleteMenuRestriction(id) == -1) { TempData["Success"] = "Menu Restriction was successfully deleted"; } else { TempData["Error"] = "Menu Restriction was unsuccessfully deleted"; } return(RedirectToAction("Index")); }
public ActionResult Edit(sp_MenuRestrictionSelect_Result model) { if (MenuRestrictionBusinessLogic.getInstance().UpdateMenuRestriction(model) == -1) { TempData["Success"] = "Menu Restriction was successfully updated"; } else { TempData["Error"] = "Menu Restriction was unsuccessfully updated"; } return(RedirectToAction("Index")); }
public ActionResult Edit(string id) { sp_MenuRestrictionSelect_Result model = new sp_MenuRestrictionSelect_Result(); var menuData = MenuRestrictionBusinessLogic.getInstance().getMenuById(id); model.RestrictionId = menuData.RestrictionId; model.MenuId = menuData.MenuId; model.RoleId = menuData.RoleId; ViewBag.RoleList = common.ToSelectList(RoleBusinessLogic.getInstance().getRoleDDL(), "ID", "NAME", model.RoleId); ViewBag.MenuList = common.ToSelectList(MenuRestrictionBusinessLogic.getInstance().getMenuDDL(model.RoleId), "ID", "NAME", model.MenuId); return(View(model)); }
public JsonResult MenuDDL(string roleId) { var menuList = common.ToSelectList(MenuRestrictionBusinessLogic.getInstance().getMenuDDL(roleId), "ID", "NAME", ""); return(Json(menuList, JsonRequestBehavior.AllowGet)); }
public ActionResult Create() { ViewBag.RoleList = common.ToSelectList(RoleBusinessLogic.getInstance().getRoleDDL(), "ID", "NAME", string.Empty); ViewBag.MenuList = common.ToSelectList(MenuRestrictionBusinessLogic.getInstance().getMenuDDL(""), "ID", "NAME", string.Empty); return(View()); }
//[CheckAuthorize(Roles = "Menu Restriction")] public ActionResult Index() { return(View(MenuRestrictionBusinessLogic.getInstance().ListMenuRestriction())); }