예제 #1
0
 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"));
 }
예제 #2
0
        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));
        }
예제 #3
0
 public int UpdateMenuRestriction(sp_MenuRestrictionSelect_Result model)
 {
     return(_db.sp_MenuUpdate(model.MenuId, model.MenuId, model.RoleId, SessionManager.userId()));
 }