This commit is contained in:
Jonathan Jenne
2021-11-11 16:31:08 +01:00
parent 8dcd06154d
commit 6bed0b3024
25 changed files with 1390 additions and 1393 deletions

View File

@@ -11,6 +11,12 @@ Namespace Documents
Private ReadOnly Winline As Winline.Data
Public Property Files As New List(Of Document)
Public Event FileLoadComplete As EventHandler(Of FileLoadInfo)
Public Structure FileLoadInfo
Public FilesLoaded As Integer
Public FilesTotal As Integer
End Structure
Public Sub New(pLogConfig As LogConfig, pWinline As Winline.Data)
MyBase.New(pLogConfig, pLogConfig.GetLogger())
@@ -35,6 +41,12 @@ Namespace Documents
For Each oFile In oFiles
Dim oDocument = LoadFile(oFile, pSchema, pMandator)
Files.Add(oDocument)
Dim oInfo As FileLoadInfo
oInfo.FilesLoaded = Files.Count
oInfo.FilesTotal = oFiles.Count
RaiseEvent FileLoadComplete(Me, oInfo)
Next
Return True
@@ -212,6 +224,8 @@ Namespace Documents
If oArticleNumber IsNot Nothing Then
oNumberItem.External = oArticleNumber
oNumberItem.Final = oArticleNumber
Else
oNumberItem.Error = DocumentRow.FieldError.ArticleNotFound
End If
End Sub).
ToList()
@@ -249,6 +263,8 @@ Namespace Documents
.Final = oAccount.Name
})
End If
Else
oNumberItem.Error = DocumentRow.FieldError.AccountNotFound
End If
End Sub