/// <summary> /// 批量删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lnkbBatchDelete_Click(object sender, EventArgs e) { string loginIDs = string.Empty; foreach (DataListItem item in this.dtlUser.Items) { HtmlInputCheckBox chkbUserID = (HtmlInputCheckBox)item.FindControl("chkbUserID"); if (chkbUserID.Checked) { if (loginIDs == string.Empty) { loginIDs = "'" + chkbUserID.Value + "'"; } else { loginIDs = loginIDs + "," + "'" + chkbUserID.Value + "'"; } } } if (loginIDs.Length != 0) { loginIDs = "(" + loginIDs + ")"; UserBusiness userBusiness = new UserBusiness(); userBusiness.BatchDeleteUsers(loginIDs); } this.BindDataList(); }