Ejemplo n.º 1
0
 /// <summary>
 /// 判断节点是否为父节点或者与相比节点为同一节点
 /// </summary>
 /// <param name="category"></param>
 /// <returns></returns>
 public bool IsParentOrSelfNode(CategoryNode category)
 {
     return(CategoryPath.StartsWith(category.CategoryPath));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 判断分类是否为父节点
 /// </summary>
 /// <param name="category">分类</param>
 /// <returns></returns>
 public bool IsParentNode(CategoryNode category)
 {
     return(CategoryPath.StartsWith(category.CategoryPath) && Id != category.Id);
 }