public static List <Fiction> Fiction_SelectPage(FictionSearchInfo search, int pageIndex, int pageSize, out int rowCount)
        {
            IYuYangService            channel = Entity.CreateChannel <IYuYangService>(SiteEnum.SiteService.YuYangService);
            Fiction_SelectPageRequest request = new Fiction_SelectPageRequest()
            {
                cloumns   = "*",
                orderBy   = search.DefaultOrder,
                pageIndex = pageIndex,
                pageSize  = pageSize,
                where     = search.ToWhereString()
            };

            var result = channel.Fiction_SelectPage(request);

            (channel as IDisposable).Dispose();

            rowCount = result.rowCount;
            return(result.Fiction_SelectPageResult);
        }
Exemple #2
0
        public ActionResult SiteContentListView(string cateId)
        {
            int    page     = Request["page"].ToInt32(1);
            int    pageSize = Request["pagesize"].ToInt32(15);
            string f_title  = Request["f_title"] ?? string.Empty;

            int rowCount;
            //查询该分类下的小说内容
            FictionSearchInfo search = new FictionSearchInfo();

            search.C_C_ID = cateId;
            search.Title  = f_title;

            List <Fiction> list = YuYangServiceClass.Fiction_SelectPage(search, page, pageSize, out rowCount);

            ViewData["list"] = list;

            ViewData["page"]     = page;
            ViewData["pageSize"] = pageSize;
            ViewData["rowCount"] = rowCount;
            return(PartialView());
        }