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

View File

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