private void btnDelete_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("请先选择要删除的商品", false); return; } System.Collections.Generic.List <int> list = new System.Collections.Generic.List <int>(); string[] array = text.Split(new char[] { ',' }); for (int i = 0; i < array.Length; i++) { string value = array[i]; list.Add(System.Convert.ToInt32(value)); } SendMessageHelper.SendMessageToDistributors(text, 3); if (ProductHelper.CanclePenetrationProducts(text) >= 1) { int num = ProductHelper.RemoveProduct(text); if (num > 0) { this.ShowMsg("成功删除了选择的商品", true); this.BindProducts(); return; } this.ShowMsg("删除商品失败,未知错误", false); } }
private void btnStockPentrationStauts_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { this.ShowMsg("请先选择要入库的商品", false); } else { if (this.hdPenetrationStatus.Value.Equals("1")) { List <int> productIds = new List <int>(); foreach (string str2 in str.Split(new char[] { ',' })) { productIds.Add(Convert.ToInt32(str2)); } if (ProductHelper.CanclePenetrationProducts(productIds) == 0) { this.ShowMsg("取消铺货失败!", false); return; } } if (ProductHelper.InStock(str) > 0) { this.ShowMsg("成功入库选择的商品,您可以在仓库区的商品里面找到入库以后的商品", true); this.BindProducts(); } else { this.ShowMsg("入库商品失败,未知错误", false); } } }
private void btnOK_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { ShowMsg("请先选择要下架的商品", false); } else { if (hdPenetrationStatus.Value.Equals("1")) { List <int> productIds = new List <int>(); foreach (string str2 in str.Split(new char[] { ',' })) { productIds.Add(Convert.ToInt32(str2)); } AdminPage.SendMessageToDistributors(str, 1); if (ProductHelper.CanclePenetrationProducts(productIds) == 0) { ShowMsg("取消铺货失败!", false); return; } } if (ProductHelper.OffShelf(str) > 0) { ShowMsg("成功下架了选择的商品,您可以在下架区的商品里面找到下架以后的商品", true); ReloadProductAlert(false); } else { ShowMsg("下架商品失败,未知错误", false); } } }
private void btnInStock_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("请先选择要入库的商品", false); return; } if (this.hdPenetrationStatus.Value.Equals("1")) { SendMessageHelper.SendMessageToDistributors(text, 2); if (ProductHelper.CanclePenetrationProducts(text) == 0) { this.ShowMsg("取消铺货失败!", false); return; } } int num = ProductHelper.InStock(text); if (num > 0) { this.ShowMsg("成功入库选择的商品,您可以在仓库区的商品里面找到入库以后的商品", true); this.BindProducts(); return; } this.ShowMsg("入库商品失败,未知错误", false); }
private void btnUnSale_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { this.ShowMsg("请先选择要下架的商品", false); } else { if (this.hdPenetrationStatus.Value.Equals("1")) { SendMessageHelper.SendMessageToDistributors(str, 1); if (ProductHelper.CanclePenetrationProducts(str) == 0) { this.ShowMsg("取消铺货失败!", false); return; } } if (ProductHelper.OffShelf(str) > 0) { this.ShowMsg("成功下架了选择的商品,您可以在下架区的商品里面找到下架以后的商品", true); this.BindProducts(); } else { this.ShowMsg("下架商品失败,未知错误", false); } } }
private void btnDelete_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { this.ShowMsg("请先选择要删除的商品", false); } else { List <int> list = new List <int>(); foreach (string str2 in str.Split(new char[] { ',' })) { list.Add(Convert.ToInt32(str2)); } SendMessageHelper.SendMessageToDistributors(str, 3); if (ProductHelper.RemoveProduct(str) > 0) { this.ShowMsg("成功删除了选择的商品", true); this.BindProducts(); } else { this.ShowMsg("删除商品失败,未知错误", false); } if (this.hdPenetrationStatus.Value.Equals("1")) { ProductHelper.CanclePenetrationProducts(str); } } }
private void btnDelete_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { this.ShowMsg("请先选择要删除的商品", false); } else { List <int> productIds = new List <int>(); int id; foreach (string str2 in str.Split(new char[] { ',' })) { id = Convert.ToInt32(str2); productIds.Add(id); } if (ProductHelper.CanclePenetrationProducts(productIds) >= 1) { if (ProductHelper.RemoveProduct(str) > 0) { this.ShowMsg("成功删除了选择的商品", true); this.BindProducts(); this.ReloadProductOnSales(false); } else { this.ShowMsg("删除商品失败,未知错误", false); } } } }
private void btnDelete_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { ShowMsg("请先选择要删除的商品", false); } else { List <int> productIds = new List <int>(); foreach (string str2 in str.Split(new char[] { ',' })) { productIds.Add(Convert.ToInt32(str2)); } AdminPage.SendMessageToDistributors(str, 3); if (ProductHelper.CanclePenetrationProducts(productIds) >= 1) { if (ProductHelper.RemoveProduct(str) > 0) { ShowMsg("成功删除了选择的商品", true); BindProducts(); } else { ShowMsg("删除商品失败,未知错误", false); } } } }
private void grdProducts_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Penetration") { int item = Convert.ToInt32(e.CommandArgument.ToString()); List <int> list2 = new List <int>(); list2.Add(item); IList <int> productIds = list2; LinkButton commandSource = e.CommandSource as LinkButton; if (commandSource.Text == "取消") { AdminPage.SendMessageToDistributors(item.ToString(), 5); if (ProductHelper.CanclePenetrationProducts(productIds) != 1) { ShowMsg("取消铺货失败", false); return; } } else if ((commandSource.Text == "铺货") && (ProductHelper.PenetrationProducts(productIds) != 1)) { ShowMsg("铺货失败", false); return; } } BindProducts(); }
private void btnCheck_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("错误:请先选择要提交的商品", false); return; } Methods.Supplier_PtCheckErrorReferAgree(text); ProductHelper.CanclePenetrationProducts(text); this.Page.ClientScript.RegisterClientScriptBlock(base.GetType(), "sucess", string.Format("<script language=\"javascript\" >alert('操作成功');window.location.href=\"{0}\"</script>", System.Web.HttpContext.Current.Request.RawUrl)); }
private void grdProducts_RowDeleting(object sender, GridViewDeleteEventArgs e) { List <int> productIds = new List <int>(); string str = grdProducts.DataKeys[e.RowIndex].Value.ToString(); if (str != "") { productIds.Add(Convert.ToInt32(str)); } AdminPage.SendMessageToDistributors(str, 3); if ((ProductHelper.CanclePenetrationProducts(productIds) == 1) && (ProductHelper.RemoveProduct(str) > 0)) { ShowMsg("删除商品成功", true); ReloadProductOnSales(false); } }
private void grdProducts_RowDeleting(object sender, GridViewDeleteEventArgs e) { List <int> productIds = new List <int>(); string str = this.grdProducts.DataKeys[e.RowIndex].Value.ToString(); if (str != "") { int id = Convert.ToInt32(str); productIds.Add(id); } if ((ProductHelper.CanclePenetrationProducts(productIds) == 1) && (ProductHelper.RemoveProduct(str) > 0)) { this.ShowMsg("删除商品成功", true); this.BindProducts(); this.ReloadProductOnSales(false); } }
private void btnCheckError_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("错误:请先选择要提交的商品", false); return; } if (string.IsNullOrEmpty(this.txtCheckError.Text)) { this.ShowMsg("错误:请填写审核失败原因", false); return; } Methods.Supplier_PtCheckError(text, "审核失败:" + this.txtCheckError.Text); ProductHelper.CanclePenetrationProducts(text); this.ShowMsg("操作成功", true); this.BindProducts(); }
private void btnCancle_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("请先选择要下架的商品", false); return; } SendMessageHelper.SendMessageToDistributors(text, 5); int num = ProductHelper.CanclePenetrationProducts(text); if (num > 0) { this.ShowMsg("取消铺货成功", true); this.BindProducts(); return; } this.ShowMsg("取消铺货失败,未知错误", false); }
private void grdProducts_RowDeleting(object sender, GridViewDeleteEventArgs e) { List <int> list = new List <int>(); string str = this.grdProducts.DataKeys[e.RowIndex].Value.ToString(); if (str != "") { list.Add(Convert.ToInt32(str)); } SendMessageHelper.SendMessageToDistributors(str, 3); if (this.hdPenetrationStatus.Value.Equals("1")) { ProductHelper.CanclePenetrationProducts(str); } if (ProductHelper.RemoveProduct(str) > 0) { this.ShowMsg("删除商品成功", true); this.ReloadProductOnSales(false); } }
private void grdProducts_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e) { System.Collections.Generic.List <int> list = new System.Collections.Generic.List <int>(); string text = this.grdProducts.DataKeys[e.RowIndex].Value.ToString(); if (text != "") { list.Add(System.Convert.ToInt32(text)); } SendMessageHelper.SendMessageToDistributors(text, 3); if (this.hdPenetrationStatus.Value.Equals("1")) { ProductHelper.CanclePenetrationProducts(text); } if (ProductHelper.RemoveProduct(text) > 0) { this.ShowMsg("删除商品成功", true); this.BindProducts(); } }
private void btnCancle_Click(object sender, EventArgs e) { int num = 0; string productId = ""; foreach (GridViewRow row in grdProducts.Rows) { CheckBox box = (CheckBox)row.FindControl("checkboxCol"); if ((box != null) && box.Checked) { num++; productId = grdProducts.DataKeys[row.RowIndex].Value.ToString() + ","; } } if (num == 0) { ShowMsg("请先选择要取消铺货的商品", false); } else { productId = productId.Substring(0, productId.Length - 1); IList <int> selectedProducts = SelectedProducts; if (selectedProducts.Count == 0) { ShowMsg("请先选择要取消铺货的商品", false); } else { AdminPage.SendMessageToDistributors(productId, 5); if (ProductHelper.CanclePenetrationProducts(selectedProducts) > 0) { ShowMsg("取消铺货成功", true); BindProducts(); } else { ShowMsg("取消铺货失败,未知错误", false); } } } }
private void btnCancle_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { this.ShowMsg("请先选择要下架的商品", false); } else { SendMessageHelper.SendMessageToDistributors(str, 5); if (ProductHelper.CanclePenetrationProducts(str) > 0) { this.ShowMsg("取消铺货成功", true); this.BindProducts(); } else { this.ShowMsg("取消铺货失败,未知错误", false); } } }
private void btnOK_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("请先选择要下架的商品", false); return; } if (this.hdPenetrationStatus.Value.Equals("1")) { System.Collections.Generic.List <int> list = new System.Collections.Generic.List <int>(); string[] array = text.Split(new char[] { ',' }); for (int i = 0; i < array.Length; i++) { string value = array[i]; list.Add(System.Convert.ToInt32(value)); } SendMessageHelper.SendMessageToDistributors(text, 1); if (ProductHelper.CanclePenetrationProducts(text) == 0) { this.ShowMsg("取消铺货失败!", false); return; } } int num = ProductHelper.OffShelf(text); if (num > 0) { this.ShowMsg("成功下架了选择的商品,您可以在下架区的商品里面找到下架以后的商品", true); this.BindProducts(); return; } this.ShowMsg("下架商品失败,未知错误", false); }
private void btnSave_Click(object sender, EventArgs e) { int num; int num2; int num3; decimal num4; decimal num5; decimal num6; decimal?nullable; decimal?nullable2; decimal?nullable3; if (this.categoryId == 0) { this.categoryId = (int)this.ViewState["ProductCategoryId"]; } if (this.ValidateConverts(this.chkSkuEnabled.Checked, out num, out num4, out num5, out num6, out nullable, out nullable2, out num2, out num3, out nullable3)) { if (!this.chkSkuEnabled.Checked) { if (num6 <= 0M) { this.ShowMsg("商品一口价必须大于0", false); return; } if (nullable.HasValue && (nullable.Value >= num6)) { this.ShowMsg("商品成本价必须小于商品一口价", false); return; } if (num4 > num5) { this.ShowMsg("分销商采购价必须要小于等于其最低零售价", false); return; } } string text = this.fckDescription.Text; if (this.ckbIsDownPic.Checked) { text = base.DownRemotePic(text); } ProductInfo info3 = new ProductInfo(); info3.ProductId = this.productId; info3.CategoryId = this.categoryId; info3.TypeId = this.dropProductTypes.SelectedValue; info3.ProductName = this.txtProductName.Text; info3.ProductCode = this.txtProductCode.Text; info3.DisplaySequence = num; info3.LineId = this.dropProductLines.SelectedValue.Value; info3.LowestSalePrice = num5; info3.MarketPrice = nullable2; info3.Unit = this.txtUnit.Text; info3.ImageUrl1 = this.uploader1.UploadedImageUrl; info3.ImageUrl2 = this.uploader2.UploadedImageUrl; info3.ImageUrl3 = this.uploader3.UploadedImageUrl; info3.ImageUrl4 = this.uploader4.UploadedImageUrl; info3.ImageUrl5 = this.uploader5.UploadedImageUrl; info3.ThumbnailUrl40 = this.uploader1.ThumbnailUrl40; info3.ThumbnailUrl60 = this.uploader1.ThumbnailUrl60; info3.ThumbnailUrl100 = this.uploader1.ThumbnailUrl100; info3.ThumbnailUrl160 = this.uploader1.ThumbnailUrl160; info3.ThumbnailUrl180 = this.uploader1.ThumbnailUrl180; info3.ThumbnailUrl220 = this.uploader1.ThumbnailUrl220; info3.ThumbnailUrl310 = this.uploader1.ThumbnailUrl310; info3.ThumbnailUrl410 = this.uploader1.ThumbnailUrl410; info3.ShortDescription = this.txtShortDescription.Text; info3.Description = (!string.IsNullOrEmpty(text) && (text.Length > 0)) ? text : null; info3.PenetrationStatus = this.chkPenetration.Checked ? PenetrationStatus.Already : PenetrationStatus.Notyet; info3.Title = this.txtTitle.Text; info3.MetaDescription = this.txtMetaDescription.Text; info3.MetaKeywords = this.txtMetaKeywords.Text; info3.AddedDate = DateTime.Now; info3.BrandId = this.dropBrandCategories.SelectedValue; ProductInfo target = info3; ProductSaleStatus onSale = ProductSaleStatus.OnSale; if (this.radInStock.Checked) { onSale = ProductSaleStatus.OnStock; } if (this.radUnSales.Checked) { onSale = ProductSaleStatus.UnSale; } if (this.radOnSales.Checked) { onSale = ProductSaleStatus.OnSale; } target.SaleStatus = onSale; CategoryInfo category = CatalogHelper.GetCategory(this.categoryId); if (category != null) { target.MainCategoryPath = category.Path + "|"; } Dictionary <string, SKUItem> skus = null; Dictionary <int, IList <int> > attrs = null; if (this.chkSkuEnabled.Checked) { target.HasSKU = true; skus = base.GetSkus(this.txtSkus.Text); } else { Dictionary <string, SKUItem> dictionary3 = new Dictionary <string, SKUItem>(); SKUItem item = new SKUItem(); item.SkuId = "0"; item.SKU = this.txtSku.Text; item.SalePrice = num6; item.CostPrice = nullable.HasValue ? nullable.Value : 0M; item.PurchasePrice = num4; item.Stock = num2; item.AlertStock = num3; item.Weight = nullable3.HasValue ? nullable3.Value : 0M; dictionary3.Add("0", item); skus = dictionary3; if (this.txtMemberPrices.Text.Length > 0) { base.GetMemberPrices(skus["0"], this.txtMemberPrices.Text); } if (this.txtDistributorPrices.Text.Length > 0) { base.GetDistributorPrices(skus["0"], this.txtDistributorPrices.Text); } } if (!string.IsNullOrEmpty(this.txtAttributes.Text) && (this.txtAttributes.Text.Length > 0)) { attrs = base.GetAttributes(this.txtAttributes.Text); } ValidationResults validateResults = Hishop.Components.Validation.Validation.Validate <ProductInfo>(target); if (!validateResults.IsValid) { this.ShowMsg(validateResults); } else { if (this.ViewState["distributorUserIds"] == null) { this.ViewState["distributorUserIds"] = new List <int>(); } int type = 0; if (((target.LineId > 0) && (int.Parse(this.hdlineId.Value) > 0)) && (target.LineId != int.Parse(this.hdlineId.Value))) { type = 6; } if (!this.chkPenetration.Checked) { type = 5; } if (type == 5) { SendMessageHelper.SendMessageToDistributors(target.ProductId.ToString(), type); ProductHelper.CanclePenetrationProducts(this.productId.ToString()); } else if (type == 6) { this.toline = this.dropProductLines.SelectedItem.Text; SendMessageHelper.SendMessageToDistributors(this.hdlineId.Value + "|" + this.toline, type); } IList <int> tagIds = new List <int>(); if (!string.IsNullOrEmpty(this.txtProductTag.Text.Trim())) { string str2 = this.txtProductTag.Text.Trim(); string[] strArray = null; if (str2.Contains(",")) { strArray = str2.Split(new char[] { ',' }); } else { strArray = new string[] { str2 }; } foreach (string str3 in strArray) { tagIds.Add(Convert.ToInt32(str3)); } } switch (ProductHelper.UpdateProduct(target, skus, attrs, (IList <int>) this.ViewState["distributorUserIds"], tagIds)) { case ProductActionStatus.Success: this.litralProductTag.SelectedValue = tagIds; this.ShowMsg("修改商品成功", true); return; case ProductActionStatus.AttributeError: this.ShowMsg("修改商品失败,保存商品属性时出错", false); return; case ProductActionStatus.DuplicateName: this.ShowMsg("修改商品失败,商品名称不能重复", false); return; case ProductActionStatus.DuplicateSKU: this.ShowMsg("修改商品失败,商家编码不能重复", false); return; case ProductActionStatus.SKUError: this.ShowMsg("修改商品失败,商家编码不能重复", false); return; case ProductActionStatus.OffShelfError: this.ShowMsg("修改商品失败, 子站没在零售价范围内的商品无法下架", false); return; case ProductActionStatus.ProductTagEroor: this.ShowMsg("修改商品失败,保存商品标签时出错", false); return; } this.ShowMsg("修改商品失败,未知错误", false); } } }
private void btnSave_Click(object sender, System.EventArgs e) { if (this.categoryId == 0) { this.categoryId = (int)this.ViewState["ProductCategoryId"]; } int displaySequence; decimal num; decimal num2; decimal num3; decimal?num4; decimal?marketPrice; int stock; int alertStock; decimal?num5; if (!this.ValidateConverts(this.chkSkuEnabled.Checked, out displaySequence, out num, out num2, out num3, out num4, out marketPrice, out stock, out alertStock, out num5)) { return; } if (!this.chkSkuEnabled.Checked) { if (num3 <= 0m) { this.ShowMsg("商品一口价必须大于0", false); return; } if (num4.HasValue && num4.Value >= num3) { this.ShowMsg("商品成本价必须小于商品一口价", false); return; } if (!(num <= num2)) { this.ShowMsg("分销商采购价必须要小于等于其最低零售价", false); return; } } string text = this.fckDescription.Text; if (this.ckbIsDownPic.Checked) { text = base.DownRemotePic(text); } ProductInfo productInfo = new ProductInfo { ProductId = this.productId, CategoryId = this.categoryId, TypeId = this.dropProductTypes.SelectedValue, ProductName = this.txtProductName.Text, ProductCode = this.txtProductCode.Text, DisplaySequence = displaySequence, LineId = this.dropProductLines.SelectedValue.Value, LowestSalePrice = num2, MarketPrice = marketPrice, Unit = this.txtUnit.Text, ImageUrl1 = this.uploader1.UploadedImageUrl, ImageUrl2 = this.uploader2.UploadedImageUrl, ImageUrl3 = this.uploader3.UploadedImageUrl, ImageUrl4 = this.uploader4.UploadedImageUrl, ImageUrl5 = this.uploader5.UploadedImageUrl, ThumbnailUrl40 = this.uploader1.ThumbnailUrl40, ThumbnailUrl60 = this.uploader1.ThumbnailUrl60, ThumbnailUrl100 = this.uploader1.ThumbnailUrl100, ThumbnailUrl160 = this.uploader1.ThumbnailUrl160, ThumbnailUrl180 = this.uploader1.ThumbnailUrl180, ThumbnailUrl220 = this.uploader1.ThumbnailUrl220, ThumbnailUrl310 = this.uploader1.ThumbnailUrl310, ThumbnailUrl410 = this.uploader1.ThumbnailUrl410, ShortDescription = this.txtShortDescription.Text, Description = (string.IsNullOrEmpty(text) || text.Length <= 0) ? null : text, PenetrationStatus = this.chkPenetration.Checked ? PenetrationStatus.Already : PenetrationStatus.Notyet, Title = this.txtTitle.Text, MetaDescription = this.txtMetaDescription.Text, MetaKeywords = this.txtMetaKeywords.Text, AddedDate = System.DateTime.Now, BrandId = this.dropBrandCategories.SelectedValue }; ProductSaleStatus saleStatus = ProductSaleStatus.OnSale; if (this.radInStock.Checked) { saleStatus = ProductSaleStatus.OnStock; } if (this.radUnSales.Checked) { saleStatus = ProductSaleStatus.UnSale; } if (this.radOnSales.Checked) { saleStatus = ProductSaleStatus.OnSale; } productInfo.SaleStatus = saleStatus; CategoryInfo category = CatalogHelper.GetCategory(this.categoryId); if (category != null) { productInfo.MainCategoryPath = category.Path + "|"; } System.Collections.Generic.Dictionary <int, System.Collections.Generic.IList <int> > attrs = null; System.Collections.Generic.Dictionary <string, SKUItem> dictionary; if (this.chkSkuEnabled.Checked) { productInfo.HasSKU = true; dictionary = base.GetSkus(this.txtSkus.Text); } else { dictionary = new System.Collections.Generic.Dictionary <string, SKUItem> { { "0", new SKUItem { SkuId = "0", SKU = this.txtSku.Text, SalePrice = num3, CostPrice = num4.HasValue ? num4.Value : 0m, PurchasePrice = num, Stock = stock, AlertStock = alertStock, Weight = num5.HasValue ? num5.Value : 0m } } }; if (this.txtMemberPrices.Text.Length > 0) { base.GetMemberPrices(dictionary["0"], this.txtMemberPrices.Text); } if (this.txtDistributorPrices.Text.Length > 0) { base.GetDistributorPrices(dictionary["0"], this.txtDistributorPrices.Text); } } if (!string.IsNullOrEmpty(this.txtAttributes.Text) && this.txtAttributes.Text.Length > 0) { attrs = base.GetAttributes(this.txtAttributes.Text); } ValidationResults validationResults = Validation.Validate <ProductInfo>(productInfo); if (!validationResults.IsValid) { this.ShowMsg(validationResults); return; } if (this.ViewState["distributorUserIds"] == null) { this.ViewState["distributorUserIds"] = new System.Collections.Generic.List <int>(); } int num6 = 0; if (productInfo.LineId > 0 && int.Parse(this.hdlineId.Value) > 0 && productInfo.LineId != int.Parse(this.hdlineId.Value)) { num6 = 6; } if (!this.chkPenetration.Checked) { num6 = 5; } if (num6 == 5) { SendMessageHelper.SendMessageToDistributors(productInfo.ProductId.ToString(), num6); ProductHelper.CanclePenetrationProducts(this.productId.ToString()); } else { if (num6 == 6) { this.toline = this.dropProductLines.SelectedItem.Text; SendMessageHelper.SendMessageToDistributors(this.hdlineId.Value + "|" + this.toline, num6); } } System.Collections.Generic.IList <int> list = new System.Collections.Generic.List <int>(); if (!string.IsNullOrEmpty(this.txtProductTag.Text.Trim())) { string text2 = this.txtProductTag.Text.Trim(); string[] array; if (text2.Contains(",")) { array = text2.Split(new char[] { ',' }); } else { array = new string[] { text2 }; } string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string value = array2[i]; list.Add(System.Convert.ToInt32(value)); } } ProductActionStatus productActionStatus = ProductHelper.UpdateProduct(productInfo, dictionary, attrs, (System.Collections.Generic.IList <int>) this.ViewState["distributorUserIds"], list); if (productActionStatus == ProductActionStatus.Success) { this.litralProductTag.SelectedValue = list; this.ShowMsg("修改商品成功", true); return; } if (productActionStatus == ProductActionStatus.AttributeError) { this.ShowMsg("修改商品失败,保存商品属性时出错", false); return; } if (productActionStatus == ProductActionStatus.DuplicateName) { this.ShowMsg("修改商品失败,商品名称不能重复", false); return; } if (productActionStatus == ProductActionStatus.DuplicateSKU) { this.ShowMsg("修改商品失败,商家编码不能重复", false); return; } if (productActionStatus == ProductActionStatus.SKUError) { this.ShowMsg("修改商品失败,商家编码不能重复", false); return; } if (productActionStatus == ProductActionStatus.OffShelfError) { this.ShowMsg("修改商品失败, 子站没在零售价范围内的商品无法下架", false); return; } if (productActionStatus == ProductActionStatus.ProductTagEroor) { this.ShowMsg("修改商品失败,保存商品标签时出错", false); return; } this.ShowMsg("修改商品失败,未知错误", false); }