protected override void AddDTOToImportList(QuantityImporterDTO quantityImporterDTO, IStartValuesBuildingBlock <IMoleculeStartValue> importTarget, ImportedQuantityDTO dto)
        {
            quantityImporterDTO.QuantitDTOs.Add(dto);
            if (dto.HasWarning())
            {
                quantityImporterDTO.AddToLog(dto.GetWarning());
            }

            quantityImporterDTO.AddToLog(IsNewInsert(dto, importTarget)
            ? AppConstants.Captions.AddingMoleculeStartValue(dto.Path, dto.ConvertToDisplayUnit(dto.QuantityInBaseUnit), dto.DisplayUnit, dto.IsPresent, dto.Name, dto.NegativeValuesAllowed)
            : AppConstants.Captions.UpdatingMoleculeStartValue(dto.Path, dto.ConvertToDisplayUnit(dto.QuantityInBaseUnit), dto.DisplayUnit, dto.IsPresent, dto.Name, dto.NegativeValuesAllowed));
        }
예제 #2
0
        protected override void AddDTOToImportList(QuantityImporterDTO quantityImporterDTO, TImportTarget importTarget, ImportedQuantityDTO dto)
        {
            if (!dto.SkipImport)
            {
                quantityImporterDTO.QuantitDTOs.Add(dto);
                quantityImporterDTO.AddToLog(LogMessageFor(dto, importTarget));
            }

            if (dto.HasWarning())
            {
                quantityImporterDTO.AddToLog(dto.GetWarning());
            }
        }