Report, Dynamic SQL
This commit is contained in:
@@ -162,11 +162,6 @@ Namespace Winline
|
||||
End Function
|
||||
|
||||
Private Function GetBytesFromDocument(pDocument As Document) As Byte()
|
||||
' TODO: should "Lief_Name" be included here?
|
||||
Dim oFilteredFields As New List(Of String) From {
|
||||
"Fakt_Name"
|
||||
}
|
||||
|
||||
Using oStream As New IO.MemoryStream()
|
||||
Dim w = XmlWriter.Create(oStream)
|
||||
|
||||
@@ -187,7 +182,7 @@ Namespace Winline
|
||||
Continue For
|
||||
End If
|
||||
|
||||
If oFilteredFields.Contains(oField.Key) Then
|
||||
If oField.Value.IsVirtual Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
|
||||
@@ -29,19 +29,9 @@ Namespace Winline
|
||||
MappingConfig = pMappingConfig
|
||||
End Sub
|
||||
|
||||
<DebuggerStepThrough>
|
||||
Public Function GetWinLineYear(pYear As Integer)
|
||||
Return (pYear - 1900) * 12
|
||||
End Function
|
||||
|
||||
<DebuggerStepThrough>
|
||||
Public Function GetWinLineYear()
|
||||
Return GetWinLineYear(Config.GetYear)
|
||||
End Function
|
||||
|
||||
Public Async Function LoadArticles(pMandator As Mandator) As Task
|
||||
Logger.Info("Loading Articles for Mandator [{0}]", pMandator)
|
||||
Dim oYear = GetWinLineYear()
|
||||
Dim oYear = Config.GetWinLineYear()
|
||||
|
||||
Try
|
||||
Dim oSQL = $"
|
||||
@@ -80,7 +70,7 @@ Namespace Winline
|
||||
|
||||
Public Async Function LoadAccounts(pMandator As Mandator) As Task
|
||||
Logger.Info("Loading Accounts for Mandator [{0}]", pMandator)
|
||||
Dim oYear = GetWinLineYear()
|
||||
Dim oYear = Config.GetWinLineYear()
|
||||
|
||||
Try
|
||||
Dim oSQL = $"
|
||||
@@ -167,7 +157,7 @@ Namespace Winline
|
||||
End Sub
|
||||
|
||||
Public Async Function LoadDocumentKinds(pMandator As Mandator) As Task
|
||||
Dim oYear As Integer = GetWinLineYear()
|
||||
Dim oYear As Integer = Config.GetWinLineYear()
|
||||
|
||||
Try
|
||||
' TODO: This is Schaum specific, maybe move to config later
|
||||
@@ -208,7 +198,7 @@ Namespace Winline
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Dim oYear As Integer = GetWinLineYear()
|
||||
Dim oYear As Integer = Config.GetWinLineYear()
|
||||
Dim oSQL = $"
|
||||
SELECT
|
||||
[c002], -- Kundennummer
|
||||
@@ -260,7 +250,7 @@ Namespace Winline
|
||||
|
||||
Public Function TryGetArticleNumber(pEAN As String, pMandator As Mandator) As String
|
||||
Try
|
||||
Dim oYear As Integer = GetWinLineYear()
|
||||
Dim oYear As Integer = Config.GetWinLineYear()
|
||||
Dim oSQL As String = $"
|
||||
SELECT
|
||||
[c011], -- Artikelnummer
|
||||
@@ -300,7 +290,7 @@ Namespace Winline
|
||||
Public Function GetContacts(pAccountNumber As String, pMandator As Mandator) As List(Of Contact)
|
||||
Try
|
||||
Dim oContacts As New List(Of Contact)
|
||||
Dim oYear As Integer = GetWinLineYear()
|
||||
Dim oYear As Integer = Config.GetWinLineYear()
|
||||
Dim oSQL As String = $"
|
||||
SELECT
|
||||
[c000], -- Key
|
||||
@@ -335,7 +325,7 @@ Namespace Winline
|
||||
|
||||
Public Function GetReplacementArticleNumber(pArticleNumber As String, pMandator As Mandator)
|
||||
Try
|
||||
Dim oYear As Integer = GetWinLineYear()
|
||||
Dim oYear As Integer = Config.GetWinLineYear()
|
||||
Dim oSQL As String = $"
|
||||
SELECT
|
||||
[c011], -- Artikelnummer
|
||||
@@ -391,7 +381,7 @@ Namespace Winline
|
||||
Distinct().
|
||||
ToList()
|
||||
|
||||
Dim oYear = GetWinLineYear()
|
||||
Dim oYear = Config.GetWinLineYear()
|
||||
Dim oMandatorId As String = String.Empty
|
||||
|
||||
' TODO: Instead load whitelisted mandators from database
|
||||
|
||||
Reference in New Issue
Block a user