Exemplo n.º 1
1
 public PersonArray(IList<Person> mdos)
 {
     if (mdos == null || mdos.Count <= 0)
     {
         return;
     }
     Person[] ary = new Person[mdos.Count];
     mdos.CopyTo(ary, 0);
     setProps(ary);
 }
Exemplo n.º 2
0
 public PersonTO(Person mdo)
 {
     this.name = mdo.Name.getLastNameFirst();
     if (mdo.SSN != null)
     {
         this.ssn = mdo.SSN.toHyphenatedString();
     }
     this.gender = mdo.Gender;
     this.dob = mdo.DOB;
     this.ethnicity = mdo.Ethnicity;
     this.age = mdo.Age;
     this.maritalStatus = mdo.MaritalStatus;
     if (mdo.HomeAddress != null)
     {
         this.homeAddress = new AddressTO(mdo.HomeAddress);
     }
     if (mdo.HomePhone != null)
     {
         this.homePhone = new PhoneNumTO(mdo.HomePhone);
     }
     if (mdo.CellPhone != null)
     {
         this.cellPhone = new PhoneNumTO(mdo.CellPhone);
     }
     if (mdo.Demographics != null && mdo.Demographics.Count > 0)
     {
         this.demographics = new DemographicSetTO[mdo.Demographics.Count];
         int i = 0;
         foreach (KeyValuePair<string, DemographicSet> kvp in mdo.Demographics)
         {
             this.demographics[i++] = new DemographicSetTO(kvp);
         }
     }
 }
Exemplo n.º 3
0
 private void setProps(Person[] mdo)
 {
     if (mdo == null)
     {
         return;
     }
     persons = new PersonTO[mdo.Length];
     for (int i = 0; i < mdo.Length; i++)
     {
         persons[i] = new PersonTO(mdo[i]);
     }
     count = mdo.Length;
 }
Exemplo n.º 4
0
 public TaggedPersonArray(string tag, Person person)
 {
     this.tag = tag;
     setSourceName();
     if (person == null)
     {
         this.count = 0;
         return;
     }
     this.persons = new PersonTO[1];
     this.persons[0] = new PersonTO(person);
     this.count = 1;
 }
Exemplo n.º 5
0
 public TaggedPersonArray(string tag, Person[] persons)
 {
     this.tag = tag;
     setSourceName();
     if (persons == null)
     {
         this.count = 0;
         return;
     }
     this.persons = new PersonTO[persons.Length];
     for (int i = 0; i < persons.Length; i++)
     {
         this.persons[i] = new PersonTO(persons[i]);
     }
     this.count = persons.Length;
 }
Exemplo n.º 6
0
 public PersonArray(Person[] mdo)
 {
     setProps(mdo);
 }