/// <summary> /// 获取功能项的直接下级列表 /// </summary> /// <param name="func"></param> /// <returns></returns> public static IEnumerable <AppFunction> GetChildren(this AppFunction func) { return(AppManager.Instance.FunctionManager.GetAll().Where(f => f.ParentId == func.Id) .OrderBy(f => f.Ord)); }
/// <summary> /// 判断有无下级 /// </summary> /// <param name="func"></param> /// <returns></returns> public static bool HasChildren(this AppFunction func) { return(AppManager.Instance.FunctionManager.GetAll().Any(f => f.ParentId == func.Id)); }