Пример #1
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="dto">The dto to process.</param>
        /// <param name="aggregateNode">The aggregate node.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(GpraDischargeDto dto, GpraDischarge aggregateNode)
        {
            var result = _mappingResult &= MappingProperties(dto, aggregateNode);

            _mappingResult &= result;

            return(_mappingResult);
        }
Пример #2
0
        private bool MappingProperties(GpraDischargeDto gpraDischargeDto, GpraDischarge gpraDischarge)
        {
            var dischargeStatus            = _mappingHelper.MapLookupField <GpraDischargeStatus> (gpraDischargeDto.GpraDischargeStatus);
            var dischargeTerminationReason =
                _mappingHelper.MapLookupField <GpraDischargeTerminationReason> (gpraDischargeDto.GpraDischargeTerminationReason);

            AggregateRoot.ReviseGpraDischarge(
                new GpraDischargeSection(
                    gpraDischargeDto.GpraDischargeDate,
                    dischargeStatus,
                    gpraDischargeDto.GpraDischargeStatusOtherDescription,
                    dischargeTerminationReason,
                    string.Empty,
                    gpraDischargeDto.GpraHivTestIndicator,
                    gpraDischargeDto.GpraReferToHivTestIndicator
                    ));
            gpraDischargeDto.Key = AggregateRoot.GpraDischarge.Key;
            return(true);
        }