private void btnUpShelf_Click(object sender, EventArgs e)
        {
            string str = base.Request.Form["CheckBoxGroup"];

            if (string.IsNullOrEmpty(str))
            {
                ShowMsg("请先选择要上架的商品", false);
            }
            else if (!SubSiteProducthelper.IsOnSale(str))
            {
                ShowMsg("选择要上架的商品中有一口价低于最低零售价的情况", false);
            }
            else if (SubSiteProducthelper.UpdateProductSaleStatus(str, ProductSaleStatus.OnSale) > 0)
            {
                ShowMsg("成功上架了选择的商品,您可以到出售中的商品中找到上架的商品", true);
                BindProducts();
            }
            else
            {
                ShowMsg("上架商品失败,未知错误", false);
            }
        }
Exemplo n.º 2
0
        private void btnUpShelf_Click(object sender, System.EventArgs e)
        {
            string text = base.Request.Form["CheckBoxGroup"];

            if (string.IsNullOrEmpty(text))
            {
                this.ShowMsg("请先选择要上架的商品", false);
                return;
            }
            if (!SubSiteProducthelper.IsOnSale(text))
            {
                this.ShowMsg("选择要上架的商品中有一口价低于最低零售价的情况", false);
                return;
            }
            int num = SubSiteProducthelper.UpdateProductSaleStatus(text, ProductSaleStatus.OnSale);

            if (num > 0)
            {
                this.ShowMsg("成功上架了选择的商品,您可以到出售中的商品中找到上架的商品", true);
                this.BindProducts();
                return;
            }
            this.ShowMsg("上架商品失败,未知错误", false);
        }