Exemplo n.º 1
0
        /// <summary>
        /// 已经生成的品牌上新商品列表
        /// </summary>
        /// <param name="brandNo">品牌ID</param>
        /// <returns></returns>
        public ActionResult NewShelfBrandProductList(string brandNo, string DateShelf)
        {
            if (brandNo == null || brandNo == "")
            {
                brandNo = "B0543";
            }
            DateShelf = DateShelf == null || DateShelf == "" ? System.DateTime.Now.ToString("yyyy-MM-dd HH") : DateShelf;
            if (Request.QueryString["keyWord"] != null)
            {
                ViewBag.keyWord = Request.QueryString["keyWord"];
            }
            if (Request.QueryString["CategoryNo"] != null)
            {
                ViewBag.category = Request.QueryString["CategoryNo"];
            }
            if (Request.QueryString["Gender"] != null)
            {
                ViewBag.Gender = Request.QueryString["Gender"];
            }
            NewShelfBrandProductService service = new NewShelfBrandProductService();
            List <ProductInfoNew>       list    = service.NewProductList(brandNo, Convert.ToDateTime(DateShelf), ViewBag.keyWord, ViewBag.category, ViewBag.Gender);

            for (int i = 0; i < list.Count(); i++)//循环去取商品价格的信息
            {
                list[i] = service.SelectSpfSkuPrice(list[i], list[i].ProductNo);
            }
            return(View(list));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 添加上新商品列表
        /// </summary>
        /// <param name="brandNo">品牌ID</param>
        /// <returns></returns>
        public ActionResult AddNewShelfProductList(string brandNo, string pageIndex, string DateShelf, int pageSize = 20)
        {
            pageIndex = pageIndex == null || pageIndex == "" ? "1" : pageIndex;
            DateShelf = DateShelf == null || DateShelf == "" ? System.DateTime.Now.ToString("yyyy-MM-dd HH") : DateShelf;
            if (Request.QueryString["keyWord"] != null)
            {
                ViewBag.keyWord = Request.QueryString["keyWord"];
            }
            if (Request.QueryString["CategoryNo"] != null)
            {
                ViewBag.categoryNo = Request.QueryString["CategoryNo"];
            }
            if (Request.QueryString["Gender"] != null)
            {
                ViewBag.Gender = Request.QueryString["Gender"];
            }
            if (Request.QueryString["startDate"] != null)
            {
                ViewBag.startDate = Request.QueryString["startDate"];
            }
            if (Request.QueryString["endDate"] != null)
            {
                ViewBag.endDate = Request.QueryString["endDate"];
            }
            NewShelfBrandProductService service = new NewShelfBrandProductService();
            int total = 0;
            List <ProductInfoNew> list = service.BrandNewShelfProductList(brandNo, Convert.ToInt32(pageIndex), pageSize, Convert.ToDateTime(DateShelf), ViewBag.keyword, ViewBag.categoryNo, ViewBag.Gender, ViewBag.startDate, ViewBag.endDate, out total);

            ViewBag.page       = pageIndex;
            ViewBag.pageSize   = pageSize;
            ViewBag.totalCount = total;
            //找出当前品牌下已经有的上新商品的总数
            List <ProductInfoNew> newPlist = service.NewProductList(brandNo, Convert.ToDateTime(DateShelf), null, null, null);

            ViewBag.NrePcount = newPlist.Count;
            return(View(list));
        }