예제 #1
0
        public JsonResult GetAllFeed(String dateTime = "", int page = 1, int pageSize = 20)
        {
            var queryResult = _feedbackService.GetAllFeed(dateTime);
            var totalRows   = queryResult.Count();
            var result      = Mapper.Map <IEnumerable <Feedback>, IEnumerable <FeedbackDto> >(queryResult.Skip((page - 1) * pageSize).Take(pageSize));

            return(Json(new
            {
                success = true,
                data = result,
                total = totalRows
            }, JsonRequestBehavior.AllowGet));
        }