Inheritance: 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);
        }