Compare commits
2 Commits
b7602d896a
...
8dfc659ef8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8dfc659ef8 | ||
|
|
5c58e05204 |
159
EDIDocumentImport/CREATE_DATABASE.sql
Normal file
159
EDIDocumentImport/CREATE_DATABASE.sql
Normal file
@@ -0,0 +1,159 @@
|
||||
USE [DD_ECM]
|
||||
GO
|
||||
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
/* TBEDI_XML_TEMPLATES */
|
||||
|
||||
DROP TABLE [dbo].[TBEDI_XML_TEMPLATES]
|
||||
|
||||
CREATE TABLE [dbo].[TBEDI_XML_TEMPLATES](
|
||||
[GUID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
[NAME] [nvarchar](20) NOT NULL,
|
||||
[DESCRIPTION] [nvarchar](max) NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
INSERT INTO [dbo].[TBEDI_XML_TEMPLATES] (NAME, DESCRIPTION) VALUES ('EXIM-VRG_orders', 'Schaum EDI Aufträge')
|
||||
|
||||
/* TBEDI_XML_TYPES */
|
||||
|
||||
DROP TABLE [dbo].[TBEDI_XML_TYPES]
|
||||
|
||||
CREATE TABLE [dbo].[TBEDI_XML_TYPES](
|
||||
[GUID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
[NAME] [nvarchar](20) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
INSERT INTO [dbo].[TBEDI_XML_TYPES] (NAME) VALUES ('STRING')
|
||||
INSERT INTO [dbo].[TBEDI_XML_TYPES] (NAME) VALUES ('INTEGER')
|
||||
INSERT INTO [dbo].[TBEDI_XML_TYPES] (NAME) VALUES ('DATE')
|
||||
INSERT INTO [dbo].[TBEDI_XML_TYPES] (NAME) VALUES ('BOOLEAN')
|
||||
INSERT INTO [dbo].[TBEDI_XML_TYPES] (NAME) VALUES ('DECIMAL')
|
||||
|
||||
INSERT INTO [dbo].[TBEDI_XML_TYPES] (NAME) VALUES ('ACCOUNT')
|
||||
INSERT INTO [dbo].[TBEDI_XML_TYPES] (NAME) VALUES ('ARTICLE')
|
||||
|
||||
/* TBEDI_XML_NODES */
|
||||
|
||||
DROP TABLE [dbo].[TBEDI_XML_FUNCTIONS]
|
||||
|
||||
CREATE TABLE [dbo].[TBEDI_XML_FUNCTIONS](
|
||||
[GUID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
[NAME] [nvarchar](max) NOT NULL,
|
||||
[DESCRIPTION] [nvarchar](max) NOT NULL,
|
||||
[PARAMETERS] [nvarchar](max) NULL,
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
INSERT INTO [dbo].[TBEDI_XML_FUNCTIONS] (NAME, DESCRIPTION) VALUES ('GLN', 'Finds an WinLine Account Number by GLN')
|
||||
INSERT INTO [dbo].[TBEDI_XML_FUNCTIONS] (NAME, DESCRIPTION) VALUES ('EAN', 'Finds an WinLine Article Number by EAN')
|
||||
|
||||
/* TBEDI_XML_NODES */
|
||||
|
||||
DROP TABLE [dbo].[TBEDI_XML_NODES]
|
||||
|
||||
CREATE TABLE [dbo].[TBEDI_XML_NODES](
|
||||
[GUID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
[NAME] [nvarchar](max) NOT NULL,
|
||||
[TEMPLATE_ID] [int] NOT NULL,
|
||||
[IS_HEAD] [bit] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TBEDI_XML_NODES]
|
||||
ADD CONSTRAINT DF_TBEDI_XML_NODES_IS_HEAD
|
||||
DEFAULT 0 FOR IS_HEAD
|
||||
|
||||
INSERT INTO [dbo].[TBEDI_XML_NODES] (NAME, IS_HEAD, TEMPLATE_ID) VALUES ('EXIM-VRG_ordersT025', 1, 1)
|
||||
INSERT INTO [dbo].[TBEDI_XML_NODES] (NAME, IS_HEAD, TEMPLATE_ID) VALUES ('EXIM-VRG_ordersT026', 0, 1)
|
||||
|
||||
/* TBEDI_XML_ITEMS */
|
||||
|
||||
DROP TABLE [dbo].[TBEDI_XML_ITEMS]
|
||||
|
||||
CREATE TABLE [dbo].[TBEDI_XML_ITEMS](
|
||||
[GUID] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
|
||||
[XML_NAME] [nvarchar](50) NOT NULL,
|
||||
[XML_NODE_ID] [int] NOT NULL,
|
||||
[XML_TYPE_ID] [int] NOT NULL,
|
||||
[READ_ONLY] [bit] NOT NULL,
|
||||
[FUNCTION_ID] [int] NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[TBEDI_XML_ITEMS]
|
||||
ADD CONSTRAINT FK_TBEDI_XML_TYPES FOREIGN KEY (XML_TYPE_ID)
|
||||
REFERENCES [dbo].[TBEDI_XML_ITEMS] (GUID)
|
||||
|
||||
ALTER TABLE [dbo].[TBEDI_XML_ITEMS]
|
||||
ADD CONSTRAINT FK_TBEDI_XML_NODES FOREIGN KEY (XML_NODE_ID)
|
||||
REFERENCES [dbo].[TBEDI_XML_ITEMS] (GUID)
|
||||
|
||||
ALTER TABLE [dbo].[TBEDI_XML_ITEMS]
|
||||
ADD CONSTRAINT DF_TBEDI_XML_ITEMS_READ_ONLY
|
||||
DEFAULT 0 FOR READ_ONLY
|
||||
|
||||
|
||||
DROP VIEW [dbo].[VWEDI_XML_ITEMS]
|
||||
GO
|
||||
|
||||
CREATE VIEW [dbo].[VWEDI_XML_ITEMS]
|
||||
AS
|
||||
SELECT DISTINCT
|
||||
[TBITEMS].[XML_NAME]
|
||||
,[TBNODES].[NAME] [XML_ROOT]
|
||||
,[TBTEMPLATES].[NAME] [TEMPLATE_NAME]
|
||||
,[TBTYPES].[NAME] [DATA_TYPE]
|
||||
,[TBNODES].[IS_HEAD] [IS_HEAD]
|
||||
,[TBFUNCTIONS].[GUID] [FUNCTION_ID]
|
||||
,[TBFUNCTIONS].[NAME] [FUNCTION_NAME]
|
||||
,[TBFUNCTIONS].[PARAMETERS] [FUNCTION_PARAMETERS]
|
||||
,[TBITEMS].[READ_ONLY]
|
||||
FROM
|
||||
[dbo].[TBEDI_XML_ITEMS] [TBITEMS]
|
||||
INNER JOIN [dbo].[TBEDI_XML_NODES] [TBNODES] ON [TBITEMS].[XML_NODE_ID] = [TBNODES].[GUID]
|
||||
INNER JOIN [dbo].[TBEDI_XML_TYPES] [TBTYPES] ON [TBITEMS].[XML_TYPE_ID] = [TBTYPES].[GUID]
|
||||
INNER JOIN [dbo].[TBEDI_XML_TEMPLATES] [TBTEMPLATES] ON [TBNODES].[TEMPLATE_ID] = [TBTEMPLATES].[GUID]
|
||||
LEFT OUTER JOIN [dbo].[TBEDI_XML_FUNCTIONS] [TBFUNCTIONS] ON [TBITEMS].[FUNCTION_ID] = [TBFUNCTIONS].[GUID]
|
||||
|
||||
GO
|
||||
|
||||
|
||||
/* Kopfdaten */
|
||||
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('BELEGKEY', 1, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Fakt_Kontonummer', 1, 1, 1, 1)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Laufnummer', 1, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Bestellt_von', 1, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Lief_Kontonummer', 1, 1, 1, 1)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Belegart', 1, 2, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Datum_Auftrag-Bestellung', 1, 3, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Auftrags-Bestellnummer', 1, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Leistungsdatum', 1, 3, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Infotext', 1, 1, 1, NULL)
|
||||
|
||||
/* Positionsdaten */
|
||||
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('BELEGKEY', 2, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Zeilennummer', 2, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Datentyp', 2, 2, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Artikelnummer', 2, 1, 1, 2)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Bezeichnung', 2, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Lieferantenartikelnummer', 2, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Menge_bestellt', 2, 5, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Menge_geliefert', 2, 5, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Colli', 2, 1, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Einzelpreis', 2, 5, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Zeilenrabatt1', 2, 5, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Zeilenrabatt2', 2, 5, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Zeilenrabatt3', 2, 5, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Zeilenrabatt4', 2, 5, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('Umsatzsteuerprozent_Zeile', 2, 2, 1, NULL)
|
||||
INSERT [dbo].[TBEDI_XML_ITEMS] (XML_NAME, XML_NODE_ID, XML_TYPE_ID, READ_ONLY, FUNCTION_ID) VALUES ('EDI_Infotext', 2, 1, 1, NULL)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports ImporterShared
|
||||
|
||||
@@ -16,6 +17,11 @@ Public Class GridLoader
|
||||
.Name = pTable.Name
|
||||
}
|
||||
|
||||
Dim oInvisibleColumns As New List(Of String) From {
|
||||
"Zeilennummer",
|
||||
"BELEGKEY",
|
||||
"Infotext"
|
||||
}
|
||||
|
||||
oGrid.ForceInitialize()
|
||||
oGrid.MainView.PopulateColumns()
|
||||
@@ -25,18 +31,33 @@ Public Class GridLoader
|
||||
oView.OptionsBehavior.Editable = False
|
||||
|
||||
For Each oCol In pTable.Columns
|
||||
Dim oVisibleIndex As Integer = 0
|
||||
|
||||
' Hide certain columns
|
||||
If oInvisibleColumns.Contains(oCol.Name) Then
|
||||
oVisibleIndex = -1
|
||||
End If
|
||||
|
||||
Dim oColumn = New Columns.GridColumn With {
|
||||
.Name = oCol.Name,
|
||||
.Caption = oCol.Name,
|
||||
.FieldName = oCol.Name,
|
||||
.UnboundType = GetColumnType(oCol),
|
||||
.VisibleIndex = 0
|
||||
.VisibleIndex = oVisibleIndex
|
||||
}
|
||||
|
||||
oView.Columns.Add(oColumn)
|
||||
|
||||
Next
|
||||
|
||||
oView.BestFitColumns()
|
||||
|
||||
Dim oGridBuilder As New GridBuilder(oView)
|
||||
oGridBuilder.
|
||||
WithDefaults().
|
||||
WithReadOnlyOptions().
|
||||
WithClipboardHandler()
|
||||
|
||||
Return oGrid
|
||||
End Function
|
||||
|
||||
|
||||
@@ -259,7 +259,17 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="CREATE_DATABASE.sql" />
|
||||
<Content Include="README.txt" />
|
||||
<None Include="Resources\rotatecounterclockwise.svg" />
|
||||
<None Include="Resources\open1.svg" />
|
||||
<None Include="Resources\actions_checkcircled.svg" />
|
||||
<None Include="Resources\export.svg" />
|
||||
<None Include="Resources\up.svg" />
|
||||
<None Include="Resources\open22.svg" />
|
||||
<None Include="Resources\resetview.svg" />
|
||||
<None Include="Resources\actions_arrow4down.svg" />
|
||||
<None Include="Resources\save.svg" />
|
||||
<None Include="Resources\open21.svg" />
|
||||
<None Include="Resources\paymentrefund.svg" />
|
||||
<None Include="Resources\open2.svg" />
|
||||
|
||||
90
EDIDocumentImport/My Project/Resources.Designer.vb
generated
90
EDIDocumentImport/My Project/Resources.Designer.vb
generated
@@ -60,6 +60,26 @@ Namespace My.Resources
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property actions_arrow4down() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("actions_arrow4down", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property actions_checkcircled() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("actions_checkcircled", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
@@ -80,6 +100,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property export() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("export", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
@@ -110,6 +140,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property open1() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("open1", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
@@ -130,6 +170,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property open22() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("open22", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
@@ -160,6 +210,36 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property resetview() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("resetview", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property rotatecounterclockwise() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("rotatecounterclockwise", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property save() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("save", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
@@ -200,6 +280,16 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property up() As DevExpress.Utils.Svg.SvgImage
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("up", resourceCulture)
|
||||
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
|
||||
'''</summary>
|
||||
|
||||
@@ -124,6 +124,12 @@
|
||||
<data name="paymentrefund" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="open22" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\open22.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="resetview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\resetview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="preview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\preview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
@@ -133,6 +139,12 @@
|
||||
<data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\import.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="open1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\open1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="tableproperties" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\tableproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
@@ -145,12 +157,27 @@
|
||||
<data name="bo_validation" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bo_validation.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="up" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\up.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="wraptext" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\wraptext.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="open21" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\open21.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\export.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="actions_arrow4down" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="open2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\open2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="actions_checkcircled" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\actions_checkcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="pagesetup" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\pagesetup.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
@@ -160,7 +187,7 @@
|
||||
<data name="showallfieldcodes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\showallfieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name="open21" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\open21.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
<data name="rotatecounterclockwise" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\rotatecounterclockwise.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,17 +1,18 @@
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignBarManager, DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignDockManager, DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraVerticalGrid.PropertyGridControl, DevExpress.XtraVerticalGrid.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.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.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.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.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.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.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.XtraRichEdit.RichEditControl, DevExpress.XtraRichEdit.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraVerticalGrid.PropertyGridControl, DevExpress.XtraVerticalGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.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.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.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.XtraLayout.LayoutControl, DevExpress.XtraLayout.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignBarManager, DevExpress.XtraReports.v19.2.Extensions, 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.TextEdit, DevExpress.XtraEditors.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.Repository.RepositoryItemDateEdit, DevExpress.XtraEditors.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.XtraGrid.GridControl, DevExpress.XtraGrid.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraReports.UserDesigner.XRDesignDockManager, DevExpress.XtraReports.v19.2.Extensions, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
15
EDIDocumentImport/Resources/actions_arrow4down.svg
Normal file
15
EDIDocumentImport/Resources/actions_arrow4down.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Blue{fill:#1177D7;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.Black{fill:#727272;}
|
||||
.Green{fill:#039C23;}
|
||||
.Red{fill:#D11C1C;}
|
||||
.st0{opacity:0.75;}
|
||||
.st1{opacity:0.5;}
|
||||
</style>
|
||||
<g id="Arrow4Down">
|
||||
<polygon points="18,20.3 18,4 14,4 14,20.3 6,12.3 6,18 16,28 26,18 26,12.3 " class="Green" />
|
||||
</g>
|
||||
</svg>
|
||||
15
EDIDocumentImport/Resources/actions_checkcircled.svg
Normal file
15
EDIDocumentImport/Resources/actions_checkcircled.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Blue{fill:#1177D7;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.Black{fill:#727272;}
|
||||
.Green{fill:#039C23;}
|
||||
.Red{fill:#D11C1C;}
|
||||
.st0{opacity:0.75;}
|
||||
.st1{opacity:0.5;}
|
||||
</style>
|
||||
<g id="CheckCircled">
|
||||
<path d="M16,4C9.4,4,4,9.4,4,16c0,6.6,5.4,12,12,12s12-5.4,12-12C28,9.4,22.6,4,16,4z M14,22l-6-6l2-2l4,4l8-8l2,2 L14,22z" class="Green" />
|
||||
</g>
|
||||
</svg>
|
||||
18
EDIDocumentImport/Resources/export.svg
Normal file
18
EDIDocumentImport/Resources/export.svg
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Black{fill:#727272;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.Blue{fill:#1177D7;}
|
||||
.Green{fill:#039C23;}
|
||||
.Red{fill:#D11C1C;}
|
||||
.White{fill:#FFFFFF;}
|
||||
.st0{opacity:0.75;}
|
||||
.st1{opacity:0.5;}
|
||||
.st2{opacity:0.25;}
|
||||
</style>
|
||||
<g id="Export">
|
||||
<path d="M10,12H6V6h4V12z M22,12v6v9c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V7c0-0.6,0.4-1,1-1h3v8h14v-2H22z M18,18H4 v6h14V18z" class="Black" />
|
||||
<polygon points="16,10 24,10 24,14 32,8 24,2 24,6 16,6 " class="Green" />
|
||||
</g>
|
||||
</svg>
|
||||
11
EDIDocumentImport/Resources/open1.svg
Normal file
11
EDIDocumentImport/Resources/open1.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Open" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Yellow{fill:#FFB115;}
|
||||
.st0{opacity:0.75;}
|
||||
</style>
|
||||
<g class="st0">
|
||||
<path d="M2.2,25.2l5.5-12c0.3-0.7,1-1.2,1.8-1.2H26V9c0-0.6-0.4-1-1-1H12V5c0-0.6-0.4-1-1-1H3C2.4,4,2,4.4,2,5v20 c0,0.2,0,0.3,0.1,0.4C2.1,25.3,2.2,25.3,2.2,25.2z" class="Yellow" />
|
||||
</g>
|
||||
<path d="M31.3,14H9.6L4,26h21.8c0.5,0,1.1-0.3,1.3-0.7L32,14.7C32.1,14.3,31.8,14,31.3,14z" class="Yellow" />
|
||||
</svg>
|
||||
13
EDIDocumentImport/Resources/open22.svg
Normal file
13
EDIDocumentImport/Resources/open22.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Open2" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Green{fill:#039C23;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.st0{opacity:0.75;}
|
||||
</style>
|
||||
<g class="st0">
|
||||
<path d="M19.2,10H12V7c0-0.6-0.4-1-1-1H3C2.4,6,2,6.5,2,7v18c0,0.2,0,0.3,0.1,0.4c0,0,0.1-0.1,0.1-0.2l5.5-10 C8,14.5,8.7,14,9.5,14h13.7L19.2,10z" class="Yellow" />
|
||||
</g>
|
||||
<path d="M29.3,16H9.6L4,26h19.8c0.5,0,1.1-0.2,1.3-0.6l4.9-8.9C30.1,16.2,29.8,16,29.3,16z" class="Yellow" />
|
||||
<path d="M28,8c0-3.3-2.7-6-6-6s-6,2.7-6,6c0-2.2,1.8-4,4-4s4,1.8,4,4h-4l6,6l6-6H28z" class="Green" />
|
||||
</svg>
|
||||
17
EDIDocumentImport/Resources/resetview.svg
Normal file
17
EDIDocumentImport/Resources/resetview.svg
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Red{fill:#D11C1C;}
|
||||
.Black{fill:#727272;}
|
||||
.Blue{fill:#1177D7;}
|
||||
.Green{fill:#039C23;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.White{fill:#FFFFFF;}
|
||||
.st0{opacity:0.5;}
|
||||
.st1{opacity:0.75;}
|
||||
.st2{opacity:0.25;}
|
||||
</style>
|
||||
<g id="ResetView">
|
||||
<path d="M20,10h-0.7c-2.6,0-5.1,1-7.1,2.9L6,19.2V10l-4,4v12h12l4-4H8.8l6.2-6.2c1.2-1.2,2.7-1.8,4.2-1.8v0H20 c3.3,0,6,2.7,6,6v2h4v-2C30,14.5,25.5,10,20,10z" class="Blue" />
|
||||
</g>
|
||||
</svg>
|
||||
15
EDIDocumentImport/Resources/rotatecounterclockwise.svg
Normal file
15
EDIDocumentImport/Resources/rotatecounterclockwise.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Yellow{fill:#FFB115;}
|
||||
.Red{fill:#D11C1C;}
|
||||
.Blue{fill:#1177D7;}
|
||||
.Green{fill:#039C23;}
|
||||
.Black{fill:#727272;}
|
||||
.White{fill:#FFFFFF;}
|
||||
.st0{opacity:0.75;}
|
||||
</style>
|
||||
<g id="RotateCounterclockwise">
|
||||
<path d="M18,4C11.4,4,6,9.4,6,16H1l7,7l7-7h-5c0-4.4,3.6-8,8-8s8,3.6,8,8s-3.6,8-8,8c-1.7,0-3.3-0.5-4.6-1.4 l-2.9,2.9c2,1.6,4.6,2.6,7.4,2.6c6.6,0,12-5.4,12-12C30,9.4,24.6,4,18,4z" class="Green" />
|
||||
</g>
|
||||
</svg>
|
||||
7
EDIDocumentImport/Resources/save.svg
Normal file
7
EDIDocumentImport/Resources/save.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Save" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Black{fill:#727272;}
|
||||
</style>
|
||||
<path d="M27,4h-3v10H8V4H5C4.4,4,4,4.4,4,5v22c0,0.6,0.4,1,1,1h22c0.6,0,1-0.4,1-1V5C28,4.4,27.6,4,27,4z M24,24H8v-6 h16V24z M10,4v8h10V4H10z M14,10h-2V6h2V10z" class="Black" />
|
||||
</svg>
|
||||
13
EDIDocumentImport/Resources/up.svg
Normal file
13
EDIDocumentImport/Resources/up.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
|
||||
<style type="text/css">
|
||||
.Green{fill:#039C23;}
|
||||
.Yellow{fill:#FFB115;}
|
||||
.st0{opacity:0.5;}
|
||||
</style>
|
||||
<g class="st0">
|
||||
<path d="M2.2,25.2l5.5-10C8,14.5,8.7,14,9.5,14H20v-4h-8V7c0-0.6-0.4-1-1-1H3C2.4,6,2,6.5,2,7v18 c0,0.2,0,0.3,0.1,0.4C2.1,25.4,2.2,25.3,2.2,25.2z" class="Yellow" />
|
||||
</g>
|
||||
<path d="M29.3,16H9.6L4,26h19.8c0.5,0,1.1-0.2,1.3-0.6l4.9-8.9C30.1,16.2,29.8,16,29.3,16z" class="Yellow" />
|
||||
<polygon points="24,2 18,8 22,8 22,14 26,14 26,8 30,8 " class="Green" />
|
||||
</svg>
|
||||
283
EDIDocumentImport/frmImportMain.Designer.vb
generated
283
EDIDocumentImport/frmImportMain.Designer.vb
generated
@@ -19,51 +19,58 @@ Partial Class frmImportMain
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim UnboundSourceProperty1 As DevExpress.Data.UnboundSourceProperty = New DevExpress.Data.UnboundSourceProperty()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmImportMain))
|
||||
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.txtVersion = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.txtFilesLoaded = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnLoadFiles = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnTransferFile = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnOpenInputDirectory = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnOpenOutputDirectory = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnOpenSchemaDirectory = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnReloadFile = 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.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.GridControlFiles = New DevExpress.XtraGrid.GridControl()
|
||||
Me.GridViewFiles = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.GridColumn3 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.SplitContainerControl4 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.UnboundSource1 = New DevExpress.Data.UnboundSource(Me.components)
|
||||
Me.colSelected = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.colFilename = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.SplitContainerGrids = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.SplitContainerGrids1 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.SplitContainerGrids2 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl1.SuspendLayout()
|
||||
CType(Me.GridControlFiles, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridViewFiles, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerControl2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl2.SuspendLayout()
|
||||
CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl3.SuspendLayout()
|
||||
CType(Me.SplitContainerControl4, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl4.SuspendLayout()
|
||||
CType(Me.UnboundSource1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerMain.SuspendLayout()
|
||||
CType(Me.SplitContainerGrids, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerGrids.SuspendLayout()
|
||||
CType(Me.SplitContainerGrids1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerGrids1.SuspendLayout()
|
||||
CType(Me.SplitContainerGrids2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerGrids2.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'RibbonControl
|
||||
'
|
||||
Me.RibbonControl.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.txtVersion, Me.txtFilesLoaded, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3})
|
||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.txtVersion, Me.txtFilesLoaded, Me.btnLoadFiles, Me.btnTransferFile, Me.btnOpenInputDirectory, Me.btnOpenOutputDirectory, Me.btnOpenSchemaDirectory, Me.btnReloadFile})
|
||||
Me.RibbonControl.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl.MaxItemId = 6
|
||||
Me.RibbonControl.MaxItemId = 12
|
||||
Me.RibbonControl.Name = "RibbonControl"
|
||||
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl.Size = New System.Drawing.Size(1215, 158)
|
||||
Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.RibbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide
|
||||
Me.RibbonControl.ShowToolbarCustomizeItem = False
|
||||
Me.RibbonControl.Size = New System.Drawing.Size(1215, 132)
|
||||
Me.RibbonControl.StatusBar = Me.RibbonStatusBar
|
||||
Me.RibbonControl.Toolbar.ShowCustomizeItem = False
|
||||
'
|
||||
'txtVersion
|
||||
'
|
||||
@@ -78,37 +85,70 @@ Partial Class frmImportMain
|
||||
Me.txtFilesLoaded.Id = 2
|
||||
Me.txtFilesLoaded.Name = "txtFilesLoaded"
|
||||
'
|
||||
'BarButtonItem1
|
||||
'btnLoadFiles
|
||||
'
|
||||
Me.BarButtonItem1.Caption = "Import"
|
||||
Me.BarButtonItem1.Id = 3
|
||||
Me.BarButtonItem1.Name = "BarButtonItem1"
|
||||
Me.btnLoadFiles.Caption = "Dateien einlesen"
|
||||
Me.btnLoadFiles.Id = 3
|
||||
Me.btnLoadFiles.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.export
|
||||
Me.btnLoadFiles.Name = "btnLoadFiles"
|
||||
'
|
||||
'BarButtonItem2
|
||||
'btnTransferFile
|
||||
'
|
||||
Me.BarButtonItem2.Caption = "Export"
|
||||
Me.BarButtonItem2.Id = 4
|
||||
Me.BarButtonItem2.Name = "BarButtonItem2"
|
||||
Me.btnTransferFile.Caption = "Aktuelle Datei übermitteln"
|
||||
Me.btnTransferFile.Id = 4
|
||||
Me.btnTransferFile.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.actions_checkcircled
|
||||
Me.btnTransferFile.Name = "btnTransferFile"
|
||||
'
|
||||
'BarButtonItem3
|
||||
'btnOpenInputDirectory
|
||||
'
|
||||
Me.BarButtonItem3.Caption = "Edit"
|
||||
Me.BarButtonItem3.Id = 5
|
||||
Me.BarButtonItem3.Name = "BarButtonItem3"
|
||||
Me.btnOpenInputDirectory.Caption = "Eingangsverzeichnis öffnen"
|
||||
Me.btnOpenInputDirectory.Id = 6
|
||||
Me.btnOpenInputDirectory.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.open22
|
||||
Me.btnOpenInputDirectory.Name = "btnOpenInputDirectory"
|
||||
'
|
||||
'btnOpenOutputDirectory
|
||||
'
|
||||
Me.btnOpenOutputDirectory.Caption = "Ausgangsverzeichnis öffnen"
|
||||
Me.btnOpenOutputDirectory.Id = 7
|
||||
Me.btnOpenOutputDirectory.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.up
|
||||
Me.btnOpenOutputDirectory.Name = "btnOpenOutputDirectory"
|
||||
'
|
||||
'btnOpenSchemaDirectory
|
||||
'
|
||||
Me.btnOpenSchemaDirectory.Caption = "Vorlagenverzeichnis öffnen"
|
||||
Me.btnOpenSchemaDirectory.Id = 9
|
||||
Me.btnOpenSchemaDirectory.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.open1
|
||||
Me.btnOpenSchemaDirectory.Name = "btnOpenSchemaDirectory"
|
||||
'
|
||||
'btnReloadFile
|
||||
'
|
||||
Me.btnReloadFile.Caption = "Aktuelle Datei neu laden"
|
||||
Me.btnReloadFile.Id = 11
|
||||
Me.btnReloadFile.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.rotatecounterclockwise
|
||||
Me.btnReloadFile.Name = "btnReloadFile"
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1})
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2})
|
||||
Me.RibbonPage1.Name = "RibbonPage1"
|
||||
Me.RibbonPage1.Text = "RibbonPage1"
|
||||
'
|
||||
'RibbonPageGroup1
|
||||
'
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem2)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem3)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnLoadFiles)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnTransferFile)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnReloadFile)
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "Start"
|
||||
'
|
||||
'RibbonPageGroup2
|
||||
'
|
||||
Me.RibbonPageGroup2.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenInputDirectory)
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenOutputDirectory)
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenSchemaDirectory)
|
||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||
Me.RibbonPageGroup2.Text = "Debugging"
|
||||
'
|
||||
'RibbonStatusBar
|
||||
'
|
||||
@@ -122,13 +162,13 @@ Partial Class frmImportMain
|
||||
'SplitContainerControl1
|
||||
'
|
||||
Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 158)
|
||||
Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 132)
|
||||
Me.SplitContainerControl1.Name = "SplitContainerControl1"
|
||||
Me.SplitContainerControl1.Panel1.Controls.Add(Me.GridControlFiles)
|
||||
Me.SplitContainerControl1.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerControl2)
|
||||
Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerMain)
|
||||
Me.SplitContainerControl1.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerControl1.Size = New System.Drawing.Size(1215, 564)
|
||||
Me.SplitContainerControl1.Size = New System.Drawing.Size(1215, 590)
|
||||
Me.SplitContainerControl1.SplitterPosition = 325
|
||||
Me.SplitContainerControl1.TabIndex = 2
|
||||
'
|
||||
@@ -139,83 +179,86 @@ Partial Class frmImportMain
|
||||
Me.GridControlFiles.MainView = Me.GridViewFiles
|
||||
Me.GridControlFiles.MenuManager = Me.RibbonControl
|
||||
Me.GridControlFiles.Name = "GridControlFiles"
|
||||
Me.GridControlFiles.Size = New System.Drawing.Size(325, 564)
|
||||
Me.GridControlFiles.Size = New System.Drawing.Size(325, 590)
|
||||
Me.GridControlFiles.TabIndex = 0
|
||||
Me.GridControlFiles.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewFiles})
|
||||
'
|
||||
'GridViewFiles
|
||||
'
|
||||
Me.GridViewFiles.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn1, Me.GridColumn2, Me.GridColumn3})
|
||||
Me.GridViewFiles.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colSelected, Me.colFilename})
|
||||
Me.GridViewFiles.GridControl = Me.GridControlFiles
|
||||
Me.GridViewFiles.Name = "GridViewFiles"
|
||||
'
|
||||
'GridColumn1
|
||||
'colSelected
|
||||
'
|
||||
Me.GridColumn1.Caption = "GridColumn1"
|
||||
Me.GridColumn1.FieldName = "Name"
|
||||
Me.GridColumn1.Name = "GridColumn1"
|
||||
Me.GridColumn1.Visible = True
|
||||
Me.GridColumn1.VisibleIndex = 0
|
||||
Me.colSelected.Caption = "Ausgewählt"
|
||||
Me.colSelected.FieldName = "Selected"
|
||||
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
|
||||
'
|
||||
'GridColumn2
|
||||
'colFilename
|
||||
'
|
||||
Me.GridColumn2.Caption = "GridColumn2"
|
||||
Me.GridColumn2.FieldName = "FullName"
|
||||
Me.GridColumn2.Name = "GridColumn2"
|
||||
Me.GridColumn2.Visible = True
|
||||
Me.GridColumn2.VisibleIndex = 1
|
||||
Me.colFilename.Caption = "Dateiname"
|
||||
Me.colFilename.FieldName = "Name"
|
||||
Me.colFilename.Name = "colFilename"
|
||||
Me.colFilename.Visible = True
|
||||
Me.colFilename.VisibleIndex = 1
|
||||
'
|
||||
'GridColumn3
|
||||
'SplitContainerMain
|
||||
'
|
||||
Me.GridColumn3.Caption = "GridColumn3"
|
||||
Me.GridColumn3.FieldName = "Selected"
|
||||
Me.GridColumn3.Name = "GridColumn3"
|
||||
Me.GridColumn3.Visible = True
|
||||
Me.GridColumn3.VisibleIndex = 2
|
||||
Me.SplitContainerMain.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerMain.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainerMain.Name = "SplitContainerMain"
|
||||
Me.SplitContainerMain.Panel1.Controls.Add(Me.SplitContainerGrids)
|
||||
Me.SplitContainerMain.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerMain.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerMain.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel1
|
||||
Me.SplitContainerMain.Size = New System.Drawing.Size(880, 590)
|
||||
Me.SplitContainerMain.SplitterPosition = 588
|
||||
Me.SplitContainerMain.TabIndex = 1
|
||||
'
|
||||
'SplitContainerControl2
|
||||
'SplitContainerGrids
|
||||
'
|
||||
Me.SplitContainerControl2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerControl2.Horizontal = False
|
||||
Me.SplitContainerControl2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainerControl2.Name = "SplitContainerControl2"
|
||||
Me.SplitContainerControl2.Panel1.Controls.Add(Me.SplitContainerControl3)
|
||||
Me.SplitContainerControl2.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerControl2.Panel2.Controls.Add(Me.SplitContainerControl4)
|
||||
Me.SplitContainerControl2.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerControl2.Size = New System.Drawing.Size(880, 564)
|
||||
Me.SplitContainerControl2.SplitterPosition = 288
|
||||
Me.SplitContainerControl2.TabIndex = 0
|
||||
Me.SplitContainerGrids.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerGrids.Horizontal = False
|
||||
Me.SplitContainerGrids.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainerGrids.Name = "SplitContainerGrids"
|
||||
Me.SplitContainerGrids.Panel1.Controls.Add(Me.SplitContainerGrids1)
|
||||
Me.SplitContainerGrids.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerGrids.Panel2.Controls.Add(Me.SplitContainerGrids2)
|
||||
Me.SplitContainerGrids.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerGrids.Size = New System.Drawing.Size(880, 590)
|
||||
Me.SplitContainerGrids.SplitterPosition = 288
|
||||
Me.SplitContainerGrids.TabIndex = 0
|
||||
'
|
||||
'SplitContainerControl3
|
||||
'SplitContainerGrids1
|
||||
'
|
||||
Me.SplitContainerControl3.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerControl3.Horizontal = False
|
||||
Me.SplitContainerControl3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainerControl3.Name = "SplitContainerControl3"
|
||||
Me.SplitContainerControl3.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerControl3.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerControl3.Size = New System.Drawing.Size(880, 288)
|
||||
Me.SplitContainerControl3.SplitterPosition = 118
|
||||
Me.SplitContainerControl3.TabIndex = 0
|
||||
Me.SplitContainerGrids1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerGrids1.Horizontal = False
|
||||
Me.SplitContainerGrids1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainerGrids1.Name = "SplitContainerGrids1"
|
||||
Me.SplitContainerGrids1.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerGrids1.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerGrids1.Size = New System.Drawing.Size(880, 288)
|
||||
Me.SplitContainerGrids1.SplitterPosition = 118
|
||||
Me.SplitContainerGrids1.TabIndex = 0
|
||||
'
|
||||
'SplitContainerControl4
|
||||
'SplitContainerGrids2
|
||||
'
|
||||
Me.SplitContainerControl4.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerControl4.Horizontal = False
|
||||
Me.SplitContainerControl4.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainerControl4.Name = "SplitContainerControl4"
|
||||
Me.SplitContainerControl4.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerControl4.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerControl4.Size = New System.Drawing.Size(880, 266)
|
||||
Me.SplitContainerControl4.SplitterPosition = 126
|
||||
Me.SplitContainerControl4.TabIndex = 0
|
||||
'
|
||||
'UnboundSource1
|
||||
'
|
||||
UnboundSourceProperty1.DisplayName = Nothing
|
||||
UnboundSourceProperty1.Name = "Property0"
|
||||
Me.UnboundSource1.Properties.Add(UnboundSourceProperty1)
|
||||
Me.SplitContainerGrids2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainerGrids2.Horizontal = False
|
||||
Me.SplitContainerGrids2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainerGrids2.Name = "SplitContainerGrids2"
|
||||
Me.SplitContainerGrids2.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerGrids2.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerGrids2.Size = New System.Drawing.Size(880, 292)
|
||||
Me.SplitContainerGrids2.SplitterPosition = 126
|
||||
Me.SplitContainerGrids2.TabIndex = 0
|
||||
'
|
||||
'frmImportMain
|
||||
'
|
||||
@@ -228,19 +271,20 @@ Partial Class frmImportMain
|
||||
Me.Name = "frmImportMain"
|
||||
Me.Ribbon = Me.RibbonControl
|
||||
Me.StatusBar = Me.RibbonStatusBar
|
||||
Me.Text = "frmImportMain"
|
||||
Me.Text = "WebService Multitool für WinLine"
|
||||
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerControl1.ResumeLayout(False)
|
||||
CType(Me.GridControlFiles, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridViewFiles, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SplitContainerControl2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerControl2.ResumeLayout(False)
|
||||
CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerControl3.ResumeLayout(False)
|
||||
CType(Me.SplitContainerControl4, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerControl4.ResumeLayout(False)
|
||||
CType(Me.UnboundSource1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerMain.ResumeLayout(False)
|
||||
CType(Me.SplitContainerGrids, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerGrids.ResumeLayout(False)
|
||||
CType(Me.SplitContainerGrids1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerGrids1.ResumeLayout(False)
|
||||
CType(Me.SplitContainerGrids2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainerGrids2.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -255,14 +299,17 @@ Partial Class frmImportMain
|
||||
Friend WithEvents GridViewFiles As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents txtVersion As DevExpress.XtraBars.BarStaticItem
|
||||
Friend WithEvents txtFilesLoaded As DevExpress.XtraBars.BarStaticItem
|
||||
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents SplitContainerControl2 As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents SplitContainerControl3 As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents SplitContainerControl4 As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents GridColumn3 As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents UnboundSource1 As DevExpress.Data.UnboundSource
|
||||
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents btnLoadFiles As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents SplitContainerGrids As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents SplitContainerGrids1 As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents SplitContainerGrids2 As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents colFilename As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents colSelected As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents btnTransferFile As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents btnOpenInputDirectory As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents btnOpenOutputDirectory As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl
|
||||
Friend WithEvents btnReloadFile As DevExpress.XtraBars.BarButtonItem
|
||||
End Class
|
||||
|
||||
@@ -117,7 +117,23 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="UnboundSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="DevExpress.Data.v19.2" name="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<data name="colSelected.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
|
||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHICAAAC77u/
|
||||
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
|
||||
ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz
|
||||
OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp
|
||||
dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkNoZWNrQ2lyY2xlZCI+DQogICAgPHBhdGggZD0iTTE2
|
||||
LDRDOS40LDQsNCw5LjQsNCwxNmMwLDYuNiw1LjQsMTIsMTIsMTJzMTItNS40LDEyLTEyQzI4LDkuNCwy
|
||||
Mi42LDQsMTYsNHogTTE0LDIybC02LTZsMi0ybDQsNGw4LThsMiwyICAgTDE0LDIyeiIgY2xhc3M9Ikdy
|
||||
ZWVuIiAvPg0KICA8L2c+DQo8L3N2Zz4L
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -4,6 +4,7 @@ Imports System.Xml
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DigitalData.Controls.SQLConfig
|
||||
Imports DigitalData.GUIs.Common
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
@@ -18,15 +19,18 @@ Public Class frmImportMain
|
||||
Private ConfigManager As ConfigManager(Of ImporterShared.Config)
|
||||
Private Database As MSSQLServer
|
||||
Private Winline As Data
|
||||
Private FileEx As DigitalData.Modules.Filesystem.File
|
||||
Private WebService As WebService
|
||||
Private PositionData As PositionData
|
||||
Private DocumentLoader As Documents.DocumentLoader
|
||||
Private SchemaLoader As Schemas.SchemaLoader
|
||||
Private GridLoader As GridLoader
|
||||
|
||||
Private Grids As List(Of GridControl)
|
||||
Private GridLoader As GridLoader
|
||||
Private GridBuilder As GridBuilder
|
||||
|
||||
Private CurrentSchema As String
|
||||
Private CurrentDocument As Document
|
||||
|
||||
Private Sub frmImportMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
txtVersion.Caption = String.Format(txtVersion.Caption, Application.ProductVersion)
|
||||
@@ -35,11 +39,19 @@ Public Class frmImportMain
|
||||
Logger = LogConfig.GetLogger()
|
||||
Logger.Info("EDI Document Importer, Version [{0}]", Application.ProductVersion)
|
||||
|
||||
ConfigManager = New ConfigManager(Of ImporterShared.Config)(LogConfig,
|
||||
ConfigManager = New ConfigManager(Of Config)(LogConfig,
|
||||
Application.UserAppDataPath,
|
||||
Application.CommonAppDataPath,
|
||||
Application.StartupPath)
|
||||
|
||||
GridBuilder = New GridBuilder(GridViewFiles)
|
||||
GridBuilder.
|
||||
WithDefaults.
|
||||
WithReadOnlyOptions.
|
||||
WithClipboardHandler()
|
||||
|
||||
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig)
|
||||
|
||||
' If ConnectionString does not exist, show SQL Config Form
|
||||
If ConfigManager.Config.ConnectionString = String.Empty Then
|
||||
Dim oForm As New frmSQLConfig(LogConfig) With {
|
||||
@@ -65,6 +77,7 @@ Public Class frmImportMain
|
||||
Winline.LoadMandators()
|
||||
Winline.LoadEconomicYears()
|
||||
Winline.LoadDocumentKinds(Winline.Mandators)
|
||||
Winline.LoadTemplateConfiguration()
|
||||
For Each oMandator In Winline.Mandators
|
||||
Winline.LoadAccounts(oMandator)
|
||||
Next
|
||||
@@ -91,28 +104,28 @@ Public Class frmImportMain
|
||||
If oTableCounter = 0 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl3.Panel1.Controls.Add(oGrid)
|
||||
SplitContainerGrids1.Panel1.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
|
||||
If oTableCounter = 1 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl3.Panel2.Controls.Add(oGrid)
|
||||
SplitContainerGrids1.Panel2.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
|
||||
If oTableCounter = 2 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl4.Panel1.Controls.Add(oGrid)
|
||||
SplitContainerGrids2.Panel1.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
|
||||
If oTableCounter = 3 Then
|
||||
Dim oGrid = GridLoader.GetGridFromElement(oTable)
|
||||
AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick
|
||||
SplitContainerControl4.Panel2.Controls.Add(oGrid)
|
||||
SplitContainerGrids2.Panel2.Controls.Add(oGrid)
|
||||
oGrids.Add(oGrid)
|
||||
End If
|
||||
|
||||
@@ -124,7 +137,7 @@ Public Class frmImportMain
|
||||
Next
|
||||
|
||||
If oTableCounter < 3 Then
|
||||
SplitContainerControl2.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel1
|
||||
SplitContainerGrids.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel1
|
||||
End If
|
||||
|
||||
Return oGrids
|
||||
@@ -133,14 +146,35 @@ Public Class frmImportMain
|
||||
Private Sub Grid_DoubleClick(sender As Object, e As EventArgs)
|
||||
Dim oGrid As GridControl = DirectCast(sender, GridControl)
|
||||
Dim oView As GridView = DirectCast(oGrid.FocusedView, GridView)
|
||||
|
||||
If Not oView.IsDataRow(oView.FocusedRowHandle) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oRow As DataRow = oView.GetDataRow(oView.FocusedRowHandle)
|
||||
Dim oColumns = oView.Columns.Select(Function(c) c.FieldName).ToList()
|
||||
Dim oDocumentRow = CurrentDocument.Rows.
|
||||
Where(Function(r) r.Id.ToString = oRow.Item("GUID")).
|
||||
SingleOrDefault()
|
||||
|
||||
Dim oForm As New frmRowEditor(oRow, oColumns)
|
||||
oForm.Showdialog()
|
||||
Dim oAccounts = Winline.Accounts.
|
||||
Where(Function(a) a.Mandator = CurrentDocument.Mandator).
|
||||
ToList()
|
||||
|
||||
Dim oForm As New frmRowEditor(oColumns, oDocumentRow, oAccounts)
|
||||
If oForm.ShowDialog() = DialogResult.OK Then
|
||||
'Dim oModifiedRow = oForm.DocumentRow
|
||||
|
||||
'For Each oField In oModifiedRow.Fields
|
||||
' oRow.Item(oField.Key) = oField.Value.Final
|
||||
|
||||
'Next
|
||||
|
||||
'oRow.AcceptChanges()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||
Private Sub btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnLoadFiles.ItemClick
|
||||
If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory) Then
|
||||
GridControlFiles.DataSource = DocumentLoader.Files
|
||||
End If
|
||||
@@ -149,74 +183,113 @@ Public Class frmImportMain
|
||||
Private Sub GridViewFiles_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewFiles.FocusedRowChanged
|
||||
|
||||
Dim oDocument As Document = GridViewFiles.GetRow(e.FocusedRowHandle)
|
||||
Dim oDatasources As New Dictionary(Of String, DataTable)
|
||||
|
||||
For Each oRow In oDocument.Rows
|
||||
Dim oGrid As GridControl = Grids.
|
||||
Where(Function(g) g.Name = oRow.Name).
|
||||
SingleOrDefault()
|
||||
|
||||
If Not oDatasources.ContainsKey(oRow.Name) Then
|
||||
Dim oTable As New DataTable()
|
||||
|
||||
For Each ofield In oRow.Fields
|
||||
oTable.Columns.Add(New DataColumn(ofield.Key))
|
||||
Next
|
||||
oDatasources.Add(oRow.Name, oTable)
|
||||
|
||||
oGrid.DataSource = oTable
|
||||
End If
|
||||
|
||||
Dim oDataTable = oDatasources.Item(oRow.Name)
|
||||
Dim oDataRow = oDataTable.NewRow()
|
||||
|
||||
For Each oField In oRow.Fields
|
||||
oDataRow.Item(oField.Key) = oField.Value
|
||||
Next
|
||||
|
||||
oDataTable.Rows.Add(oDataRow)
|
||||
oDataTable.AcceptChanges()
|
||||
Next
|
||||
If LoadDocument(oDocument) Then
|
||||
CurrentDocument = oDocument
|
||||
Else
|
||||
MsgBox("Das Laden des Dokuments ist fehlgeschlagen!", MsgBoxStyle.Critical, Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
||||
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
|
||||
Private Function LoadDocument(pDocument As Document)
|
||||
Try
|
||||
Dim oDatasources As New Dictionary(Of String, DataTable)
|
||||
|
||||
Using oStream As New MemoryStream()
|
||||
Dim w = XmlWriter.Create(oStream)
|
||||
' List of Root Elements in XML
|
||||
For Each oRow In pDocument.Rows
|
||||
Dim oGrid As GridControl = Grids.
|
||||
Where(Function(g) g.Name = oRow.Name).
|
||||
SingleOrDefault()
|
||||
|
||||
w.WriteStartDocument()
|
||||
' Create initial Datatable if none exists for this Root Element
|
||||
If Not oDatasources.ContainsKey(oRow.Name) Then
|
||||
Dim oTable As New DataTable()
|
||||
|
||||
w.WriteStartElement("MESOWebService")
|
||||
w.WriteAttributeString("Template", oDocument.TemplateName)
|
||||
w.WriteAttributeString("TemplateType", oDocument.TemplateType)
|
||||
w.WriteAttributeString("option", oDocument.Option)
|
||||
w.WriteAttributeString("printVoucher", oDocument.PrintVoucher)
|
||||
oTable.Columns.Add(New DataColumn("GUID"))
|
||||
|
||||
For Each oRow In oDocument.Rows
|
||||
w.WriteStartElement(oRow.Name)
|
||||
For Each oField In oRow.Fields
|
||||
oTable.Columns.Add(New DataColumn(oField.Key))
|
||||
Next
|
||||
|
||||
For Each oField As KeyValuePair(Of String, String) In oRow.Fields
|
||||
w.WriteStartElement(oField.Key)
|
||||
w.WriteValue(oField.Value)
|
||||
w.WriteEndElement() ' Field
|
||||
oDatasources.Add(oRow.Name, oTable)
|
||||
|
||||
oGrid.DataSource = oTable
|
||||
End If
|
||||
|
||||
Dim oDataTable = oDatasources.Item(oRow.Name)
|
||||
Dim oDataRow = oDataTable.NewRow()
|
||||
|
||||
oDataRow.Item("GUID") = oRow.Id.ToString
|
||||
|
||||
For Each oField In oRow.Fields
|
||||
oDataRow.Item(oField.Key) = oField.Value
|
||||
Next
|
||||
|
||||
w.WriteEndElement() ' Row
|
||||
oDataTable.Rows.Add(oDataRow)
|
||||
oDataTable.AcceptChanges()
|
||||
Next
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
w.WriteEndElement() ' MESOWebService
|
||||
Private Async Sub btnTransferFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTransferFile.ItemClick
|
||||
Try
|
||||
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
|
||||
GridViewFiles.ShowLoadingPanel()
|
||||
SplitContainerGrids.Enabled = False
|
||||
Await WebService.TransferDocumentToWinline(oDocument)
|
||||
|
||||
MsgBox("Document successfully transferred to WinLine!", MsgBoxStyle.Information, Text)
|
||||
|
||||
w.WriteEndDocument() ' Document
|
||||
Catch ex As Exception
|
||||
MsgBox("Error while transferring to WinLine: " & ex.Message, MsgBoxStyle.Critical, Text)
|
||||
Logger.Error(ex)
|
||||
Finally
|
||||
SplitContainerGrids.Enabled = True
|
||||
GridViewFiles.HideLoadingPanel()
|
||||
|
||||
w.Close()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
File.WriteAllBytes(ConfigManager.Config.OutputDirectory, oStream.ToArray)
|
||||
End Using
|
||||
Private Sub btnOpenInputDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenInputDirectory.ItemClick
|
||||
TryOpenDirectory(ConfigManager.Config.InputDirectory)
|
||||
End Sub
|
||||
|
||||
Private Sub btnOpenOutputDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenOutputDirectory.ItemClick
|
||||
TryOpenDirectory(IO.Path.Combine(FileEx.GetAppDataPath("Digital Data", "EDI Document Importer"), "WebService"))
|
||||
End Sub
|
||||
|
||||
Private Sub btnOpenSchemaDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenSchemaDirectory.ItemClick
|
||||
TryOpenDirectory(ConfigManager.Config.SchemaDirectory)
|
||||
End Sub
|
||||
|
||||
Private Sub TryOpenDirectory(pPath As String)
|
||||
Try
|
||||
Process.Start(pPath)
|
||||
Catch ex As Exception
|
||||
MsgBox($"Path {pPath} could not be found!", MsgBoxStyle.Exclamation, Text)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub btnReloadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReloadFile.ItemClick
|
||||
Dim oResult As DialogResult = MsgBox("Wollen Sie wirklich die Aktuelle Datei neu laden? Alle von Ihnen getätigte Änderungen werden dabei verworfen.", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
|
||||
|
||||
If oResult = DialogResult.Yes Then
|
||||
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
|
||||
|
||||
Dim oNewDocument = DocumentLoader.LoadFile(oDocument.File)
|
||||
Dim oIndex = DocumentLoader.Files.IndexOf(oDocument)
|
||||
DocumentLoader.Files.Item(oIndex) = oNewDocument
|
||||
|
||||
If LoadDocument(oNewDocument) Then
|
||||
CurrentDocument = oNewDocument
|
||||
Else
|
||||
MsgBox("Das Laden des Dokuments ist fehlgeschlagen!", MsgBoxStyle.Critical, Text)
|
||||
CurrentDocument = Nothing
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
123
EDIDocumentImport/frmRowEditor.Designer.vb
generated
123
EDIDocumentImport/frmRowEditor.Designer.vb
generated
@@ -20,15 +20,20 @@ Partial Class frmRowEditor
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnSave = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnApplyFromWinline = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.btnApplyFromOriginal = 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.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
|
||||
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.KEY = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.VALUE = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.Key = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.ValueOriginal = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.ValueExternal = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.ValueFinal = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -38,9 +43,9 @@ Partial Class frmRowEditor
|
||||
'
|
||||
Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified
|
||||
Me.RibbonControl1.ExpandCollapseItem.Id = 0
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1})
|
||||
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnSave, Me.btnApplyFromWinline, Me.btnApplyFromOriginal})
|
||||
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RibbonControl1.MaxItemId = 2
|
||||
Me.RibbonControl1.MaxItemId = 4
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||
@@ -48,24 +53,46 @@ Partial Class frmRowEditor
|
||||
Me.RibbonControl1.Size = New System.Drawing.Size(914, 63)
|
||||
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
|
||||
'
|
||||
'BarButtonItem1
|
||||
'btnSave
|
||||
'
|
||||
Me.BarButtonItem1.Caption = "Save"
|
||||
Me.BarButtonItem1.Id = 1
|
||||
Me.BarButtonItem1.Name = "BarButtonItem1"
|
||||
Me.btnSave.Caption = "Speichern und Schließen"
|
||||
Me.btnSave.Id = 1
|
||||
Me.btnSave.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.save
|
||||
Me.btnSave.Name = "btnSave"
|
||||
'
|
||||
'btnApplyFromWinline
|
||||
'
|
||||
Me.btnApplyFromWinline.Caption = "Aus Winline übernehmen"
|
||||
Me.btnApplyFromWinline.Id = 2
|
||||
Me.btnApplyFromWinline.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.actions_arrow4down
|
||||
Me.btnApplyFromWinline.Name = "btnApplyFromWinline"
|
||||
'
|
||||
'btnApplyFromOriginal
|
||||
'
|
||||
Me.btnApplyFromOriginal.Caption = "Zurücksetzen"
|
||||
Me.btnApplyFromOriginal.Id = 3
|
||||
Me.btnApplyFromOriginal.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.resetview
|
||||
Me.btnApplyFromOriginal.Name = "btnApplyFromOriginal"
|
||||
'
|
||||
'RibbonPage1
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1})
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2})
|
||||
Me.RibbonPage1.Name = "RibbonPage1"
|
||||
Me.RibbonPage1.Text = "RibbonPage1"
|
||||
'
|
||||
'RibbonPageGroup1
|
||||
'
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1)
|
||||
Me.RibbonPageGroup1.ItemLinks.Add(Me.btnSave)
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
Me.RibbonPageGroup1.Text = "RibbonPageGroup1"
|
||||
'
|
||||
'RibbonPageGroup2
|
||||
'
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnApplyFromWinline)
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnApplyFromOriginal)
|
||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||
Me.RibbonPageGroup2.Text = "RibbonPageGroup2"
|
||||
'
|
||||
'RibbonStatusBar1
|
||||
'
|
||||
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 589)
|
||||
@@ -91,31 +118,56 @@ Partial Class frmRowEditor
|
||||
'
|
||||
'GridView1
|
||||
'
|
||||
Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.KEY, Me.VALUE})
|
||||
Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.Key, Me.ValueOriginal, Me.ValueExternal, Me.ValueFinal})
|
||||
Me.GridView1.GridControl = Me.GridControl1
|
||||
Me.GridView1.Name = "GridView1"
|
||||
Me.GridView1.OptionsView.RowAutoHeight = True
|
||||
'
|
||||
'KEY
|
||||
'Key
|
||||
'
|
||||
Me.KEY.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.KEY.AppearanceCell.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.KEY.AppearanceCell.Options.UseBackColor = True
|
||||
Me.KEY.AppearanceCell.Options.UseFont = True
|
||||
Me.KEY.Caption = "KEY"
|
||||
Me.KEY.FieldName = "KEY"
|
||||
Me.KEY.Name = "KEY"
|
||||
Me.KEY.OptionsColumn.AllowEdit = False
|
||||
Me.KEY.OptionsColumn.ReadOnly = True
|
||||
Me.KEY.Visible = True
|
||||
Me.KEY.VisibleIndex = 0
|
||||
Me.Key.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.Key.AppearanceCell.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Key.AppearanceCell.Options.UseBackColor = True
|
||||
Me.Key.AppearanceCell.Options.UseFont = True
|
||||
Me.Key.Caption = "Schlüssel"
|
||||
Me.Key.FieldName = "KEY"
|
||||
Me.Key.Name = "Key"
|
||||
Me.Key.OptionsColumn.AllowEdit = False
|
||||
Me.Key.OptionsColumn.ReadOnly = True
|
||||
Me.Key.Visible = True
|
||||
Me.Key.VisibleIndex = 0
|
||||
'
|
||||
'VALUE
|
||||
'ValueOriginal
|
||||
'
|
||||
Me.VALUE.Caption = "VALUE"
|
||||
Me.VALUE.FieldName = "VALUE"
|
||||
Me.VALUE.Name = "VALUE"
|
||||
Me.VALUE.Visible = True
|
||||
Me.VALUE.VisibleIndex = 1
|
||||
Me.ValueOriginal.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.ValueOriginal.AppearanceCell.Options.UseBackColor = True
|
||||
Me.ValueOriginal.Caption = "Original Wert"
|
||||
Me.ValueOriginal.FieldName = "VALUE_ORIGINAL"
|
||||
Me.ValueOriginal.Name = "ValueOriginal"
|
||||
Me.ValueOriginal.OptionsColumn.AllowEdit = False
|
||||
Me.ValueOriginal.OptionsColumn.ReadOnly = True
|
||||
Me.ValueOriginal.Visible = True
|
||||
Me.ValueOriginal.VisibleIndex = 1
|
||||
'
|
||||
'ValueExternal
|
||||
'
|
||||
Me.ValueExternal.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.ValueExternal.AppearanceCell.Options.UseBackColor = True
|
||||
Me.ValueExternal.Caption = "Winline Wert"
|
||||
Me.ValueExternal.FieldName = "VALUE_EXTERNAL"
|
||||
Me.ValueExternal.Name = "ValueExternal"
|
||||
Me.ValueExternal.OptionsColumn.AllowEdit = False
|
||||
Me.ValueExternal.OptionsColumn.ReadOnly = True
|
||||
Me.ValueExternal.Visible = True
|
||||
Me.ValueExternal.VisibleIndex = 2
|
||||
'
|
||||
'ValueFinal
|
||||
'
|
||||
Me.ValueFinal.Caption = "Finaler Wert"
|
||||
Me.ValueFinal.FieldName = "VALUE_FINAL"
|
||||
Me.ValueFinal.Name = "ValueFinal"
|
||||
Me.ValueFinal.Visible = True
|
||||
Me.ValueFinal.VisibleIndex = 3
|
||||
'
|
||||
'frmRowEditor
|
||||
'
|
||||
@@ -142,9 +194,14 @@ Partial Class frmRowEditor
|
||||
Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar
|
||||
Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage
|
||||
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents btnSave As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
|
||||
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents KEY As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents VALUE As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents Key As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents ValueOriginal As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents ValueFinal As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents ValueExternal As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents btnApplyFromWinline As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents btnApplyFromOriginal As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||
End Class
|
||||
|
||||
@@ -2,51 +2,136 @@
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraVerticalGrid.Rows
|
||||
Imports ImporterShared.Documents
|
||||
Imports ImporterShared.DocumentRow
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports ImporterShared.Winline
|
||||
|
||||
Public Class frmRowEditor
|
||||
Private Row As DataRow
|
||||
Private Columns As List(Of String)
|
||||
Private ReadOnly _Columns As List(Of String)
|
||||
Private ReadOnly _DataTable As New DataTable
|
||||
Private ReadOnly _Accounts As List(Of Account)
|
||||
Private _DocumentRow As ImporterShared.DocumentRow
|
||||
|
||||
Public Sub New(pRow As DataRow, pColumns As List(Of String))
|
||||
Private DatePicker As New RepositoryItemDateEdit()
|
||||
Private MultilineEditor As New RepositoryItemMemoEdit()
|
||||
Private AccountPicker As New RepositoryItemSearchLookUpEdit
|
||||
|
||||
Private Const COL_KEY = "KEY"
|
||||
Private Const COL_VALUE_ORIGINAL = "VALUE_ORIGINAL"
|
||||
Private Const COL_VALUE_EXTERNAL = "VALUE_EXTERNAL"
|
||||
Private Const COL_VALUE_FINAL = "VALUE_FINAL"
|
||||
|
||||
Public ReadOnly Property DocumentRow As ImporterShared.DocumentRow
|
||||
Get
|
||||
Return _DocumentRow
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New(pColumns As List(Of String), pDocumentRow As ImporterShared.DocumentRow, pAccounts As List(Of Account))
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
Row = pRow
|
||||
Columns = pColumns
|
||||
_Columns = pColumns
|
||||
_Accounts = pAccounts
|
||||
_DocumentRow = pDocumentRow
|
||||
|
||||
AccountPicker.DataSource = _Accounts
|
||||
AccountPicker.DisplayMember = "Name"
|
||||
AccountPicker.ValueMember = "Id"
|
||||
End Sub
|
||||
|
||||
Private Sub frmRowEditor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Row Is Nothing Then
|
||||
Dim oDict = New Dictionary(Of String, FieldValue)
|
||||
|
||||
For Each oColumn As String In _Columns
|
||||
Dim oField = _DocumentRow.Fields.
|
||||
Where(Function(f) f.Key = oColumn).
|
||||
SingleOrDefault()
|
||||
|
||||
If oField.Value Is Nothing Then
|
||||
oDict.Add(oColumn, New FieldValue())
|
||||
Else
|
||||
oDict.Add(oColumn, oField.Value)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
_DataTable.Columns.Clear()
|
||||
_DataTable.Columns.Add(COL_KEY)
|
||||
_DataTable.Columns.Add(COL_VALUE_ORIGINAL)
|
||||
_DataTable.Columns.Add(COL_VALUE_EXTERNAL)
|
||||
_DataTable.Columns.Add(COL_VALUE_FINAL)
|
||||
|
||||
For Each oKV In oDict
|
||||
_DataTable.Rows.Add(oKV.Key, oKV.Value.Original, oKV.Value.External, oKV.Value.Final)
|
||||
Next
|
||||
|
||||
GridControl1.DataSource = _DataTable
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick
|
||||
GridView1.CloseEditor()
|
||||
|
||||
For Each oRow As DataRow In _DataTable.Rows
|
||||
Dim oField = _DocumentRow.Fields.
|
||||
Where(Function(f) f.Key = oRow.Item(COL_KEY)).
|
||||
SingleOrDefault()
|
||||
|
||||
If oField.Key Is Nothing Then
|
||||
oField = New KeyValuePair(Of String, FieldValue)(oRow.Item(COL_KEY), New FieldValue())
|
||||
End If
|
||||
|
||||
Dim oFieldValue = oField.Value
|
||||
oFieldValue.Final = oRow.Item(COL_VALUE_FINAL)
|
||||
|
||||
If _DocumentRow.Fields.ContainsKey(oField.Key) Then
|
||||
_DocumentRow.Fields.Item(oField.Key) = oFieldValue
|
||||
Else
|
||||
_DocumentRow.Fields.Add(oField.Key, oFieldValue)
|
||||
End If
|
||||
Next
|
||||
|
||||
DialogResult = DialogResult.OK
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btnApplyFromWinline_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnApplyFromWinline.ItemClick
|
||||
Dim oSelectedRow As DataRow = GridView1.GetDataRow(GridView1.FocusedRowHandle)
|
||||
|
||||
If oSelectedRow Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oDataTable As New DataTable()
|
||||
Dim oDict = New Dictionary(Of String, String)
|
||||
oSelectedRow.Item(COL_VALUE_FINAL) = oSelectedRow.Item(COL_VALUE_EXTERNAL)
|
||||
oSelectedRow.AcceptChanges()
|
||||
End Sub
|
||||
|
||||
For Each oColumn As String In Columns
|
||||
Dim oValue
|
||||
Try
|
||||
oValue = Row.Item(oColumn)
|
||||
Catch ex As Exception
|
||||
oValue = String.Empty
|
||||
End Try
|
||||
Private Sub btnApplyFromOriginal_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnApplyFromOriginal.ItemClick
|
||||
Dim oSelectedRow As DataRow = GridView1.GetDataRow(GridView1.FocusedRowHandle)
|
||||
|
||||
oDict.Add(oColumn, oValue)
|
||||
Next
|
||||
|
||||
oDataTable.Columns.Add("KEY")
|
||||
oDataTable.Columns.Add("VALUE")
|
||||
|
||||
For Each oKV In oDict
|
||||
oDataTable.Rows.Add(oKV.Key, oKV.Value)
|
||||
Next
|
||||
|
||||
GridControl1.DataSource = oDataTable
|
||||
GridView1.BestFitColumns()
|
||||
If oSelectedRow Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
oSelectedRow.Item(COL_VALUE_FINAL) = oSelectedRow.Item(COL_VALUE_ORIGINAL)
|
||||
oSelectedRow.AcceptChanges()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub GridView1_CustomRowCellEdit(sender As Object, e As CustomRowCellEditEventArgs) Handles GridView1.CustomRowCellEdit
|
||||
Dim oDataRow As DataRow = GridView1.GetDataRow(e.RowHandle)
|
||||
|
||||
If e.Column.FieldName = COL_VALUE_ORIGINAL Or e.Column.FieldName = COL_VALUE_FINAL Then
|
||||
If oDataRow.Item(COL_KEY) = "Datum_Auftrag-Bestellung" Then
|
||||
e.RepositoryItem = DatePicker
|
||||
ElseIf e.CellValue.ToString.Length > 100 Then
|
||||
e.RepositoryItem = MultilineEditor
|
||||
ElseIf oDataRow.Item(COL_KEY) = "Fakt_Kontonummer" Or oDataRow.Item(COL_KEY) = "Lief_Kontonummer" Then
|
||||
e.RepositoryItem = AccountPicker
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
6
ImporterShared/Constants.vb
Normal file
6
ImporterShared/Constants.vb
Normal file
@@ -0,0 +1,6 @@
|
||||
Public Class Constants
|
||||
Public Enum XmlFunction
|
||||
GLN = 1
|
||||
EAN = 2
|
||||
End Enum
|
||||
End Class
|
||||
@@ -7,11 +7,22 @@ Namespace Documents
|
||||
Public Type As DocumentType
|
||||
Public Selected As Boolean = False
|
||||
|
||||
''' <summary>
|
||||
''' TODO: Set before submitting to web services
|
||||
''' </summary>
|
||||
Public CreatedAt As Date
|
||||
|
||||
|
||||
Public TemplateName As String
|
||||
Public TemplateType As Integer
|
||||
Public [Option] As Integer
|
||||
Public PrintVoucher As Integer
|
||||
|
||||
''' <summary>
|
||||
''' Original Values, read-only
|
||||
''' </summary>
|
||||
Public Property Rows As New List(Of DocumentRow)
|
||||
|
||||
Public ReadOnly Property FullName As String
|
||||
Get
|
||||
Return File?.FullName
|
||||
@@ -24,7 +35,9 @@ Namespace Documents
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Rows As New List(Of DocumentRow)
|
||||
Public Overrides Function Equals(obj As Object) As Boolean
|
||||
Return FullName = DirectCast(obj, Document).FullName
|
||||
End Function
|
||||
|
||||
' Public Type As DocumentType
|
||||
' Public Data As Object
|
||||
|
||||
@@ -18,6 +18,7 @@ Namespace Documents
|
||||
|
||||
Public Files As New List(Of Document)
|
||||
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pWinline As Winline.Data)
|
||||
MyBase.New(pLogConfig, pLogConfig.GetLogger())
|
||||
Winline = pWinline
|
||||
@@ -30,6 +31,7 @@ Namespace Documents
|
||||
End If
|
||||
|
||||
Logger.Info("Loading files from directory [{0}]", pInputDirectory)
|
||||
Files.Clear()
|
||||
|
||||
Try
|
||||
Dim oDirectory As New DirectoryInfo(pInputDirectory)
|
||||
@@ -37,20 +39,31 @@ Namespace Documents
|
||||
|
||||
Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory)
|
||||
|
||||
Files = oFiles.
|
||||
Select(AddressOf WrapFileInfo).
|
||||
Select(AddressOf LoadDocumentData2).
|
||||
ToList()
|
||||
For Each oFile In oFiles
|
||||
Dim oDocument = LoadFile(oFile)
|
||||
Files.Add(oDocument)
|
||||
Next
|
||||
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Throw New IO.IOException($"Could not load files from directory {pInputDirectory}", ex)
|
||||
Throw New IOException($"Could not load files from directory {pInputDirectory}", ex)
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function LoadFile(pFileInfo As FileInfo) As Document
|
||||
Dim oFileList As New List(Of FileInfo) From {pFileInfo}
|
||||
Logger.Info("Loading file [{0}]", pFileInfo.Name)
|
||||
|
||||
Return oFileList.
|
||||
Select(AddressOf WrapFileInfo).
|
||||
Select(AddressOf LoadDocumentData2).
|
||||
Select(Function(d) MatchDataFromWinLine(d, Winline.Mandators)).
|
||||
SingleOrDefault()
|
||||
End Function
|
||||
|
||||
Private Function LoadDocumentData2(pDocument As Document) As Document
|
||||
Dim oText As String = IO.File.ReadAllText(pDocument.FullName)
|
||||
Dim oDoc = XDocument.Parse(oText)
|
||||
@@ -67,12 +80,15 @@ Namespace Documents
|
||||
Dim oRows As New List(Of DocumentRow)
|
||||
|
||||
For Each oElement As XElement In oRowElements
|
||||
Dim oFields As New Dictionary(Of String, String)
|
||||
Dim oFields As New Dictionary(Of String, DocumentRow.FieldValue)
|
||||
|
||||
Dim oSubElements = oElement.Descendants().ToList()
|
||||
|
||||
For Each oSubElement As XElement In oSubElements
|
||||
oFields.Add(oSubElement.Name.ToString, oSubElement.Value)
|
||||
oFields.Add(oSubElement.Name.ToString, New DocumentRow.FieldValue With {
|
||||
.Original = oSubElement.Value,
|
||||
.Final = oSubElement.Value
|
||||
})
|
||||
Next
|
||||
|
||||
Dim oRow = New DocumentRow With {
|
||||
@@ -91,143 +107,116 @@ Namespace Documents
|
||||
|
||||
Return pDocument
|
||||
End Function
|
||||
'Private Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Winline.Mandator)) As Document
|
||||
' Dim oMandators As List(Of Winline.Mandator) = pMandators.
|
||||
' Where(Function(m) m.IsWhitelisted = True).
|
||||
' OrderBy(Function(m) m.Order).
|
||||
' ToList()
|
||||
|
||||
' If TypeOf pDocument.Data Is Schemas.Orders.Input.MESOWebService Then
|
||||
' Dim oMandator = Winline.FindMatchingMandatorFromOrder(pDocument.Data)
|
||||
' Dim oData As Schemas.Orders.Input.MESOWebService = MatchOrderData(pDocument.Data, oMandator)
|
||||
|
||||
' If oMandator Is Nothing Then
|
||||
' Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name)
|
||||
' End If
|
||||
Private Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Winline.Mandator)) As Document
|
||||
Dim oMandators As List(Of Winline.Mandator) = pMandators.
|
||||
Where(Function(m) m.IsWhitelisted = True).
|
||||
OrderBy(Function(m) m.Order).
|
||||
ToList()
|
||||
|
||||
' pDocument.Mandator = oMandator.Id
|
||||
' pDocument.Data = oData
|
||||
' End If
|
||||
Dim oMandator = Winline.FindMatchingMandatorFromOrder(pDocument)
|
||||
|
||||
' Return pDocument
|
||||
'End Function
|
||||
If oMandator Is Nothing Then
|
||||
Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name)
|
||||
End If
|
||||
|
||||
Private Function MatchOrderData(pData As Input.MESOWebService, pMandator As Winline.Mandator) As Input.MESOWebService
|
||||
pDocument = MatchOrderData(pDocument, oMandator)
|
||||
pDocument.Mandator = oMandator.Id
|
||||
|
||||
|
||||
'If TypeOf pDocument.Data Is Schemas.Orders.Input.MESOWebService Then
|
||||
' Dim oMandator = Winline.FindMatchingMandatorFromOrder(pDocument.Data)
|
||||
' Dim oData As Schemas.Orders.Input.MESOWebService = MatchOrderData(pDocument.Data, oMandator)
|
||||
|
||||
' If oMandator Is Nothing Then
|
||||
' Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name)
|
||||
' End If
|
||||
|
||||
' pDocument.Mandator = oMandator.Id
|
||||
' pDocument.Data = oData
|
||||
'End If
|
||||
|
||||
Return pDocument
|
||||
End Function
|
||||
|
||||
Private Function MatchOrderData(pDocument As Document, pMandator As Winline.Mandator) As Document
|
||||
Dim oYear = Winline.GetWinLineYear()
|
||||
|
||||
If pMandator Is Nothing Then
|
||||
Return pData
|
||||
Return pDocument
|
||||
End If
|
||||
|
||||
Dim oHead As Input.MESOWebServiceEXIMVRG_ordersT025 = pData.Items.
|
||||
Where(Function(h) TypeOf h Is Input.MESOWebServiceEXIMVRG_ordersT025).
|
||||
SetValue(Sub(h As Input.MESOWebServiceEXIMVRG_ordersT025)
|
||||
Dim oAccount = Winline.TryGetAccount(h.Fakt_Kontonummer, pMandator)
|
||||
If oAccount IsNot Nothing Then
|
||||
h.Fakt_Kontonummer = oAccount.Id
|
||||
h.Fakt_Name = oAccount.Name
|
||||
End If
|
||||
End Sub).
|
||||
SetValue(Sub(h As Input.MESOWebServiceEXIMVRG_ordersT025)
|
||||
Dim oAccount = Winline.TryGetAccount(h.Lief_Kontonummer, pMandator)
|
||||
If oAccount IsNot Nothing Then
|
||||
h.Lief_Kontonummer = oAccount.Id
|
||||
h.Lief_Name = oAccount.Name
|
||||
End If
|
||||
End Sub).
|
||||
Dim oHead As DocumentRow = pDocument.Rows.
|
||||
Where(Function(r) r.Name.ToUpper.EndsWith("T025")).
|
||||
SetValue(Sub(r As DocumentRow) SetAccountByGLN(r, pMandator, "Fakt_Kontonummer", "Fakt_Name")).
|
||||
SetValue(Sub(r As DocumentRow) SetAccountByGLN(r, pMandator, "Lief_Kontonummer", "Lief_Name")).
|
||||
FirstOrDefault()
|
||||
|
||||
Dim oPositions As List(Of Input.MESOWebServiceEXIMVRG_ordersT026) = pData.Items.
|
||||
Where(Function(p) TypeOf p Is Input.MESOWebServiceEXIMVRG_ordersT026).
|
||||
SetValue(Sub(p)
|
||||
Dim oArticleNumber = Winline.TryGetArticleNumber(p.Artikelnummer, pMandator)
|
||||
Dim oPositions As List(Of DocumentRow) = pDocument.Rows.
|
||||
Where(Function(r) r.Name.ToUpper.EndsWith("T026")).
|
||||
SetValue(Sub(oRow As DocumentRow)
|
||||
Dim oNumberItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault("Artikelnummer")
|
||||
If oNumberItem Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oArticleNumber = Winline.TryGetArticleNumber(oNumberItem.Original, pMandator)
|
||||
If oArticleNumber IsNot Nothing Then
|
||||
p.Artikelnummer = oArticleNumber
|
||||
oNumberItem.External = oArticleNumber
|
||||
oNumberItem.Final = oArticleNumber
|
||||
End If
|
||||
End Sub).
|
||||
Select(Of Input.MESOWebServiceEXIMVRG_ordersT026)(Function(i) i).
|
||||
ToList()
|
||||
|
||||
pData.Items = New List(Of Object) From {oHead}.
|
||||
Concat(oPositions).
|
||||
ToArray()
|
||||
Dim oList As New List(Of DocumentRow) From {oHead}
|
||||
pDocument.Rows = oList.Concat(oPositions).ToList()
|
||||
|
||||
Return pData
|
||||
Return pDocument
|
||||
End Function
|
||||
|
||||
Private Sub SetAccountByGLN(oRow As DocumentRow, pMandator As Winline.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)
|
||||
Dim oContainsAccountName As Boolean = Not IsNothing(oNameItem)
|
||||
|
||||
If oNumberItem Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' Try to find an account that matches the GLN
|
||||
Dim oAccount = Winline.TryGetAccount(oNumberItem.Original, pMandator)
|
||||
|
||||
' If an account was found, set it for External and Final value
|
||||
If oAccount IsNot Nothing Then
|
||||
oNumberItem.External = oAccount.Id
|
||||
oNumberItem.Final = oAccount.Id
|
||||
|
||||
If oContainsAccountName Then
|
||||
oNameItem.External = oAccount.Name
|
||||
oNameItem.Final = oAccount.Name
|
||||
Else
|
||||
oRow.Fields.Add(pNameField, New DocumentRow.FieldValue() With {
|
||||
.External = oAccount.Name,
|
||||
.Final = oAccount.Name
|
||||
})
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function TryGetDictionaryItem(Of T)(pDictionary As IDictionary(Of String, T), pKey As String) As T
|
||||
If pDictionary.ContainsKey(pKey) Then
|
||||
Return pDictionary.Item(pKey)
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
Private Function WrapFileInfo(pFileInfo As FileInfo) As Document
|
||||
Return New Document With {.File = pFileInfo}
|
||||
End Function
|
||||
|
||||
'Private Function LoadDocumentData(pDocument As Document) As Document
|
||||
' Using oFileStream As New FileStream(pDocument.FullName, FileMode.Open, FileAccess.Read, FileShare.Read)
|
||||
' Try
|
||||
' Dim oXmlDocument = New XPathDocument(oFileStream)
|
||||
' Dim oDocument = oXmlDocument.CreateNavigator()
|
||||
' Dim oTemplateName = GetTemplateName(oDocument)
|
||||
' Dim oDocumentType = DocumentMatch.GetDocumentTypeFromTemplateName(oTemplateName)
|
||||
' Dim oSchemaType As Type = DocumentMatch.GetDocumentSchemaFromDocumentType(oDocumentType)
|
||||
|
||||
' ' Read data the first time, working copy
|
||||
' 'Using oReader = oNavigator.ReadSubtree()
|
||||
' ' Dim oSerializer = Serializer.GetSerializer(oSchemaType)
|
||||
' ' pDocument.Data = oSerializer.Deserialize(oReader)
|
||||
|
||||
' 'End Using
|
||||
|
||||
' ' Read data the second time, archive copy
|
||||
' 'Using oReader = oNavigator.ReadSubtree()
|
||||
' ' Dim oSerializer = Serializer.GetSerializer(oSchemaType)
|
||||
' ' pDocument.DataOriginal = oSerializer.Deserialize(oReader)
|
||||
|
||||
' 'End Using
|
||||
|
||||
' 'Dim oInstance As Object = Activator.CreateInstance(oSchemaType)
|
||||
' 'Dim oProps = oSchemaType.GetProperties()
|
||||
|
||||
' 'Dim oHead = oProps.
|
||||
' ' Where(Function(p) p.Name = "Head").
|
||||
' ' SingleOrDefault()
|
||||
' 'Dim oDescriptionHead As CustomAttributeData = oHead.CustomAttributes.
|
||||
' ' Where(Function(d) d.AttributeType.Equals(GetType(DescriptionAttribute))).
|
||||
' ' SingleOrDefault()
|
||||
' 'Dim oDescriptionHeadValue = oDescriptionHead.ConstructorArguments.First().Value
|
||||
' 'Dim oHeadXml = oDocument.Select($"//MESOWebService/{oDescriptionHeadValue}")
|
||||
|
||||
' 'Dim oPositions As PropertyInfo = oProps.
|
||||
' ' Where(Function(p) p.Name = "Positions").
|
||||
' ' SingleOrDefault()
|
||||
' 'Dim oDescriptionPos As CustomAttributeData = oPositions.CustomAttributes.
|
||||
' ' Where(Function(d) d.AttributeType.Equals(GetType(DescriptionAttribute))).
|
||||
' ' SingleOrDefault()
|
||||
' 'Dim oDescriptionPosValue = oDescriptionPos.ConstructorArguments.First().Value
|
||||
' 'Dim oPosXml = oDocument.Select($"//MESOWebService/{oDescriptionPosValue}")
|
||||
|
||||
|
||||
|
||||
|
||||
' pDocument.Type = oDocumentType
|
||||
' Return pDocument
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex)
|
||||
|
||||
' Dim oException As Exception = ex
|
||||
' If ex.InnerException IsNot Nothing Then
|
||||
' oException = ex.InnerException
|
||||
' End If
|
||||
|
||||
' Throw oException
|
||||
' End Try
|
||||
' End Using
|
||||
'End Function
|
||||
|
||||
Private Function GetTemplateName(pDocument As XPathNavigator) As String
|
||||
Dim oTemplateName = pDocument.
|
||||
SelectSingleNode("//MESOWebService").
|
||||
GetAttribute("Template", "")
|
||||
|
||||
Return oTemplateName
|
||||
End Function
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
@@ -1,4 +1,23 @@
|
||||
Public Class DocumentRow
|
||||
''' <summary>
|
||||
''' Tabellen/Elementname aus XML
|
||||
''' </summary>
|
||||
Public Name As String
|
||||
Public Fields As Dictionary(Of String, String)
|
||||
Public Id As New Guid
|
||||
|
||||
Public Fields As Dictionary(Of String, FieldValue)
|
||||
|
||||
Public Sub New()
|
||||
Id = Guid.NewGuid()
|
||||
End Sub
|
||||
|
||||
Public Class FieldValue
|
||||
Public Original As String = ""
|
||||
Public External As String = ""
|
||||
Public Final As String = ""
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return Final
|
||||
End Function
|
||||
End Class
|
||||
End Class
|
||||
|
||||
17
ImporterShared/IDictionaryEx.vb
Normal file
17
ImporterShared/IDictionaryEx.vb
Normal file
@@ -0,0 +1,17 @@
|
||||
Imports System.Runtime.CompilerServices
|
||||
|
||||
Module IDictionaryEx
|
||||
<Extension()>
|
||||
Function GetOrDefault(Of TKey, TValue)(pDictionary As Dictionary(Of TKey, TValue), pKey As TKey, Optional pOnMissing As TValue = Nothing) As TValue
|
||||
Dim oValue As TValue
|
||||
Return IIf(pDictionary.TryGetValue(pKey, oValue), oValue, pOnMissing)
|
||||
End Function
|
||||
|
||||
<Extension()>
|
||||
Function GetOrInsertNew(Of T, U As New)(dic As Dictionary(Of T, U), key As T) As U
|
||||
If dic.ContainsKey(key) Then Return dic(key)
|
||||
Dim newObj As U = New U()
|
||||
dic(key) = newObj
|
||||
Return newObj
|
||||
End Function
|
||||
End Module
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Module IEnumerableEx
|
||||
<Extension()>
|
||||
Function SetValue(Of T)(ByVal items As IEnumerable(Of T), ByVal updateMethod As Action(Of T)) As IEnumerable(Of T)
|
||||
Function SetValue(Of T)(items As IEnumerable(Of T), updateMethod As Action(Of T)) As IEnumerable(Of T)
|
||||
For Each item As T In items
|
||||
updateMethod(item)
|
||||
Next
|
||||
|
||||
@@ -94,11 +94,13 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="BaseClass.vb" />
|
||||
<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" />
|
||||
<Compile Include="IDictionaryEx.vb" />
|
||||
<Compile Include="IEnumerableEx.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
@@ -130,7 +132,7 @@
|
||||
<Compile Include="Winline\Entities\Contact.vb" />
|
||||
<Compile Include="Winline\Entities\DocumentKind.vb" />
|
||||
<Compile Include="Winline\Entities\Mandator.vb" />
|
||||
<Compile Include="Winline\Entities\XmlItem.vb" />
|
||||
<Compile Include="Winline\Entities\TemplateColumn.vb" />
|
||||
<Compile Include="Winline\WebService.vb" />
|
||||
<Compile Include="XmlData.vb" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -16,8 +16,10 @@ Namespace Winline
|
||||
Public Mandators As New List(Of Mandator)
|
||||
Public DocumentKinds As New List(Of DocumentKind)
|
||||
Public Years As List(Of Integer)
|
||||
Public XmlConfigHead As List(Of XmlItem)
|
||||
Public XmlConfigPositions As List(Of XmlItem)
|
||||
Public TemplateConfiguration As New List(Of TemplateColumn)
|
||||
|
||||
'Public XmlConfigHead As List(Of TemplateColumn)
|
||||
'Public XmlConfigPositions As List(Of TemplateColumn)
|
||||
|
||||
Public Const ALL_MESOCOMP = "mesocomp"
|
||||
|
||||
@@ -26,6 +28,9 @@ Namespace Winline
|
||||
|
||||
Public Const V50_ACCOUNTNUMBER = "c002"
|
||||
Public Const V50_ACCOUNTNAME = "c003"
|
||||
Public Const V50_STREETNAME = "c050"
|
||||
Public Const V50_ZIPCODE = "c051"
|
||||
Public Const V50_CITYNAME = "c052"
|
||||
|
||||
Public Const T45_KEY = "c000"
|
||||
Public Const T45_NAME = "c001"
|
||||
@@ -64,9 +69,12 @@ Namespace Winline
|
||||
Try
|
||||
Dim oSQL = $"
|
||||
SELECT DISTINCT
|
||||
[c002],
|
||||
[c003]
|
||||
FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v005]
|
||||
[c002], -- Kundennummer
|
||||
[c003], -- Kundenname
|
||||
[c050], -- Straße
|
||||
[c052], -- Ort
|
||||
[c051] -- PLZ
|
||||
FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v050]
|
||||
WHERE
|
||||
c139 IS NULL
|
||||
AND mesocomp = '{pMandator.Id}'
|
||||
@@ -75,9 +83,18 @@ Namespace Winline
|
||||
Dim oAccounts As New List(Of Account)
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oAccountNumber As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNUMBER), String.Empty)
|
||||
Dim oAccountName As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNAME), String.Empty)
|
||||
Dim oStreetName As String = Utils.NotNull(oRow.Item(V50_STREETNAME), String.Empty)
|
||||
Dim oZipCode As String = Utils.NotNull(oRow.Item(V50_ZIPCODE), String.Empty)
|
||||
Dim oCityName As String = Utils.NotNull(oRow.Item(V50_CITYNAME), String.Empty)
|
||||
|
||||
oAccounts.Add(New Account With {
|
||||
.Id = oRow.Item(V05_ACCOUNTID),
|
||||
.Name = oRow.Item(V05_ACCOUNTNAME),
|
||||
.Id = oAccountNumber,
|
||||
.Name = oAccountName,
|
||||
.StreetName = oStreetName,
|
||||
.ZipCode = oZipCode,
|
||||
.CityName = oCityName,
|
||||
.Mandator = pMandator.Id
|
||||
})
|
||||
Next
|
||||
@@ -186,7 +203,10 @@ Namespace Winline
|
||||
Dim oSQL = $"
|
||||
SELECT
|
||||
[c002], -- Kundennummer
|
||||
[c003] -- Kundenname
|
||||
[c003], -- Kundenname
|
||||
[c050], -- Straße
|
||||
[c052], -- Ort
|
||||
[c051] -- PLZ
|
||||
FROM [{pMandator.Database}].[dbo].[v050]
|
||||
WHERE [c004] = 2 -- KontoTyp
|
||||
AND [c260] = '{pGLN}'
|
||||
@@ -210,10 +230,16 @@ Namespace Winline
|
||||
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||
Dim oAccountNumber As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNUMBER), String.Empty)
|
||||
Dim oAccountName As String = Utils.NotNull(oRow.Item(V50_ACCOUNTNAME), String.Empty)
|
||||
Dim oStreetName As String = Utils.NotNull(oRow.Item(V50_STREETNAME), String.Empty)
|
||||
Dim oZipCode As String = Utils.NotNull(oRow.Item(V50_ZIPCODE), String.Empty)
|
||||
Dim oCityName As String = Utils.NotNull(oRow.Item(V50_CITYNAME), String.Empty)
|
||||
|
||||
Return New Account With {
|
||||
.Id = oAccountNumber,
|
||||
.Name = oAccountName,
|
||||
.StreetName = oStreetName,
|
||||
.CityName = oCityName,
|
||||
.ZipCode = oZipCode,
|
||||
.Mandator = pMandator.Id
|
||||
}
|
||||
Catch ex As Exception
|
||||
@@ -340,39 +366,47 @@ Namespace Winline
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function FindMatchingMandatorFromOrder(pData As Schemas.Orders.Input.MESOWebService) As Mandator
|
||||
Dim oPositions As List(Of Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026) = pData.Items.
|
||||
Where(Function(i) TypeOf i Is Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026).
|
||||
Select(Of Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026)(Function(i) i).
|
||||
Public Function FindMatchingMandatorFromOrder(pData As Documents.Document) As Mandator
|
||||
Dim oPositions = pData.Rows.
|
||||
Where(Function(r) r.Name.ToUpper.EndsWith("T026")).
|
||||
ToList()
|
||||
Dim oEANNumbers = oPositions.
|
||||
Select(Function(p) p.Fields.Item("Artikelnummer").Original).
|
||||
Distinct().
|
||||
ToList()
|
||||
|
||||
'Dim oPositions As List(Of Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026) = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026).
|
||||
' Select(Of Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026)(Function(i) i).
|
||||
' ToList()
|
||||
Dim oYear = GetWinLineYear()
|
||||
Dim oMandatorId As String = String.Empty
|
||||
Dim oWhitelistedMandators = Mandators.
|
||||
Where(Function(m) m.IsWhitelisted = True).
|
||||
ToList()
|
||||
|
||||
For Each oPos In oPositions
|
||||
For Each oEANNumber In oEANNumbers
|
||||
For Each oMandator In oWhitelistedMandators
|
||||
Dim oSQL As String = $"
|
||||
SELECT
|
||||
[c011], -- Artikelnummer
|
||||
[c003], -- Artikelbezeichnung
|
||||
[c075], -- EAN-Nummer
|
||||
[c123] -- Ersatzartikelnummer
|
||||
FROM [{oMandator.Database}].[dbo].[v021]
|
||||
WHERE [c075] = '{oPos.Artikelnummer}'
|
||||
AND [mesocomp] = '{oMandator.Id}' AND [mesoyear] = {oYear}"
|
||||
SELECT
|
||||
[c011], -- Artikelnummer
|
||||
[c003], -- Artikelbezeichnung
|
||||
[c075], -- EAN-Nummer
|
||||
[c123] -- Ersatzartikelnummer
|
||||
FROM [{oMandator.Database}].[dbo].[v021]
|
||||
WHERE [c075] = '{oEANNumber}'
|
||||
AND [mesocomp] = '{oMandator.Id}' AND [mesoyear] = {oYear}"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSQL)
|
||||
|
||||
' EAN not found in this Mandator, continue to next one
|
||||
If oTable.Rows.Count = 0 Then
|
||||
Logger.Debug("EAN [{0}] was not found in Mandator: [{1}]", oPos.Artikelnummer, oMandator.Id)
|
||||
Logger.Debug("EAN [{0}] was not found in Mandator: [{1}]", oEANNumber, oMandator.Id)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' Duplicate EAN, exit and do nothing about this manda
|
||||
If oTable.Rows.Count > 1 Then
|
||||
Logger.Warn("EAN [{0}] was found more than once. Skipping Mandator [{1}]", oPos.Artikelnummer, oMandator.Id)
|
||||
Logger.Warn("EAN [{0}] was found more than once. Skipping Mandator [{1}]", oEANNumber, oMandator.Id)
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -413,23 +447,107 @@ Namespace Winline
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Sub GetXmlConfiguration()
|
||||
'Public Function FindMatchingMandatorFromOrder(pData As Schemas.Orders.Input.MESOWebService) As Mandator
|
||||
' Dim oPositions As List(Of Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026) = pData.Items.
|
||||
' Where(Function(i) TypeOf i Is Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026).
|
||||
' Select(Of Schemas.Orders.Input.MESOWebServiceEXIMVRG_ordersT026)(Function(i) i).
|
||||
' ToList()
|
||||
' Dim oYear = GetWinLineYear()
|
||||
' Dim oMandatorId As String = String.Empty
|
||||
' Dim oWhitelistedMandators = Mandators.
|
||||
' Where(Function(m) m.IsWhitelisted = True).
|
||||
' ToList()
|
||||
|
||||
' For Each oPos In oPositions
|
||||
' For Each oMandator In oWhitelistedMandators
|
||||
' Dim oSQL As String = $"
|
||||
' SELECT
|
||||
' [c011], -- Artikelnummer
|
||||
' [c003], -- Artikelbezeichnung
|
||||
' [c075], -- EAN-Nummer
|
||||
' [c123] -- Ersatzartikelnummer
|
||||
' FROM [{oMandator.Database}].[dbo].[v021]
|
||||
' WHERE [c075] = '{oPos.Artikelnummer}'
|
||||
' AND [mesocomp] = '{oMandator.Id}' AND [mesoyear] = {oYear}"
|
||||
' Dim oTable As DataTable = Database.GetDatatable(oSQL)
|
||||
|
||||
' ' EAN not found in this Mandator, continue to next one
|
||||
' If oTable.Rows.Count = 0 Then
|
||||
' Logger.Debug("EAN [{0}] was not found in Mandator: [{1}]", oPos.Artikelnummer, oMandator.Id)
|
||||
' Continue For
|
||||
' End If
|
||||
|
||||
' ' Duplicate EAN, exit and do nothing about this manda
|
||||
' If oTable.Rows.Count > 1 Then
|
||||
' Logger.Warn("EAN [{0}] was found more than once. Skipping Mandator [{1}]", oPos.Artikelnummer, oMandator.Id)
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||
' Dim oArticleNumber As String = Utils.NotNull(oRow.Item(V21_ARTICLENUMBER), String.Empty)
|
||||
|
||||
' ' EAN was found, now we need to check it against the Regex of the current Mandantor, if one exists
|
||||
' If oMandator.Regex <> String.Empty Then
|
||||
' Try
|
||||
' Dim oRegex As New Regex(oMandator.Regex)
|
||||
' Dim oMatch = oRegex.Match(oArticleNumber)
|
||||
|
||||
' ' If ArticleNumber matches the regex, we assign it and exit
|
||||
' If oMatch.Success Then
|
||||
' oMandatorId = oMandator.Id
|
||||
' Exit For
|
||||
' Else
|
||||
' ' If it does not match, continue to the next mandator
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex)
|
||||
' Logger.Warn("Regex [{0}] could not be parsed. Skipping.", oMandator.Regex)
|
||||
' End Try
|
||||
' Else
|
||||
' ' If no regex was found, we assume the number matches
|
||||
' oMandatorId = oMandator.Id
|
||||
' End If
|
||||
' Next
|
||||
' Next
|
||||
|
||||
' If oMandatorId = String.Empty Then
|
||||
' Return Nothing
|
||||
' Else
|
||||
' Return oWhitelistedMandators.
|
||||
' Where(Function(m) m.Id = oMandatorId).
|
||||
' Take(1).
|
||||
' SingleOrDefault()
|
||||
' End If
|
||||
'End Function
|
||||
|
||||
Public Function LoadTemplateConfiguration() As Boolean
|
||||
Try
|
||||
Dim oSql = $"SELECT XML_NAME, XML_ROOT, DATA_TYPE, IS_HEAD FROM [DD_ECM].[dbo].[VWEDI_XML_ITEMS]"
|
||||
Dim oSql = $"SELECT XML_NAME, XML_ROOT, TEMPLATE_NAME, DATA_TYPE, IS_HEAD, FUNCTION_ID, READ_ONLY FROM [DD_ECM].[dbo].[VWEDI_XML_ITEMS]"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSql)
|
||||
Dim oItems As New List(Of TemplateColumn)
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oXmlItem As New XmlItem With {
|
||||
Dim oColumn As New TemplateColumn With {
|
||||
.Name = oRow.Item("XML_NAME"),
|
||||
.Root = oRow.Item("XML_ROOT"),
|
||||
.Type = oRow.Item("XML_TYPE")
|
||||
.Type = oRow.Item("XML_TYPE"),
|
||||
.Template = oRow.Item("TEMPLATE_NAME"),
|
||||
.[Function] = oRow.Item("FUNCTION_ID"),
|
||||
.[ReadOnly] = oRow.Item("READ_ONLY")
|
||||
}
|
||||
|
||||
oItems.Add(oColumn)
|
||||
Next
|
||||
|
||||
TemplateConfiguration = oItems
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Turns a database info like "SQLCWLDATEN on SERVER\INSTANCE" into a Tuple of two strings
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
Public Class Account
|
||||
Public Property Id As String
|
||||
Public Property Name As String
|
||||
|
||||
Public Property StreetName As String
|
||||
Public Property CityName As String
|
||||
Public Property ZipCode As String
|
||||
|
||||
Public Property Mandator As String
|
||||
|
||||
Public Overrides Function GetHashCode() As Integer
|
||||
|
||||
12
ImporterShared/Winline/Entities/TemplateColumn.vb
Normal file
12
ImporterShared/Winline/Entities/TemplateColumn.vb
Normal file
@@ -0,0 +1,12 @@
|
||||
Namespace Winline
|
||||
Public Class TemplateColumn
|
||||
Public Name As String
|
||||
Public Root As String
|
||||
Public Type As String
|
||||
Public IsHead As Boolean
|
||||
Public Template As String
|
||||
Public [ReadOnly] As Boolean
|
||||
Public [Function] As Constants.XmlFunction
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
@@ -1,9 +0,0 @@
|
||||
Namespace Winline
|
||||
Public Class XmlItem
|
||||
Public Name As String
|
||||
Public Root As String
|
||||
Public Type As String
|
||||
Public IsHead As Boolean
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
@@ -25,82 +25,75 @@ Namespace Winline
|
||||
'Mapper = MapperFactory.GetMapper()
|
||||
End Sub
|
||||
|
||||
'Public Async Function TransferDocumentToWinLine(pDocument As Document) As Task(Of Boolean)
|
||||
' If TypeOf pDocument.Data Is Schemas.Orders.Input.MESOWebService Then
|
||||
' Return Await TransferOrderToWinline(pDocument)
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
'End Function
|
||||
Public Async Function TransferDocumentToWinline(pDocument As Document) As Task(Of Boolean)
|
||||
Dim oBytes As Byte() = GetBytesFromDocument(pDocument)
|
||||
Dim oWS As Config.WebServiceConfig = Config.Webservice
|
||||
|
||||
'Private Async Function TransferOrderToWinline(pDocument As Document) As Task(Of Boolean)
|
||||
' Dim oOrderOutput = TransformOrderToOutput(pDocument.Data)
|
||||
' Dim oWS As Config.WebServiceConfig = Config.Webservice
|
||||
' --- Get and create path for request/response files
|
||||
|
||||
' ' --- Get and create path for request/response files
|
||||
Dim oPath As String = GetBaseWebServicePath()
|
||||
If IO.Directory.Exists(oPath) = False Then
|
||||
IO.Directory.CreateDirectory(oPath)
|
||||
End If
|
||||
|
||||
' Dim oPath As String = GetBaseWebServicePath()
|
||||
' If IO.Directory.Exists(oPath) = False Then
|
||||
' IO.Directory.CreateDirectory(oPath)
|
||||
' End If
|
||||
' --- Build all teh filenamez and pathz
|
||||
|
||||
' ' --- Build all teh filenamez and pathz
|
||||
Dim oBaseFileName As String = GetBaseFilenameForRequest()
|
||||
Dim oFileName = GetXmlFilenameWithSuffix(oBaseFileName, "Request", "xml")
|
||||
|
||||
' Dim oBaseFileName As String = GetBaseFilenameForRequest()
|
||||
' Dim oFileName = GetXmlFilenameWithSuffix(oBaseFileName, "Request", "xml")
|
||||
' Relative Path for Webservice Call
|
||||
Dim oImportRelativeFilePath = IO.Path.Combine(GetDateSubDirectoryPath(Config.Webservice.ImportRelativePath), oFileName)
|
||||
|
||||
' ' Relative Path for Webservice Call
|
||||
' Dim oImportRelativeFilePath = IO.Path.Combine(GetDateSubDirectoryPath(Config.Webservice.ImportRelativePath), oFileName)
|
||||
' Absolute Path to copy Request file
|
||||
Dim oImportAbsolutePath = IO.Path.Combine(Config.Webservice.ImportBasePath, Config.Webservice.ImportRelativePath)
|
||||
Dim oImportAbsoluteFilePath = IO.Path.Combine(GetDateSubDirectoryPath(oImportAbsolutePath), oFileName)
|
||||
|
||||
' ' Absolute Path to copy Request file
|
||||
' Dim oImportAbsolutePath = IO.Path.Combine(Config.Webservice.ImportBasePath, Config.Webservice.ImportRelativePath)
|
||||
' Dim oImportAbsoluteFilePath = IO.Path.Combine(GetDateSubDirectoryPath(oImportAbsolutePath), oFileName)
|
||||
' --- Serialize Data into XML string
|
||||
|
||||
' ' --- Serialize Data into XML string
|
||||
Dim oOutputFilePath = IO.Path.Combine(GetBaseWebServicePath(), oFileName)
|
||||
IO.File.WriteAllBytes(oOutputFilePath, oBytes)
|
||||
|
||||
' Dim oOutputFilePath = SerializeOrder(oOrderOutput, oFileName)
|
||||
' --- Copy file to Winline Import Directory
|
||||
|
||||
' ' --- Copy file to Winline Import Directory
|
||||
Try
|
||||
IO.File.Copy(oOutputFilePath, oImportAbsoluteFilePath, True)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
|
||||
' Try
|
||||
' IO.File.Copy(oOutputFilePath, oImportAbsoluteFilePath, True)
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex)
|
||||
' Throw ex
|
||||
' End Try
|
||||
' --- Prepare URL and HTTP Client
|
||||
Dim oTemplateType = pDocument.TemplateType
|
||||
Dim oTemplateName = pDocument.TemplateName
|
||||
|
||||
' ' --- Prepare URL and HTTP Client
|
||||
' Dim oTemplateType = 30
|
||||
' Dim oTemplateName = "EXIM-VRG_orders"
|
||||
' ActionCode: Should this be a test or not?
|
||||
' 0 = Testcall
|
||||
' 1 = Real call
|
||||
Dim oActionCode = 1
|
||||
|
||||
' ' ActionCode: Should this be a test or not?
|
||||
' ' 0 = Testcall
|
||||
' ' 1 = Real call
|
||||
' Dim oActionCode = 1
|
||||
' Byref: Should data be supplied as file or as string?
|
||||
' 0 = As String
|
||||
' 1 = As File (relative to Winline Server directory)
|
||||
Dim oByref = 1
|
||||
|
||||
' ' Byref: Should data be supplied as file or as string?
|
||||
' ' 0 = As String
|
||||
' ' 1 = As File (relative to Winline Server directory)
|
||||
' Dim oByref = 1
|
||||
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pDocument.Mandator}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
|
||||
Dim oClient As New HttpClient()
|
||||
|
||||
' Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pDocument.Mandator}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
|
||||
' Dim oClient As New HttpClient()
|
||||
Logger.Info("Creating HTTP Request to [{0}]", oWS.BaseUrl)
|
||||
|
||||
' Logger.Info("Creating HTTP Request to [{0}]", oWS.BaseUrl)
|
||||
' --- Bring the action!
|
||||
Try
|
||||
Dim oResponse As HttpResponseMessage = Await oClient.GetAsync(oURL)
|
||||
Await HandleResponse(oResponse, oPath, oBaseFileName)
|
||||
|
||||
' ' --- Bring the action!
|
||||
' Try
|
||||
' Dim oResponse As HttpResponseMessage = Await oClient.GetAsync(oURL)
|
||||
' Await HandleResponse(oResponse, oPath, oBaseFileName)
|
||||
|
||||
' Return True
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex)
|
||||
' Throw ex
|
||||
' Finally
|
||||
' oClient.Dispose()
|
||||
' End Try
|
||||
'End Function
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
Finally
|
||||
oClient.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Async Function HandleResponse(pResponse As HttpResponseMessage, pPath As String, pBaseFileNAme As String) As Task
|
||||
pResponse.EnsureSuccessStatusCode()
|
||||
@@ -115,6 +108,7 @@ 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 oErrorStrings As New List(Of String)
|
||||
|
||||
For Each oDetails As Schemas.MESOWebServiceResultResultDetails In oResponseObject.ResultDetails
|
||||
|
||||
@@ -124,11 +118,14 @@ Namespace Winline
|
||||
Else
|
||||
Logger.Warn("ErrorCode: [{0}]", oDetails.ErrorCode)
|
||||
Logger.Warn("ErrorText: [{0}]", oDetails.ErrorText)
|
||||
oErrorStrings.Add($"[{oDetails.ErrorCode}] {oDetails.ErrorText}")
|
||||
End If
|
||||
Next
|
||||
|
||||
If oResponseObject.OverallSuccess = False Then
|
||||
Throw New ApplicationException("Request to Webservice was unsuccessful. Please check the logs.")
|
||||
Dim oMessage = $"Request to Webservice was unsuccessful:{vbNewLine}{vbNewLine}{String.Join(vbNewLine, oErrorStrings.ToArray)}"
|
||||
|
||||
Throw New ApplicationException(oMessage)
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -155,6 +152,49 @@ Namespace Winline
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetBytesFromDocument(pDocument As Document) As Byte()
|
||||
Dim oFilteredFields As New List(Of String) From {
|
||||
"Fakt_Name",
|
||||
"Lief_Name"
|
||||
}
|
||||
|
||||
Using oStream As New IO.MemoryStream()
|
||||
Dim w = XmlWriter.Create(oStream)
|
||||
|
||||
w.WriteStartDocument()
|
||||
w.WriteStartElement("MESOWebService")
|
||||
w.WriteAttributeString("Template", pDocument.TemplateName)
|
||||
w.WriteAttributeString("TemplateType", pDocument.TemplateType)
|
||||
w.WriteAttributeString("option", pDocument.Option)
|
||||
w.WriteAttributeString("printVoucher", pDocument.PrintVoucher)
|
||||
|
||||
For Each oRow In pDocument.Rows
|
||||
w.WriteStartElement(oRow.Name)
|
||||
|
||||
For Each oField As KeyValuePair(Of String, DocumentRow.FieldValue) In oRow.Fields
|
||||
If oField.Value.Final = String.Empty Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
If oFilteredFields.Contains(oField.Key) Then
|
||||
Continue For
|
||||
End If
|
||||
|
||||
w.WriteStartElement(oField.Key)
|
||||
w.WriteValue(oField.Value.Final)
|
||||
w.WriteEndElement() ' Field
|
||||
Next
|
||||
|
||||
w.WriteEndElement() ' Row
|
||||
Next
|
||||
w.WriteEndElement() ' MESOWebService
|
||||
w.WriteEndDocument() ' Document
|
||||
w.Close()
|
||||
|
||||
Return oStream.ToArray()
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user