diff --git a/EDIDocumentImport/Config.vb b/EDIDocumentImport/Config.vb
index 066c7e0..22e5c0a 100644
--- a/EDIDocumentImport/Config.vb
+++ b/EDIDocumentImport/Config.vb
@@ -1,10 +1,13 @@
Public Class Config
Public Property ConnectionString As String = ""
+ Public Property Mandators As New List(Of String)
Public Property InputDirectory As String = ""
Public Property OutputDirectory As String = ""
Public Property Webservice As New WebServiceConfig()
Public Class WebServiceConfig
- Public Property BaseUrl As String
+ Public Property BaseUrl As String = "http://127.0.0.1/EWL"
+ Public Property Username As String = "Username"
+ Public Property Password As String = "Password"
End Class
End Class
diff --git a/EDIDocumentImport/DocumentInfo.vb b/EDIDocumentImport/DocumentInfo.vb
index 8cf71fd..6711a64 100644
--- a/EDIDocumentImport/DocumentInfo.vb
+++ b/EDIDocumentImport/DocumentInfo.vb
@@ -1,4 +1,26 @@
-Public Class DocumentInfo
+Imports System.IO
+
+Public Class DocumentInfo
+
+ Public Class Document
+ Public File As FileInfo
+ Public Type As DocumentType
+ Public Data As Object
+ Public Selected As Boolean = False
+
+ Public ReadOnly Property FullName As String
+ Get
+ Return File?.FullName
+ End Get
+ End Property
+
+ Public ReadOnly Property Name As String
+ Get
+ Return File?.Name
+ End Get
+ End Property
+ End Class
+
Enum DocumentType
Order ' Auftrag
OrderResponse ' Bestellbestätigung
diff --git a/EDIDocumentImport/DocumentLoader.vb b/EDIDocumentImport/DocumentLoader.vb
index ec07ce5..997a299 100644
--- a/EDIDocumentImport/DocumentLoader.vb
+++ b/EDIDocumentImport/DocumentLoader.vb
@@ -1,14 +1,76 @@
-Imports DigitalData.Modules.Logging
+Imports System.IO
+Imports System.Xml
+Imports System.Xml.Serialization
+Imports System.Xml.XPath
+Imports DigitalData.Modules.Logging
Imports EDIDocumentImport.DocumentInfo
Public Class DocumentLoader
Inherits Base
- Public Sub New(pLogConfig As LogConfig)
+ Public Config As Config
+ Public Files As New List(Of Document)
+
+ Public Sub New(pLogConfig As LogConfig, pConfig As Config)
MyBase.New(pLogConfig, pLogConfig.GetLogger())
+ Config = pConfig
End Sub
- Public Sub LoadDocument(pDocument As Tuple(Of Object, DocumentType))
+ Public Function LoadFiles() As Boolean
+ If Config.InputDirectory = String.Empty Then
+ Throw New ArgumentNullException("InputDirectory")
+ End If
- End Sub
+ Logger.Info("Loading files from directory [{0}]", Config.InputDirectory)
+
+ Try
+ Dim oDirectory As New DirectoryInfo(Config.InputDirectory)
+ Dim oFiles = oDirectory.GetFiles()
+
+ Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory)
+
+ Files = oFiles.
+ Select(AddressOf WrapFileInfo).
+ Select(AddressOf LoadDocumentData).
+ ToList()
+
+ Return True
+
+ Catch ex As Exception
+ Logger.Error(ex)
+ Throw New IO.IOException($"Could not load files from directory {Config.InputDirectory}", ex)
+
+ End Try
+ End Function
+
+ Private Function WrapFileInfo(pFileInfo As FileInfo) As Document
+ Return New Document With {.File = pFileInfo}
+ End Function
+
+ Public Function LoadDocumentData(pDocument As Document) As Document
+ Using oFileStream As New FileStream(pDocument.FullName, FileMode.Open, FileAccess.Read, FileShare.Read)
+ Dim oXmlDocument = New XPathDocument(oFileStream)
+ Dim oNavigator = oXmlDocument.CreateNavigator()
+
+ Using oReader = oNavigator.ReadSubtree()
+ Dim oTemplateName = GetTemplateName(oNavigator)
+ Dim oDocumentType = GetDocumentTypeFromTemplateName(oTemplateName)
+ Dim oSchemaType = GetDocumentSchemaFromDocumentType(oDocumentType)
+ Dim oSerializer As New XmlSerializer(oSchemaType)
+ Dim oObject = oSerializer.Deserialize(oReader)
+
+ pDocument.Data = oObject
+ pDocument.Type = oDocumentType
+ Return pDocument
+ End Using
+ End Using
+ End Function
+
+ Public Function GetTemplateName(pDocument As XPathNavigator) As String
+ Dim oTemplateName = pDocument.
+ SelectSingleNode("//MESOWebService").
+ GetAttribute("Template", "")
+
+ Return oTemplateName
+ End Function
End Class
diff --git a/EDIDocumentImport/DocumentPositions.vb b/EDIDocumentImport/DocumentPositions.vb
index 35bed83..efda40c 100644
--- a/EDIDocumentImport/DocumentPositions.vb
+++ b/EDIDocumentImport/DocumentPositions.vb
@@ -15,7 +15,8 @@ Public Class DocumentPositions
Public Shared Property ColumnRowNumber As New GridColumn With {
.FieldName = "RowNumber",
.Caption = "Nr.",
- .VisibleIndex = 0
+ .VisibleIndex = 0,
+ .MaxWidth = 30
}
Public Shared Property ColumnArticleNumber As New GridColumn With {
.FieldName = "ArticleNumber",
diff --git a/EDIDocumentImport/EDIDocumentImporter.vbproj b/EDIDocumentImport/EDIDocumentImporter.vbproj
index 12582a7..c05ed64 100644
--- a/EDIDocumentImport/EDIDocumentImporter.vbproj
+++ b/EDIDocumentImport/EDIDocumentImporter.vbproj
@@ -128,10 +128,9 @@
-
-
+
frmMain.vb
@@ -192,6 +191,9 @@
+
+
+
diff --git a/EDIDocumentImport/FileLoader.vb b/EDIDocumentImport/FileLoader.vb
deleted file mode 100644
index deb71bd..0000000
--- a/EDIDocumentImport/FileLoader.vb
+++ /dev/null
@@ -1,69 +0,0 @@
-Imports System.IO
-Imports System.Xml
-Imports System.Xml.Serialization
-Imports System.Xml.XPath
-Imports DigitalData.Modules.Logging
-Imports EDIDocumentImport.DocumentInfo
-
-Public Class FileLoader
- Inherits Base
-
- Public Config As Config
- Public Files As New List(Of FileInfo)
-
- Public Sub New(pLogConfig As LogConfig, pConfig As Config)
- MyBase.New(pLogConfig, pLogConfig.GetLogger())
- Config = pConfig
- End Sub
-
- Public Function LoadFiles() As Boolean
- If Config.InputDirectory = String.Empty Then
- Throw New ArgumentNullException("InputDirectory")
- End If
-
- Logger.Info("Loading files from directory [{0}]", Config.InputDirectory)
-
- Try
- Dim oDirectory As New DirectoryInfo(Config.InputDirectory)
- Dim oFiles = oDirectory.GetFiles()
-
- Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory)
-
- Files = oFiles.ToList()
-
- Return True
- Catch ex As Exception
- Logger.Error(ex)
- Throw New IO.IOException($"Could not load files from directory {Config.InputDirectory}", ex)
- End Try
- End Function
-
- Public Function LoadFile(pFullName) As Object
- Dim oFile As FileInfo = Files.
- Where(Function(f) f.FullName = pFullName).
- SingleOrDefault()
-
- Using oFileStream As New FileStream(oFile.FullName, FileMode.Open, FileAccess.Read, FileShare.Read)
- Dim oXmlDocument = New XPathDocument(oFileStream)
- Dim oNavigator = oXmlDocument.CreateNavigator()
-
- Using oReader = oNavigator.ReadSubtree()
- Dim oTemplateName = GetTemplateName(oNavigator)
- Dim oDocumentType = GetDocumentTypeFromTemplateName(oTemplateName)
- Dim oSchemaType = GetDocumentSchemaFromDocumentType(oDocumentType)
- Dim oSerializer As New XmlSerializer(oSchemaType)
- Dim oObject = oSerializer.Deserialize(oReader)
-
- Return New Tuple(Of Object, DocumentType)(oObject, oDocumentType)
- End Using
- End Using
- End Function
-
- Public Function GetTemplateName(pDocument As XPathNavigator) As String
- Dim oTemplateName = pDocument.
- SelectSingleNode("//MESOWebService").
- GetAttribute("Template", "")
-
- Return oTemplateName
- End Function
-End Class
diff --git a/EDIDocumentImport/My Project/Resources.Designer.vb b/EDIDocumentImport/My Project/Resources.Designer.vb
index 9f99120..4259e93 100644
--- a/EDIDocumentImport/My Project/Resources.Designer.vb
+++ b/EDIDocumentImport/My Project/Resources.Designer.vb
@@ -70,6 +70,16 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
+ '''
+ Friend ReadOnly Property deletetablerows() As DevExpress.Utils.Svg.SvgImage
+ Get
+ Dim obj As Object = ResourceManager.GetObject("deletetablerows", resourceCulture)
+ Return CType(obj,DevExpress.Utils.Svg.SvgImage)
+ End Get
+ End Property
+
'''
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''
@@ -80,6 +90,16 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
+ '''
+ Friend ReadOnly Property itemtypechecked() As DevExpress.Utils.Svg.SvgImage
+ Get
+ Dim obj As Object = ResourceManager.GetObject("itemtypechecked", resourceCulture)
+ Return CType(obj,DevExpress.Utils.Svg.SvgImage)
+ End Get
+ End Property
+
'''
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''
@@ -119,5 +139,15 @@ Namespace My.Resources
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
+
+ '''
+ ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
+ '''
+ Friend ReadOnly Property tableproperties() As DevExpress.Utils.Svg.SvgImage
+ Get
+ Dim obj As Object = ResourceManager.GetObject("tableproperties", resourceCulture)
+ Return CType(obj,DevExpress.Utils.Svg.SvgImage)
+ End Get
+ End Property
End Module
End Namespace
diff --git a/EDIDocumentImport/My Project/Resources.resx b/EDIDocumentImport/My Project/Resources.resx
index 03926b2..7c0d9a0 100644
--- a/EDIDocumentImport/My Project/Resources.resx
+++ b/EDIDocumentImport/My Project/Resources.resx
@@ -118,22 +118,31 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- ..\Resources\showallfieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-
-
- ..\Resources\open2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-
..\Resources\import.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+ ..\Resources\deletetablerows.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+
+ ..\Resources\bo_validation.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+
+ ..\Resources\showallfieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
..\Resources\pagesetup.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-
- ..\Resources\bo_validation.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+ ..\Resources\itemtypechecked.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+
+ ..\Resources\open2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+
+
+ ..\Resources\tableproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
\ No newline at end of file
diff --git a/EDIDocumentImport/My Project/licenses.licx b/EDIDocumentImport/My Project/licenses.licx
index 4d41376..b52c216 100644
--- a/EDIDocumentImport/My Project/licenses.licx
+++ b/EDIDocumentImport/My Project/licenses.licx
@@ -1,11 +1,12 @@
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
diff --git a/EDIDocumentImport/Resources/deletetablerows.svg b/EDIDocumentImport/Resources/deletetablerows.svg
new file mode 100644
index 0000000..4f78be6
--- /dev/null
+++ b/EDIDocumentImport/Resources/deletetablerows.svg
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/EDIDocumentImport/Resources/itemtypechecked.svg b/EDIDocumentImport/Resources/itemtypechecked.svg
new file mode 100644
index 0000000..6f8b142
--- /dev/null
+++ b/EDIDocumentImport/Resources/itemtypechecked.svg
@@ -0,0 +1,30 @@
+
+
\ No newline at end of file
diff --git a/EDIDocumentImport/Resources/tableproperties.svg b/EDIDocumentImport/Resources/tableproperties.svg
new file mode 100644
index 0000000..2c2174d
--- /dev/null
+++ b/EDIDocumentImport/Resources/tableproperties.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/EDIDocumentImport/WinLineInfo.vb b/EDIDocumentImport/WinLineInfo.vb
index 912fb98..83a0eb6 100644
--- a/EDIDocumentImport/WinLineInfo.vb
+++ b/EDIDocumentImport/WinLineInfo.vb
@@ -5,11 +5,29 @@ Public Class WinLineInfo
Inherits Base
Private Database As MSSQLServer
+
+ Public Accounts As New List(Of Account)
Public Mandators As New List(Of Mandator)
+ Public Years As List(Of Integer)
+
+ Public Class Account
+ Public Property Id As String
+ Public Property Name As String
+ Public Property Mandator As String
+ Public Overrides Function ToString() As String
+ Return $"{Name} ({Id})"
+ End Function
+ End Class
Public Class Mandator
Public Property Id As String
Public Property Name As String
+ Public Property Database As String
+ Public Property Server As String
+
+ Public Overrides Function ToString() As String
+ Return $"{Name} ({Id})"
+ End Function
End Class
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer)
@@ -17,16 +35,64 @@ Public Class WinLineInfo
Database = pDatabase
End Sub
+ Public Sub LoadAccounts(pMandator As Mandator)
+ Dim oSQL = $"SELECT [c002], [c003] FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v005] WHERE c139 IS NULL"
+ Dim oTable = Database.GetDatatable(oSQL)
+
+ For Each oRow As DataRow In oTable.Rows
+ Accounts.Add(New Account With {
+ .Id = oRow.Item("c002"),
+ .Name = oRow.Item("c003"),
+ .Mandator = pMandator.Id
+ })
+ Next
+ End Sub
+
Public Sub LoadMandators()
- Dim oSQL = "SELECT * FROM v005 WHERE c139 IS NULL"
+ Dim oSQL = "SELECT [c000], [c003], [c004] FROM [cwlsystem].[dbo].[T001SRV] (NOLOCK)"
Dim oTable = Database.GetDatatable(oSQL)
Mandators.Clear()
For Each oRow As DataRow In oTable.Rows
+ Dim oDbInfo = SplitConnectionInfo(oRow)
+
Mandators.Add(New Mandator With {
- .Id = oRow.Item("c002"),
- .Name = oRow.Item("c003")
+ .Id = oRow.Item("c000"),
+ .Name = oRow.Item("c003"),
+ .Database = oDbInfo.Item1,
+ .Server = oDbInfo.Item2
})
Next
End Sub
+
+ Public Sub LoadEconomicYears()
+ Dim oCurrentYear = Now.Year
+ Dim oRange As IEnumerable(Of Integer) = Enumerable.Range(oCurrentYear - 10, 12).ToList()
+ Years = oRange
+ End Sub
+
+ '''
+ ''' Turns a database info like "CWLDATEN on SERVER\INSTANCE" into a Tuple of two strings
+ '''
+ '''
+ '''
+ Private Function SplitConnectionInfo(pRow As DataRow) As Tuple(Of String, String)
+ Dim oDbInfo = pRow.Item("c004").ToString()
+ Dim oSplittedInfo = SplitAtString(oDbInfo.ToUpper, "ON")
+ Dim oServer = oSplittedInfo.Item(1).Trim()
+
+ Dim oDatabase = oSplittedInfo.Item(0).Trim()
+ If oDatabase.StartsWith("SQL") Then
+ oDatabase = oDatabase.Remove(0, 3)
+ End If
+
+ Return New Tuple(Of String, String)(oDatabase, oServer)
+ End Function
+
+ Private Function SplitAtString(pStringToSplit As String, pDelimiter As String) As List(Of String)
+ Dim oDelimiter As String() = New String(0) {pDelimiter}
+ Return pStringToSplit.
+ Split(oDelimiter, StringSplitOptions.None).
+ ToList()
+ End Function
End Class
diff --git a/EDIDocumentImport/frmMain.Designer.vb b/EDIDocumentImport/frmMain.Designer.vb
index 3c5166a..7c698b7 100644
--- a/EDIDocumentImport/frmMain.Designer.vb
+++ b/EDIDocumentImport/frmMain.Designer.vb
@@ -19,6 +19,7 @@ Partial Class frmMain
'Do not modify it using the code editor.
_
Private Sub InitializeComponent()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.btnLoadDocuments = New DevExpress.XtraBars.BarButtonItem()
Me.txtFilesLoaded = New DevExpress.XtraBars.BarHeaderItem()
@@ -27,13 +28,20 @@ Partial Class frmMain
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
Me.checkShowXml = New DevExpress.XtraBars.BarCheckItem()
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
+ Me.BarButtonItem5 = New DevExpress.XtraBars.BarButtonItem()
+ Me.txtVersion = New DevExpress.XtraBars.BarStaticItem()
+ Me.BarButtonItem6 = New DevExpress.XtraBars.BarButtonItem()
+ Me.BarButtonItem7 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
+ Me.RibbonPageGroup4 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
+ Me.RibbonPageGroup5 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.GridControlFiles = New DevExpress.XtraGrid.GridControl()
Me.GridViewFiles = New DevExpress.XtraGrid.Views.Grid.GridView()
+ Me.colSelected = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colFilePath = New DevExpress.XtraGrid.Columns.GridColumn()
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
@@ -54,6 +62,8 @@ Partial Class frmMain
Me.SearchLookUpEdit1View = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.cmbCustomer = New DevExpress.XtraEditors.SearchLookUpEdit()
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
+ Me.cmbDeliveryAddress = New DevExpress.XtraEditors.SearchLookUpEdit()
+ Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.Root = New DevExpress.XtraLayout.LayoutControlGroup()
Me.LayoutItemOrderIssuer = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem()
@@ -68,11 +78,14 @@ Partial Class frmMain
Me.LayoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem()
Me.SimpleSeparator1 = New DevExpress.XtraLayout.SimpleSeparator()
+ Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem()
Me.GridControlPositions = New DevExpress.XtraGrid.GridControl()
Me.GridViewPositions = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl()
Me.RichEditXml = New DevExpress.XtraRichEdit.RichEditControl()
+ Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem()
+ Me.cmbYears = New DevExpress.XtraEditors.ComboBoxEdit()
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridControlFiles, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridViewFiles, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -98,6 +111,8 @@ Partial Class frmMain
CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.cmbCustomer.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.cmbDeliveryAddress.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutItemOrderIssuer, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -112,19 +127,22 @@ Partial Class frmMain
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SimpleSeparator1, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridControlPositions, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridViewPositions, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl3.SuspendLayout()
+ CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.cmbYears.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'RibbonControl
'
Me.RibbonControl.ExpandCollapseItem.Id = 0
- Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnLoadDocuments, Me.txtFilesLoaded, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.checkShowXml, Me.BarButtonItem4})
+ Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnLoadDocuments, Me.txtFilesLoaded, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.checkShowXml, Me.BarButtonItem4, Me.BarButtonItem5, Me.txtVersion, Me.BarButtonItem6, Me.BarButtonItem7})
Me.RibbonControl.Location = New System.Drawing.Point(0, 0)
- Me.RibbonControl.MaxItemId = 11
+ Me.RibbonControl.MaxItemId = 15
Me.RibbonControl.Name = "RibbonControl"
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl.Size = New System.Drawing.Size(1406, 158)
@@ -173,23 +191,50 @@ Partial Class frmMain
'
'BarButtonItem4
'
- Me.BarButtonItem4.Caption = "Daten übermitteln"
+ Me.BarButtonItem4.Caption = "Aktuelle Zeile übermitteln"
Me.BarButtonItem4.Id = 10
Me.BarButtonItem4.ImageOptions.SvgImage = Global.EDIDocumentImport.My.Resources.Resources.bo_validation
Me.BarButtonItem4.Name = "BarButtonItem4"
'
+ 'BarButtonItem5
+ '
+ Me.BarButtonItem5.Caption = "Markierte Zeilen übermitteln"
+ Me.BarButtonItem5.Id = 11
+ Me.BarButtonItem5.ImageOptions.SvgImage = Global.EDIDocumentImport.My.Resources.Resources.itemtypechecked
+ Me.BarButtonItem5.Name = "BarButtonItem5"
+ '
+ 'txtVersion
+ '
+ Me.txtVersion.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right
+ Me.txtVersion.Caption = "Version {0}"
+ Me.txtVersion.Id = 12
+ Me.txtVersion.Name = "txtVersion"
+ '
+ 'BarButtonItem6
+ '
+ Me.BarButtonItem6.Caption = "Zeile löschen"
+ Me.BarButtonItem6.Id = 13
+ Me.BarButtonItem6.ImageOptions.SvgImage = Global.EDIDocumentImport.My.Resources.Resources.deletetablerows
+ Me.BarButtonItem6.Name = "BarButtonItem6"
+ '
+ 'BarButtonItem7
+ '
+ Me.BarButtonItem7.Caption = "Artikel ersetzen"
+ Me.BarButtonItem7.Id = 14
+ Me.BarButtonItem7.ImageOptions.SvgImage = Global.EDIDocumentImport.My.Resources.Resources.tableproperties
+ Me.BarButtonItem7.Name = "BarButtonItem7"
+ '
'RibbonPage1
'
- Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroup3})
+ Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2, Me.RibbonPageGroup3, Me.RibbonPageGroup4, Me.RibbonPageGroup5})
Me.RibbonPage1.Name = "RibbonPage1"
Me.RibbonPage1.Text = "Start"
'
'RibbonPageGroup1
'
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnLoadDocuments)
- Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem4)
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
- Me.RibbonPageGroup1.Text = "Start"
+ Me.RibbonPageGroup1.Text = "Daten laden"
'
'RibbonPageGroup2
'
@@ -207,9 +252,24 @@ Partial Class frmMain
Me.RibbonPageGroup3.Name = "RibbonPageGroup3"
Me.RibbonPageGroup3.Text = "Debugging"
'
+ 'RibbonPageGroup4
+ '
+ Me.RibbonPageGroup4.ItemLinks.Add(Me.BarButtonItem4)
+ Me.RibbonPageGroup4.ItemLinks.Add(Me.BarButtonItem5)
+ Me.RibbonPageGroup4.Name = "RibbonPageGroup4"
+ Me.RibbonPageGroup4.Text = "Daten übermitteln"
+ '
+ 'RibbonPageGroup5
+ '
+ Me.RibbonPageGroup5.ItemLinks.Add(Me.BarButtonItem6)
+ Me.RibbonPageGroup5.ItemLinks.Add(Me.BarButtonItem7)
+ Me.RibbonPageGroup5.Name = "RibbonPageGroup5"
+ Me.RibbonPageGroup5.Text = "Belegpositionen"
+ '
'RibbonStatusBar
'
Me.RibbonStatusBar.ItemLinks.Add(Me.txtFilesLoaded)
+ Me.RibbonStatusBar.ItemLinks.Add(Me.txtVersion)
Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 752)
Me.RibbonStatusBar.Name = "RibbonStatusBar"
Me.RibbonStatusBar.Ribbon = Me.RibbonControl
@@ -228,17 +288,29 @@ Partial Class frmMain
'
'GridViewFiles
'
- Me.GridViewFiles.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colFileName, Me.colFilePath})
+ Me.GridViewFiles.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colSelected, Me.colFileName, Me.colFilePath})
Me.GridViewFiles.GridControl = Me.GridControlFiles
Me.GridViewFiles.Name = "GridViewFiles"
'
+ 'colSelected
+ '
+ Me.colSelected.FieldName = "colSelected"
+ Me.colSelected.ImageOptions.SvgImage = CType(resources.GetObject("colSelected.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
+ Me.colSelected.ImageOptions.SvgImageSize = New System.Drawing.Size(16, 16)
+ Me.colSelected.Name = "colSelected"
+ Me.colSelected.UnboundType = DevExpress.Data.UnboundColumnType.[Boolean]
+ Me.colSelected.Visible = True
+ Me.colSelected.VisibleIndex = 0
+ Me.colSelected.Width = 30
+ '
'colFileName
'
Me.colFileName.Caption = "Dateiname"
Me.colFileName.FieldName = "Name"
Me.colFileName.Name = "colFileName"
Me.colFileName.Visible = True
- Me.colFileName.VisibleIndex = 0
+ Me.colFileName.VisibleIndex = 1
+ Me.colFileName.Width = 99
'
'colFilePath
'
@@ -246,7 +318,8 @@ Partial Class frmMain
Me.colFilePath.FieldName = "FullName"
Me.colFilePath.Name = "colFilePath"
Me.colFilePath.Visible = True
- Me.colFilePath.VisibleIndex = 1
+ Me.colFilePath.VisibleIndex = 2
+ Me.colFilePath.Width = 99
'
'SplitContainerControl1
'
@@ -290,6 +363,8 @@ Partial Class frmMain
Me.LayoutControl1.Controls.Add(Me.dateOrderDate)
Me.LayoutControl1.Controls.Add(Me.cmbMandator)
Me.LayoutControl1.Controls.Add(Me.cmbCustomer)
+ Me.LayoutControl1.Controls.Add(Me.cmbDeliveryAddress)
+ Me.LayoutControl1.Controls.Add(Me.cmbYears)
Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.LayoutControl1.Location = New System.Drawing.Point(0, 0)
Me.LayoutControl1.Name = "LayoutControl1"
@@ -301,116 +376,115 @@ Partial Class frmMain
'
'txtOrderIssuer
'
- Me.txtOrderIssuer.Location = New System.Drawing.Point(87, 105)
+ Me.txtOrderIssuer.Location = New System.Drawing.Point(92, 135)
Me.txtOrderIssuer.MenuManager = Me.RibbonControl
Me.txtOrderIssuer.Name = "txtOrderIssuer"
- Me.txtOrderIssuer.Size = New System.Drawing.Size(184, 20)
+ Me.txtOrderIssuer.Size = New System.Drawing.Size(123, 20)
Me.txtOrderIssuer.StyleController = Me.LayoutControl1
Me.txtOrderIssuer.TabIndex = 6
'
'MemoEdit1
'
- Me.MemoEdit1.Location = New System.Drawing.Point(87, 135)
+ Me.MemoEdit1.Location = New System.Drawing.Point(92, 165)
Me.MemoEdit1.MenuManager = Me.RibbonControl
Me.MemoEdit1.Name = "MemoEdit1"
- Me.MemoEdit1.Size = New System.Drawing.Size(608, 125)
+ Me.MemoEdit1.Size = New System.Drawing.Size(490, 95)
Me.MemoEdit1.StyleController = Me.LayoutControl1
Me.MemoEdit1.TabIndex = 12
'
'txtOrderNumber
'
- Me.txtOrderNumber.Location = New System.Drawing.Point(353, 105)
+ Me.txtOrderNumber.Location = New System.Drawing.Point(302, 135)
Me.txtOrderNumber.MenuManager = Me.RibbonControl
Me.txtOrderNumber.Name = "txtOrderNumber"
- Me.txtOrderNumber.Size = New System.Drawing.Size(128, 20)
+ Me.txtOrderNumber.Size = New System.Drawing.Size(97, 20)
Me.txtOrderNumber.StyleController = Me.LayoutControl1
Me.txtOrderNumber.TabIndex = 7
'
'TextEdit5
'
- Me.TextEdit5.Location = New System.Drawing.Point(778, 15)
+ Me.TextEdit5.Location = New System.Drawing.Point(670, 15)
Me.TextEdit5.MenuManager = Me.RibbonControl
Me.TextEdit5.Name = "TextEdit5"
- Me.TextEdit5.Size = New System.Drawing.Size(269, 20)
+ Me.TextEdit5.Size = New System.Drawing.Size(377, 20)
Me.TextEdit5.StyleController = Me.LayoutControl1
Me.TextEdit5.TabIndex = 3
'
'TextEdit6
'
- Me.TextEdit6.Location = New System.Drawing.Point(778, 45)
+ Me.TextEdit6.Location = New System.Drawing.Point(670, 45)
Me.TextEdit6.MenuManager = Me.RibbonControl
Me.TextEdit6.Name = "TextEdit6"
- Me.TextEdit6.Size = New System.Drawing.Size(269, 20)
+ Me.TextEdit6.Size = New System.Drawing.Size(377, 20)
Me.TextEdit6.StyleController = Me.LayoutControl1
Me.TextEdit6.TabIndex = 5
'
'TextEdit7
'
- Me.TextEdit7.Location = New System.Drawing.Point(778, 105)
+ Me.TextEdit7.Location = New System.Drawing.Point(670, 105)
Me.TextEdit7.MenuManager = Me.RibbonControl
Me.TextEdit7.Name = "TextEdit7"
- Me.TextEdit7.Size = New System.Drawing.Size(269, 20)
+ Me.TextEdit7.Size = New System.Drawing.Size(377, 20)
Me.TextEdit7.StyleController = Me.LayoutControl1
Me.TextEdit7.TabIndex = 11
'
'TextEdit8
'
- Me.TextEdit8.Location = New System.Drawing.Point(778, 75)
+ Me.TextEdit8.Location = New System.Drawing.Point(670, 75)
Me.TextEdit8.MenuManager = Me.RibbonControl
Me.TextEdit8.Name = "TextEdit8"
- Me.TextEdit8.Size = New System.Drawing.Size(269, 20)
+ Me.TextEdit8.Size = New System.Drawing.Size(377, 20)
Me.TextEdit8.StyleController = Me.LayoutControl1
Me.TextEdit8.TabIndex = 9
'
'TextEdit9
'
- Me.TextEdit9.Location = New System.Drawing.Point(778, 135)
+ Me.TextEdit9.Location = New System.Drawing.Point(670, 135)
Me.TextEdit9.MenuManager = Me.RibbonControl
Me.TextEdit9.Name = "TextEdit9"
- Me.TextEdit9.Size = New System.Drawing.Size(269, 20)
+ Me.TextEdit9.Size = New System.Drawing.Size(377, 20)
Me.TextEdit9.StyleController = Me.LayoutControl1
Me.TextEdit9.TabIndex = 13
'
'txtBELEGKEY
'
- Me.txtBELEGKEY.Location = New System.Drawing.Point(87, 15)
+ Me.txtBELEGKEY.Location = New System.Drawing.Point(453, 15)
Me.txtBELEGKEY.MenuManager = Me.RibbonControl
Me.txtBELEGKEY.Name = "txtBELEGKEY"
- Me.txtBELEGKEY.Size = New System.Drawing.Size(184, 20)
+ Me.txtBELEGKEY.Size = New System.Drawing.Size(129, 20)
Me.txtBELEGKEY.StyleController = Me.LayoutControl1
Me.txtBELEGKEY.TabIndex = 0
'
'txtRunningNumber
'
- Me.txtRunningNumber.Location = New System.Drawing.Point(353, 15)
+ Me.txtRunningNumber.Location = New System.Drawing.Point(92, 15)
Me.txtRunningNumber.MenuManager = Me.RibbonControl
Me.txtRunningNumber.Name = "txtRunningNumber"
- Me.txtRunningNumber.Size = New System.Drawing.Size(342, 20)
+ Me.txtRunningNumber.Size = New System.Drawing.Size(274, 20)
Me.txtRunningNumber.StyleController = Me.LayoutControl1
Me.txtRunningNumber.TabIndex = 2
'
'dateOrderDate
'
Me.dateOrderDate.EditValue = Nothing
- Me.dateOrderDate.Location = New System.Drawing.Point(563, 105)
+ Me.dateOrderDate.Location = New System.Drawing.Point(486, 135)
Me.dateOrderDate.MenuManager = Me.RibbonControl
Me.dateOrderDate.Name = "dateOrderDate"
Me.dateOrderDate.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.dateOrderDate.Properties.CalendarTimeProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
- Me.dateOrderDate.Size = New System.Drawing.Size(132, 20)
+ Me.dateOrderDate.Size = New System.Drawing.Size(96, 20)
Me.dateOrderDate.StyleController = Me.LayoutControl1
Me.dateOrderDate.TabIndex = 8
'
'cmbMandator
'
- Me.cmbMandator.Location = New System.Drawing.Point(87, 45)
+ Me.cmbMandator.Location = New System.Drawing.Point(92, 45)
Me.cmbMandator.MenuManager = Me.RibbonControl
Me.cmbMandator.Name = "cmbMandator"
Me.cmbMandator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.cmbMandator.Properties.NullText = ""
Me.cmbMandator.Properties.PopupView = Me.SearchLookUpEdit1View
- Me.cmbMandator.Properties.ValueMember = "Id"
- Me.cmbMandator.Size = New System.Drawing.Size(608, 20)
+ Me.cmbMandator.Size = New System.Drawing.Size(274, 20)
Me.cmbMandator.StyleController = Me.LayoutControl1
Me.cmbMandator.TabIndex = 4
'
@@ -423,15 +497,14 @@ Partial Class frmMain
'
'cmbCustomer
'
- Me.cmbCustomer.Location = New System.Drawing.Point(87, 75)
+ Me.cmbCustomer.Location = New System.Drawing.Point(92, 75)
Me.cmbCustomer.MenuManager = Me.RibbonControl
Me.cmbCustomer.Name = "cmbCustomer"
Me.cmbCustomer.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.cmbCustomer.Properties.DisplayMember = "Name"
Me.cmbCustomer.Properties.NullText = ""
Me.cmbCustomer.Properties.PopupView = Me.GridView1
- Me.cmbCustomer.Properties.ValueMember = "Id"
- Me.cmbCustomer.Size = New System.Drawing.Size(608, 20)
+ Me.cmbCustomer.Size = New System.Drawing.Size(490, 20)
Me.cmbCustomer.StyleController = Me.LayoutControl1
Me.cmbCustomer.TabIndex = 10
'
@@ -442,11 +515,31 @@ Partial Class frmMain
Me.GridView1.OptionsSelection.EnableAppearanceFocusedCell = False
Me.GridView1.OptionsView.ShowGroupPanel = False
'
+ 'cmbDeliveryAddress
+ '
+ Me.cmbDeliveryAddress.Location = New System.Drawing.Point(92, 105)
+ Me.cmbDeliveryAddress.MenuManager = Me.RibbonControl
+ Me.cmbDeliveryAddress.Name = "cmbDeliveryAddress"
+ Me.cmbDeliveryAddress.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
+ Me.cmbDeliveryAddress.Properties.NullText = ""
+ Me.cmbDeliveryAddress.Properties.PopupSizeable = False
+ Me.cmbDeliveryAddress.Properties.PopupView = Me.GridView2
+ Me.cmbDeliveryAddress.Size = New System.Drawing.Size(490, 20)
+ Me.cmbDeliveryAddress.StyleController = Me.LayoutControl1
+ Me.cmbDeliveryAddress.TabIndex = 14
+ '
+ 'GridView2
+ '
+ Me.GridView2.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
+ Me.GridView2.Name = "GridView2"
+ Me.GridView2.OptionsSelection.EnableAppearanceFocusedCell = False
+ Me.GridView2.OptionsView.ShowGroupPanel = False
+ '
'Root
'
Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True]
Me.Root.GroupBordersVisible = False
- Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutItemOrderIssuer, Me.LayoutControlItem3, Me.LayoutItemOrderNumber, Me.LayoutControlItem6, Me.LayoutControlItem9, Me.LayoutControlItem10, Me.LayoutControlItem11, Me.LayoutControlItemRunningNumber, Me.LayoutItemOrderDate, Me.LayoutControlItem8, Me.LayoutControlItem7, Me.LayoutControlItem1, Me.SimpleSeparator1, Me.LayoutControlItem5})
+ Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutItemOrderIssuer, Me.LayoutControlItem3, Me.LayoutItemOrderNumber, Me.LayoutControlItem6, Me.LayoutControlItem9, Me.LayoutControlItem10, Me.LayoutControlItem11, Me.LayoutItemOrderDate, Me.LayoutControlItem8, Me.LayoutControlItem7, Me.LayoutControlItem1, Me.SimpleSeparator1, Me.LayoutControlItem2, Me.LayoutControlItem5, Me.LayoutControlItemRunningNumber, Me.LayoutControlItem4})
Me.Root.Name = "Root"
Me.Root.Size = New System.Drawing.Size(1062, 275)
Me.Root.TextVisible = False
@@ -454,112 +547,112 @@ Partial Class frmMain
'LayoutItemOrderIssuer
'
Me.LayoutItemOrderIssuer.Control = Me.txtOrderIssuer
- Me.LayoutItemOrderIssuer.Location = New System.Drawing.Point(0, 90)
+ Me.LayoutItemOrderIssuer.Location = New System.Drawing.Point(0, 120)
Me.LayoutItemOrderIssuer.Name = "LayoutItemOrderIssuer"
Me.LayoutItemOrderIssuer.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutItemOrderIssuer.Size = New System.Drawing.Size(266, 30)
+ Me.LayoutItemOrderIssuer.Size = New System.Drawing.Size(210, 30)
Me.LayoutItemOrderIssuer.Text = "Besteller"
- Me.LayoutItemOrderIssuer.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutItemOrderIssuer.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem3
'
Me.LayoutControlItem3.Control = Me.MemoEdit1
- Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 120)
+ Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 150)
Me.LayoutControlItem3.Name = "LayoutControlItem3"
Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem3.Size = New System.Drawing.Size(690, 135)
+ Me.LayoutControlItem3.Size = New System.Drawing.Size(577, 105)
Me.LayoutControlItem3.Text = "Freitext"
- Me.LayoutControlItem3.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem3.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutItemOrderNumber
'
Me.LayoutItemOrderNumber.Control = Me.txtOrderNumber
- Me.LayoutItemOrderNumber.Location = New System.Drawing.Point(266, 90)
+ Me.LayoutItemOrderNumber.Location = New System.Drawing.Point(210, 120)
Me.LayoutItemOrderNumber.Name = "LayoutItemOrderNumber"
Me.LayoutItemOrderNumber.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutItemOrderNumber.Size = New System.Drawing.Size(210, 30)
+ Me.LayoutItemOrderNumber.Size = New System.Drawing.Size(184, 30)
Me.LayoutItemOrderNumber.Text = "Bestellnummer"
- Me.LayoutItemOrderNumber.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutItemOrderNumber.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem6
'
Me.LayoutControlItem6.Control = Me.TextEdit5
- Me.LayoutControlItem6.Location = New System.Drawing.Point(691, 0)
+ Me.LayoutControlItem6.Location = New System.Drawing.Point(578, 0)
Me.LayoutControlItem6.Name = "LayoutControlItem6"
Me.LayoutControlItem6.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem6.Size = New System.Drawing.Size(351, 30)
+ Me.LayoutControlItem6.Size = New System.Drawing.Size(464, 30)
Me.LayoutControlItem6.Text = "Straße"
- Me.LayoutControlItem6.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem6.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem9
'
Me.LayoutControlItem9.Control = Me.TextEdit8
- Me.LayoutControlItem9.Location = New System.Drawing.Point(691, 60)
+ Me.LayoutControlItem9.Location = New System.Drawing.Point(578, 60)
Me.LayoutControlItem9.Name = "LayoutControlItem9"
Me.LayoutControlItem9.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem9.Size = New System.Drawing.Size(351, 30)
+ Me.LayoutControlItem9.Size = New System.Drawing.Size(464, 30)
Me.LayoutControlItem9.Text = "PLZ"
- Me.LayoutControlItem9.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem9.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem10
'
Me.LayoutControlItem10.Control = Me.TextEdit9
- Me.LayoutControlItem10.Location = New System.Drawing.Point(691, 120)
+ Me.LayoutControlItem10.Location = New System.Drawing.Point(578, 120)
Me.LayoutControlItem10.Name = "LayoutControlItem10"
Me.LayoutControlItem10.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem10.Size = New System.Drawing.Size(351, 135)
+ Me.LayoutControlItem10.Size = New System.Drawing.Size(464, 135)
Me.LayoutControlItem10.Text = "Kontakt"
- Me.LayoutControlItem10.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem10.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem11
'
Me.LayoutControlItem11.Control = Me.txtBELEGKEY
- Me.LayoutControlItem11.Location = New System.Drawing.Point(0, 0)
+ Me.LayoutControlItem11.Location = New System.Drawing.Point(361, 0)
Me.LayoutControlItem11.Name = "LayoutControlItem11"
Me.LayoutControlItem11.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem11.Size = New System.Drawing.Size(266, 30)
+ Me.LayoutControlItem11.Size = New System.Drawing.Size(216, 30)
Me.LayoutControlItem11.Text = "BELEGKEY"
- Me.LayoutControlItem11.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem11.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItemRunningNumber
'
Me.LayoutControlItemRunningNumber.Control = Me.txtRunningNumber
- Me.LayoutControlItemRunningNumber.Location = New System.Drawing.Point(266, 0)
+ Me.LayoutControlItemRunningNumber.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlItemRunningNumber.Name = "LayoutControlItemRunningNumber"
Me.LayoutControlItemRunningNumber.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItemRunningNumber.Size = New System.Drawing.Size(424, 30)
+ Me.LayoutControlItemRunningNumber.Size = New System.Drawing.Size(361, 30)
Me.LayoutControlItemRunningNumber.Text = "Laufnummer"
- Me.LayoutControlItemRunningNumber.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItemRunningNumber.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutItemOrderDate
'
Me.LayoutItemOrderDate.Control = Me.dateOrderDate
- Me.LayoutItemOrderDate.Location = New System.Drawing.Point(476, 90)
+ Me.LayoutItemOrderDate.Location = New System.Drawing.Point(394, 120)
Me.LayoutItemOrderDate.Name = "LayoutItemOrderDate"
Me.LayoutItemOrderDate.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutItemOrderDate.Size = New System.Drawing.Size(214, 30)
+ Me.LayoutItemOrderDate.Size = New System.Drawing.Size(183, 30)
Me.LayoutItemOrderDate.Text = "Bestelldatum"
- Me.LayoutItemOrderDate.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutItemOrderDate.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem8
'
Me.LayoutControlItem8.Control = Me.TextEdit7
- Me.LayoutControlItem8.Location = New System.Drawing.Point(691, 90)
+ Me.LayoutControlItem8.Location = New System.Drawing.Point(578, 90)
Me.LayoutControlItem8.Name = "LayoutControlItem8"
Me.LayoutControlItem8.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem8.Size = New System.Drawing.Size(351, 30)
+ Me.LayoutControlItem8.Size = New System.Drawing.Size(464, 30)
Me.LayoutControlItem8.Text = "Ort"
- Me.LayoutControlItem8.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem8.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem7
'
Me.LayoutControlItem7.Control = Me.TextEdit6
- Me.LayoutControlItem7.Location = New System.Drawing.Point(691, 30)
+ Me.LayoutControlItem7.Location = New System.Drawing.Point(578, 30)
Me.LayoutControlItem7.Name = "LayoutControlItem7"
Me.LayoutControlItem7.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem7.Size = New System.Drawing.Size(351, 30)
+ Me.LayoutControlItem7.Size = New System.Drawing.Size(464, 30)
Me.LayoutControlItem7.Text = "Hausnummer"
- Me.LayoutControlItem7.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem7.TextSize = New System.Drawing.Size(74, 13)
'
'LayoutControlItem1
'
@@ -567,26 +660,36 @@ Partial Class frmMain
Me.LayoutControlItem1.Location = New System.Drawing.Point(0, 30)
Me.LayoutControlItem1.Name = "LayoutControlItem1"
Me.LayoutControlItem1.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem1.Size = New System.Drawing.Size(690, 30)
+ Me.LayoutControlItem1.Size = New System.Drawing.Size(361, 30)
Me.LayoutControlItem1.Text = "Mandant"
- Me.LayoutControlItem1.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem1.TextSize = New System.Drawing.Size(74, 13)
'
'SimpleSeparator1
'
Me.SimpleSeparator1.AllowHotTrack = False
- Me.SimpleSeparator1.Location = New System.Drawing.Point(690, 0)
+ Me.SimpleSeparator1.Location = New System.Drawing.Point(577, 0)
Me.SimpleSeparator1.Name = "SimpleSeparator1"
Me.SimpleSeparator1.Size = New System.Drawing.Size(1, 255)
'
+ 'LayoutControlItem2
+ '
+ Me.LayoutControlItem2.Control = Me.cmbDeliveryAddress
+ Me.LayoutControlItem2.Location = New System.Drawing.Point(0, 90)
+ Me.LayoutControlItem2.Name = "LayoutControlItem2"
+ Me.LayoutControlItem2.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
+ Me.LayoutControlItem2.Size = New System.Drawing.Size(577, 30)
+ Me.LayoutControlItem2.Text = "Lieferadresse"
+ Me.LayoutControlItem2.TextSize = New System.Drawing.Size(74, 13)
+ '
'LayoutControlItem5
'
Me.LayoutControlItem5.Control = Me.cmbCustomer
Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 60)
Me.LayoutControlItem5.Name = "LayoutControlItem5"
Me.LayoutControlItem5.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
- Me.LayoutControlItem5.Size = New System.Drawing.Size(690, 30)
+ Me.LayoutControlItem5.Size = New System.Drawing.Size(577, 30)
Me.LayoutControlItem5.Text = "Kunde"
- Me.LayoutControlItem5.TextSize = New System.Drawing.Size(69, 13)
+ Me.LayoutControlItem5.TextSize = New System.Drawing.Size(74, 13)
'
'GridControlPositions
'
@@ -633,6 +736,26 @@ Partial Class frmMain
Me.RichEditXml.Size = New System.Drawing.Size(0, 0)
Me.RichEditXml.TabIndex = 0
'
+ 'LayoutControlItem4
+ '
+ Me.LayoutControlItem4.Control = Me.cmbYears
+ Me.LayoutControlItem4.Location = New System.Drawing.Point(361, 30)
+ Me.LayoutControlItem4.Name = "LayoutControlItem4"
+ Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(5, 5, 5, 5)
+ Me.LayoutControlItem4.Size = New System.Drawing.Size(216, 30)
+ Me.LayoutControlItem4.Text = "Wirtschaftsjahr"
+ Me.LayoutControlItem4.TextSize = New System.Drawing.Size(74, 13)
+ '
+ 'cmbYears
+ '
+ Me.cmbYears.Location = New System.Drawing.Point(453, 45)
+ Me.cmbYears.MenuManager = Me.RibbonControl
+ Me.cmbYears.Name = "cmbYears"
+ Me.cmbYears.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
+ Me.cmbYears.Size = New System.Drawing.Size(129, 20)
+ Me.cmbYears.StyleController = Me.LayoutControl1
+ Me.cmbYears.TabIndex = 15
+ '
'frmMain
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -670,6 +793,8 @@ Partial Class frmMain
CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.cmbCustomer.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.cmbDeliveryAddress.Properties, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutItemOrderIssuer, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit()
@@ -684,11 +809,14 @@ Partial Class frmMain
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SimpleSeparator1, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridControlPositions, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridViewPositions, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl3.ResumeLayout(False)
+ CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.cmbYears.Properties, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -748,4 +876,16 @@ Partial Class frmMain
Friend WithEvents cmbCustomer As DevExpress.XtraEditors.SearchLookUpEdit
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
+ Friend WithEvents cmbDeliveryAddress As DevExpress.XtraEditors.SearchLookUpEdit
+ Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView
+ Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem
+ Friend WithEvents BarButtonItem5 As DevExpress.XtraBars.BarButtonItem
+ Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
+ Friend WithEvents txtVersion As DevExpress.XtraBars.BarStaticItem
+ Friend WithEvents BarButtonItem6 As DevExpress.XtraBars.BarButtonItem
+ Friend WithEvents RibbonPageGroup5 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
+ Friend WithEvents BarButtonItem7 As DevExpress.XtraBars.BarButtonItem
+ Friend WithEvents colSelected As DevExpress.XtraGrid.Columns.GridColumn
+ Friend WithEvents cmbYears As DevExpress.XtraEditors.ComboBoxEdit
+ Friend WithEvents LayoutControlItem4 As DevExpress.XtraLayout.LayoutControlItem
End Class
diff --git a/EDIDocumentImport/frmMain.resx b/EDIDocumentImport/frmMain.resx
index 1af7de1..072ab73 100644
--- a/EDIDocumentImport/frmMain.resx
+++ b/EDIDocumentImport/frmMain.resx
@@ -117,4 +117,23 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
+ LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
+ dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHICAAAC77u/
+ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
+ IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
+ MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
+ Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
+ MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
+ ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz
+ OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp
+ dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkNoZWNrQ2lyY2xlZCI+DQogICAgPHBhdGggZD0iTTE2
+ LDRDOS40LDQsNCw5LjQsNCwxNmMwLDYuNiw1LjQsMTIsMTIsMTJzMTItNS40LDEyLTEyQzI4LDkuNCwy
+ Mi42LDQsMTYsNHogTTE0LDIybC02LTZsMi0ybDQsNGw4LThsMiwyICAgTDE0LDIyeiIgY2xhc3M9Ikdy
+ ZWVuIiAvPg0KICA8L2c+DQo8L3N2Zz4L
+
+
\ No newline at end of file
diff --git a/EDIDocumentImport/frmMain.vb b/EDIDocumentImport/frmMain.vb
index 1ee773a..ef9edb3 100644
--- a/EDIDocumentImport/frmMain.vb
+++ b/EDIDocumentImport/frmMain.vb
@@ -15,16 +15,18 @@ Public Class frmMain
Public LogConfig As LogConfig
Public Logger As Logger
Public ConfigManager As ConfigManager(Of Config)
- Public DocumentLoader As DocumentLoader
Public Database As MSSQLServer
- Public FileLoader As FileLoader
+ Public DocumentLoader As DocumentLoader
Public GridBuilder As GridBuilder
Public Winline As WinLineInfo
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try
+ txtVersion.Caption = String.Format(txtVersion.Caption, Application.ProductVersion)
+
LogConfig = New LogConfig(LogConfig.PathType.AppData, Nothing, Nothing, "Digital Data", "EDI Document Importer")
ConfigManager = New ConfigManager(Of Config)(LogConfig, Application.UserAppDataPath, Application.CommonAppDataPath, Application.StartupPath)
+ ConfigManager.Save()
Logger = LogConfig.GetLogger()
' If ConnectionString does not exist, show SQL Config Form
@@ -44,10 +46,21 @@ Public Class frmMain
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
Database = New MSSQLServer(LogConfig, oConnectionString)
Winline = New WinLineInfo(LogConfig, Database)
- Winline.LoadMandators()
+ ' Load WinLine Data
+ Winline.Mandators.Clear()
+ Winline.LoadMandators()
+ Winline.LoadEconomicYears()
+ For Each oMandator In Winline.Mandators
+ Winline.LoadAccounts(oMandator)
+ Next
+
+ ' Load data for UI Fields
cmbMandator.Properties.DataSource = Winline.Mandators
- cmbCustomer.Properties.DataSource = Winline.Mandators
+ cmbCustomer.Properties.DataSource = Winline.Accounts
+ cmbDeliveryAddress.Properties.DataSource = Winline.Accounts
+ cmbYears.Properties.Items.AddRange(Winline.Years)
+ cmbYears.SelectedItem = Now.Year
' Initialize Grids
GridBuilder = New GridBuilder(New List(Of GridView) From {GridViewFiles, GridViewPositions})
@@ -56,8 +69,7 @@ Public Class frmMain
WithReadOnlyOptions(GridViewFiles)
' Construct classes related to the xml data
- FileLoader = New FileLoader(LogConfig, ConfigManager.Config)
- DocumentLoader = New DocumentLoader(LogConfig)
+ DocumentLoader = New DocumentLoader(LogConfig, ConfigManager.Config)
Catch ex As Exception
Logger.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, Text)
@@ -66,9 +78,9 @@ Public Class frmMain
Private Sub btnLoadDocuments_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnLoadDocuments.ItemClick
Try
- If FileLoader.LoadFiles() = True Then
- GridControlFiles.DataSource = FileLoader.Files
- txtFilesLoaded.Caption = $"{FileLoader.Files.Count} Dokumente geladen"
+ If DocumentLoader.LoadFiles() = True Then
+ GridControlFiles.DataSource = DocumentLoader.Files
+ txtFilesLoaded.Caption = $"{DocumentLoader.Files.Count} Dokumente geladen"
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, Text)
@@ -76,7 +88,7 @@ Public Class frmMain
End Sub
Private Sub GridViewFiles_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridViewFiles.FocusedRowChanged
- Dim oFile As FileInfo = GridViewFiles.GetRow(e.FocusedRowHandle)
+ Dim oFile As Document = GridViewFiles.GetRow(e.FocusedRowHandle)
If oFile Is Nothing Then
Exit Sub
@@ -85,20 +97,21 @@ Public Class frmMain
RichEditXml.LoadDocument(oFile.FullName, DocumentFormat.PlainText)
Try
- Dim oResult As Tuple(Of Object, DocumentType) = FileLoader.LoadFile(oFile.FullName)
-
- Select Case oResult.Item2
+ Select Case oFile.Type
Case DocumentType.Order
- ShowDocument(oResult.Item1)
+ 'ShowDocument(oFile.Data)
End Select
+
Catch ex As Xml.XmlException
Dim oMessage As String = $"Fehler beim Verarbeiten des Dokuments {oFile.Name}:{vbNewLine}{ex.Message}"
MsgBox(oMessage, MsgBoxStyle.Critical, Text)
+ Logger.Error(ex)
Catch ex As Exception
-
MsgBox(ex.Message, MsgBoxStyle.Critical, Text)
+ Logger.Error(ex)
+
End Try
End Sub
@@ -111,10 +124,15 @@ Public Class frmMain
txtBELEGKEY.Text = oHead.BELEGKEY
txtRunningNumber.Text = oHead.Laufnummer
- cmbMandator.EditValue = Winline.Mandators.Where(Function(m) m.Id = oHead.Fakt_Kontonummer).SingleOrDefault()
txtOrderIssuer.Text = oHead.Fakt_Ansprechpartner
txtOrderNumber.Text = oHead.AuftragsBestellnummer
dateOrderDate.EditValue = oHead.Datum_AuftragBestellung
+ cmbMandator.EditValue = Winline.Mandators.
+ Where(Function(m) m.Id = "SIVT").
+ SingleOrDefault()
+ cmbCustomer.EditValue = Winline.Accounts.
+ Where(Function(m) m.Id = oHead.Fakt_Kontonummer).
+ SingleOrDefault()
' ====== Position Data ======