Correct errors of opening material

This commit is contained in:
ear
2024-11-08 15:18:00 +05:00
parent 0bf9cf6a0b
commit a8d570713d
2 changed files with 5 additions and 5 deletions

View File

@@ -73,8 +73,8 @@ namespace DataAccess.DTOs
private IHelperMaterial GetElasticMaterial(ElasticMaterialDTO source) private IHelperMaterial GetElasticMaterial(ElasticMaterialDTO source)
{ {
TraceLogger?.AddMessage(MaterialIs + "Elastic material", TraceLogStatuses.Service); TraceLogger?.AddMessage(MaterialIs + "Elastic material", TraceLogStatuses.Service);
reinforcementConvertStrategy.ReferenceDictionary = ReferenceDictionary; elasticConvertStrategy.ReferenceDictionary = ReferenceDictionary;
reinforcementConvertStrategy.TraceLogger = TraceLogger; elasticConvertStrategy.TraceLogger = TraceLogger;
var newItem = elasticConvertStrategy.Convert(source); var newItem = elasticConvertStrategy.Convert(source);
safetyFactorUpdateStrategy.Update(newItem, source); safetyFactorUpdateStrategy.Update(newItem, source);
return newItem; return newItem;
@@ -83,8 +83,8 @@ namespace DataAccess.DTOs
private IHelperMaterial GetFRMaterial(FRMaterialDTO source) private IHelperMaterial GetFRMaterial(FRMaterialDTO source)
{ {
TraceLogger?.AddMessage(MaterialIs + "Fiber reinforcement material", TraceLogStatuses.Service); TraceLogger?.AddMessage(MaterialIs + "Fiber reinforcement material", TraceLogStatuses.Service);
reinforcementConvertStrategy.ReferenceDictionary = ReferenceDictionary; frConvertStrategy.ReferenceDictionary = ReferenceDictionary;
reinforcementConvertStrategy.TraceLogger = TraceLogger; frConvertStrategy.TraceLogger = TraceLogger;
var newItem = frConvertStrategy.Convert(source); var newItem = frConvertStrategy.Convert(source);
safetyFactorUpdateStrategy.Update(newItem, source); safetyFactorUpdateStrategy.Update(newItem, source);
return newItem; return newItem;

View File

@@ -29,7 +29,7 @@ namespace StructureHelperLogics.Models.Materials
public FRMaterial(MaterialTypes materialType, Guid id) public FRMaterial(MaterialTypes materialType, Guid id)
{ {
if (materialType != MaterialTypes.CarbonFiber || if (materialType != MaterialTypes.CarbonFiber &
materialType != MaterialTypes.GlassFiber) materialType != MaterialTypes.GlassFiber)
{ {
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Material type {materialType} is not right"); throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Material type {materialType} is not right");