protected void Button_OK_Click(object sender, EventArgs e)
        {
            //Response.Write(SelectedCategoryID);
            BrandCategoryRelationBll relationBll = new BrandCategoryRelationBll();

            DataTable dt = relationBll.GetCategoryBrandList(SelectedCategoryID);
            if (dt.Rows.Count <= 0)
            {
                //MessageBox.Show(this, "当前分类下尚无品牌,请先添加品牌!");
                MessageBox.ResponseScript(this, @"
                    if(confirm('当前分类下尚无品牌,是否转向品牌添加页面?'))
                        window.self.location.href='/Brand/Relation/List.aspx?cid=" + SelectedCategoryID + @"';
                    ");
                return;
            }

            LastSelectedCategoryPath = bll.GetModel(SelectedCategoryID).CatePath;

            if (!String.IsNullOrEmpty(Request.QueryString["pid"]))
            {
                Response.Redirect(String.Format("edit.aspx?ProductID={0}&CategoryID={1}", Request.QueryString["pid"], SelectedCategoryID));
            }
            else
            {
                Response.Redirect(String.Format("add.aspx?CategoryID={0}", SelectedCategoryID));
            }
        }
        private void InitConditionItems(int cateId)
        {
            BrandCategoryRelationBll bcrbll = new BrandCategoryRelationBll();

            this.cblBrands.DataSource =  bcrbll.GetCategoryBrandList(cateId);
            this.cblBrands.DataTextField = "BrandName";
            this.cblBrands.DataValueField = "BrandId";
            this.cblBrands.DataBind();

            NoName.NetShop.Product.BLL.CategoryModelBll cbll = new CategoryModelBll();
            this.cblSubCate.DataSource = cbll.GetSubCategory(cateId);
            this.cblSubCate.DataTextField = "CateName";
            this.cblSubCate.DataValueField = "CateId";
            this.cblSubCate.DataBind();

            CategoryParaModelBll cpbll = new CategoryParaModelBll();
            List<CategoryParaModel> plist = cpbll.GetModelList("status=1 and paratype=1 and cateid=" + cateId);
            rpItems.DataSource = plist;
            rpItems.DataBind();
        }