コード例 #1
0
        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));
            }
        }
コード例 #2
0
        public ActionResult Group_Activity()
        {
            ViewBag.Title = "Home Page";
            GroupActivityListModel model = new GroupActivityListModel();

            model.Groups = GetGroups();
            return(View(model));
        }
コード例 #3
0
        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));
        }