Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 private void ChangeLocationContact(LocationContactDto dto, Location location, LocationContact locationContact)
 {
     RemoveLocationContact(dto, location, locationContact);
     AddLocationContact(dto, location);
 }
Ejemplo n.º 3
0
 private static void RemoveLocationContact(LocationContactDto dto, Location location, LocationContact locationContact)
 {
     location.RemoveContacts(locationContact);
 }