Esempio n. 1
0
        private void Delete(HttpContext context)
        {
            int value = base.GetIntParam(context, "BrandId", false).Value;

            if (CatalogHelper.BrandHvaeProducts(value))
            {
                throw new HidistroAshxException("选择的品牌分类下还有商品,删除失败");
            }
            if (CatalogHelper.DeleteBrandCategory(value))
            {
                base.ReturnSuccessResult(context, "成功删除品牌分类!", 0, true);
                return;
            }
            throw new HidistroAshxException("删除品牌分类失败");
        }
Esempio n. 2
0
        protected void grdBrandCategriesList_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e)
        {
            int brandId = (int)this.grdBrandCategriesList.DataKeys[e.RowIndex].Value;

            if (CatalogHelper.BrandHvaeProducts(brandId))
            {
                this.ShowMsg("选择的品牌分类下还有商品,删除失败", false);
                return;
            }
            if (CatalogHelper.DeleteBrandCategory(brandId))
            {
                this.ShowMsg("成功删除品牌分类", true);
            }
            else
            {
                this.ShowMsg("删除品牌分类失败", false);
            }
            this.BindBrandCategories();
        }
Esempio n. 3
0
        protected void grdBrandCategriesList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int brandId = (int)grdBrandCategriesList.DataKeys[e.RowIndex].Value;

            if (CatalogHelper.BrandHvaeProducts(brandId))
            {
                ShowMsg("选择的品牌分类下还有商品,删除失败", false);
            }
            else
            {
                if (CatalogHelper.DeleteBrandCategory(brandId))
                {
                    ShowMsg("成功删除品牌分类", true);
                }
                else
                {
                    ShowMsg("删除品牌分类失败", false);
                }
                BindBrandCategories();
            }
        }