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); SubsitePromoteHelper.DeleteCountDown(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 (SubsitePromoteHelper.DeleteCountDown((int)this.grdCountDownsList.DataKeys[e.RowIndex].Value)) { this.BindCountDown(); this.ShowMsg("成功删除了选择的限时抢购活动", true); return; } this.ShowMsg("删除失败", false); }
protected void grdGroupBuyList_RowDeleting(object sender, GridViewDeleteEventArgs e) { if (SubsitePromoteHelper.DeleteCountDown((int)grdCountDownsList.DataKeys[e.RowIndex].Value)) { BindCountDown(); ShowMsg("成功删除了选择的限时抢购活动", true); } else { ShowMsg("删除失败", false); } }
protected void lkbtnDeleteCheck_Click(object sender, EventArgs e) { int num = 0; foreach (GridViewRow row in grdCountDownsList.Rows) { CheckBox box = (CheckBox)row.FindControl("checkboxCol"); if (box.Checked) { num++; SubsitePromoteHelper.DeleteCountDown(Convert.ToInt32(grdCountDownsList.DataKeys[row.RowIndex].Value, CultureInfo.InvariantCulture)); } } if (num != 0) { BindCountDown(); ShowMsg(string.Format(CultureInfo.InvariantCulture, "成功删除\"{0}\"条限时抢购活动", new object[] { num }), true); } else { ShowMsg("请先选择需要删除的限时抢购活动", false); } }