protected void SubmitButton_Click(object sender, EventArgs e) { StandardInfo standard = new StandardInfo(); standard.ID = RequestHelper.GetQueryString <int>("ID"); standard.Name = this.Name.Text; standard.DisplayTye = Convert.ToInt32(this.DisplayTye.Text); standard.ValueList = RequestHelper.GetForm <string>("ValueList"); standard.PhotoList = RequestHelper.GetForm <string>("PhotoList"); string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (standard.ID == -2147483648) { base.CheckAdminPower("AddStandard", PowerCheckType.Single); int id = StandardBLL.AddStandard(standard); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("Standard"), id); } else { base.CheckAdminPower("UpdateStandard", PowerCheckType.Single); StandardBLL.UpdateStandard(standard); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("Standard"), standard.ID); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { base.CheckAdminPower("ReadStandard", PowerCheckType.Single); base.BindControl(StandardBLL.ReadStandardCacheList(), this.RecordList); } }
protected void DeleteButton_Click(object sender, EventArgs e) { base.CheckAdminPower("DeleteStandard", PowerCheckType.Single); string intsForm = RequestHelper.GetIntsForm("SelectID"); if (intsForm != string.Empty) { StandardBLL.DeleteStandard(intsForm); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Standard"), intsForm); ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { this.DisplayTye.DataSource = EnumHelper.ReadEnumList <DisplayTye>(); this.DisplayTye.DataTextField = "ChineseName"; this.DisplayTye.DataValueField = "Value"; this.DisplayTye.DataBind(); this.DisplayTye.SelectedIndex = 0; int queryString = RequestHelper.GetQueryString <int>("ID"); if (queryString != -2147483648) { base.CheckAdminPower("ReadStandard", PowerCheckType.Single); this.standard = StandardBLL.ReadStandardCache(queryString); this.Name.Text = this.standard.Name; this.DisplayTye.Text = this.standard.DisplayTye.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { base.ClearCache(); this.standardType = RequestHelper.GetQueryString <int>("StandardType"); int queryString = RequestHelper.GetQueryString <int>("ProductID"); this.standardList = StandardBLL.ReadStandardCacheList(); if (queryString > 0) { this.standardRecordList = StandardRecordBLL.ReadStandardRecordByProduct(queryString, this.standardType); if (this.standardRecordList.Count > 0) { this.selectStandard = this.standardRecordList[0].StandardIDList; if (this.standardType == 2) { string groupTag = this.standardRecordList[0].GroupTag; ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductID = groupTag; this.productList = ProductBLL.SearchProductList(productSearch); } } } }
protected override void PageLoad() { base.PageLoad(); int queryString = RequestHelper.GetQueryString <int>("ID"); this.product = ProductBLL.ReadProduct(queryString); if (this.product.IsSale == 0) { ScriptHelper.Alert("该产品未上市,不能查看"); } ProductBLL.ChangeProductViewCount(queryString, 1); this.userGradeList = UserGradeBLL.ReadUserGradeCacheList(); this.memberPriceList = MemberPriceBLL.ReadMemberPriceByProduct(queryString); this.currentMemberPrice = (this.product.MarketPrice * UserGradeBLL.ReadUserGradeCache(base.GradeID).Discount) / 100M; foreach (MemberPriceInfo info in this.memberPriceList) { if (info.GradeID == base.GradeID) { this.currentMemberPrice = info.Price; break; } } this.currentMemberPrice = Math.Round(this.currentMemberPrice, 2); ProductPhotoInfo item = new ProductPhotoInfo(); item.Name = this.product.Name; item.Photo = this.product.Photo; this.productPhotoList.Add(item); this.productPhotoList.AddRange(ProductPhotoBLL.ReadProductPhotoByProduct(queryString)); this.strHistoryProduct = base.Server.UrlDecode(CookiesHelper.ReadCookieValue("HistoryProduct")); string strProductID = (this.product.RelationProduct + "," + this.product.Accessory + "," + this.strHistoryProduct).Replace(",,", ","); if (strProductID.StartsWith(",")) { strProductID = strProductID.Substring(1); } if (strProductID.EndsWith(",")) { strProductID = strProductID.Substring(0, strProductID.Length - 1); } ProductSearchInfo productSearch = new ProductSearchInfo(); productSearch.InProductID = strProductID; this.tempProductList = ProductBLL.SearchProductList(productSearch); if (strProductID != string.Empty) { this.tempMemberPriceList = MemberPriceBLL.ReadMemberPriceByProductGrade(strProductID, base.GradeID); } this.attributeRecordList = AttributeRecordBLL.ReadAttributeRecordByProduct(queryString); TagsSearchInfo tags = new TagsSearchInfo(); tags.ProductID = queryString; this.productTagsList = TagsBLL.SearchTagsList(tags); if (this.product.RelationArticle != string.Empty) { ArticleSearchInfo articleSearch = new ArticleSearchInfo(); articleSearch.InArticleID = this.product.RelationArticle; this.productArticleList = ArticleBLL.SearchArticleList(articleSearch); } this.standardRecordList = StandardRecordBLL.ReadStandardRecordByProduct(this.product.ID, this.product.StandardType); if ((this.standardRecordList.Count > 0) && (this.product.StandardType == 1)) { string[] strArray = this.standardRecordList[0].StandardIDList.Split(new char[] { ',' }); for (int i = 0; i < strArray.Length; i++) { StandardInfo info6 = StandardBLL.ReadStandardCache(Convert.ToInt32(strArray[i])); string[] strArray2 = info6.ValueList.Split(new char[] { ',' }); string[] strArray3 = info6.PhotoList.Split(new char[] { ',' }); string str2 = string.Empty; string str3 = string.Empty; for (int j = 0; j < strArray2.Length; j++) { foreach (StandardRecordInfo info7 in this.standardRecordList) { string[] strArray4 = info7.ValueList.Split(new char[] { ',' }); if (strArray2[j] == strArray4[i]) { str2 = str2 + strArray2[j] + ","; str3 = str3 + strArray3[j] + ","; goto Label_043B; } } Label_043B :; } if (str2 != string.Empty) { str2 = str2.Substring(0, str2.Length - 1); str3 = str3.Substring(0, str3.Length - 1); } info6.ValueList = str2; info6.PhotoList = str3; this.standardList.Add(info6); } foreach (StandardRecordInfo info7 in this.standardRecordList) { object standardRecordValueList = this.standardRecordValueList; this.standardRecordValueList = string.Concat(new object[] { standardRecordValueList, info7.ProductID, ",", info7.ValueList, "|" }); } } if (ShopConfig.ReadConfigInfo().ProductStorageType == 1) { this.leftStorageCount = this.product.TotalStorageCount - this.product.OrderCount; } else { this.leftStorageCount = this.product.ImportVirtualStorageCount; } base.Title = this.product.Name; base.Keywords = (this.product.Keywords == string.Empty) ? this.product.Name : this.product.Keywords; base.Description = (this.product.Summary == string.Empty) ? StringHelper.Substring(StringHelper.KillHTML(this.product.Introduction), 200) : this.product.Summary; }