public static bool HasParent(this IDetailObject child, ITabularNamedObject parent, Culture culture) { string parentPath = GetFullPath(parent); return(child.Table.Name.ConcatPath(child.GetDisplayFolder(culture)) == parentPath); }
public static bool HasAncestor(this IDetailObject child, ITabularNamedObject ancestor, Culture culture) { string ancestorPath = GetFullPath(ancestor); return((child.Table.Name.ConcatPath(child.GetDisplayFolder(culture)) + "\\").StartsWith(ancestorPath + "\\")); }