/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); int id = RequestHelper.GetQueryString <int>("ID"); themeActivity = ThemeActivityBLL.ReadThemeActivity(id); styleArray = themeActivity.Style.Split('|'); if (themeActivity.ProductGroup != string.Empty) { string productIDList = string.Empty; productGroupArray = themeActivity.ProductGroup.Split('#'); for (int i = 0; i < productGroupArray.Length; i++) { if (productGroupArray[i].Split('|')[2] != string.Empty) { if (productIDList == string.Empty) { productIDList = productGroupArray[i].Split('|')[2]; } else { productIDList += "," + productGroupArray[i].Split('|')[2]; } } } if (productIDList != string.Empty) { ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductID = productIDList; productList = ProductBLL.SearchProductList(productSearch); memberPriceList = MemberPriceBLL.ReadMemberPriceByProductGrade(productIDList, base.GradeID); } } Title = themeActivity.Name; }
protected override void PageLoad() { base.PageLoad(); int queryString = RequestHelper.GetQueryString <int>("ID"); this.themeActivity = ThemeActivityBLL.ReadThemeActivity(queryString); this.styleArray = this.themeActivity.Style.Split(new char[] { '|' }); if (this.themeActivity.ProductGroup != string.Empty) { string strProductID = string.Empty; this.productGroupArray = this.themeActivity.ProductGroup.Split(new char[] { '#' }); for (int i = 0; i < this.productGroupArray.Length; i++) { if (this.productGroupArray[i].Split(new char[] { '|' })[2] != string.Empty) { if (strProductID == string.Empty) { strProductID = this.productGroupArray[i].Split(new char[] { '|' })[2]; } else { strProductID = strProductID + "," + this.productGroupArray[i].Split(new char[] { '|' })[2]; } } } if (strProductID != string.Empty) { ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductID = strProductID; this.productList = ProductBLL.SearchProductList(productSearch); this.memberPriceList = MemberPriceBLL.ReadMemberPriceByProductGrade(strProductID, base.GradeID); } } base.Title = this.themeActivity.Name; }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { int queryString = RequestHelper.GetQueryString <int>("ID"); if (queryString != -2147483648) { base.CheckAdminPower("ReadThemeActivity", PowerCheckType.Single); this.strThemeActivityID = queryString.ToString(); ThemeActivityInfo info = ThemeActivityBLL.ReadThemeActivity(queryString); this.Name.Text = info.Name; this.Photo.Text = info.Photo; this.Description.Text = info.Description; this.Css.Text = info.Css; if (info.ProductGroup != string.Empty) { string str = string.Empty; int length = info.ProductGroup.Split(new char[] { '#' }).Length; this.photoArray = new string[length]; this.linkArray = new string[length]; this.idArray = new string[length]; for (int i = 0; i < length; i++) { string[] strArray = info.ProductGroup.Split(new char[] { '#' })[i].Split(new char[] { '|' }); this.photoArray[i] = strArray[0]; this.linkArray[i] = strArray[1]; this.idArray[i] = strArray[2]; if (strArray[2] != string.Empty) { str = str + strArray[2] + ","; } } if (str != string.Empty) { str = str.Substring(0, str.Length - 1); } ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductID = str; this.productList = ProductBLL.SearchProductList(productSearch); } this.TopImage.Text = info.Style.Split(new char[] { '|' })[0]; this.BackgroundImage.Text = info.Style.Split(new char[] { '|' })[1]; this.BottomImage.Text = info.Style.Split(new char[] { '|' })[2]; this.ProductColor.Text = info.Style.Split(new char[] { '|' })[3]; this.ProductColor.Attributes.Add("style", "color:" + info.Style.Split(new char[] { '|' })[3] + ";"); this.ProductSize.Text = info.Style.Split(new char[] { '|' })[4]; this.PriceColor.Text = info.Style.Split(new char[] { '|' })[5]; this.PriceColor.Attributes.Add("style", "color:" + info.Style.Split(new char[] { '|' })[5] + ";"); this.PriceSize.Text = info.Style.Split(new char[] { '|' })[6]; this.OtherColor.Text = info.Style.Split(new char[] { '|' })[7]; this.OtherColor.Attributes.Add("style", "color:" + info.Style.Split(new char[] { '|' })[7] + ";"); this.OtherSize.Text = info.Style.Split(new char[] { '|' })[8]; } } }