示例#1
0
        public ActionResult WebSiteList(SearchCodition searchCoditon)
        {
            TempData["searchCoditon"] = searchCoditon;
            WebSiteOperation    uo   = new WebSiteOperation();
            List <WebSiteModel> list = uo.GetList(searchCoditon.SearchName, searchCoditon.PageIndex, searchCoditon.PageSize);
            int count = uo.GetCount();

            if (Request.IsAjaxRequest())
            {
                return(PartialView("WebSiteTable", new PagedList <WebSiteModel>(list, searchCoditon.PageIndex, searchCoditon.PageSize,
                                                                                count)));
            }
            return(PartialView(new SearchCodition()));
        }
示例#2
0
        //
        // GET: /WebSite/

        public ActionResult WebSiteList()
        {
            WebSiteOperation uo = new WebSiteOperation();

            SearchCodition searchCoditon = new SearchCodition()
            {
                PageSize = 20
            };

            List <WebSiteModel> list = uo.GetList();
            int count = uo.GetCount();

            ViewBag.list = new PagedList <WebSiteModel>(list, searchCoditon.PageIndex, searchCoditon.PageSize,
                                                        count);

            return(View(searchCoditon));
        }