コード例 #1
0
 /// <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));
 }
コード例 #2
0
 /// <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));
 }