private string Delete(HttpContext context) { //#region 权限处理 //if (!DataLoadTool.CheckCurrUserPms(PermissionKey.Pms_Permission_DeletePermission)) //{ // return "无权删除权限"; //} //#endregion string ids = context.Request["ids"]; //删除权限前 删除相关权限组关联 //删除权限权限组对应关系 if (bllPer.Delete(new PermissionRelationInfo(), string.Format("PermissionID in({0}) ", ids)) > 0) { } int result = bllPer.Delete(new PermissionInfo(), string.Format(" PermissionID in ({0})", ids));//pmsBll.DeleteUser(idsList); return(result.ToString()); }
private string Delete(HttpContext context) { //#region 权限处理 //if (!DataLoadTool.CheckCurrUserPms(PermissionKey.Pms_PermissionGroup_DeletePermissionGroup)) //{ // return "无权删除权限组"; //} //#endregion string ids = context.Request["ids"]; //删除前 删除相关权限组关联 ids = Common.StringHelper.ListToStr <string>(ids.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(), "'", ","); //删除用户-权限组关系表 if (bllPer.Delete(new UserPmsGroupRelationInfo(), string.Format("GroupID in ({0})", ids)) >= 0) { } //删除权限组对应菜单 if (bllPer.Delete(new MenuRelationInfo(), string.Format("RelationID in({0}) and RelationType In (0)", ids)) >= 0) { } //删除权限组对应权限 对应权限栏目栏目 if (bllPer.Delete(new PermissionRelationInfo(), string.Format("RelationID in({0}) and RelationType In ({1})", ids, "0,3")) >= 0) { } int result = bllPer.Delete(new PermissionGroupInfo(), string.Format(" GroupID in ({0})", ids));//pmsBll.DeleteUser(idsList); return(result.ToString()); }