Exemple #1
0
        public ActionResult GetCommentList(CommentRequest page)
        {
            int recordCount = 0;
            var list        = new ProductCommentService().GetCommentList(page.ProductId, page.PageIndex, page.PageSize, out recordCount);
            int count       = SysHelper.GetPageCount(recordCount, page.PageSize);
            var data        = new PageReturnEntity <List <CommentInfoEntity> > {
                PageCount = count, Data = list
            };

            return(JsonCResult(data));
        }
Exemple #2
0
        public ActionResult GetSearchList(SearchRequest req)
        {
            int recordCount = 0;
            var list        = new BookService().GetBookList(req.CategorId, req.Key, req.PageIndex, req.PageSize, out recordCount);
            int count       = SysHelper.GetPageCount(recordCount, req.PageSize);
            var data        = new PageReturnEntity <List <BookInfoEntity> > {
                PageCount = count, Data = list
            };

            return(JsonCResult(data));
        }