private void lkbtnDeleteCheck_Click(object sender, System.EventArgs e) { int num = 0; foreach (System.Web.UI.WebControls.GridViewRow gridViewRow in this.grdCountDownsList.Rows) { System.Web.UI.WebControls.CheckBox checkBox = (System.Web.UI.WebControls.CheckBox)gridViewRow.FindControl("checkboxCol"); if (checkBox.Checked) { num++; int countDownId = System.Convert.ToInt32(this.grdCountDownsList.DataKeys[gridViewRow.RowIndex].Value, System.Globalization.CultureInfo.InvariantCulture); PromoteHelper.DeleteCountDownCategories(countDownId); } } if (num != 0) { this.BindCountDown(); this.ShowMsg(string.Format(System.Globalization.CultureInfo.InvariantCulture, "成功删除\"{0}\"条限时记录", new object[] { num }), true); return; } this.ShowMsg("请先选择需要删除信息!", false); }
private void grdGroupBuyList_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e) { if (PromoteHelper.DeleteCountDownCategories((int)this.grdCountDownsList.DataKeys[e.RowIndex].Value)) { this.BindCountDown(); this.ShowMsg("成功删除了选择的限时记录", true); return; } this.ShowMsg("删除失败", false); }