MS Interfaces 2.0 Logging InvoiceSeller

This commit is contained in:
SchreiberM 2024-06-07 09:19:20 +02:00
parent 15e67f1e4c
commit 99b2a5a53b
2 changed files with 10 additions and 8 deletions

View File

@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.14.0.0")>
<Assembly: AssemblyFileVersion("1.14.0.0")>
<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyFileVersion("2.0.0.0")>

View File

@ -31,7 +31,7 @@ Public Class PropertyValues
Public Value As String
End Class
Public Function CheckPropertyValues(Document As Object, PropertyMap As Dictionary(Of String, XmlItemProperty), MessageId As String) As CheckPropertyValuesResult
Public Function CheckPropertyValues(pDocument As Object, PropertyMap As Dictionary(Of String, XmlItemProperty), MessageId As String) As CheckPropertyValuesResult
Dim oGlobalGroupCounter = 0
Dim oMissingProperties As New List(Of String)
Dim oResult As New CheckPropertyValuesResult()
@ -65,7 +65,7 @@ Public Class PropertyValues
Dim oPropertyValues As List(Of Object)
_logger.Debug($"Fetching value for itemSpecification [{oProperty.Value.TableColumn}].")
Try
oPropertyValues = GetPropValue(Document, oProperty.Key)
oPropertyValues = GetPropValue(pDocument, oProperty.Key)
Catch ex As Exception
_logger.Warn($"{MessageId} - Unknown error occurred while fetching property/TColumn [{0}] in group [{1}]:", oProperty.Value.TableColumn, oGroupScope)
_logger.Error(ex)
@ -104,9 +104,7 @@ Public Class PropertyValues
Dim oPropertyValue = oColumn.Value.ElementAtOrDefault(oRowIndex)
_logger.Debug("Processing itemSpecification *TableColumn* [{0}].", oTableColumn)
If oTableColumn = "INVOICE_SELLER_EMAIL" Then
Console.WriteLine("INVOICE_SELLER_EMAIL")
End If
If IsNothing(oPropertyValue) OrElse String.IsNullOrEmpty(oPropertyValue) Then
If oColumn.Key.IsRequired Then
_logger.Warn($"{MessageId} # oPropertyValue for specification [{oTableColumn}] is empty or not found but is required. Continuing with Empty String.")
@ -144,10 +142,14 @@ Public Class PropertyValues
Dim oTableName = oItem.Value.TableName
Dim oIsRequired = oItem.Value.IsRequired
Dim oDescription = oItem.Value.Description
If oTableColumn = "INVOICE_SELLER_EMAIL" Then
Console.WriteLine("INVOICE_SELLER_EMAIL")
End If
Try
oPropertyValueList = GetPropValue(Document, oItem.Key)
oPropertyValueList = GetPropValue(pDocument, oItem.Key)
Catch ex As Exception
_logger.Warn("{2} # Unknown error occurred while fetching specification [{0}] in group [{1}]:", oPropertyDescription, oItem.Value.GroupScope, MessageId)
_logger.Warn("ERROR-MESSAGE [{0}]", ex.Message)
_logger.Error(ex)
oPropertyValueList = New List(Of Object)
End Try