//批量删除 protected void btnDelete_Click(object sender, EventArgs e) { ChkAdminLevel("sys_order_list", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.Order bll = new BLL.Order(); string result = ""; int success = 0, error = 0; StringBuilder sb = new StringBuilder(); manager = GetAdminInfo(); for (int i = 0; i < rptList.Items.Count; i++) { CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId"); if (cb.Checked) { result = bll.DeleteOrder(((HiddenField)rptList.Items[i].FindControl("hidId")).Value, manager); if (result == "") { success++; } else { error++; sb.Append(result + "<br/>"); } } } JscriptMsg("共选择" + (success + error) + "条记录,成功" + success + "条,失败" + error + "条<br/>" + sb.ToString(), backUrl()); }