예제 #1
0
        public JsonResult List(int page)
        {
            var list       = custService.PageList(page);
            var totalCount = custService.TotalCount();
            var response   = new JsonResult(
                new SingleResponse
            {
                Data       = list,
                TotalCount = totalCount
            }
                );

            return(response);
        }
예제 #2
0
        public JsonResult List(int page)
        {
            var list       = custService.PageList(page);
            var totalCount = custService.TotalCount();
            var response   = new JsonResult(
                new SingleResponse
            {
                Data = list.Select(x => new VBasicData {
                    id = x.Id, code = x.Code, name = x.Code + x.NameCn
                }).ToList(),
                TotalCount = totalCount
            }
                );

            return(response);
        }