private void grdProductLine_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e) { int lineId = (int)this.grdProductLine.DataKeys[e.RowIndex].Value; if (ProductLineHelper.DeleteProductLine(lineId)) { this.BindData(); this.ShowMsg("成功删除了已选定的产品线", true); return; } this.ShowMsg("不能删除有商品的产品线或最后一个产品线", false); }
private void grdProductLine_RowDeleting(object sender, GridViewDeleteEventArgs e) { int lineId = (int)grdProductLine.DataKeys[e.RowIndex].Value; if (ProductLineHelper.DeleteProductLine(lineId)) { BindData(); ShowMsg("成功删除了已选定的产品线", true); } else { ShowMsg("不能删除有商品的产品线或最后一个产品线", false); } }