Show Errors, Make grids usable when no mandator is selected, move completed files also when reloading
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user