This commit is contained in:
Jonathan Jenne
2021-11-19 13:53:38 +01:00
parent 673a507d04
commit ee23cdd7e8
23 changed files with 291 additions and 97 deletions

View File

@@ -22,7 +22,7 @@ Namespace Winline
AppDataPath = pAppDataPath
End Sub
Public Async Function TransferDocumentToWinline(pDocument As Document, pMandator As Mandator) As Task(Of Boolean)
Public Async Function TransferDocumentToWinline(pDocument As Document, pMandator As Mandator, Optional pIsTest As Boolean = False) As Task(Of Boolean)
Dim oBytes As Byte() = GetBytesFromDocument(pDocument)
Dim oWS As Config.WebServiceConfig = Config.Webservice
@@ -68,9 +68,12 @@ Namespace Winline
Dim oTemplateName = pDocument.TemplateName
' ActionCode: Should this be a test or not?
' 0 = Testcall
' 0 = Test call
' 1 = Real call
Dim oActionCode = 1
If pIsTest = True Then
oActionCode = 0
End If
' Byref: Should data be supplied as file or as string?
' 0 = As String

View File

@@ -2,6 +2,7 @@
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Database
Imports MultiTool.Shared.Helpers
Imports MultiTool.Shared.Schemas
Imports System.Text.RegularExpressions
Namespace Winline
@@ -165,16 +166,17 @@ Namespace Winline
.Server = oDbInfo.Item2
}
Dim oMandatorConfig As Config.MandatorConfig = Config.Mandators.
Where(Function(m) oMandator.Id = m.Name).
SingleOrDefault()
'Dim oMandatorConfig As Config.MandatorConfig = Config.Mandators.
' Where(Function(m) oMandator.Id = m.Name).
' SingleOrDefault()
If oMandatorConfig IsNot Nothing Then
oMandator.IsWhitelisted = True
oMandator.Regex = oMandatorConfig.ArticleRegex
oMandator.Order = oMandatorConfig.Order
End If
'Dim oMandatorConfig2 = MappingConfiguration.Where(Function(c) c.)
'If oMandatorConfig IsNot Nothing Then
' oMandator.IsWhitelisted = True
' oMandator.Regex = oMandatorConfig.ArticleRegex
' oMandator.Order = oMandatorConfig.Order
'End If
Mandators.Add(oMandator)
Next