public void FromDto(AffiliateDTO dto) { if (dto == null) { return; } this.Id = dto.Id; this.StoreId = dto.StoreId; this.Enabled = dto.Enabled; this.ReferralId = dto.ReferralId; this.DisplayName = dto.DisplayName; this.Address.FromDto(dto.Address); this.CommissionAmount = dto.CommissionAmount; this.CommissionType = (AffiliateCommissionType)((int)dto.CommissionType); this.ReferralDays = dto.ReferralDays; this.TaxId = dto.TaxId; this.DriversLicenseNumber = dto.DriversLicenseNumber; this.WebSiteUrl = dto.WebSiteUrl; this.CustomThemeName = dto.CustomThemeName; this.Notes = dto.Notes; this.LastUpdatedUtc = dto.LastUpdatedUtc; this.Contacts.Clear(); foreach (AffiliateContactDTO contact in dto.Contacts) { AffiliateContact c = new AffiliateContact(); c.FromDto(contact); this.Contacts.Add(c); } }
public void FromDto(AffiliateDTO dto) { if (dto == null) return; this.Id = dto.Id; this.StoreId = dto.StoreId; this.Enabled = dto.Enabled; this.ReferralId = dto.ReferralId; this.DisplayName = dto.DisplayName; this.Address.FromDto(dto.Address); this.CommissionAmount = dto.CommissionAmount; this.CommissionType = (AffiliateCommissionType)((int)dto.CommissionType); this.ReferralDays = dto.ReferralDays; this.TaxId = dto.TaxId; this.DriversLicenseNumber = dto.DriversLicenseNumber; this.WebSiteUrl = dto.WebSiteUrl; this.CustomThemeName = dto.CustomThemeName; this.Notes = dto.Notes; this.LastUpdatedUtc = dto.LastUpdatedUtc; this.Contacts.Clear(); foreach (AffiliateContactDTO contact in dto.Contacts) { AffiliateContact c = new AffiliateContact(); c.FromDto(contact); this.Contacts.Add(c); } }