First pass of new mandator selection
This commit is contained in:
@@ -23,7 +23,7 @@ Namespace Documents
|
||||
|
||||
Public ReadOnly Property HasErrors As Boolean
|
||||
Get
|
||||
Return Rows.Any(Function(r As DocumentRow) r.HasErrors)
|
||||
Return Mandator Is Nothing Or Rows.Any(Function(r As DocumentRow) r.HasErrors)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ Namespace Documents
|
||||
oInfo.FilesTotal = oFiles.Count
|
||||
|
||||
RaiseEvent FileLoadComplete(Me, oInfo)
|
||||
|
||||
Catch ex As MissingAttributeException
|
||||
Logger.Error(ex)
|
||||
Throw New DocumentLoaderException($"Missing Attribute '{ex.Message}' in File '{oFile.Name}'")
|
||||
@@ -270,12 +271,11 @@ Namespace Documents
|
||||
|
||||
If oMandator Is Nothing Then
|
||||
Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name)
|
||||
Throw New Exceptions.NoMandatorException($"Mandator not found for file [{pDocument.File.Name}]")
|
||||
Else
|
||||
pDocument = MatchDocumentData(pDocument, oMandator, pTemplate)
|
||||
End If
|
||||
|
||||
pDocument = MatchDocumentData(pDocument, oMandator, pTemplate)
|
||||
pDocument.Mandator = oMandator
|
||||
|
||||
Return pDocument
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user