private void btnDelete_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { ShowMsg("请先选择要删除的商品", false); } else if (SubSiteProducthelper.DeleteProducts(str) > 0) { ShowMsg("成功删除了选择的商品", true); ReBindProducts(false); } else { ShowMsg("删除商品失败,未知错误", false); } }
private void btnDelete_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("请先选择要删除的商品", false); return; } int num = SubSiteProducthelper.DeleteProducts(text); if (num > 0) { this.ShowMsg(string.Format("成功删除了选择的{0}件商品", num), true); this.BindProducts(); return; } this.ShowMsg("删除商品失败,未知错误", false); }
private void grdProducts_RowDeleting(object sender, GridViewDeleteEventArgs e) { SubSiteProducthelper.DeleteProducts(grdProducts.DataKeys[e.RowIndex].Value.ToString()); BindProducts(); }
private void grdProducts_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e) { SubSiteProducthelper.DeleteProducts(this.grdProducts.DataKeys[e.RowIndex].Value.ToString()); this.BindProducts(); }