Ejemplo n.º 1
0
        public ActionResult ContentCatePartialListView()
        {
            int page     = Request["page"].ToString().ToInt32(1);
            int pageSize = Request["pagesize"].ToString().ToInt32(15);

            int rowCount;
            //查询所有的分类
            ContentCateSearchInfo search = new ContentCateSearchInfo();
            List <ContentCate>    list   = YuYangServiceClass.ContentCate_SelectPage(search, page, pageSize, out rowCount);

            ViewData["list"] = list;

            return(PartialView());
        }
Ejemplo n.º 2
0
        public static List <ContentCate> ContentCate_SelectPage(ContentCateSearchInfo search, int pageIndex, int pageSize, out int rowCount)
        {
            IYuYangService channel = Entity.CreateChannel <IYuYangService>(SiteEnum.SiteService.YuYangService);
            ContentCate_SelectPageRequest request = new ContentCate_SelectPageRequest()
            {
                cloumns   = "*",
                orderBy   = search.DefaultOrder,
                pageIndex = pageIndex,
                pageSize  = pageSize,
                where     = search.ToWhereString()
            };

            var result = channel.ContentCate_SelectPage(request);

            (channel as IDisposable).Dispose();

            rowCount = result.rowCount;
            return(result.ContentCate_SelectPageResult);
        }