Ejemplo n.º 1
0
        public ActionResult Group(int id)
        {
            Response.AppendHeader("Cache-Control", "max-age=1200,stale-while-revalidate=3600"); // HTTP 1.1.
            Response.AppendHeader("Pragma", "no-cache");                                        // HTTP 1.0.
            string pageQuery = Request.QueryString["page"];
            int    page      = 1;

            if (!string.IsNullOrEmpty(pageQuery))
            {
                page = Convert.ToInt32(pageQuery);
            }

            WebService.SearchResult rs = sv.GetProductByGroup(StoreID, TokenKey, id, page, 14, 0);
            ViewData["productList"] = rs;
            ViewBag.page            = Anpero.Paging.setUpPagedV2(page, 14, rs == null?0: rs.ResultCount, 10, "?page=");

            ViewBag.isParent = "1";
            ViewBag.pageName = "Group";
            if (rs != null && rs.Item.Length > 0)
            {
                ViewBag.Title = rs.Item[0].ParentCatName;
            }
            SetUpAds();
            SetUpSeo(1, id);
            return(View("List"));
        }
Ejemplo n.º 2
0
        public ActionResult Group(int id)
        {
            string pageQuery = Request.QueryString["page"];
            int    page      = 1;

            if (!string.IsNullOrEmpty(pageQuery))
            {
                page = Convert.ToInt32(pageQuery);
            }
            WebService.AnperoService sv = new WebService.AnperoService();
            WebService.SearchResult  rs = sv.GetProductByGroup(StoreID, TokenKey, id, page, 14, 0);
            ViewData["productList"] = rs;
            ViewBag.page            = Anpero.Paging.setUpPagedV2(page, 14, rs.ResultCount, 10, "?page=");

            ViewBag.isParent = "1";
            if (rs != null && rs.Item.Length > 0)
            {
                ViewBag.Title = rs.Item[0].ParentCatName;
            }
            SetupCommonProduct();
            SetUpSeo(1, id);
            return(View("List"));
        }