protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("ReadAttributeClass", PowerCheckType.Single); base.BindControl(AttributeClassBLL.ReadAttributeClassCacheList(), this.RecordList); } }
protected void BindClassBrandAttributeClassStandardType() { List <ProductBrandInfo> list = ProductBrandBLL.ReadProductBrandCacheList(); this.BrandID.DataSource = list; this.BrandID.DataTextField = "Name"; this.BrandID.DataValueField = "ID"; this.BrandID.DataBind(); this.BrandID.Items.Insert(0, new ListItem("选择品牌", "0")); this.RelationBrandID.DataSource = list; this.RelationBrandID.DataTextField = "Name"; this.RelationBrandID.DataValueField = "ID"; this.RelationBrandID.DataBind(); this.RelationBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); this.AccessoryBrandID.DataSource = list; this.AccessoryBrandID.DataTextField = "Name"; this.AccessoryBrandID.DataValueField = "ID"; this.AccessoryBrandID.DataBind(); this.AccessoryBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); List <ProductClassInfo> list2 = ProductClassBLL.ReadProductClassNamedList(); foreach (ProductClassInfo info in list2) { this.RelationClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); foreach (ProductClassInfo info in list2) { this.AccessoryClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.AccessoryClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); this.AttributeClassID.DataSource = AttributeClassBLL.ReadAttributeClassCacheList(); this.AttributeClassID.DataTextField = "Name"; this.AttributeClassID.DataValueField = "ID"; this.AttributeClassID.DataBind(); this.AttributeClassID.Items.Insert(0, new ListItem("请选择", "0")); foreach (ArticleClassInfo info2 in ArticleClassBLL.ReadArticleClassChildList(3)) { this.ArticleClassID.Items.Add(new ListItem(info2.ClassName, "|" + info2.ID + "|")); } this.ArticleClassID.Items.Insert(0, new ListItem(ArticleClassBLL.ReadArticleClassCache(3).ClassName, "|" + 3 + "|")); this.StandardType.DataSource = EnumHelper.ReadEnumList <ProductStandardType>(); this.StandardType.DataTextField = "ChineseName"; this.StandardType.DataValueField = "Value"; this.StandardType.DataBind(); }
protected void BindClassBrandAttributeClassStandardType() { //List<ProductBrandInfo> list = ProductBrandBLL.ReadProductBrandCacheList(); //this.RelationBrandID.DataSource = list; //this.RelationBrandID.DataTextField = "Name"; //this.RelationBrandID.DataValueField = "ID"; //this.RelationBrandID.DataBind(); //this.RelationBrandID.Items.Insert(0, new ListItem("所有品牌", string.Empty)); List <ProductClassInfo> list2 = ProductClassBLL.ReadProductClassNamedList(); foreach (ProductClassInfo info in list2) { this.RelationClassID.Items.Add(new ListItem(info.ClassName, "|" + info.ID + "|")); } this.RelationClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); CourseCateInfo CourseCateModel = new CourseCateInfo(); CourseCateModel.Condition = CompanyBLL.SystemCompanyId.ToString(); List <CourseCateInfo> courseCateList = CourseCateBLL.ReadCourseCateNamedList(CourseCateModel); foreach (CourseCateInfo info in courseCateList) { this.AccessoryClassID.Items.Add(new ListItem(info.CateName, info.CateId.ToString())); } this.AccessoryClassID.Items.Insert(0, new ListItem("所有分类", string.Empty)); this.AttributeClassID.DataSource = AttributeClassBLL.ReadAttributeClassCacheList(); this.AttributeClassID.DataTextField = "Name"; this.AttributeClassID.DataValueField = "ID"; this.AttributeClassID.DataBind(); this.AttributeClassID.Items.Insert(0, new ListItem("请选择", "0")); foreach (ArticleClassInfo info2 in ArticleClassBLL.ReadArticleClassChildList(3)) { this.ArticleClassID.Items.Add(new ListItem(info2.ClassName, "|" + info2.ID + "|")); } this.ArticleClassID.Items.Insert(0, new ListItem(ArticleClassBLL.ReadArticleClassCache(3).ClassName, "|" + 3 + "|")); this.StandardType.DataSource = EnumHelper.ReadEnumList <ProductStandardType>(); this.StandardType.DataTextField = "ChineseName"; this.StandardType.DataValueField = "Value"; this.StandardType.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("ReadAttribute", PowerCheckType.Single); this.AttributeClass.DataSource = AttributeClassBLL.ReadAttributeClassCacheList(); this.AttributeClass.DataTextField = "Name"; this.AttributeClass.DataValueField = "ID"; this.AttributeClass.DataBind(); this.InputType.DataSource = EnumHelper.ReadEnumList <InputType>(); this.InputType.DataTextField = "ChineseName"; this.InputType.DataValueField = "Value"; this.InputType.DataBind(); this.InputType.Items[0].Selected = true; string queryString = RequestHelper.GetQueryString <string>("Action"); int id = RequestHelper.GetQueryString <int>("ID"); if ((queryString != string.Empty) && (id > 0)) { if (queryString == "Up") { AttributeBLL.ChangeAttributeOrder(ChangeAction.Up, id); } else { AttributeBLL.ChangeAttributeOrder(ChangeAction.Down, id); } } if (id != -2147483648) { AttributeInfo info = AttributeBLL.ReadAttributeCache(id); this.Name.Text = info.Name; this.InputType.Text = info.InputType.ToString(); this.InputValue.Text = info.InputValue; } this.attributeClassIDAspx = RequestHelper.GetQueryString <int>("AttributeClassID"); this.AttributeClass.SelectedValue = this.attributeClassIDAspx.ToString(); base.BindControl(AttributeBLL.ReadAttributeListByClassID(this.attributeClassIDAspx), this.RecordList); } }