예제 #1
0
        public ActionResult GetGridJson(NewsSearchView searchView, int page = 1)
        {
            var data = _NewsService.GetNewsList(searchView, page, PageSize);

            data.ForEach(da => {
                da.Description = RegexRegular.CheckMathLength(RegexRegular.NoHTML(da.Description), 20);
            });
            return(Content(new
            {
                rows = data,
                total = data.PageCount,
                page = data.PageIndex,
                records = data.TotalCount
            }.ToJson()));
        }
예제 #2
0
        public ActionResult GetGridJson(HelpSearchView searchView, int page = 1)
        {
            var data = _HelpService.GetHelps(searchView, page, PageSize);

            data.ForEach(da => {
                da.Description = RegexRegular.CheckMathLength(RegexRegular.NoHTML(da.Description), 20);
                //da.HelpCode = EnumCommon.GetDescription((HelpCode)da.HelpCode);
            });
            return(Content(new
            {
                rows = data,
                total = data.PageCount,
                page = data.PageIndex,
                records = data.TotalCount
            }.ToJson()));
        }