Rename Schema to Template , Clean up obsolete files
This commit is contained in:
parent
ee23cdd7e8
commit
cc81a77f05
@ -12,7 +12,7 @@ Public Class GridLoader
|
||||
MyBase.New(pLogConfig, pLogConfig.GetLogger())
|
||||
End Sub
|
||||
|
||||
Public Function GetGridFromElement(pGrid As GridControl, pTable As Schemas.Schema.Table) As GridControl
|
||||
Public Function GetGridFromElement(pGrid As GridControl, pTable As Templates.Template.Table) As GridControl
|
||||
pGrid.Name = pTable.Name
|
||||
pGrid.ForceInitialize()
|
||||
pGrid.MainView.PopulateColumns()
|
||||
@ -62,7 +62,7 @@ Public Class GridLoader
|
||||
Return pGrid
|
||||
End Function
|
||||
|
||||
Private Function GetColumnType(pColumn As Schemas.Schema.Column)
|
||||
Private Function GetColumnType(pColumn As Templates.Template.Column)
|
||||
Select Case pColumn.DataType
|
||||
Case ColumnType.Boolean
|
||||
Return DevExpress.Data.UnboundColumnType.Boolean
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
Imports MultiTool.Shared.Schemas
|
||||
Imports MultiTool.Shared.Templates
|
||||
|
||||
Namespace My
|
||||
<HideModuleName()>
|
||||
Module MyExtensions
|
||||
Friend Property TemplateConfiguration As SchemaConfig
|
||||
Friend Property TemplateConfiguration As TemplateConfig
|
||||
Friend Property MappingConfiguration As New List(Of MappingConfig)
|
||||
End Module
|
||||
End Namespace
|
||||
|
||||
2
MultiTool.Form/Reports/OrderReport.Designer.vb
generated
2
MultiTool.Form/Reports/OrderReport.Designer.vb
generated
@ -666,7 +666,7 @@ Partial Public Class OrderReport
|
||||
'
|
||||
'ObjectDataSource1
|
||||
'
|
||||
Me.ObjectDataSource1.DataSource = GetType(MultiTool.[Shared].ReportSource)
|
||||
Me.ObjectDataSource1.DataSource = GetType(MultiTool.[Shared].Report.ReportSource)
|
||||
Me.ObjectDataSource1.Name = "ObjectDataSource1"
|
||||
'
|
||||
'OrderReport
|
||||
|
||||
@ -10,8 +10,10 @@ Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports MultiTool.Shared
|
||||
Imports MultiTool.Shared.Documents
|
||||
Imports MultiTool.Shared.Schemas
|
||||
Imports MultiTool.Shared.Report
|
||||
Imports MultiTool.Shared.Templates
|
||||
Imports MultiTool.Shared.Winline
|
||||
Imports MultiTool.Shared.Winline.Entities
|
||||
Imports MultiTool.Shared.Constants
|
||||
Imports MultiTool.Shared.Exceptions
|
||||
Imports DevExpress.XtraReports.UI
|
||||
@ -25,7 +27,7 @@ Public Class frmImportMain
|
||||
Private Database As MSSQLServer
|
||||
Private Winline As WinlineData
|
||||
Private FileEx As DigitalData.Modules.Filesystem.File
|
||||
Private WebService As WebService
|
||||
Private WebService As WebServiceData
|
||||
Private DocumentLoader As DocumentLoader
|
||||
Private FormHelper As FormHelper
|
||||
|
||||
@ -33,18 +35,18 @@ Public Class frmImportMain
|
||||
Private GridLoader As GridLoader
|
||||
Private GridBuilder As GridBuilder
|
||||
|
||||
Private ReadOnly CurrentSchema As Schema = Nothing
|
||||
Private ReadOnly CurrentTemplate As Template = Nothing
|
||||
|
||||
' Runtime variables
|
||||
Private CurrentGrid As GridControl = Nothing
|
||||
Private CurrentDocument As Document = Nothing
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Config), pSchema As Schema)
|
||||
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Config), pTemplate As Template)
|
||||
InitializeComponent()
|
||||
|
||||
LogConfig = pLogConfig
|
||||
ConfigManager = pConfigManager
|
||||
CurrentSchema = pSchema
|
||||
CurrentTemplate = pTemplate
|
||||
|
||||
BehaviorManager.Attach(Of PersistenceBehavior)(Me, AddressOf LoadPersistenceSettings)
|
||||
End Sub
|
||||
@ -75,7 +77,7 @@ Public Class frmImportMain
|
||||
|
||||
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig)
|
||||
Winline = New WinlineData(LogConfig, Database, ConfigManager.Config)
|
||||
WebService = New WebService(LogConfig, ConfigManager.Config, Application.UserAppDataPath)
|
||||
WebService = New WebServiceData(LogConfig, ConfigManager.Config, Application.UserAppDataPath)
|
||||
AddHandler WebService.WebServiceProgress, AddressOf WebService_Progress
|
||||
|
||||
Catch ex As Exception
|
||||
@ -85,7 +87,7 @@ Public Class frmImportMain
|
||||
|
||||
txtVersion.Caption = String.Format(My.Resources.frmImportMainExtra.Version__0_, My.Application.Info.Version.ToString)
|
||||
txtCulture.Caption = String.Format(My.Resources.frmImportMainExtra.Culture___0_, My.Application.UICulture.ToString)
|
||||
Text = String.Format(My.Resources.frmShared._0____WebService_Multitool_für_WinLine, CurrentSchema.Name)
|
||||
Text = String.Format(My.Resources.frmShared._0____WebService_Multitool_für_WinLine, CurrentTemplate.Name)
|
||||
End Sub
|
||||
|
||||
Private Async Sub frmImportMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
@ -119,12 +121,7 @@ Public Class frmImportMain
|
||||
|
||||
SplashScreenManager.SetWaitFormDescription(My.Resources.frmImportMainExtra.Lade_Vorlagen)
|
||||
|
||||
'SchemaLoader.LoadFiles(ConfigManager.Config.SchemaDirectory)
|
||||
'CurrentSchemaName = SchemaLoader.SchemaList.First().FullName
|
||||
'CurrentSchema = SchemaLoader.GetSchemaFromFile(CurrentSchemaName)
|
||||
'CurrentSchema = SchemaLoader.UpdateSchemaWithDatabaseConfiguration(CurrentSchema, SchemaLoader.TemplateConfiguration)
|
||||
|
||||
Grids = CreateGridsAndColumns(CurrentSchema)
|
||||
Grids = CreateGridsAndColumns(CurrentTemplate)
|
||||
|
||||
For Each oGrid As GridControl In Grids
|
||||
AddHandler oGrid.GotFocus, AddressOf Grid_Focus
|
||||
@ -141,11 +138,11 @@ Public Class frmImportMain
|
||||
CurrentGrid = sender
|
||||
End Sub
|
||||
|
||||
Private Function CreateGridsAndColumns(pSchema As Schemas.Schema) As List(Of GridControl)
|
||||
Private Function CreateGridsAndColumns(pTemplate As Templates.Template) As List(Of GridControl)
|
||||
Dim oGrids As New List(Of GridControl)
|
||||
Dim oTableCounter = 0
|
||||
|
||||
For Each oTable In pSchema.Tables
|
||||
For Each oTable In pTemplate.Tables
|
||||
If oTableCounter = 0 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(GridControl1, oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_MouseDoubleClick
|
||||
@ -203,7 +200,7 @@ Public Class frmImportMain
|
||||
Dim oDocumentRow = CurrentDocument.Rows.
|
||||
Where(Function(r) r.Id.ToString = oRow.Item(COLUMN_GUID)).
|
||||
SingleOrDefault()
|
||||
Dim oSchemaTable = CurrentSchema.Tables.
|
||||
Dim oTemplateTable = CurrentTemplate.Tables.
|
||||
Where(Function(t) t.Name = oGrid.Name).
|
||||
SingleOrDefault()
|
||||
|
||||
@ -213,7 +210,7 @@ Public Class frmImportMain
|
||||
oDocumentRow,
|
||||
CurrentDocument.Mandator,
|
||||
Winline,
|
||||
oSchemaTable
|
||||
oTemplateTable
|
||||
)
|
||||
If oForm.ShowDialog() = DialogResult.OK Then
|
||||
Dim oModifiedRow = oForm.DocumentRow
|
||||
@ -241,7 +238,7 @@ Public Class frmImportMain
|
||||
SplashScreenManager.SetWaitFormDescription(oMessage)
|
||||
End Sub
|
||||
|
||||
If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, CurrentSchema, lookupMandator.EditValue) Then
|
||||
If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, CurrentTemplate, lookupMandator.EditValue) Then
|
||||
GridControlFiles.DataSource = Nothing
|
||||
GridControlFiles.DataSource = DocumentLoader.Files
|
||||
|
||||
@ -276,7 +273,7 @@ Public Class frmImportMain
|
||||
If oResult = DialogResult.Yes Then
|
||||
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
|
||||
|
||||
Dim oNewDocument = DocumentLoader.LoadFile(oDocument.File, CurrentSchema, lookupMandator.EditValue)
|
||||
Dim oNewDocument = DocumentLoader.LoadFile(oDocument.File, CurrentTemplate, lookupMandator.EditValue)
|
||||
Dim oIndex = DocumentLoader.Files.IndexOf(oDocument)
|
||||
DocumentLoader.Files.Item(oIndex) = oNewDocument
|
||||
|
||||
@ -320,7 +317,7 @@ Public Class frmImportMain
|
||||
Next
|
||||
|
||||
' Create initial Datatable for each Root Element
|
||||
For Each oTable In CurrentSchema.Tables
|
||||
For Each oTable In CurrentTemplate.Tables
|
||||
Dim oDataTable As New DataTable()
|
||||
|
||||
' This is makes it possible to fetch the DocumentRow later
|
||||
|
||||
@ -5,14 +5,14 @@ Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports MultiTool.Shared.Schemas
|
||||
Imports MultiTool.Shared.Templates
|
||||
|
||||
Public Class frmMain
|
||||
Private LogConfig As LogConfig
|
||||
Private Logger As Logger
|
||||
Private ConfigManager As ConfigManager(Of [Shared].Config)
|
||||
Private Database As MSSQLServer
|
||||
Private SchemaLoader As SchemaLoader
|
||||
Private TemplateLoader As TemplateLoader
|
||||
Private GridBuilder As GridBuilder
|
||||
Private FormHelper As FormHelper
|
||||
|
||||
@ -52,18 +52,18 @@ Public Class frmMain
|
||||
Database = New MSSQLServer(LogConfig, oConnectionString)
|
||||
|
||||
' Initialize Schemas
|
||||
SchemaLoader = New SchemaLoader(LogConfig, Database)
|
||||
Await SchemaLoader.LoadTemplates()
|
||||
Await SchemaLoader.LoadTemplateConfiguration()
|
||||
Await SchemaLoader.LoadMappingConfiguration()
|
||||
TemplateLoader = New TemplateLoader(LogConfig, Database)
|
||||
Await TemplateLoader.LoadTemplates()
|
||||
Await TemplateLoader.LoadTemplateConfiguration()
|
||||
Await TemplateLoader.LoadMappingConfiguration()
|
||||
|
||||
' Save Schema data in 'My' Namespace
|
||||
My.MappingConfiguration = SchemaLoader.MappingConfiguration
|
||||
My.TemplateConfiguration = SchemaLoader.TemplateConfiguration
|
||||
My.MappingConfiguration = TemplateLoader.MappingConfiguration
|
||||
My.TemplateConfiguration = TemplateLoader.TemplateConfiguration
|
||||
|
||||
Dim oBindingSource = New BindingList(Of Schema)
|
||||
For Each oSchema As Schema In SchemaLoader.SchemaList
|
||||
oBindingSource.Add(oSchema)
|
||||
Dim oBindingSource = New BindingList(Of Template)
|
||||
For Each oTemplate As Template In TemplateLoader.TemplateList
|
||||
oBindingSource.Add(oTemplate)
|
||||
Next
|
||||
|
||||
GridControl1.DataSource = oBindingSource
|
||||
@ -75,18 +75,18 @@ Public Class frmMain
|
||||
|
||||
Private Sub btnOpenImportExportForm_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenImportExportForm.ItemClick
|
||||
Try
|
||||
Dim oSchema As Schema = GridViewTemplates.GetRow(GridViewTemplates.FocusedRowHandle)
|
||||
Dim oTemplate As Template = GridViewTemplates.GetRow(GridViewTemplates.FocusedRowHandle)
|
||||
|
||||
If oSchema Is Nothing Then
|
||||
If oTemplate Is Nothing Then
|
||||
MsgBox("Keine Vorlage ausgewählt! Bitte wählen Sie eine Vorlage aus!", MsgBoxStyle.Exclamation, Text)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
oSchema = SchemaLoader.UpdateSchemaFromFile(oSchema, ConfigManager.Config.SchemaDirectory)
|
||||
oSchema = SchemaLoader.UpdateSchemaFromDatabase(oSchema, SchemaLoader.TemplateConfiguration)
|
||||
oTemplate = TemplateLoader.UpdateTemplateFromFile(oTemplate, ConfigManager.Config.SchemaDirectory)
|
||||
oTemplate = TemplateLoader.UpdateTemplateFromDatabase(oTemplate, TemplateLoader.TemplateConfiguration)
|
||||
|
||||
If oSchema.IsImport Then
|
||||
Dim oForm As New frmImportMain(LogConfig, ConfigManager, oSchema)
|
||||
If oTemplate.IsImport Then
|
||||
Dim oForm As New frmImportMain(LogConfig, ConfigManager, oTemplate)
|
||||
oForm.ShowDialog()
|
||||
Else
|
||||
MsgBox("Export-Vorlagen werden noch nicht unterstützt!", MsgBoxStyle.Exclamation, Text)
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
Imports MultiTool.Shared.Documents
|
||||
Imports MultiTool.Shared.Documents.DocumentRow
|
||||
Imports MultiTool.Shared.Winline
|
||||
Imports MultiTool.Shared.Schemas
|
||||
Imports MultiTool.Shared.Winline.Entities
|
||||
Imports MultiTool.Shared.Templates
|
||||
Imports MultiTool.Shared.Constants
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Logging
|
||||
@ -15,7 +16,7 @@ Public Class frmRowEditor
|
||||
Private ReadOnly Logger As Logger
|
||||
Private ReadOnly FormHelper As FormHelper
|
||||
|
||||
Private ReadOnly _Table As Schema.Table
|
||||
Private ReadOnly _Table As Template.Table
|
||||
Private ReadOnly _Columns As List(Of String)
|
||||
Private ReadOnly _DataTable As New DataTable
|
||||
Private ReadOnly _Accounts As List(Of Account)
|
||||
@ -40,7 +41,7 @@ Public Class frmRowEditor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pColumns As List(Of String), pDocumentRow As DocumentRow, pMandator As Mandator, pWinline As WinlineData, pTable As Schema.Table)
|
||||
Public Sub New(pLogConfig As LogConfig, pColumns As List(Of String), pDocumentRow As DocumentRow, pMandator As Mandator, pWinline As WinlineData, pTable As Template.Table)
|
||||
InitializeComponent()
|
||||
|
||||
Logger = pLogConfig.GetLogger()
|
||||
|
||||
@ -1,19 +1,13 @@
|
||||
Public Class Constants
|
||||
Public Const COLUMN_GUID = "GUID"
|
||||
|
||||
Public Enum XmlFunction
|
||||
None = 0
|
||||
GLN = 1
|
||||
EAN = 2
|
||||
End Enum
|
||||
|
||||
Public Const FUNCTION_GLN = "GLN"
|
||||
Public Const FUNCTION_EAN = "EAN"
|
||||
|
||||
Public Const SCHEMA_TYPE_DATE = "xs:date"
|
||||
Public Const SCHEMA_TYPE_INTEGER = "xs:integer"
|
||||
Public Const SCHEMA_TYPE_DECIMAL = "xs:decimal"
|
||||
Public Const SCHEMA_TYPE_BOOLEAN = "xs:boolean"
|
||||
Public Const TEMPLATE_TYPE_DATE = "xs:date"
|
||||
Public Const TEMPLATE_TYPE_INTEGER = "xs:integer"
|
||||
Public Const TEMPLATE_TYPE_DECIMAL = "xs:decimal"
|
||||
Public Const TEMPLATE_TYPE_BOOLEAN = "xs:boolean"
|
||||
|
||||
Public Const DB_TYPE_DATE = "DATE"
|
||||
Public Const DB_TYPE_INTEGER = "INTEGER"
|
||||
@ -27,4 +21,9 @@
|
||||
[Boolean]
|
||||
[Decimal]
|
||||
End Enum
|
||||
Public Enum XmlFunction
|
||||
None = 0
|
||||
GLN = 1
|
||||
EAN = 2
|
||||
End Enum
|
||||
End Class
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
Imports System.IO
|
||||
Imports MultiTool.Shared.Schemas
|
||||
Imports MultiTool.Shared.Winline
|
||||
Imports MultiTool.Shared.Templates
|
||||
Imports MultiTool.Shared.Winline.Entities
|
||||
|
||||
Namespace Documents
|
||||
Public Class Document
|
||||
Public File As FileInfo
|
||||
Public Property Type As DocumentType
|
||||
Public Schema As Schema
|
||||
Public Schema As Template
|
||||
Public Mandator As Mandator
|
||||
|
||||
Public TemplateName As String
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports MultiTool.Shared.Exceptions
|
||||
Imports MultiTool.Shared.Schemas
|
||||
Imports MultiTool.Shared.Templates
|
||||
Imports MultiTool.Shared.Winline
|
||||
Imports MultiTool.Shared.Winline.Entities
|
||||
|
||||
Namespace Documents
|
||||
Public Class DocumentLoader
|
||||
@ -25,7 +25,7 @@ Namespace Documents
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function LoadFiles(pInputDirectory As String, pSchema As Schema, pMandator As Mandator) As Boolean
|
||||
Public Function LoadFiles(pInputDirectory As String, pTemplate As Template, pMandator As Mandator) As Boolean
|
||||
If pInputDirectory = String.Empty Then
|
||||
Throw New ArgumentNullException("InputDirectory")
|
||||
End If
|
||||
@ -41,7 +41,7 @@ Namespace Documents
|
||||
|
||||
For Each oFile In oFiles
|
||||
Try
|
||||
Dim oDocument = LoadFile(oFile, pSchema, pMandator)
|
||||
Dim oDocument = LoadFile(oFile, pTemplate, pMandator)
|
||||
Files.Add(oDocument)
|
||||
|
||||
Dim oInfo As FileLoadInfo
|
||||
@ -68,16 +68,16 @@ Namespace Documents
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function LoadFile(pFileInfo As FileInfo, pSchema As Schema, pMandator As Mandator) As Document
|
||||
Public Function LoadFile(pFileInfo As FileInfo, pTemplate As Template, pMandator As Mandator) As Document
|
||||
Dim oFileList As New List(Of FileInfo) From {pFileInfo}
|
||||
Logger.Info("Loading file [{0}]", pFileInfo.Name)
|
||||
|
||||
Try
|
||||
Return oFileList.
|
||||
Select(AddressOf WrapFileInfo).
|
||||
Select(Function(d) IncludeSchema(d, pSchema)).
|
||||
Select(Function(d) LoadDocumentData(d, pSchema)).
|
||||
Select(Function(d) MatchDataFromWinLine(d, Winline.Mandators, pMandator, pSchema)).
|
||||
Select(Function(d) IncludeSchema(d, pTemplate)).
|
||||
Select(Function(d) LoadDocumentData(d, pTemplate)).
|
||||
Select(Function(d) MatchDataFromWinLine(d, Winline.Mandators, pMandator, pTemplate)).
|
||||
SingleOrDefault()
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
@ -86,8 +86,8 @@ Namespace Documents
|
||||
End Function
|
||||
|
||||
|
||||
Private Function IncludeSchema(pDocument As Document, pSchema As Schema) As Document
|
||||
pDocument.Schema = pSchema
|
||||
Private Function IncludeSchema(pDocument As Document, pTemplate As Template) As Document
|
||||
pDocument.Schema = pTemplate
|
||||
Return pDocument
|
||||
End Function
|
||||
|
||||
@ -105,7 +105,7 @@ Namespace Documents
|
||||
''' </MESOWebService>
|
||||
'''
|
||||
''' </example>
|
||||
Private Function LoadDocumentData(pDocument As Document, pSchema As Schema) As Document
|
||||
Private Function LoadDocumentData(pDocument As Document, pTemplate As Template) As Document
|
||||
Dim oText As String = IO.File.ReadAllText(pDocument.FullName)
|
||||
Dim oDoc = XDocument.Parse(oText)
|
||||
|
||||
@ -150,7 +150,7 @@ Namespace Documents
|
||||
Dim oColumnSortKey = 0
|
||||
Dim oFields As New Dictionary(Of String, DocumentRow.FieldValue)
|
||||
Dim oSubElements = oTopLevelElement.Descendants().ToList()
|
||||
Dim oTable = pSchema.Tables.
|
||||
Dim oTable = pTemplate.Tables.
|
||||
Where(Function(t) t.Name = oTopLevelElement.Name).
|
||||
FirstOrDefault()
|
||||
|
||||
@ -165,7 +165,7 @@ Namespace Documents
|
||||
Dim oValue = oSubElement.Value.Trim()
|
||||
|
||||
' TODO: Needed when we have time for date times
|
||||
'If oSchemaField.DataType = Constants.ColumnType.Date Then
|
||||
'If oTemplateField.DataType = Constants.ColumnType.Date Then
|
||||
' Dim oDate = Date.ParseExact(oValue, "yyyy-MM-dd", CultureInfo.InvariantCulture)
|
||||
' oValue = oDate.ToString("d")
|
||||
'End If
|
||||
@ -193,15 +193,15 @@ Namespace Documents
|
||||
Next
|
||||
|
||||
'For Each oSubElement As XElement In oSubElements
|
||||
' Dim oSchemaField = oTable.Columns.
|
||||
' Dim oTemplateField = oTable.Columns.
|
||||
' Where(Function(c) c.Name = oSubElement.Name).
|
||||
' SingleOrDefault()
|
||||
|
||||
' Dim oRequired = oSchemaField.IsRequired
|
||||
' Dim oRequired = oTemplateField.IsRequired
|
||||
' Dim oValue = oSubElement.Value.Trim()
|
||||
|
||||
' ' TODO: Needed when we have time for date times
|
||||
' 'If oSchemaField.DataType = Constants.ColumnType.Date Then
|
||||
' 'If oTemplateField.DataType = Constants.ColumnType.Date Then
|
||||
' ' Dim oDate = Date.ParseExact(oValue, "yyyy-MM-dd", CultureInfo.InvariantCulture)
|
||||
' ' oValue = oDate.ToString("d")
|
||||
' 'End If
|
||||
@ -209,7 +209,7 @@ Namespace Documents
|
||||
' oFields.Add(oSubElement.Name.ToString, New DocumentRow.FieldValue With {
|
||||
' .Original = oValue,
|
||||
' .Final = oValue,
|
||||
' .DataType = oSchemaField.DataType,
|
||||
' .DataType = oTemplateField.DataType,
|
||||
' .Required = oRequired
|
||||
' })
|
||||
|
||||
@ -255,8 +255,8 @@ Namespace Documents
|
||||
End Function
|
||||
|
||||
|
||||
Private Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Mandator), pMandator As Mandator, pSchema As Schema) As Document
|
||||
Dim oMandators As List(Of Winline.Mandator) = pMandators.
|
||||
Private Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Mandator), pMandator As Mandator, pTemplate As Template) As Document
|
||||
Dim oMandators As List(Of Mandator) = pMandators.
|
||||
Where(Function(m) m.IsWhitelisted = True).
|
||||
OrderBy(Function(m) m.Order).
|
||||
ToList()
|
||||
@ -273,13 +273,13 @@ Namespace Documents
|
||||
Throw New Exceptions.NoMandatorException($"Mandator not found for file [{pDocument.File.Name}]")
|
||||
End If
|
||||
|
||||
pDocument = MatchDocumentData(pDocument, oMandator, pSchema)
|
||||
pDocument = MatchDocumentData(pDocument, oMandator, pTemplate)
|
||||
pDocument.Mandator = oMandator
|
||||
|
||||
Return pDocument
|
||||
End Function
|
||||
|
||||
Private Function MatchDocumentData(pDocument As Document, pMandator As Winline.Mandator, pSchema As Schema) As Document
|
||||
Private Function MatchDocumentData(pDocument As Document, pMandator As Mandator, pTemplate As Template) As Document
|
||||
Dim oYear = Winline.GetWinLineYear()
|
||||
|
||||
If pMandator Is Nothing Then
|
||||
@ -287,7 +287,7 @@ Namespace Documents
|
||||
End If
|
||||
|
||||
For Each oRow As DocumentRow In pDocument.Rows
|
||||
Dim oTable = pSchema.Tables.Where(Function(t) t.Name = oRow.Name).SingleOrDefault()
|
||||
Dim oTable = pTemplate.Tables.Where(Function(t) t.Name = oRow.Name).SingleOrDefault()
|
||||
|
||||
For Each oField In oRow.Fields
|
||||
If oTable Is Nothing Then
|
||||
@ -348,7 +348,7 @@ Namespace Documents
|
||||
Return pDocument
|
||||
End Function
|
||||
|
||||
Private Sub SetAccountByGLN(oRow As DocumentRow, pMandator As Winline.Mandator, pNumberField As String, pNameField As String)
|
||||
Private Sub SetAccountByGLN(oRow As DocumentRow, pMandator As Mandator, pNumberField As String, pNameField As String)
|
||||
' Try to read the Account number (which is a GLN really) and account Name
|
||||
Dim oNumberItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNumberField)
|
||||
Dim oNameItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNameField)
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
Namespace Documents
|
||||
Public Class DocumentMatch
|
||||
Public Shared Property TypeMatchingTable As New Dictionary(Of String, DocumentType) From {
|
||||
{"orders", DocumentType.Order},
|
||||
{"ordrsp", DocumentType.OrderResponse},
|
||||
{"desadv", DocumentType.DispatchNotification},
|
||||
{"invoic", DocumentType.Invoice}
|
||||
}
|
||||
|
||||
Public Shared Property SchemaMatchingTable As New Dictionary(Of DocumentType, Type) From {
|
||||
{DocumentType.Order, GetType(Schemas.OrderSchema)}
|
||||
}
|
||||
|
||||
Public Shared Function GetDocumentTypeFromTemplateName(pTemplateName As String) As DocumentType
|
||||
Return TypeMatchingTable.
|
||||
Where(Function(kv) pTemplateName.Contains(kv.Key)).
|
||||
Select(Function(kv) kv.Value).
|
||||
FirstOrDefault()
|
||||
End Function
|
||||
|
||||
Public Shared Function GetDocumentSchemaFromDocumentType(pDocumentType As DocumentType) As Type
|
||||
Return SchemaMatchingTable.
|
||||
Where(Function(kv) pDocumentType = kv.Key).
|
||||
Select(Function(kv) kv.Value).
|
||||
FirstOrDefault()
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
@ -61,8 +61,8 @@ Public Class Mapper
|
||||
PropertyMap = pPropertyMap
|
||||
End Sub
|
||||
|
||||
Public Function Convert(source As Dictionary(Of String, FieldValue), destination As TDestination, context As ResolutionContext) As TDestination Implements ITypeConverter(Of Dictionary(Of String, FieldValue), TDestination).Convert
|
||||
If source Is Nothing Then
|
||||
Public Function Convert(pSource As Dictionary(Of String, FieldValue), pDestination As TDestination, pContext As ResolutionContext) As TDestination Implements ITypeConverter(Of Dictionary(Of String, FieldValue), TDestination).Convert
|
||||
If pSource Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
@ -83,9 +83,9 @@ Public Class Mapper
|
||||
Dim oSourceSubkey As String = oMatch.Groups("Subkey")?.Value
|
||||
|
||||
' Set property value if property exists in source
|
||||
If source.ContainsKey(oSourceKey) Then
|
||||
If pSource.ContainsKey(oSourceKey) Then
|
||||
' Try to get the value from 'source'
|
||||
Dim oFieldValue As FieldValue = source.Item(oSourceKey)
|
||||
Dim oFieldValue As FieldValue = pSource.Item(oSourceKey)
|
||||
|
||||
' Get the destination property by DestinationKey
|
||||
Dim oProperty = GetType(TDestination).
|
||||
|
||||
@ -99,7 +99,6 @@
|
||||
<Compile Include="Config.vb" />
|
||||
<Compile Include="Constants.vb" />
|
||||
<Compile Include="Documents\Document.vb" />
|
||||
<Compile Include="Documents\DocumentMatch.vb" />
|
||||
<Compile Include="Documents\DocumentRow.vb" />
|
||||
<Compile Include="Documents\DocumentType.vb" />
|
||||
<Compile Include="Documents\DocumentLoader.vb" />
|
||||
@ -124,27 +123,23 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Schemas\BaseSchema.vb" />
|
||||
<Compile Include="Schemas\MappingConfig.vb" />
|
||||
<Compile Include="Schemas\Orders\Helpers.vb" />
|
||||
<Compile Include="Schemas\Orders\Input.vb" />
|
||||
<Compile Include="Schemas\Orders\OrderSchema.vb" />
|
||||
<Compile Include="Schemas\Report\ReportHead.vb" />
|
||||
<Compile Include="Schemas\Report\ReportPosition.vb" />
|
||||
<Compile Include="Schemas\Report\ReportSource.vb" />
|
||||
<Compile Include="Schemas\Response.vb" />
|
||||
<Compile Include="Schemas\Schema.vb" />
|
||||
<Compile Include="Schemas\SchemaLoader.vb" />
|
||||
<Compile Include="Templates\MappingConfig.vb" />
|
||||
<Compile Include="Report\ReportHead.vb" />
|
||||
<Compile Include="Report\ReportPosition.vb" />
|
||||
<Compile Include="Report\ReportSource.vb" />
|
||||
<Compile Include="Winline\Entities\Response.vb" />
|
||||
<Compile Include="Templates\Template.vb" />
|
||||
<Compile Include="Templates\TemplateLoader.vb" />
|
||||
<Compile Include="Serializer.vb" />
|
||||
<Compile Include="Schemas\SchemaConfig.vb" />
|
||||
<Compile Include="Templates\TemplateConfig.vb" />
|
||||
<Compile Include="Winline\Entities\Account.vb" />
|
||||
<Compile Include="Winline\WinlineData.vb" />
|
||||
<Compile Include="Winline\Entities\Article.vb" />
|
||||
<Compile Include="Winline\Entities\Contact.vb" />
|
||||
<Compile Include="Winline\Entities\DocumentKind.vb" />
|
||||
<Compile Include="Winline\Entities\Mandator.vb" />
|
||||
<Compile Include="Schemas\ColumnConfig.vb" />
|
||||
<Compile Include="Winline\WebService.vb" />
|
||||
<Compile Include="Templates\ColumnConfig.vb" />
|
||||
<Compile Include="Winline\WebServiceData.vb" />
|
||||
<Compile Include="XmlData.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
23
MultiTool.Shared/Report/ReportHead.vb
Normal file
23
MultiTool.Shared/Report/ReportHead.vb
Normal file
@ -0,0 +1,23 @@
|
||||
Namespace Report
|
||||
Public Class ReportHead
|
||||
Public Property Title As String
|
||||
Public Property Subtitle As String
|
||||
Public Property Filename As String
|
||||
|
||||
Public Property DateCreated As Date
|
||||
Public Property Id As String
|
||||
|
||||
Public Property Text1 As String
|
||||
Public Property Text2 As String
|
||||
Public Property Text3 As String
|
||||
Public Property Text4 As String
|
||||
Public Property Text5 As String
|
||||
Public Property Text6 As String
|
||||
Public Property Text7 As String
|
||||
Public Property Text8 As String
|
||||
Public Property Text9 As String
|
||||
Public Property Text10 As String
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
27
MultiTool.Shared/Report/ReportPosition.vb
Normal file
27
MultiTool.Shared/Report/ReportPosition.vb
Normal file
@ -0,0 +1,27 @@
|
||||
Namespace Report
|
||||
Public Class ReportPosition
|
||||
Public Property Id As String
|
||||
|
||||
Public Property Text1 As String
|
||||
Public Property Text2 As String
|
||||
Public Property Text3 As String
|
||||
Public Property Text4 As String
|
||||
Public Property Text5 As String
|
||||
Public Property Text6 As String
|
||||
Public Property Text7 As String
|
||||
Public Property Text8 As String
|
||||
Public Property Text9 As String
|
||||
Public Property Text10 As String
|
||||
Public Property Text11 As String
|
||||
Public Property Text12 As String
|
||||
Public Property Text13 As String
|
||||
Public Property Text14 As String
|
||||
Public Property Text15 As String
|
||||
Public Property Text16 As String
|
||||
Public Property Text17 As String
|
||||
Public Property Text18 As String
|
||||
Public Property Text19 As String
|
||||
Public Property Text20 As String
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
18
MultiTool.Shared/Report/ReportSource.vb
Normal file
18
MultiTool.Shared/Report/ReportSource.vb
Normal file
@ -0,0 +1,18 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.DataAccess.ObjectBinding
|
||||
|
||||
Namespace Report
|
||||
<HighlightedClass, DisplayName("ReportSource")>
|
||||
Public Class ReportSource
|
||||
<HighlightedMember>
|
||||
Public Property Head As ReportHead
|
||||
<HighlightedMember>
|
||||
Public Property Positions As IEnumerable(Of ReportPosition)
|
||||
<HighlightedMember>
|
||||
Public Iterator Function GetPositionList() As IEnumerable(Of ReportPosition)
|
||||
For Each oPosition In Positions
|
||||
Yield oPosition
|
||||
Next
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
@ -1,8 +0,0 @@
|
||||
Namespace Schemas
|
||||
Public Class BaseSchema
|
||||
Public Property Template As String
|
||||
Public Property TemplateType As Integer
|
||||
Public Property [Option] As Integer
|
||||
Public Property PrintVoucher As Integer
|
||||
End Class
|
||||
End Namespace
|
||||
@ -1,28 +0,0 @@
|
||||
Namespace Schemas.Orders
|
||||
'Public Class Helpers
|
||||
' Public Shared Function GetOrderHead(Of T)(pData As IMesoWebservice) As T
|
||||
' Dim oHead As T = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is T).
|
||||
' FirstOrDefault()
|
||||
' Return oHead
|
||||
' End Function
|
||||
|
||||
' Public Shared Sub SetOrderHead(Of T)(pData As IMesoWebservice, pUpdateFunction As Action(Of T))
|
||||
' Dim oHead As T = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is T).
|
||||
' SetValue(Sub(pObject As T)
|
||||
' pUpdateFunction(pObject)
|
||||
' End Sub).
|
||||
' FirstOrDefault()
|
||||
|
||||
' End Sub
|
||||
|
||||
' Public Shared Function GetOrderPositions(Of T)(pData As IMesoWebservice) As List(Of T)
|
||||
' Dim oPositions As List(Of T) = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is T).
|
||||
' Select(Of T)(Function(i) i).
|
||||
' ToList()
|
||||
' Return oPositions
|
||||
' End Function
|
||||
'End Class
|
||||
End Namespace
|
||||
@ -1,713 +0,0 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
'
|
||||
'This source code was auto-generated by xsd, Version=4.8.3928.0.
|
||||
'
|
||||
Namespace Schemas.Orders.Input
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"),
|
||||
System.SerializableAttribute(),
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(),
|
||||
System.ComponentModel.DesignerCategoryAttribute("code"),
|
||||
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True),
|
||||
System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=False)>
|
||||
Partial Public Class MESOWebService
|
||||
|
||||
Private itemsField() As Object
|
||||
|
||||
Private templateTypeField As String
|
||||
|
||||
Private templateField As String
|
||||
|
||||
Private optionField As String
|
||||
|
||||
Private amountField As String
|
||||
|
||||
Private extEntryField As String
|
||||
|
||||
Private printVoucherField As String
|
||||
|
||||
Private extInsertField As String
|
||||
|
||||
Private changeLotSizeField As String
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute("EXIM-VRG_ordersT025", GetType(MESOWebServiceEXIMVRG_ordersT025), Form:=System.Xml.Schema.XmlSchemaForm.Unqualified),
|
||||
System.Xml.Serialization.XmlElementAttribute("EXIM-VRG_ordersT026", GetType(MESOWebServiceEXIMVRG_ordersT026), Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
||||
Public Property Items() As Object()
|
||||
Get
|
||||
Return Me.itemsField
|
||||
End Get
|
||||
Set
|
||||
Me.itemsField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute(DataType:="string")>
|
||||
Public Property TemplateType() As String
|
||||
Get
|
||||
Return Me.templateTypeField
|
||||
End Get
|
||||
Set
|
||||
Me.templateTypeField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute()>
|
||||
Public Property Template() As String
|
||||
Get
|
||||
Return Me.templateField
|
||||
End Get
|
||||
Set
|
||||
Me.templateField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute(DataType:="string")>
|
||||
Public Property [option]() As String
|
||||
Get
|
||||
Return Me.optionField
|
||||
End Get
|
||||
Set
|
||||
Me.optionField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute(DataType:="string")>
|
||||
Public Property amount() As String
|
||||
Get
|
||||
Return Me.amountField
|
||||
End Get
|
||||
Set
|
||||
Me.amountField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute(DataType:="string")>
|
||||
Public Property extEntry() As String
|
||||
Get
|
||||
Return Me.extEntryField
|
||||
End Get
|
||||
Set
|
||||
Me.extEntryField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute(DataType:="string")>
|
||||
Public Property printVoucher() As String
|
||||
Get
|
||||
Return Me.printVoucherField
|
||||
End Get
|
||||
Set
|
||||
Me.printVoucherField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute(DataType:="string")>
|
||||
Public Property extInsert() As String
|
||||
Get
|
||||
Return Me.extInsertField
|
||||
End Get
|
||||
Set
|
||||
Me.extInsertField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlAttributeAttribute(DataType:="string")>
|
||||
Public Property ChangeLotSize() As String
|
||||
Get
|
||||
Return Me.changeLotSizeField
|
||||
End Get
|
||||
Set
|
||||
Me.changeLotSizeField = Value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _
|
||||
System.SerializableAttribute(), _
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)> _
|
||||
Partial Public Class MESOWebServiceEXIMVRG_ordersT025
|
||||
|
||||
Private bELEGKEYField As String
|
||||
|
||||
Private fakt_KontonummerField As String
|
||||
|
||||
Private laufnummerField As String
|
||||
|
||||
Private fakt_NameField As String
|
||||
|
||||
Private fakt_StrasseField As String
|
||||
|
||||
Private fakt_PLZField As String
|
||||
|
||||
Private fakt_OrtField As String
|
||||
|
||||
Private fakt_AnsprechpartnerField As String
|
||||
|
||||
Private lief_KontonummerField As String
|
||||
|
||||
Private lief_NameField As String
|
||||
|
||||
Private lief_StrasseField As String
|
||||
|
||||
Private lief_PLZField As String
|
||||
|
||||
Private lief_OrtField As String
|
||||
|
||||
Private belegartField As String
|
||||
|
||||
Private datum_AuftragBestellungField As String
|
||||
|
||||
Private datum_AuftragBestellungFieldSpecified As Boolean
|
||||
|
||||
Private auftragsBestellnummerField As String
|
||||
|
||||
Private leistungsdatumField As String
|
||||
|
||||
Private leistungsdatumFieldSpecified As Boolean
|
||||
|
||||
Private auftragsreferenzField As String
|
||||
|
||||
Private infotextField As String
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="string")> _
|
||||
Public Property BELEGKEY() As String
|
||||
Get
|
||||
Return Me.bELEGKEYField
|
||||
End Get
|
||||
Set
|
||||
Me.bELEGKEYField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Fakt_Kontonummer() As String
|
||||
Get
|
||||
Return Me.fakt_KontonummerField
|
||||
End Get
|
||||
Set
|
||||
Me.fakt_KontonummerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Laufnummer() As String
|
||||
Get
|
||||
Return Me.laufnummerField
|
||||
End Get
|
||||
Set
|
||||
Me.laufnummerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Fakt_Name() As String
|
||||
Get
|
||||
Return Me.fakt_NameField
|
||||
End Get
|
||||
Set
|
||||
Me.fakt_NameField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Fakt_Strasse() As String
|
||||
Get
|
||||
Return Me.fakt_StrasseField
|
||||
End Get
|
||||
Set
|
||||
Me.fakt_StrasseField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Fakt_PLZ() As String
|
||||
Get
|
||||
Return Me.fakt_PLZField
|
||||
End Get
|
||||
Set
|
||||
Me.fakt_PLZField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Fakt_Ort() As String
|
||||
Get
|
||||
Return Me.fakt_OrtField
|
||||
End Get
|
||||
Set
|
||||
Me.fakt_OrtField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Fakt_Ansprechpartner() As String
|
||||
Get
|
||||
Return Me.fakt_AnsprechpartnerField
|
||||
End Get
|
||||
Set
|
||||
Me.fakt_AnsprechpartnerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Lief_Kontonummer() As String
|
||||
Get
|
||||
Return Me.lief_KontonummerField
|
||||
End Get
|
||||
Set
|
||||
Me.lief_KontonummerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Lief_Name() As String
|
||||
Get
|
||||
Return Me.lief_NameField
|
||||
End Get
|
||||
Set
|
||||
Me.lief_NameField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Lief_Strasse() As String
|
||||
Get
|
||||
Return Me.lief_StrasseField
|
||||
End Get
|
||||
Set
|
||||
Me.lief_StrasseField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Lief_PLZ() As String
|
||||
Get
|
||||
Return Me.lief_PLZField
|
||||
End Get
|
||||
Set
|
||||
Me.lief_PLZField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Lief_Ort() As String
|
||||
Get
|
||||
Return Me.lief_OrtField
|
||||
End Get
|
||||
Set
|
||||
Me.lief_OrtField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Belegart() As String
|
||||
Get
|
||||
Return Me.belegartField
|
||||
End Get
|
||||
Set
|
||||
Me.belegartField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute("Datum_Auftrag-Bestellung", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="string")> _
|
||||
Public Property Datum_AuftragBestellung() As String
|
||||
Get
|
||||
Return Me.datum_AuftragBestellungField
|
||||
End Get
|
||||
Set
|
||||
Me.datum_AuftragBestellungField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property Datum_AuftragBestellungSpecified() As Boolean
|
||||
Get
|
||||
Return Me.datum_AuftragBestellungFieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.datum_AuftragBestellungFieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute("Auftrags-Bestellnummer", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property AuftragsBestellnummer() As String
|
||||
Get
|
||||
Return Me.auftragsBestellnummerField
|
||||
End Get
|
||||
Set
|
||||
Me.auftragsBestellnummerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="string")> _
|
||||
Public Property Leistungsdatum() As String
|
||||
Get
|
||||
Return Me.leistungsdatumField
|
||||
End Get
|
||||
Set
|
||||
Me.leistungsdatumField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property LeistungsdatumSpecified() As Boolean
|
||||
Get
|
||||
Return Me.leistungsdatumFieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.leistungsdatumFieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Auftragsreferenz() As String
|
||||
Get
|
||||
Return Me.auftragsreferenzField
|
||||
End Get
|
||||
Set
|
||||
Me.auftragsreferenzField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Infotext() As String
|
||||
Get
|
||||
Return Me.infotextField
|
||||
End Get
|
||||
Set
|
||||
Me.infotextField = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _
|
||||
System.SerializableAttribute(), _
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true)> _
|
||||
Partial Public Class MESOWebServiceEXIMVRG_ordersT026
|
||||
|
||||
Private bELEGKEYField As String
|
||||
|
||||
Private zeilennummerField As String
|
||||
|
||||
Private datentypField As String
|
||||
|
||||
Private artikelnummerField As String
|
||||
|
||||
Private bezeichnungField As String
|
||||
|
||||
Private notizblockField As String
|
||||
|
||||
Private lieferantenartikelnummerField As String
|
||||
|
||||
Private menge_bestelltField As String
|
||||
|
||||
Private menge_bestelltFieldSpecified As Boolean
|
||||
|
||||
Private menge_geliefertField As String
|
||||
|
||||
Private colliField As String
|
||||
|
||||
Private einzelpreisField As String
|
||||
|
||||
Private einzelpreisFieldSpecified As Boolean
|
||||
|
||||
Private zeilenrabatt1Field As String
|
||||
|
||||
Private zeilenrabatt1FieldSpecified As Boolean
|
||||
|
||||
Private zeilenrabatt2Field As String
|
||||
|
||||
Private zeilenrabatt2FieldSpecified As Boolean
|
||||
|
||||
Private zeilenrabatt3Field As String
|
||||
|
||||
Private zeilenrabatt3FieldSpecified As Boolean
|
||||
|
||||
Private zeilenrabatt4Field As String
|
||||
|
||||
Private zeilenrabatt4FieldSpecified As Boolean
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="string")> _
|
||||
Public Property BELEGKEY() As String
|
||||
Get
|
||||
Return Me.bELEGKEYField
|
||||
End Get
|
||||
Set
|
||||
Me.bELEGKEYField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="string")> _
|
||||
Public Property Zeilennummer() As String
|
||||
Get
|
||||
Return Me.zeilennummerField
|
||||
End Get
|
||||
Set
|
||||
Me.zeilennummerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Datentyp() As String
|
||||
Get
|
||||
Return Me.datentypField
|
||||
End Get
|
||||
Set
|
||||
Me.datentypField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Artikelnummer() As String
|
||||
Get
|
||||
Return Me.artikelnummerField
|
||||
End Get
|
||||
Set
|
||||
Me.artikelnummerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Bezeichnung() As String
|
||||
Get
|
||||
Return Me.bezeichnungField
|
||||
End Get
|
||||
Set
|
||||
Me.bezeichnungField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Notizblock() As String
|
||||
Get
|
||||
Return Me.notizblockField
|
||||
End Get
|
||||
Set
|
||||
Me.notizblockField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Lieferantenartikelnummer() As String
|
||||
Get
|
||||
Return Me.lieferantenartikelnummerField
|
||||
End Get
|
||||
Set
|
||||
Me.lieferantenartikelnummerField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Menge_bestellt() As String
|
||||
Get
|
||||
Return Me.menge_bestelltField
|
||||
End Get
|
||||
Set
|
||||
Me.menge_bestelltField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property Menge_bestelltSpecified() As Boolean
|
||||
Get
|
||||
Return Me.menge_bestelltFieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.menge_bestelltFieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Menge_geliefert() As String
|
||||
Get
|
||||
Return Me.menge_geliefertField
|
||||
End Get
|
||||
Set
|
||||
Me.menge_geliefertField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Colli() As String
|
||||
Get
|
||||
Return Me.colliField
|
||||
End Get
|
||||
Set
|
||||
Me.colliField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Einzelpreis() As String
|
||||
Get
|
||||
Return Me.einzelpreisField
|
||||
End Get
|
||||
Set
|
||||
Me.einzelpreisField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property EinzelpreisSpecified() As Boolean
|
||||
Get
|
||||
Return Me.einzelpreisFieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.einzelpreisFieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Zeilenrabatt1() As String
|
||||
Get
|
||||
Return Me.zeilenrabatt1Field
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt1Field = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property Zeilenrabatt1Specified() As Boolean
|
||||
Get
|
||||
Return Me.zeilenrabatt1FieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt1FieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Zeilenrabatt2() As String
|
||||
Get
|
||||
Return Me.zeilenrabatt2Field
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt2Field = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property Zeilenrabatt2Specified() As Boolean
|
||||
Get
|
||||
Return Me.zeilenrabatt2FieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt2FieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Zeilenrabatt3() As String
|
||||
Get
|
||||
Return Me.zeilenrabatt3Field
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt3Field = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property Zeilenrabatt3Specified() As Boolean
|
||||
Get
|
||||
Return Me.zeilenrabatt3FieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt3FieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
|
||||
Public Property Zeilenrabatt4() As String
|
||||
Get
|
||||
Return Me.zeilenrabatt4Field
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt4Field = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<System.Xml.Serialization.XmlIgnoreAttribute()> _
|
||||
Public Property Zeilenrabatt4Specified() As Boolean
|
||||
Get
|
||||
Return Me.zeilenrabatt4FieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.zeilenrabatt4FieldSpecified = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
|
||||
Namespace Schemas
|
||||
|
||||
''' <summary>
|
||||
''' XML Schema to import the Data-Files
|
||||
''' </summary>
|
||||
Public Class OrderSchema
|
||||
Inherits BaseSchema
|
||||
|
||||
<Description("EXIM-VRG_ordersT025")>
|
||||
Public Property Head As New OrderHead
|
||||
|
||||
<Description("EXIM-VRG_ordersT026")>
|
||||
Public Property Positions As New List(Of OrderPosition)
|
||||
|
||||
|
||||
Public Class OrderHead
|
||||
<Description("BELEGKEY")>
|
||||
Public Property DocumentKey As String
|
||||
<Description("Fakt_Kontonummer")>
|
||||
Public Property AccountNumber As String
|
||||
<Description("Laufnummer")>
|
||||
Public Property RunningNumber As String
|
||||
<Description("Bestellt_von")>
|
||||
Public Property OrderedBy As String
|
||||
<Description("Lief_Kontonummer")>
|
||||
Public Property AccountNumber2 As String
|
||||
<Description("Belegart")>
|
||||
Public Property DocumentType As Integer
|
||||
<Description("Datum_Auftrag-Bestellung")>
|
||||
Public Property OrderDate As Date
|
||||
<Description("Auftrags-Bestellnummer")>
|
||||
Public Property OrderNumber As String
|
||||
<Description("Infotext")>
|
||||
Public Property InfoText As String
|
||||
End Class
|
||||
|
||||
|
||||
Public Class OrderPosition
|
||||
<Description("BELEGKEY")>
|
||||
Public Property DocumentKey As String
|
||||
<Description("Zeilennummer")>
|
||||
Public Property LineNumber As String
|
||||
<Description("Artikelnummer")>
|
||||
Public Property ArticleNumber As String
|
||||
<Description("Bezeichnung")>
|
||||
Public Property ArticleDescription As String
|
||||
<Description("Lieferantenartikelnummer")>
|
||||
Public Property VendorNumber As String
|
||||
End Class
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
@ -1,19 +0,0 @@
|
||||
Public Class ReportHead
|
||||
Public Property Title As String
|
||||
Public Property Subtitle As String
|
||||
Public Property Filename As String
|
||||
|
||||
Public Property DateCreated As Date
|
||||
Public Property Id As String
|
||||
|
||||
Public Property Text1 As String
|
||||
Public Property Text2 As String
|
||||
Public Property Text3 As String
|
||||
Public Property Text4 As String
|
||||
Public Property Text5 As String
|
||||
Public Property Text6 As String
|
||||
Public Property Text7 As String
|
||||
Public Property Text8 As String
|
||||
Public Property Text9 As String
|
||||
Public Property Text10 As String
|
||||
End Class
|
||||
@ -1,24 +0,0 @@
|
||||
Public Class ReportPosition
|
||||
Public Property Id As String
|
||||
|
||||
Public Property Text1 As String
|
||||
Public Property Text2 As String
|
||||
Public Property Text3 As String
|
||||
Public Property Text4 As String
|
||||
Public Property Text5 As String
|
||||
Public Property Text6 As String
|
||||
Public Property Text7 As String
|
||||
Public Property Text8 As String
|
||||
Public Property Text9 As String
|
||||
Public Property Text10 As String
|
||||
Public Property Text11 As String
|
||||
Public Property Text12 As String
|
||||
Public Property Text13 As String
|
||||
Public Property Text14 As String
|
||||
Public Property Text15 As String
|
||||
Public Property Text16 As String
|
||||
Public Property Text17 As String
|
||||
Public Property Text18 As String
|
||||
Public Property Text19 As String
|
||||
Public Property Text20 As String
|
||||
End Class
|
||||
@ -1,16 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.DataAccess.ObjectBinding
|
||||
|
||||
<HighlightedClass, DisplayName("ReportSource")>
|
||||
Public Class ReportSource
|
||||
<HighlightedMember>
|
||||
Public Property Head As ReportHead
|
||||
<HighlightedMember>
|
||||
Public Property Positions As IEnumerable(Of ReportPosition)
|
||||
<HighlightedMember>
|
||||
Public Iterator Function GetPositionList() As IEnumerable(Of ReportPosition)
|
||||
For Each oPosition In Positions
|
||||
Yield oPosition
|
||||
Next
|
||||
End Function
|
||||
End Class
|
||||
@ -1,6 +1,6 @@
|
||||
Imports MultiTool.Shared.Constants
|
||||
|
||||
Namespace Schemas
|
||||
Namespace Templates
|
||||
Public Class ColumnConfig
|
||||
Public Property Name As String
|
||||
Public Property Table As String
|
||||
@ -1,4 +1,4 @@
|
||||
Namespace Schemas
|
||||
Namespace Templates
|
||||
Public Class MappingConfig
|
||||
Public Property OrderKey As Integer
|
||||
Public Property SourceName As String
|
||||
@ -1,8 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports MultiTool.Shared.Winline
|
||||
|
||||
Namespace Schemas
|
||||
Public Class Schema
|
||||
Namespace Templates
|
||||
Public Class Template
|
||||
Public Property Name As String
|
||||
Public Property FileName As String
|
||||
Public Property Description As String
|
||||
@ -1,11 +1,11 @@
|
||||
|
||||
Imports MultiTool.Shared.Winline
|
||||
|
||||
Namespace Schemas
|
||||
Namespace Templates
|
||||
''' <summary>
|
||||
''' Class for loading column/field config from database
|
||||
''' </summary>
|
||||
Public Class SchemaConfig
|
||||
Public Class TemplateConfig
|
||||
Public Columns As List(Of ColumnConfig)
|
||||
|
||||
Public Function GetColumn(pName As String) As ColumnConfig
|
||||
@ -4,14 +4,14 @@ Imports DigitalData.Modules.Logging
|
||||
Imports MultiTool.Shared.Winline
|
||||
Imports MultiTool.Shared.Helpers
|
||||
|
||||
Namespace Schemas
|
||||
Public Class SchemaLoader
|
||||
Namespace Templates
|
||||
Public Class TemplateLoader
|
||||
Inherits BaseClass
|
||||
|
||||
Private ReadOnly ns As XNamespace = "http://www.w3.org/2001/XMLSchema"
|
||||
|
||||
Public Property SchemaList As List(Of Schema)
|
||||
Public Property TemplateConfiguration As New SchemaConfig
|
||||
Public Property TemplateList As List(Of Template)
|
||||
Public Property TemplateConfiguration As New TemplateConfig
|
||||
Public Property MappingConfiguration As New List(Of MappingConfig)
|
||||
|
||||
Private ReadOnly Database As MSSQLServer
|
||||
@ -28,10 +28,10 @@ Namespace Schemas
|
||||
Try
|
||||
Dim oSql = $"SELECT * FROM [DD_ECM].[dbo].[TBEDI_XML_TEMPLATES]"
|
||||
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSql)
|
||||
Dim oTemplates As New List(Of Schema)
|
||||
Dim oTemplates As New List(Of Template)
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oTemplate As New Schema With {
|
||||
Dim oTemplate As New Template With {
|
||||
.Name = GetRowItem(oRow, "NAME", String.Empty),
|
||||
.Description = GetRowItem(oRow, "DESCRIPTION", String.Empty),
|
||||
.FileName = GetRowItem(oRow, "FILE_NAME", String.Empty),
|
||||
@ -41,7 +41,7 @@ Namespace Schemas
|
||||
oTemplates.Add(oTemplate)
|
||||
Next
|
||||
|
||||
SchemaList = oTemplates
|
||||
TemplateList = oTemplates
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
@ -108,7 +108,7 @@ Namespace Schemas
|
||||
oItems.Add(oColumn)
|
||||
Next
|
||||
|
||||
TemplateConfiguration = New SchemaConfig With {
|
||||
TemplateConfiguration = New TemplateConfig With {
|
||||
.Columns = oItems
|
||||
}
|
||||
|
||||
@ -121,18 +121,18 @@ Namespace Schemas
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function UpdateSchemaFromFile(pSchema As Schema, pInputDirectory As String) As Schema
|
||||
Dim oFullPath = Path.Combine(pInputDirectory, pSchema.FileName)
|
||||
Public Function UpdateTemplateFromFile(pTemplate As Template, pInputDirectory As String) As Template
|
||||
Dim oFullPath = Path.Combine(pInputDirectory, pTemplate.FileName)
|
||||
|
||||
If Not IO.File.Exists(oFullPath) Then
|
||||
Throw New FileNotFoundException(oFullPath)
|
||||
End If
|
||||
|
||||
Dim oElements = GetSchemaElements(oFullPath)
|
||||
Dim oElements = GetTemplateElements(oFullPath)
|
||||
|
||||
For Each oElement In oElements
|
||||
Dim oColumns = GetElementColumns(oElement)
|
||||
Dim oSchemaColumns As New List(Of Schema.Column)
|
||||
Dim oTemplateColumns As New List(Of Template.Column)
|
||||
|
||||
For Each oColumn As XElement In oColumns
|
||||
Dim oName = XmlData.GetElementAttribute(oColumn, "name")
|
||||
@ -145,31 +145,31 @@ Namespace Schemas
|
||||
oRequired = True
|
||||
End If
|
||||
|
||||
Dim oSchemaColumn As New Schema.Column With {
|
||||
Dim oTemplateColumn As New Template.Column With {
|
||||
.Name = oName,
|
||||
.DataType = oType,
|
||||
.IsRequired = oRequired
|
||||
}
|
||||
oSchemaColumns.Add(oSchemaColumn)
|
||||
oTemplateColumns.Add(oTemplateColumn)
|
||||
Next
|
||||
|
||||
pSchema.Tables.Add(New Schema.Table With {
|
||||
pTemplate.Tables.Add(New Template.Table With {
|
||||
.Name = XmlData.GetElementAttribute(oElement, "name"),
|
||||
.Columns = oSchemaColumns
|
||||
.Columns = oTemplateColumns
|
||||
})
|
||||
|
||||
Next
|
||||
|
||||
Return pSchema
|
||||
Return pTemplate
|
||||
End Function
|
||||
|
||||
Public Function UpdateSchemaFromDatabase(pSchema As Schema, pTemplateConfig As SchemaConfig) As Schema
|
||||
Public Function UpdateTemplateFromDatabase(pTemplate As Template, pTemplateConfig As TemplateConfig) As Template
|
||||
If pTemplateConfig Is Nothing Then
|
||||
Return pSchema
|
||||
Return pTemplate
|
||||
End If
|
||||
|
||||
For Each oTable In pSchema.Tables
|
||||
For Each oColumn As Schema.Column In oTable.Columns
|
||||
For Each oTable In pTemplate.Tables
|
||||
For Each oColumn As Template.Column In oTable.Columns
|
||||
Dim oConfig = pTemplateConfig.GetColumn(oColumn.Name)
|
||||
|
||||
If oConfig Is Nothing Then
|
||||
@ -183,7 +183,7 @@ Namespace Schemas
|
||||
Next
|
||||
Next
|
||||
|
||||
Return pSchema
|
||||
Return pTemplate
|
||||
End Function
|
||||
|
||||
Public Function GetElementType(pElement As XElement) As Constants.ColumnType
|
||||
@ -198,21 +198,21 @@ Namespace Schemas
|
||||
End If
|
||||
|
||||
Select Case oTypeString
|
||||
Case Constants.SCHEMA_TYPE_DATE
|
||||
Case Constants.TEMPLATE_TYPE_DATE
|
||||
Return Constants.ColumnType.Date
|
||||
Case Constants.SCHEMA_TYPE_INTEGER
|
||||
Case Constants.TEMPLATE_TYPE_INTEGER
|
||||
Return Constants.ColumnType.Integer
|
||||
Case Constants.SCHEMA_TYPE_DECIMAL
|
||||
Case Constants.TEMPLATE_TYPE_DECIMAL
|
||||
Return Constants.ColumnType.Decimal
|
||||
Case Constants.SCHEMA_TYPE_BOOLEAN
|
||||
Case Constants.TEMPLATE_TYPE_BOOLEAN
|
||||
Return Constants.ColumnType.Boolean
|
||||
Case Else
|
||||
Return Constants.ColumnType.String
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Public Function GetSchemaElements(pSchemaFilePath As String) As List(Of XElement)
|
||||
Dim oText As String = IO.File.ReadAllText(pSchemaFilePath)
|
||||
Public Function GetTemplateElements(pTemplateFilePath As String) As List(Of XElement)
|
||||
Dim oText As String = IO.File.ReadAllText(pTemplateFilePath)
|
||||
Dim oDoc = XDocument.Parse(oText)
|
||||
|
||||
Return XmlData.GetElementsFromElement(oDoc, "choice", ns)
|
||||
@ -1,4 +1,4 @@
|
||||
Namespace Winline
|
||||
Namespace Winline.Entities
|
||||
Public Class Account
|
||||
Public Property Id As String
|
||||
Public Property Name As String
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Namespace Winline
|
||||
Namespace Winline.Entities
|
||||
Public Class Article
|
||||
Public Property Id
|
||||
Public Property Name
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Namespace Winline
|
||||
Namespace Winline.Entities
|
||||
Public Class Contact
|
||||
Public Property Id As Integer
|
||||
Public Property Number As String
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Namespace Winline
|
||||
Namespace Winline.Entities
|
||||
Public Class DocumentKind
|
||||
Public Property Id As Integer
|
||||
Public Property Name As String
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Namespace Winline
|
||||
Namespace Winline.Entities
|
||||
Public Class Mandator
|
||||
Public Property Id As String
|
||||
Public Property Name As String
|
||||
|
||||
@ -11,20 +11,18 @@
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
'
|
||||
'This source code was auto-generated by xsd, Version=4.8.3928.0.
|
||||
'
|
||||
Namespace Schemas
|
||||
|
||||
Namespace Templates.Entities
|
||||
|
||||
'''<remarks/>
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"), _
|
||||
System.SerializableAttribute(), _
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||
System.ComponentModel.DesignerCategoryAttribute("code"), _
|
||||
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=true), _
|
||||
System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=false)> _
|
||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0"),
|
||||
System.SerializableAttribute(),
|
||||
System.Diagnostics.DebuggerStepThroughAttribute(),
|
||||
System.ComponentModel.DesignerCategoryAttribute("code"),
|
||||
System.Xml.Serialization.XmlTypeAttribute(AnonymousType:=True),
|
||||
System.Xml.Serialization.XmlRootAttribute([Namespace]:="", IsNullable:=False)>
|
||||
Partial Public Class MESOWebServiceResult
|
||||
|
||||
Private overallSuccessField As Boolean
|
||||
@ -90,7 +88,7 @@ Namespace Schemas
|
||||
Return Me.errorCodeField
|
||||
End Get
|
||||
Set
|
||||
Me.errorCodeField = value
|
||||
Me.errorCodeField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@ -101,7 +99,7 @@ Namespace Schemas
|
||||
Return Me.errorTextField
|
||||
End Get
|
||||
Set
|
||||
Me.errorTextField = value
|
||||
Me.errorTextField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
Imports System.Text
|
||||
Imports System.Net.Http
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Filesystem
|
||||
Imports MultiTool.Shared.Documents
|
||||
Imports MultiTool.Shared.Winline.Entities
|
||||
|
||||
Namespace Winline
|
||||
Public Class WebService
|
||||
Public Class WebServiceData
|
||||
Inherits BaseClass
|
||||
|
||||
Private ReadOnly Config As Config
|
||||
@ -105,7 +105,7 @@ Namespace Winline
|
||||
pResponse.EnsureSuccessStatusCode()
|
||||
Dim oResponseBody As String = Await pResponse.Content.ReadAsStringAsync()
|
||||
Dim oContentType = pResponse.Content.Headers.ContentType.MediaType
|
||||
Dim oSerializer = Serializer.GetSerializer(GetType(Schemas.MESOWebServiceResult))
|
||||
Dim oSerializer = Serializer.GetSerializer(GetType(Templates.Entities.MESOWebServiceResult))
|
||||
|
||||
RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten")
|
||||
|
||||
@ -115,10 +115,10 @@ Namespace Winline
|
||||
|
||||
Dim oBytes As Byte() = Encoding.UTF8.GetBytes(oResponseBody)
|
||||
Using oStream As New IO.MemoryStream(oBytes)
|
||||
Dim oResponseObject As Schemas.MESOWebServiceResult = oSerializer.Deserialize(oStream)
|
||||
Dim oResponseObject As Templates.Entities.MESOWebServiceResult = oSerializer.Deserialize(oStream)
|
||||
Dim oErrorStrings As New List(Of String)
|
||||
|
||||
For Each oDetails As Schemas.MESOWebServiceResultResultDetails In oResponseObject.ResultDetails
|
||||
For Each oDetails As Templates.Entities.MESOWebServiceResultResultDetails In oResponseObject.ResultDetails
|
||||
|
||||
If oDetails.Success = True Then
|
||||
Logger.Info("KeyValue: [{0}]", oDetails.KeyValue)
|
||||
@ -205,36 +205,6 @@ Namespace Winline
|
||||
End Using
|
||||
End Function
|
||||
|
||||
'Private Function TransformOrderToOutput(pData As Schemas.Orders.Input.MESOWebService) As Schemas.Orders.Output.MESOWebService
|
||||
' Dim oData As Schemas.Orders.Input.MESOWebService = pData
|
||||
' Dim oResult As Schemas.Orders.Output.MESOWebService = Mapper.Map(Of Schemas.Orders.Output.MESOWebService)(oData)
|
||||
|
||||
' Dim oItems = oData.Items.
|
||||
' Select(Function(i)
|
||||
' If TypeOf i Is Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT025 Then
|
||||
' Return Mapper.Map(Of Schemas.Orders.Output.MESOWebServiceEXIMVRG_ordersT025)(i)
|
||||
' Else
|
||||
' Return Mapper.Map(Of Schemas.Orders.Output.MESOWebServiceEXIMVRG_ordersT026)(i)
|
||||
' End If
|
||||
' End Function).
|
||||
' ToList()
|
||||
|
||||
' oResult.Items = oItems.ToArray()
|
||||
' Return oResult
|
||||
'End Function
|
||||
|
||||
'Private Function SerializeOrder(pData As Schemas.Orders.Output.MESOWebService, pFileName As String) As String
|
||||
' Dim oSerializer = Serializer.GetSerializer(GetType(Schemas.Orders.Output.MESOWebService))
|
||||
' Dim oPath As String = GetBaseWebServicePath()
|
||||
' Dim oFilePath As String = IO.Path.Combine(oPath, pFileName)
|
||||
|
||||
' Using oWriter = XmlWriter.Create(oFilePath, New XmlWriterSettings With {.Indent = True})
|
||||
' oSerializer.Serialize(oWriter, pData)
|
||||
' End Using
|
||||
|
||||
' Return oFilePath
|
||||
'End Function
|
||||
|
||||
Private Function GetBaseWebServicePath() As String
|
||||
Return IO.Path.Combine(AppDataPath, "WebService")
|
||||
End Function
|
||||
@ -1,8 +1,7 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports MultiTool.Shared.Helpers
|
||||
Imports MultiTool.Shared.Schemas
|
||||
Imports MultiTool.Shared.Winline.Entities
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Namespace Winline
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user