protected void lkDelete_Click(object sender, System.EventArgs e) { string text = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(text)) { this.ShowMsg("请先选择活动!", false); return; } if (text.Length > 1) { text = text.TrimStart(new char[] { ',' }).TrimEnd(new char[] { ',' }); } string[] array = text.Split(new char[] { ',' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string s = array2[i]; ShareActHelper.Delete(int.Parse(s)); } this.ShowMsg("批量删除成功!", true); this.BindData(); }
private void grdDate_ItemCommand(object sender, RepeaterCommandEventArgs e) { if ((e.CommandName == "Delete") && !string.IsNullOrEmpty(e.CommandArgument.ToString())) { ShareActHelper.Delete(int.Parse(e.CommandArgument.ToString())); this.BindData(); } }
private void grdDate_ItemCommand(object sender, System.Web.UI.WebControls.RepeaterCommandEventArgs e) { if (e.CommandName == "Delete") { if (string.IsNullOrEmpty(e.CommandArgument.ToString())) { return; } ShareActHelper.Delete(int.Parse(e.CommandArgument.ToString())); this.BindData(); } }
protected void lkDelete_Click(object sender, EventArgs e) { string text = this.txt_Ids.Text; this.txt_Ids.Text = ""; int i = 0; if (text.bInt(ref i)) { ShareActHelper.Delete(i); this.BindData(); } }
protected void DelBtn_Click(object sender, EventArgs e) { string text = this.txt_Ids.Text; this.txt_Ids.Text = ""; if (text.Length > 1) { text = text.TrimStart(new char[] { ',' }).TrimEnd(new char[] { ',' }); } foreach (string str2 in text.Split(new char[] { ',' })) { ShareActHelper.Delete(int.Parse(str2)); } this.BindData(); this.ShowMsg("批量删除成功!", true); }
protected void lkDelete_Click(object sender, EventArgs e) { string str = base.Request.Form["CheckBoxGroup"]; if (string.IsNullOrEmpty(str)) { this.ShowMsg("请先选择活动!", false); } else { if (str.Length > 1) { str = str.TrimStart(new char[] { ',' }).TrimEnd(new char[] { ',' }); } foreach (string str2 in str.Split(new char[] { ',' })) { ShareActHelper.Delete(int.Parse(str2)); } this.ShowMsg("批量删除成功!", true); this.BindData(); } }