WIP
This commit is contained in:
@@ -28,6 +28,9 @@ Namespace Winline
|
||||
|
||||
Public Const V50_ACCOUNTNUMBER = "c002"
|
||||
Public Const V50_ACCOUNTNAME = "c003"
|
||||
Public Const V50_STREETNAME = "c050"
|
||||
Public Const V50_ZIPCODE = "c051"
|
||||
Public Const V50_CITYNAME = "c052"
|
||||
|
||||
Public Const T45_KEY = "c000"
|
||||
Public Const T45_NAME = "c001"
|
||||
@@ -66,9 +69,12 @@ Namespace Winline
|
||||
Try
|
||||
Dim oSQL = $"
|
||||
SELECT DISTINCT
|
||||
[c002],
|
||||
[c003]
|
||||
FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v005]
|
||||
[c002], -- Kundennummer
|
||||
[c003], -- Kundenname
|
||||
[c050], -- Straße
|
||||
[c052], -- Ort
|
||||
[c051] -- PLZ
|
||||
FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v050]
|
||||
WHERE
|
||||
c139 IS NULL
|
||||
AND mesocomp = '{pMandator.Id}'
|
||||
@@ -77,9 +83,18 @@ Namespace Winline
|
||||
Dim oAccounts As New List(Of Account)
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oAccountNumber As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNUMBER), String.Empty)
|
||||
Dim oAccountName As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNAME), String.Empty)
|
||||
Dim oStreetName As String = Utils.NotNull(oRow.Item(V50_STREETNAME), String.Empty)
|
||||
Dim oZipCode As String = Utils.NotNull(oRow.Item(V50_ZIPCODE), String.Empty)
|
||||
Dim oCityName As String = Utils.NotNull(oRow.Item(V50_CITYNAME), String.Empty)
|
||||
|
||||
oAccounts.Add(New Account With {
|
||||
.Id = oRow.Item(V05_ACCOUNTID),
|
||||
.Name = oRow.Item(V05_ACCOUNTNAME),
|
||||
.Id = oAccountNumber,
|
||||
.Name = oAccountName,
|
||||
.StreetName = oStreetName,
|
||||
.ZipCode = oZipCode,
|
||||
.CityName = oCityName,
|
||||
.Mandator = pMandator.Id
|
||||
})
|
||||
Next
|
||||
@@ -188,7 +203,10 @@ Namespace Winline
|
||||
Dim oSQL = $"
|
||||
SELECT
|
||||
[c002], -- Kundennummer
|
||||
[c003] -- Kundenname
|
||||
[c003], -- Kundenname
|
||||
[c050], -- Straße
|
||||
[c052], -- Ort
|
||||
[c051] -- PLZ
|
||||
FROM [{pMandator.Database}].[dbo].[v050]
|
||||
WHERE [c004] = 2 -- KontoTyp
|
||||
AND [c260] = '{pGLN}'
|
||||
@@ -212,10 +230,16 @@ Namespace Winline
|
||||
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||
Dim oAccountNumber As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNUMBER), String.Empty)
|
||||
Dim oAccountName As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNAME), String.Empty)
|
||||
Dim oStreetName As String = Utils.NotNull(oRow.Item(V50_STREETNAME), String.Empty)
|
||||
Dim oZipCode As String = Utils.NotNull(oRow.Item(V50_ZIPCODE), String.Empty)
|
||||
Dim oCityName As String = Utils.NotNull(oRow.Item(V50_CITYNAME), String.Empty)
|
||||
|
||||
Return New Account With {
|
||||
.Id = oAccountNumber,
|
||||
.Name = oAccountName,
|
||||
.StreetName = oStreetName,
|
||||
.CityName = oCityName,
|
||||
.ZipCode = oZipCode,
|
||||
.Mandator = pMandator.Id
|
||||
}
|
||||
Catch ex As Exception
|
||||
|
||||
Reference in New Issue
Block a user