상속: AbstractTO
예제 #1
0
파일: PersonTO.cs 프로젝트: OSEHRA/mdws
 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);
         }
     }
 }
예제 #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);
         }
     }
 }
예제 #3
0
 internal string formattedPhoneNumber(PhoneNumTO num)
 {
     //string result = '(' + num.areaCode + ')' + num.exchange + '-' + num.number;
     string result = num.number;
     if (!string.IsNullOrEmpty(num.description))
     {
         result += " (" + num.description + ")";
     }
     return result;
 }
예제 #4
0
        internal string formattedPhoneNumber(PhoneNumTO num)
        {
            //string result = '(' + num.areaCode + ')' + num.exchange + '-' + num.number;
            string result = num.number;

            if (!string.IsNullOrEmpty(num.description))
            {
                result += " (" + num.description + ")";
            }
            return(result);
        }