small tweaks

This commit is contained in:
Jonathan Jenne
2021-11-18 15:33:28 +01:00
parent 0356699473
commit c1b6e2ed4d
23 changed files with 602 additions and 160 deletions

View File

@@ -375,15 +375,6 @@ Namespace Documents
End If
End Sub
Private Function TryGetDictionaryItem(Of T)(pDictionary As IDictionary(Of String, T), pKey As String) As T
If pDictionary.ContainsKey(pKey) Then
Return pDictionary.Item(pKey)
Else
Return Nothing
End If
End Function
Private Function WrapFileInfo(pFileInfo As FileInfo) As Document
Return New Document With {.File = pFileInfo}
End Function

View File

@@ -8,4 +8,12 @@ Public Class Helpers
Return Nothing
End Try
End Function
Private Function TryGetDictionaryItem(Of T)(pDictionary As IDictionary(Of String, T), pKey As String) As T
If pDictionary.ContainsKey(pKey) Then
Return pDictionary.Item(pKey)
Else
Return Nothing
End If
End Function
End Class

View File

@@ -13,15 +13,13 @@ Namespace Schemas
Public SchemaList As List(Of Schema)
Public TemplateConfiguration As New Configuration
Private Database As MSSQLServer
Private InputDirectory As String
Private ReadOnly Database As MSSQLServer
Private Const VWEDI_XML_ITEMS = "VWEDI_XML_ITEMS"
Public Sub New(pLogConfig As LogConfig, pMSSQL As MSSQLServer, pInputDirectory As String)
Public Sub New(pLogConfig As LogConfig, pMSSQL As MSSQLServer)
MyBase.New(pLogConfig, pLogConfig.GetLogger)
Database = pMSSQL
InputDirectory = pInputDirectory
End Sub
Public Async Function LoadTemplates() As Task(Of Boolean)

View File

@@ -77,7 +77,7 @@ Namespace Winline
' 1 = As File (relative to Winline Server directory)
Dim oByref = 1
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pDocument.Mandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
Dim oClient As New HttpClient()
Logger.Info("Creating HTTP Request to [{0}]", oWS.BaseUrl)