Пример #1
0
 public AddressBookContact(SharedEnums.ContactSourceType targetContactSourceType)
 {
     this.SourceFileType      = targetContactSourceType;
     this.City                = string.Empty;
     this.ContactEmail        = string.Empty;
     this.ContactFax          = string.Empty;
     this.ContactMobileNumber = string.Empty;
     this.ContactState        = string.Empty;
     this.ContactType         = ContactType.Contractor;
     this.Department          = string.Empty;
     this.Name                = string.Empty;
     this.PathToLogo          = string.Empty;
     this.PhoneNumber         = string.Empty;
     this.Responsible         = string.Empty;
     this.SourceRecordIntPK   = -1;
     this.Street              = string.Empty;
     this.Zipcode             = string.Empty;
 }
Пример #2
0
        private void _cloneValuesAcrossAddressBookContacts(AddressBookContact targetContact, AddressBookContact sourceContact, SharedEnums.ContactSourceType newContactSourceType)
        {
            //Have to do some convoluted new string gibberish to prevent the object reference being set instead of the value.
            //There has to be a better way of doing this. I may end up just making addressbookcontacts a struct. *shrug*

            targetContact.City                = new string(sourceContact.City.ToCharArray());
            targetContact.ContactEmail        = new string(sourceContact.ContactEmail.ToCharArray());
            targetContact.ContactFax          = new string(sourceContact.ContactFax.ToCharArray());
            targetContact.ContactMobileNumber = new string(sourceContact.ContactMobileNumber.ToCharArray());
            targetContact.ContactState        = new string(sourceContact.ContactState.ToCharArray());
            targetContact.ContactType         = sourceContact.ContactType;
            targetContact.Department          = new string(sourceContact.Department.ToCharArray());
            targetContact.Name                = new string(sourceContact.Name.ToCharArray());
            targetContact.PathToLogo          = new string(sourceContact.PathToLogo.ToCharArray());
            targetContact.PhoneNumber         = new string(sourceContact.PhoneNumber.ToCharArray());
            targetContact.Responsible         = new string(sourceContact.Responsible.ToCharArray());
            targetContact.Street              = new string(sourceContact.Street.ToCharArray());
            targetContact.Zipcode             = new string(sourceContact.Zipcode.ToCharArray());
            targetContact.SourceFileType      = newContactSourceType;
        }