Logging
This commit is contained in:
@@ -515,6 +515,12 @@ Namespace Winline
|
||||
|
||||
Public Function TryGetArticleNumber(pEAN As String, pMandator As Mandator) As String
|
||||
Try
|
||||
If pEAN = String.Empty Then
|
||||
Logger.Warn("Could not get ArticleNumber, EAN is empty.")
|
||||
Return Nothing
|
||||
|
||||
End If
|
||||
|
||||
Dim oYear As Integer = Config.GetWinLineYear()
|
||||
Dim oSQL As String = $"
|
||||
SELECT
|
||||
@@ -545,6 +551,8 @@ Namespace Winline
|
||||
|
||||
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||
Dim oArticleNumber As String = ItemEx(oRow, V21_MAINARTICLENUMBER, String.Empty)
|
||||
Logger.Info("Found ArticleNumber [{0}] in Column [{1}]", oArticleNumber, V21_MAINARTICLENUMBER)
|
||||
|
||||
Return oArticleNumber
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -929,7 +937,7 @@ Namespace Winline
|
||||
Dim oExistingCount = Await Database.GetScalarValueAsync(oSql)
|
||||
|
||||
If oExistingCount = 0 Then
|
||||
Logger.Debug("Running number [{0}] does not exist yet. Returning.")
|
||||
Logger.Debug("Running number [{0}] does not exist yet. Returning.", pRunningNumber)
|
||||
Return pRunningNumber
|
||||
Else
|
||||
Logger.Debug("Running number [{0}] already exists. Checking again.")
|
||||
|
||||
Reference in New Issue
Block a user