public ActionResult Delete(int id) { RoleManagementBLL objRoleManagementBLL = new RoleManagementBLL(); var roleInfo = objRoleManagementBLL.GetRoleInfo(id); return(View(roleInfo)); }
public ActionResult Index() { RoleManagementBLL objRoleManagementBLL = new RoleManagementBLL(); var roleInfoList = objRoleManagementBLL.GetAllRoleInfo(); return(View(roleInfoList)); }
// GET: Admin/AssignUserRole public ActionResult Index() { RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); var list = objRoleManagementBll.GetUserRole(); return(View(list)); }
public ActionResult Save(AssignUserRole objAssignUserRole) { if (ModelState.IsValid) { RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); objRoleManagementBll.AssignUserRole(objAssignUserRole); } return(RedirectToAction("Index", "AssignUserRole")); }
public ActionResult DeleteRoleInfo(int id) { if (ModelState.IsValid) { RoleManagementBLL objRoleManagementBLL = new RoleManagementBLL(); objRoleManagementBLL.DeleteRoleInfo(id); } return(RedirectToAction("Index", "RoleInfo")); }
public ActionResult Edit(RoleInfo objRoleInfo) { if (ModelState.IsValid) { RoleManagementBLL objRoleManagementBLL = new RoleManagementBLL(); objRoleManagementBLL.UpdateRoleInfo(objRoleInfo); } return(RedirectToAction("Index", "RoleInfo")); }
public ActionResult Get() { RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); var model = new AssignUserRole { userDetail = objRoleManagementBll.GetUserListForDropDownForSave(), roleInfo = objRoleManagementBll.GetRoleListForDropDownForSave() }; return(View("UserPartial", model)); }
public ActionResult Save(int roleId = 0) { RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); ViewBag.RoleInfo = objRoleManagementBll.GetRoleListForDropDownForSave(); NavigationBLL objNavigationBll = new NavigationBLL(); var menu = objNavigationBll.GetAllMenuForRoleMenuMapping(roleId); return(View(menu)); }
public ActionResult Edit(AssignUserRole objAssignUserRole) { objAssignUserRole.UrmId = Convert.ToInt16(Session["UrmId"]); if (ModelState.IsValid) { RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); objRoleManagementBll.UpdateUserRole(objAssignUserRole); Session.Remove("UrmId"); } return(RedirectToAction("Index", "AssignUserRole")); }
public ActionResult Save(int userDetailId = 0, int roleId = 0) { UserDetailBLL objUserDetailBll = new UserDetailBLL(); ViewBag.UserInfo = objUserDetailBll.GetAllUserInfo(); RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); ViewBag.RoleInfo = objRoleManagementBll.GetRoleListForDropDownForSave(); NavigationBLL objNavigationBll = new NavigationBLL(); var menu = objNavigationBll.GetAllMenuForUserMenuMapping(userDetailId, roleId); return(View(menu)); }
public ActionResult Edit(int id) { RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); var model = new AssignUserRole { userDetail = objRoleManagementBll.GetUserListForDropDownForSave(), roleInfo = objRoleManagementBll.GetRoleListForDropDownForSave() }; var assignRoleInfo = objRoleManagementBll.GetUserListForDropDownForEdit(id); Session["UrmId"] = assignRoleInfo.UrmId; ViewBag.roleId = assignRoleInfo.RoleId; ViewBag.UserDetailId = assignRoleInfo.UserDetailId; ViewBag.isActive = assignRoleInfo.IsActive; return(View(model)); }
public JsonResult Save(IEnumerable <int> menuId, int roleId, int userId) { bool status = false; RoleManagementBLL objRoleManagementBll = new RoleManagementBLL(); if (ModelState.IsValid) { objRoleManagementBll.ResetUserMenuMapping(roleId, userId); if (menuId != null) { foreach (int item in menuId) { objRoleManagementBll.CreateUserMenuMapping(item, roleId, userId); } } status = true; } return(new JsonResult { Data = new { status = status } }); }