public PersonEntity Entity(Contractor contractor)
 {
     PersonEntity entity = new PersonEntity();
     entity.PersonID = contractor.ContractorID;
     entity.PersonType = 2;   // "Contractor"
     entity.PersonTitle = contractor.ContractorTitle;
     entity.PersonFirstName = contractor.ContractorFirstName;
     entity.PersonLastName = contractor.ContractorLastName;
     entity.PersonEmailPrimary = contractor.ContractorEmailPrimary;
     entity.PersonEmailAlternate = contractor.ContractorEmailAlternate;
     entity.PersonFax = contractor.ContractorFax;
     entity.PersonPhonePrimary = contractor.ContractorPhonePrimary;
     entity.PersonPhoneHome = contractor.ContractorPhoneHome;
     entity.PersonPhoneMobile = contractor.ContractorPhoneMobile;
     entity.PersonPhoneWork = contractor.ContractorPhoneWork;
     entity.PersonPhoneEmergency = contractor.ContractorPhoneEmergency;
     entity.PersonCompanyName = contractor.ContractorCompanyName;
     entity.PersonPosition = contractor.ContractorPosition;
     entity.PersonDescription = contractor.ContractorDescription;
     entity.PersonIsActive = contractor.ContractorIsActive;
     return entity;
 }
 public PersonEntity Entity(Client client)
 {
     PersonEntity entity = new PersonEntity();
     entity.PersonID = client.ClientID;
     entity.PersonType = 1;      // "Client"
     entity.PersonTitle = client.ClientTitle;
     entity.PersonFirstName = client.ClientFirstName;
     entity.PersonLastName = client.ClientLastName;
     entity.PersonEmailPrimary = client.ClientEmailPrimary;
     entity.PersonEmailAlternate = client.ClientEmailAlternate;
     entity.PersonFax = client.ClientFax;
     entity.PersonPhonePrimary = client.ClientPhonePrimary;
     entity.PersonPhoneHome = client.ClientPhoneHome;
     entity.PersonPhoneMobile = client.ClientPhoneMobile;
     entity.PersonPhoneWork = client.ClientPhoneWork;
     entity.PersonPhoneEmergency = client.ClientPhoneEmergency;
     entity.PersonCompanyName = client.ClientCompanyName;
     entity.PersonPosition = client.ClientPosition;
     entity.PersonDescription = client.ClientDescription;
     entity.PersonIsActive = client.ClientIsActive;
     return entity;
 }