Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs =================================================================== diff -u -rae1937fe2fcb175b4a0f9fa5f1aaed132431f66c -r90c590080ff1a02036f608ea498f696625e11f6b --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs (.../AssemblyResultTotalView.cs) (revision ae1937fe2fcb175b4a0f9fa5f1aaed132431f66c) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssemblyResultTotalView.cs (.../AssemblyResultTotalView.cs) (revision 90c590080ff1a02036f608ea498f696625e11f6b) @@ -26,6 +26,7 @@ using Core.Common.Controls.Views; using Core.Common.Util.Extensions; using Ringtoets.ClosingStructures.Data; +using Ringtoets.Common.Data.Exceptions; using Ringtoets.DuneErosion.Data; using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.GrassCoverErosionOutwards.Data; @@ -93,6 +94,7 @@ { components?.Dispose(); } + base.Dispose(disposing); } @@ -152,11 +154,45 @@ { assemblyResultRows.ForEachElementDo(row => row.Update()); dataGridViewControl.RefreshDataGridView(); + UpdateAssemblyResultControls(); } + private void UpdateAssemblyResultControls() + { + try + { + totalAssemblyCategoryGroupControl.SetData(AssessmentSectionAssemblyFactory.AssembleAssessmentSection(AssessmentSection)); + totalAssemblyCategoryGroupControl.ClearError(); + } + catch (AssemblyException e) + { + totalAssemblyCategoryGroupControl.SetError(e.Message); + } + + try + { + failureMechanismsWithProbabilityAssemblyControl.SetData(AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithProbability(AssessmentSection)); + failureMechanismsWithProbabilityAssemblyControl.ClearError(); + } + catch (AssemblyException e) + { + failureMechanismsWithProbabilityAssemblyControl.SetError(e.Message); + } + + try + { + failureMechanismsWithoutProbabilityAssemblyControl.SetData(AssessmentSectionAssemblyFactory.AssembleFailureMechanismsWithoutProbability(AssessmentSection)); + failureMechanismsWithoutProbabilityAssemblyControl.ClearError(); + } + catch (AssemblyException e) + { + failureMechanismsWithoutProbabilityAssemblyControl.SetError(e.Message); + } + } + private void HandleCellStyling(object sender, DataGridViewCellFormattingEventArgs e) { - dataGridViewControl.FormatCellWithColumnStateDefinition(e.RowIndex, e.ColumnIndex); + dataGridViewControl.FormatCellWithColumnStateDefinition(e.RowIndex, e.ColumnIndex); } #region Failure mechanism assembly result rows @@ -168,31 +204,31 @@ ClosingStructuresFailureMechanism closingStructures = AssessmentSection.ClosingStructures; return new FailureMechanismAssemblyResultRow(closingStructures, () => ClosingStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(closingStructures, - AssessmentSection)); + AssessmentSection)); } private FailureMechanismAssemblyResultRow CreateHeightStructuresFailureMechanismAssemblyResultRow() { HeightStructuresFailureMechanism heightStructures = AssessmentSection.HeightStructures; return new FailureMechanismAssemblyResultRow(heightStructures, () => HeightStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(heightStructures, - AssessmentSection)); + AssessmentSection)); } private FailureMechanismAssemblyResultRow CreateStabilityPointsStructuresFailureMechanismAssemblyResultRow() { StabilityPointStructuresFailureMechanism stabilityPointStructures = AssessmentSection.StabilityPointStructures; return new FailureMechanismAssemblyResultRow(stabilityPointStructures, () => StabilityPointStructuresFailureMechanismAssemblyFactory.AssembleFailureMechanism(stabilityPointStructures, - AssessmentSection)); + AssessmentSection)); } private FailureMechanismAssemblyResultRow CreateGrassCoverErosionInwardsFailureMechanismAssemblyResultRow() { GrassCoverErosionInwardsFailureMechanism grassCoverErosionInwards = AssessmentSection.GrassCoverErosionInwards; return new FailureMechanismAssemblyResultRow(grassCoverErosionInwards, () => GrassCoverErosionInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(grassCoverErosionInwards, - AssessmentSection)); + AssessmentSection)); } #endregion @@ -204,15 +240,15 @@ PipingFailureMechanism piping = AssessmentSection.Piping; return new FailureMechanismAssemblyResultRow(piping, () => PipingFailureMechanismAssemblyFactory.AssembleFailureMechanism(piping, - AssessmentSection)); + AssessmentSection)); } private FailureMechanismAssemblyResultRowBase CreateMacroStabilityInwardsFailureMechanismAssemblyResultRow() { MacroStabilityInwardsFailureMechanism macroStabilityInwards = AssessmentSection.MacroStabilityInwards; return new FailureMechanismAssemblyResultRow(macroStabilityInwards, () => MacroStabilityInwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(macroStabilityInwards, - AssessmentSection)); + AssessmentSection)); } #endregion @@ -256,7 +292,7 @@ MacroStabilityOutwardsFailureMechanism macroStabilityOutwards = AssessmentSection.MacroStabilityOutwards; return new FailureMechanismAssemblyCategoryGroupResultRow(macroStabilityOutwards, () => MacroStabilityOutwardsFailureMechanismAssemblyFactory.AssembleFailureMechanism(macroStabilityOutwards, - AssessmentSection)); + AssessmentSection)); } private FailureMechanismAssemblyCategoryGroupResultRow CreateMicrostabilityFailureMechanismAssemblyResultRow()