Migrate configuration from UserConfig to database
This commit is contained in:
@@ -3,28 +3,29 @@ Imports System.Text
|
||||
Imports System.Net.Http
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports MultiTool.Shared.Documents
|
||||
Imports MultiTool.Shared.Templates.GeneralConfig
|
||||
Imports MultiTool.Shared.Winline.Entities
|
||||
|
||||
Namespace Winline
|
||||
Public Class WebServiceData
|
||||
Inherits BaseClass
|
||||
|
||||
Private ReadOnly Config As Config
|
||||
Private ReadOnly Config As WebServiceConfig
|
||||
Private ReadOnly Serializer As Serializer
|
||||
Private ReadOnly AppDataPath As String
|
||||
|
||||
Public Event WebServiceProgress As EventHandler(Of String)
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfig As Config, pAppDataPath As String)
|
||||
Public Sub New(pLogConfig As LogConfig, pWebserviceConfig As WebServiceConfig, pAppDataPath As String)
|
||||
MyBase.New(pLogConfig, pLogConfig.GetLogger())
|
||||
Serializer = New Serializer(pLogConfig)
|
||||
Config = pConfig
|
||||
Config = pWebserviceConfig
|
||||
AppDataPath = pAppDataPath
|
||||
End Sub
|
||||
|
||||
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
|
||||
Dim oWS = Config
|
||||
|
||||
' --- Get and create path for request/response files
|
||||
|
||||
@@ -41,10 +42,10 @@ Namespace Winline
|
||||
Dim oFileName = GetXmlFilenameWithSuffix(oBaseFileName, "Request", "xml")
|
||||
|
||||
' Relative Path for Webservice Call
|
||||
Dim oImportRelativeFilePath = IO.Path.Combine(GetDateSubDirectoryPath(Config.Webservice.ImportRelativePath), oFileName)
|
||||
Dim oImportRelativeFilePath = IO.Path.Combine(GetDateSubDirectoryPath(oWS.ImportRelativePath), oFileName)
|
||||
|
||||
' Absolute Path to copy Request file
|
||||
Dim oImportAbsolutePath = IO.Path.Combine(Config.Webservice.ImportBasePath, Config.Webservice.ImportRelativePath)
|
||||
Dim oImportAbsolutePath = IO.Path.Combine(oWS.ImportBasePath, oWS.ImportRelativePath)
|
||||
Dim oImportAbsoluteFilePath = IO.Path.Combine(GetDateSubDirectoryPath(oImportAbsolutePath), oFileName)
|
||||
|
||||
' --- Serialize Data into XML string
|
||||
|
||||
Reference in New Issue
Block a user