Beispiel #1
0
        /// <inheritdoc />
        /// <summary>
        /// Get dashboards
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public virtual JsonResult GetDashboards(DTParameters param)
        {
            var filtered = _context.FilterAbstractContext <DashBoard>(param.Search.Value,
                                                                      param.SortOrder, param.Start,
                                                                      param.Length,
                                                                      out var totalCount).ToList();

            var result = new DTResult <DashBoard>
            {
                Draw            = param.Draw,
                Data            = filtered,
                RecordsFiltered = totalCount,
                RecordsTotal    = filtered.Count
            };

            return(new JsonResult(result));
        }
        /// <inheritdoc />
        /// <summary>
        /// Get dashboards
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public JsonResult GetWidgetGroupsInJqueryTableFormat(DTParameters param)
        {
            var filtered = _context.FilterAbstractContext <WidgetGroup>(param.Search.Value,
                                                                        param.SortOrder, param.Start,
                                                                        param.Length,
                                                                        out var totalCount).ToList();

            var result = new DTResult <WidgetGroup>
            {
                Draw            = param.Draw,
                Data            = filtered,
                RecordsFiltered = totalCount,
                RecordsTotal    = filtered.Count
            };

            return(new JsonResult(result));
        }