示例#1
0
 public GenTree(DateTime dateOfCreate, DateTime dateOfLastEdit,
                String name, string information, int id      = -1, List <Person> personList = null,
                List <RelationBetweenTwoPerson> relationList = null)
 {
     _dateOfCreate   = dateOfCreate;
     _dateOfLastEdit = dateOfLastEdit;
     _name           = name;
     _information    = information;
     _persons        = PersonList.GetPersonList(personList);
     _relationTable  = RelationsTable.GetTable(relationList);
     if (id == -1)
     {
         _id = (name + dateOfCreate.ToString() + information).GetHashCode();
     }
     else
     {
         _id = id;
     }
 }
示例#2
0
 public static PersonList GetPersonList(List <Person> persons = null)
 {
     if (_personList == null)
     {
         if (persons == null)
         {
             _personList = new PersonList();
         }
         else
         {
             _personList = new PersonList(persons);
         }
         return(_personList);
     }
     else
     {
         if (persons != null)
         {
             _personList._persons = persons;
         }
         return(_personList);
     }
 }