protected void lbtnDel_Click(object sender, EventArgs e) { Cms.DAL.Admin dal = new DAL.Admin(); //批量删除 for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((Label)rptList.Items[i].FindControl("lb_id")).Text); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { //删除记录 dal.Delete(id); } } MessageBox.Show(this, "批量删除成功!"); RptBind(""); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int UserId) { return(_dal.Delete(UserId)); }
public void Delete(Common.AdminDatum dm) { dl.Delete(dm); }