示例#1
0
        public ActionResult GetGridJson(Pagination pagination, string queryJson)
        {
            var data = new
            {
                rows = _LogApp.GetList(pagination, queryJson),
                pagination.total,
                pagination.page,
                pagination.records
            };

            return(Content(data.ToJson()));
        }
示例#2
0
        public ActionResult GetGridJson(LogSearchView search, int page = 1)
        {
            if (!search.StartTime.HasValue)
            {
                search.TimeType  = "1";
                search.StartTime = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-01 00:00:00"));
                search.EndTime   = Convert.ToDateTime(DateTime.Now.Date.ToString("yyyy-MM-dd 23:59:59"));
            }
            var data = _LogApp.GetList(search, page, PageSize);

            return(Content(new
            {
                rows = data,
                total = data.PageCount,
                page = data.PageIndex,
                records = data.TotalCount
            }.ToJson()));
        }