/// <summary> /// 删除 /// </summary> /// <returns></returns> private string DelData() { string ids = Request.Form["BMBM"]; string dwbm = Request.Form["DWBM"]; string[] id = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); ids = ""; for (int i = 0; i < id.Length; i++) { ids += "'" + id[i].Trim() + "'"; if (i < id.Length - 1) { ids += ","; } } XT_ZZJG_BMBM bll = new XT_ZZJG_BMBM(this.Request); //string where = " and SFSC='N' and FBMBM in (" + ids + ")"; //if (bll.GetRecordCount(" and SFSC='N' and FBMBM in (" + ids + ")") == 0) if (bll.GetBmbmCount(dwbm, ids) == 0) { if (!string.IsNullOrEmpty(dwbm) && bll.DeleteListLogic(ids, "'" + dwbm + "'")) { //数据日志 OperateLog.AddLog(OperateLog.LogType.部门管理Web, "删除部门成功", Request.Form["bmmc"], UserInfo, UserRole, this.Request); return(ReturnString.JsonToString(Prompt.win, "删除数据成功", null)); } //数据日志 OperateLog.AddLog(OperateLog.LogType.部门管理Web, "删除部门失败", Request.Form["bmmc"], UserInfo, UserRole, this.Request); return(ReturnString.JsonToString(Prompt.error, "删除数据失败", null)); } //数据日志 OperateLog.AddLog(OperateLog.LogType.部门管理Web, "未找到删除部门信息", Request.Form["bmmc"], UserInfo, UserRole, this.Request); return(ReturnString.JsonToString(Prompt.error, "该部门正在被使用,无法删除!", null)); }