Ejemplo n.º 1
0
        public PartialViewResult ActProduct(int actid, RequestPagedBase page)
        {
            int pindex = 1;

            int.TryParse(Request["pindex"], out pindex);
            page.pageindex = pindex > 0 ? pindex : 1;
            int recordCount = 0;
            var productList = ProductBLL.Instance.Product_GetList(page.pageindex, page.pagesize, "0", "  EXISTS (SELECT * FROM ProductActivity AS pa WHERE pa.ActID =" + actid + " AND pa.ProductID =p.ProductID)", out recordCount);
            var pagelist    = new PagedList <ProductInfo>(productList, page.pageindex, page.pagesize, recordCount);

            ViewBag.ProductList = pagelist;
            ViewBag.ActID       = actid;
            return(PartialView("_PartialProduct"));
        }
Ejemplo n.º 2
0
        //显示
        public ActionResult Product(int actid)
        {
            var page        = new RequestPagedBase();
            int recordCount = 0;
            var productlist = ProductBLL.Instance.Product_GetList(page.pageindex, page.pagesize, "0", "EXISTS(SELECT 1 FROM ProductActivity pa where pa.ProductID = p.ProductID and pa.ActID =" + actid + ")", out recordCount);
            var paged       = new PagedList <ProductInfo>(productlist, page.pageindex, page.pagesize, recordCount);

            ViewBag.ProductList = paged;


            var searchlist  = ProductBLL.Instance.Product_GetList(page.pageindex, page.pagesize, "0", "NOT EXISTS(SELECT * FROM ProductActivity pa where pa.ProductID = p.ProductID and pa.ActID =" + actid + ")", out recordCount);
            var searchpaged = new PagedList <ProductInfo>(searchlist, page.pageindex, page.pagesize, recordCount);

            ViewBag.SearchProductList = searchpaged;
            ViewBag.ActID             = actid;
            return(View());
        }