private void AddLocationContact(LocationContactDto dto, Location location) { var contactStaff = Session.Get <Staff> (dto.ContactStaff.Key); var locationContactType = _mappingHelper.MapLookupField <LocationContactType> (dto.LocationContactType); location.AddContact( new LocationContactBuilder().WithLocationContactType(locationContactType).WithContactStaff(contactStaff) .WithEffectiveDateRange( new DateRange(dto.EffectiveStartDate, dto.EffectiveEndDate)).WithStatusIndicator(dto.StatusIndicator) .WithAlternativeContactIndicator(dto.AlternativeContactIndicator)); }
private void ChangeLocationContact(LocationContactDto dto, Location location, LocationContact locationContact) { RemoveLocationContact(dto, location, locationContact); AddLocationContact(dto, location); }
private static void RemoveLocationContact(LocationContactDto dto, Location location, LocationContact locationContact) { location.RemoveContacts(locationContact); }