/// <summary>
 /// Convert DTO to business contact person
 /// </summary>
 /// <param name="businessContactPersonDto">Business contact person</param>
 /// <returns>BusinessContactPerson</returns>
 public static BusinessContactPerson ConvertToBusinessContactPerson(BusinessContactPersonDto businessContactPersonDto)
 {
     return new BusinessContactPerson
                {
                    Id = businessContactPersonDto.Id,
                    BusinessId = businessContactPersonDto.BusinessId,
                    ContactTypeCode = businessContactPersonDto.ContactTypeCode,
                    TitleId = businessContactPersonDto.TitleId,
                    Forename = businessContactPersonDto.Forename,
                    Surname = businessContactPersonDto.Surname,
                    Email = businessContactPersonDto.Email,
                    UseBusinessAddress = businessContactPersonDto.UseBusinessAddress,
                    AddressLine1 = businessContactPersonDto.AddressLine1,
                    AddressLine2 = businessContactPersonDto.AddressLine2,
                    AddressLine3 = businessContactPersonDto.AddressLine3,
                    City = businessContactPersonDto.City,
                    StateProvinceId = businessContactPersonDto.StateProvinceId,
                    PostCode = businessContactPersonDto.PostCode,
                    CountryId = businessContactPersonDto.CountryId,
                    Notes = businessContactPersonDto.Notes,
                    IsPrimary = businessContactPersonDto.IsPrimary,
                    CreatedDatetime = businessContactPersonDto.CreatedDatetime,
                    Telephone = businessContactPersonDto.Number,
                    PrimaryContactId = businessContactPersonDto.PrimaryContactId
                };
 }
Example #2
0
 public int CreateBusinessContactPerson(BusinessContactPersonDto businessContactPersonDto)
 {
     var businessContactPerson = DataTransferObjectsConverter.ConvertToBusinessContactPerson(businessContactPersonDto);
     return businessManager.CreateContact(businessContactPerson);
 }