Fix saving of beam shear calculator input data
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using DataAccess.DTOs.Converters.BeamShears;
|
||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
|
||||
@@ -24,7 +25,14 @@ namespace DataAccess.DTOs
|
||||
actionUpdateStrategy.Update(NewItem, source);
|
||||
sectionUpdateStrategy.Update(NewItem, source);
|
||||
stirrupUpdateStrategy.Update(NewItem, source);
|
||||
|
||||
if (source.DesignRangeProperty is BeamShearDesignRangePropertyDTO propertyDTO)
|
||||
{
|
||||
NewItem.DesignRangeProperty = designRangeConvertStrategy.Convert(propertyDTO);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknownObj(source.DesignRangeProperty));
|
||||
}
|
||||
return NewItem;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using DataAccess.DTOs.Converters.BeamShears;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Models;
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperLogics.Models.BeamShears;
|
||||
|
||||
namespace DataAccess.DTOs
|
||||
{
|
||||
public class BeamShearCalculatorInputDataToDTOConvertStrategy : ConvertStrategy<BeamShearCalculatorInputDataDTO, IBeamShearCalculatorInputData>
|
||||
{
|
||||
private IUpdateStrategy<IBeamShearCalculatorInputData> updateStrategy;
|
||||
private IUpdateStrategy<IHasBeamShearActions> actionUpdateStrategy;
|
||||
private IUpdateStrategy<IHasBeamShearSections> sectionUpdateStrategy;
|
||||
private IUpdateStrategy<IHasStirrups> stirrupUpdateStrategy;
|
||||
@@ -20,6 +19,7 @@ namespace DataAccess.DTOs
|
||||
{
|
||||
InitializeStrategies();
|
||||
NewItem = new(source.Id);
|
||||
updateStrategy.Update(NewItem, source);
|
||||
actionUpdateStrategy.Update(NewItem, source);
|
||||
sectionUpdateStrategy.Update(NewItem, source);
|
||||
stirrupUpdateStrategy.Update(NewItem, source);
|
||||
@@ -29,6 +29,7 @@ namespace DataAccess.DTOs
|
||||
|
||||
private void InitializeStrategies()
|
||||
{
|
||||
updateStrategy ??= new BeamShearCalculatorInputDataUpdateStrategy();
|
||||
actionUpdateStrategy ??= new HasBeamShearActionsToDTOUpdateStrategy(ReferenceDictionary, TraceLogger);
|
||||
sectionUpdateStrategy ??= new HasBeamShearSectionsToDTORenameStrategy(ReferenceDictionary, TraceLogger);
|
||||
stirrupUpdateStrategy ??= new HasStirrupsToDTOUpdateStrategy(ReferenceDictionary, TraceLogger);
|
||||
|
||||
1412
StructureHelper/Documentation/PreviousFileVersions/V1_2.shpj
Normal file
1412
StructureHelper/Documentation/PreviousFileVersions/V1_2.shpj
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>True|2025-07-21T06:22:35.9564230Z||;True|2025-01-27T14:32:31.9770658+05:00||;True|2024-12-29T20:48:11.7280613+05:00||;True|2024-12-27T13:24:44.0055462+05:00||;True|2024-11-13T09:16:22.8894163+05:00||;True|2024-08-13T14:00:35.8311260+05:00||;True|2024-08-12T12:59:16.1785759+05:00||;True|2024-03-11T20:33:14.1457807+05:00||;True|2024-03-10T19:11:27.6834663+05:00||;True|2024-02-02T12:22:50.1454015+05:00||;True|2023-02-25T13:37:39.2738786+05:00||;False|2023-02-25T13:37:24.0284261+05:00||;True|2023-02-25T13:34:01.6858860+05:00||;True|2023-02-25T13:31:18.8295711+05:00||;False|2023-02-25T13:25:21.5807199+05:00||;False|2023-02-25T13:24:41.7164398+05:00||;</History>
|
||||
<History>True|2025-09-01T13:13:26.2156933Z||;True|2025-09-01T10:22:19.7113160+05:00||;True|2025-07-21T11:22:35.9564230+05:00||;True|2025-01-27T14:32:31.9770658+05:00||;True|2024-12-29T20:48:11.7280613+05:00||;True|2024-12-27T13:24:44.0055462+05:00||;True|2024-11-13T09:16:22.8894163+05:00||;True|2024-08-13T14:00:35.8311260+05:00||;True|2024-08-12T12:59:16.1785759+05:00||;True|2024-03-11T20:33:14.1457807+05:00||;True|2024-03-10T19:11:27.6834663+05:00||;True|2024-02-02T12:22:50.1454015+05:00||;True|2023-02-25T13:37:39.2738786+05:00||;False|2023-02-25T13:37:24.0284261+05:00||;True|2023-02-25T13:34:01.6858860+05:00||;True|2023-02-25T13:31:18.8295711+05:00||;False|2023-02-25T13:25:21.5807199+05:00||;False|2023-02-25T13:24:41.7164398+05:00||;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_LastSelectedProfileId>C:\Repos\StructureHelper\StructureHelper\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
||||
<_LastSelectedProfileId>D:\Repos\StructureHelper\StructureHelper\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Update="App.xaml">
|
||||
|
||||
@@ -18,11 +18,17 @@
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="18"/>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox IsChecked="{Binding VisualProperty.IsVisible}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}"/>
|
||||
<Rectangle Grid.Column="1" Height="12" Width="20" Margin="1">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Color="{Binding VisualProperty.Color}"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<TextBlock Grid.Column="2" Text="{Binding Name}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
Reference in New Issue
Block a user