Show Errors, Make grids usable when no mandator is selected, move completed files also when reloading

This commit is contained in:
Jonathan Jenne
2022-04-19 15:33:44 +02:00
parent 9be55f3709
commit 1bef72d65c
12 changed files with 453 additions and 294 deletions

View File

@@ -1,4 +1,5 @@
Imports System.IO
Imports MultiTool.Common.Constants
Imports MultiTool.Common.Templates
Imports MultiTool.Common.Winline.Entities
@@ -27,6 +28,18 @@ Namespace Documents
End Get
End Property
Public ReadOnly Property Errors As List(Of String)
Get
Dim oRowErrors = Rows.SelectMany(Function(row) row.Errors).ToList()
Dim oDocumentErrors As List(Of String) = GetDocumentErrors().
Select(Function(err) err.ToString()).
ToList()
Return oDocumentErrors.
Concat(oRowErrors).
ToList()
End Get
End Property
Public ReadOnly Property MandatorId As String
Get
Return Mandator?.Id
@@ -69,6 +82,17 @@ Namespace Documents
Public Overrides Function Equals(obj As Object) As Boolean
Return FullName = DirectCast(obj, Document).FullName
End Function
Private Function GetDocumentErrors() As List(Of DocumentError)
Dim oErrors As New List(Of DocumentError)
If Mandator Is Nothing Then
oErrors.Add(DocumentError.MandatorNotFound)
End If
Return oErrors
End Function
End Class
End Namespace