public ActionResult RemoveUserFromAllGroups(DataSourceRequest command, UserGroupListModel model) { HttpSessionStateBase session = HttpContext.Session; if (_userGroupService.RemoveUserFromAllGroups(model.User_ID, Convert.ToInt32(session["UserID"]))) { var gridModel = new DataSourceResult { ExtraData = new UserGroupListModel { Message = Message.OperationSuccessful, MessageColor = "green", }, Total = 1 }; return(Json(gridModel)); } else { var gridModel = new DataSourceResult { ExtraData = new UserGroupListModel { Message = Message.OperationNotAllowed, MessageColor = "red", }, Total = 1 }; return(Json(gridModel)); } }
public ActionResult User_Group() { ViewBag.Title = "Home Page"; UserGroupListModel model = new UserGroupListModel(); model.Users = GetUsers(); return(View(model)); }
public ActionResult List(UserGroupFilter filter, FetchOptions fetchOptions) { var model = new UserGroupListModel { Items = userGroupRepository.Find(filter, fetchOptions) }; return(View(model)); }
public virtual ActionResult GetUserGroups(DataSourceRequest command, UserGroupListModel model) { var GroupItems = _userGroupService.GetUserGroups(model.User_ID); var gridModel = new DataSourceResult { Data = GroupItems.Select(x => new UserGroupModel { GroupName = x.GroupName, Group_ID = x.Group_ID }), Total = GroupItems.Count() }; return(Json(gridModel)); }