Validate cyclic organization unit
Posted
by abmv
on Stack Overflow
See other posts from Stack Overflow
or by abmv
Published on 2010-03-28T12:48:54Z
Indexed on
2010/03/28
12:53 UTC
Read the original article
Hit count: 450
I have a object Organization Unit and I have a self reference to it in the same object
public class OrganizationUnit: IOrganizationUnit {
private string fName;
public string Name {
get { return fName; }
set { SetPropertyValue("Name", ref fName, (string) value); }
}
private OrganizationUnit fManagedBy;
public IOrganizationUnit ManagedBy {
get { return fManagedBy; }
set {
SetPropertyValue("ManagedBy", ref fManagedBy, (OrganizationUnit)value);
}
}
}
I need a method that will throw an exception if it finds a child organization unit in the third level is referencing a parent Organization unit, or to say cyclic parent organization.
A is main B managed by A C
© Stack Overflow or respective owner