public ActionResult AddSubactivitiesToAllGroups(DataSourceRequest command, GroupActivityListModel model) { HttpSessionStateBase session = HttpContext.Session; if (_groupActivityService.AddSubActivityToAllGroups(model.Group_ID, Convert.ToInt32(session["UserID"]))) { var gridModel = new DataSourceResult { ExtraData = new GroupActivityListModel { Message = Message.OperationSuccessful, MessageColor = "green", }, Total = 1 }; return(Json(gridModel)); } else { var gridModel = new DataSourceResult { ExtraData = new GroupActivityListModel { Message = Message.OperationNotAllowed, MessageColor = "red", }, Total = 1 }; return(Json(gridModel)); } }
public ActionResult Group_Activity() { ViewBag.Title = "Home Page"; GroupActivityListModel model = new GroupActivityListModel(); model.Groups = GetGroups(); return(View(model)); }
public virtual ActionResult GetGroupActivities(DataSourceRequest command, GroupActivityListModel model) { var GroupItems = _groupActivityService.GetGroupSubActivity(model.Group_ID); var gridModel = new DataSourceResult { Data = GroupItems.Select(x => new GroupActivityModel { SubAct_Name = x.SubActName, SubAct_ID = x.SubAct_ID }), Total = GroupItems.Count() }; return(Json(gridModel)); }