Fix filesystem refs
This commit is contained in:
@@ -77,10 +77,6 @@
|
||||
<Project>{eaf0ea75-5fa7-485d-89c7-b2d843b03a96}</Project>
|
||||
<Name>Database</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Filesystem\Filesystem.vbproj">
|
||||
<Project>{991d0231-4623-496d-8bd0-9ca906029cbc}</Project>
|
||||
<Name>Filesystem</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Interfaces\Interfaces.vbproj">
|
||||
<Project>{ab6f09bf-e794-4f6a-94bb-c97c0ba84d64}</Project>
|
||||
<Name>Interfaces</Name>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.Collections.Generic
|
||||
Imports System.IO
|
||||
Imports System.Linq
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Interfaces
|
||||
Imports DigitalData.Modules.Logging
|
||||
@@ -11,13 +12,13 @@ Namespace ZUGFeRD
|
||||
Private ReadOnly _logConfig As LogConfig
|
||||
Private ReadOnly _logger As Logger
|
||||
Private ReadOnly _mssql As MSSQLServer
|
||||
Private ReadOnly _filesystem As Filesystem.File
|
||||
Private ReadOnly _filesystem As FilesystemEx
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, MSSQL As MSSQLServer)
|
||||
_logConfig = LogConfig
|
||||
_logger = _logConfig.GetLogger()
|
||||
_mssql = MSSQL
|
||||
_filesystem = New Filesystem.File(LogConfig)
|
||||
_filesystem = New FilesystemEx(LogConfig)
|
||||
End Sub
|
||||
|
||||
Public Sub MoveFiles(
|
||||
|
||||
@@ -32,7 +32,7 @@ Public Class ImportZUGFeRDFiles
|
||||
|
||||
Private ReadOnly _logger As Logger
|
||||
Private ReadOnly _logConfig As LogConfig
|
||||
Private ReadOnly _filesystem As Filesystem.File
|
||||
Private ReadOnly _filesystem As FilesystemEx
|
||||
Private ReadOnly _mssql As MSSQLServer
|
||||
Private ReadOnly _email As ZUGFeRD.EmailFunctions
|
||||
Private ReadOnly _file As ZUGFeRD.FileFunctions
|
||||
@@ -58,7 +58,7 @@ Public Class ImportZUGFeRDFiles
|
||||
Public Sub New(LogConfig As LogConfig, Optional MSSQL As MSSQLServer = Nothing)
|
||||
_logConfig = LogConfig
|
||||
_logger = LogConfig.GetLogger()
|
||||
_filesystem = New Filesystem.File(_logConfig)
|
||||
_filesystem = New FilesystemEx(_logConfig)
|
||||
_mssql = MSSQL
|
||||
_email = New ZUGFeRD.EmailFunctions(LogConfig, _mssql)
|
||||
_file = New ZUGFeRD.FileFunctions(LogConfig, _mssql)
|
||||
@@ -82,11 +82,10 @@ Public Class ImportZUGFeRDFiles
|
||||
|
||||
_EmailOutAccountId = oArgs.EmailOutProfileId
|
||||
|
||||
Dim oOptions As New ZUGFeRDInterface.ZugferdOptions() With {
|
||||
_zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, New ZUGFeRDInterface.ZugferdOptions() With {
|
||||
.AllowFacturX_Filename = oArgs.AllowFacturX,
|
||||
.AllowXRechnung_Filename = oArgs.AllowXRechnung
|
||||
}
|
||||
_zugferd = New ZUGFeRDInterface(_logConfig, _gdpictureLicenseKey, oOptions)
|
||||
})
|
||||
|
||||
_logger.Debug("Starting Job {0}", [GetType].Name)
|
||||
|
||||
@@ -523,8 +522,6 @@ Public Class ImportZUGFeRDFiles
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "=== REFACTOR"
|
||||
Private Function ProcessFileGroup(oMessageId As String, pFiles As List(Of FileInfo), oConnections As DatabaseConnections, pArgs As WorkerArgs)
|
||||
Dim oMissingProperties = New List(Of String)
|
||||
@@ -1069,14 +1066,14 @@ Public Class ImportZUGFeRDFiles
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function CreateMD5(ByVal Filename As String) As String
|
||||
Private Function CreateMD5(pFilename As String) As String
|
||||
Try
|
||||
Dim oMD5 As New MD5CryptoServiceProvider
|
||||
Dim oHash As Byte()
|
||||
Dim oHashString As String
|
||||
Dim oResult As String = ""
|
||||
|
||||
Using oFileStream As New FileStream(Filename, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
|
||||
Using oFileStream As New FileStream(pFilename, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
|
||||
oHash = oMD5.ComputeHash(oFileStream)
|
||||
oHashString = BitConverter.ToString(oHash)
|
||||
End Using
|
||||
@@ -1236,11 +1233,11 @@ Public Class ImportZUGFeRDFiles
|
||||
Return oEmailData
|
||||
End Function
|
||||
|
||||
Private Sub AddRejectedState(oMessageID As String, oTitle As String, oTitle1 As String, oComment As String, Transaction As SqlTransaction)
|
||||
Private Sub AddRejectedState(pMessageID As String, pTitle As String, pTitle1 As String, pComment As String, pTransaction As SqlTransaction)
|
||||
Try
|
||||
'PRCUST_ADD_HISTORY_STATE: @MessageID VARCHAR(250), @TITLE1 VARCHAR(250), @TITLE2 VARCHAR(250)
|
||||
Dim oSQL = $"EXEC PRCUST_ADD_HISTORY_STATE '{oMessageID}','{oTitle}','{oTitle1}','{oComment.Replace("'", "''")}'"
|
||||
_mssql.ExecuteNonQuery(oSQL, Transaction)
|
||||
Dim oSQL = $"EXEC PRCUST_ADD_HISTORY_STATE '{pMessageID}','{pTitle}','{pTitle1}','{pComment.Replace("'", "''")}'"
|
||||
_mssql.ExecuteNonQuery(oSQL, pTransaction)
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
End Try
|
||||
|
||||
Reference in New Issue
Block a user