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())); }
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())); }