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