protected void btnDelBank_Click(object sender, EventArgs e) { //ChkAdminLevel("sys_customerBank", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.customerBank bll = new BLL.customerBank(); string result = ""; int success = 0, error = 0; StringBuilder sb = new StringBuilder(); manager = GetAdminInfo(); for (int i = 0; i < bankrptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)bankrptList.Items[i].FindControl("hidId")).Value); CheckBox cb = (CheckBox)bankrptList.Items[i].FindControl("chkId"); if (cb.Checked) { result = bll.Delete(id, manager); if (result == "") { success++; } else { error++; sb.Append(result + "<br/>"); } } } JscriptMsg("共选择" + (success + error) + "条记录,成功" + success + "条,失败" + error + "条<br/>" + sb.ToString(), "customer_edit.aspx?action=" + action + "&id=" + this.id); }
//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { PrintLoad(); ChkAdminLevel("sys_customerBank", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.customerBank bll = new BLL.customerBank(); string result = ""; int success = 0, error = 0; StringBuilder sb = new StringBuilder(); manager = GetAdminInfo(); for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId"); if (cb.Checked) { result = bll.Delete(id, manager); if (result == "") { success++; } else { error++; sb.Append(result + "<br/>"); } } } JscriptMsg("共选择" + (success + error) + "条记录,成功" + success + "条,失败" + error + "条<br/>" + sb.ToString(), Utils.CombUrlTxt("bank_list.aspx", "page={0}&txtCusName={1}&hCusId={2}&ddlisUse={3}", "__id__", _cusName, _cid, _isUse)); }