private void btnOperationOK_Click(object sender, System.EventArgs e) { if (string.IsNullOrEmpty(this.productIds)) { this.ShowMsg("没有要修改的商品", false); } else { int result = 0; if (!int.TryParse(this.txtAddStock.Text, out result)) { this.ShowMsg("请输入正确的库存格式", false); } else { if (ProductHelper.AddSkuStock(this.productIds, result)) { this.BindProduct(); this.ShowMsg("修改商品的库存成功", true); } else { this.ShowMsg("修改商品的库存失败", false); } } } }
private void btnOperationOK_Click(object sender, System.EventArgs e) { if (string.IsNullOrEmpty(this.productIds)) { this.ShowMsgToTarget("没有要修改的商品", false, "parent"); return; } int addStock = 0; if (!int.TryParse(this.txtAddStock.Text, out addStock)) { this.ShowMsgToTarget("请输入正确的库存格式", false, "parent"); return; } if (ProductHelper.AddSkuStock(this.productIds, addStock)) { this.BindProduct(); this.ShowMsgToTarget("修改商品的库存成功", true, "parent"); return; } this.ShowMsgToTarget("修改商品的库存失败", false, "parent"); }