/// <summary> /// 页面加载 /// </summary> protected override void PageLoad() { base.PageLoad(); int id = RequestHelper.GetQueryString <int>("ID"); themeActivity = ThemeActivityBLL.Read(id); styleArray = themeActivity.Style.Split('|'); if (themeActivity.ProductGroup != string.Empty) { string productIDList = string.Empty; productGroupArray = themeActivity.ProductGroup.Split(new char[] { '#' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < productGroupArray.Length; i++) { if (productGroupArray[i].Split('|')[4] != string.Empty) { if (productIDList == string.Empty) { productIDList = productGroupArray[i].Split('|')[4]; } else { productIDList += "," + productGroupArray[i].Split('|')[4]; } } } if (productIDList != string.Empty) { ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductId = productIDList; productList = ProductBLL.SearchList(productSearch); } } Title = themeActivity.Name; }
/// <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 id = RequestHelper.GetQueryString <int>("id"); theme = ThemeActivityBLL.Read(id); styleArray = theme.Style.Split('|'); if (!string.IsNullOrEmpty(theme.ProductGroup)) { productGroupArray = theme.ProductGroup.Split('#'); foreach (var group in productGroupArray) { var productIds = group.Split('|')[2]; if (!string.IsNullOrEmpty(productIds)) { int length = productIds.Split(',').Length; int count = 0; var products = ProductBLL.SearchList(1, length, new ProductSearchInfo { InProductId = productIds }, ref count); dynamic dy = new System.Dynamic.ExpandoObject(); dy.index = Array.IndexOf(productGroupArray, group); dy.list = products; productGroup.Add(dy); } } } Title = theme.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) { base.CheckAdminPower("ReadThemeActivity", PowerCheckType.Single); base.BindControl(ThemeActivityBLL.ReadThemeActivityList(base.CurrentPage, base.PageSize, ref this.Count), this.RecordList, this.MyPager); } }
protected override void PageLoad() { base.PageLoad(); themes = ThemeActivityBLL.ReadList(); Title = "活动专题"; }
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]; } } }
protected void DeleteButton_Click(object sender, EventArgs e) { CheckAdminPower("DeleteThemeActivity", PowerCheckType.Single); string deleteID = RequestHelper.GetIntsForm("SelectID"); if (deleteID != string.Empty) { ThemeActivityBLL.Delete(Array.ConvertAll <string, int>(deleteID.Split(','), k => Convert.ToInt32(k))); AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), deleteID); ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CheckAdminPower("ReadThemeActivity", PowerCheckType.Single); var themes = ThemeActivityBLL.ReadList(); themes = themes.Skip((CurrentPage - 1) * PageSize).Take(PageSize).ToList(); BindControl(themes, RecordList, MyPager); } }
protected void DeleteButton_Click(object sender, EventArgs e) { base.CheckAdminPower("DeleteThemeActivity", PowerCheckType.Single); string intsForm = RequestHelper.GetIntsForm("SelectID"); if (intsForm != string.Empty) { ThemeActivityBLL.DeleteThemeActivity(intsForm); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), intsForm); ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl); } }
protected void SubmitButton_Click(object sender, EventArgs e) { ThemeActivityInfo themeActivity = new ThemeActivityInfo(); themeActivity.ID = RequestHelper.GetQueryString <int>("ID"); themeActivity.Name = this.Name.Text; themeActivity.Photo = this.Photo.Text; themeActivity.Description = this.Description.Text; themeActivity.Css = this.Css.Text; int form = RequestHelper.GetForm <int>("ProductGroupCount"); string str = string.Empty; for (int i = 0; i < form; i++) { if (RequestHelper.GetForm <string>("ProductGroupValue" + i) != string.Empty) { str = str + RequestHelper.GetForm <string>("ProductGroupValue" + i) + "#"; } } if (str.EndsWith("#")) { str = str.Substring(0, str.Length - 1); } themeActivity.ProductGroup = str; themeActivity.Style = string.Concat(new object[] { this.TopImage.Text, '|', this.BackgroundImage.Text, '|', this.BottomImage.Text, '|', this.ProductColor.Text, '|', this.ProductSize.Text, '|', this.PriceColor.Text, '|', this.PriceSize.Text, '|', this.OtherColor.Text, '|', this.OtherSize.Text }); string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (themeActivity.ID == -2147483648) { base.CheckAdminPower("AddThemeActivity", PowerCheckType.Single); int id = ThemeActivityBLL.AddThemeActivity(themeActivity); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), id); } else { base.CheckAdminPower("UpdateThemeActivity", PowerCheckType.Single); ThemeActivityBLL.UpdateThemeActivity(themeActivity); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), themeActivity.ID); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl); }
protected void SubmitButton_Click(object sender, EventArgs e) { ThemeActivityInfo themeActivity = new ThemeActivityInfo(); themeActivity.Id = RequestHelper.GetQueryString <int>("id"); themeActivity.Name = Name.Text; themeActivity.Photo = Photo.Text; themeActivity.Description = Description.Text; themeActivity.Css = Css.Text; themeActivity.CssMobile = CssMobile.Text; int count = RequestHelper.GetForm <int>("ProductGroupCount"); string productGroup = string.Empty; for (int i = 0; i < count; i++) { if (RequestHelper.GetForm <string>("ProductGroupValue" + i) != string.Empty) { productGroup += RequestHelper.GetForm <string>("ProductGroupValue" + i) + "#"; } } if (productGroup.EndsWith("#")) { productGroup = productGroup.Substring(0, productGroup.Length - 1); } themeActivity.ProductGroup = productGroup; themeActivity.Style = TopImage.Text + '|' + BackgroundImage.Text + '|' + BottomImage.Text + '|' + ProductColor.Text + '|' + ProductSize.Text + '|' + PriceColor.Text + '|' + PriceSize.Text + '|' + OtherColor.Text + '|' + OtherSize.Text + '|' + TopImageMobile.Text + '|' + BackgroundImageMobile.Text + '|' + BottomImageMobile.Text; string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (themeActivity.Id == int.MinValue) { CheckAdminPower("AddThemeActivity", PowerCheckType.Single); int id = ThemeActivityBLL.Add(themeActivity); AdminLogBLL.Add(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), id); } else { CheckAdminPower("UpdateThemeActivity", PowerCheckType.Single); ThemeActivityBLL.Update(themeActivity); AdminLogBLL.Add(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ThemeActivity"), themeActivity.Id); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } ScriptHelper.Alert(alertMessage, RequestHelper.RawUrl); }
protected override void PageLoad() { base.PageLoad(); int queryString = RequestHelper.GetQueryString <int>("Page"); if (queryString < 1) { queryString = 1; } int pageSize = 6; int count = 0; this.themeActivityList = ThemeActivityBLL.ReadThemeActivityList(queryString, pageSize, ref count); this.ajaxPagerClass.CurrentPage = queryString; this.ajaxPagerClass.PageSize = pageSize; this.ajaxPagerClass.Count = count; this.ajaxPagerClass.DisCount = false; this.ajaxPagerClass.ListType = false; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int themeActivityId = RequestHelper.GetQueryString <int>("id"); if (themeActivityId != int.MinValue) { CheckAdminPower("ReadThemeActivity", PowerCheckType.Single); strThemeActivityId = themeActivityId.ToString(); ThemeActivityInfo themeActivity = ThemeActivityBLL.Read(themeActivityId); Name.Text = themeActivity.Name; Photo.Text = themeActivity.Photo; Description.Text = themeActivity.Description; Css.Text = themeActivity.Css; CssMobile.Text = themeActivity.CssMobile; if (themeActivity.ProductGroup != string.Empty) { string idList = string.Empty; int count = themeActivity.ProductGroup.Split('#').Length; photoArray = new string[count]; linkArray = new string[count]; photoMobileArray = new string[count]; linkMobileArray = new string[count]; idArray = new string[count]; for (int i = 0; i < count; i++) { string[] productGroupArray = themeActivity.ProductGroup.Split('#')[i].Split('|'); photoArray[i] = productGroupArray[0]; linkArray[i] = productGroupArray[1]; photoMobileArray[i] = productGroupArray[2]; linkMobileArray[i] = productGroupArray[3]; idArray[i] = productGroupArray[4]; if (productGroupArray[4] != string.Empty) { idList += productGroupArray[4] + ","; } } if (idList != string.Empty) { idList = idList.Substring(0, idList.Length - 1); } ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductId = idList; productList = ProductBLL.SearchList(1, idList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Length, productSearch, ref count); } string[] themeStyleArr = themeActivity.Style.Split('|'); TopImage.Text = themeStyleArr[0]; BackgroundImage.Text = themeStyleArr[1]; BottomImage.Text = themeStyleArr[2]; ProductColor.Text = themeStyleArr[3]; ProductColor.Attributes.Add("style", "color:" + themeStyleArr[3] + ";"); ProductSize.Text = themeStyleArr[4]; PriceColor.Text = themeStyleArr[5]; PriceColor.Attributes.Add("style", "color:" + themeStyleArr[5] + ";"); PriceSize.Text = themeStyleArr[6]; OtherColor.Text = themeStyleArr[7]; OtherColor.Attributes.Add("style", "color:" + themeStyleArr[7] + ";"); OtherSize.Text = themeStyleArr[8]; TopImageMobile.Text = themeStyleArr[9]; BackgroundImageMobile.Text = themeStyleArr[10]; BottomImageMobile.Text = themeStyleArr[11]; } } }