This commit is contained in:
Jonathan Jenne 2021-10-28 14:04:56 +02:00
parent 3fac097f46
commit 0b83ddcc4d
13 changed files with 164 additions and 49 deletions

View File

@ -262,6 +262,7 @@
<ItemGroup> <ItemGroup>
<Content Include="CREATE_DATABASE.sql" /> <Content Include="CREATE_DATABASE.sql" />
<Content Include="README.txt" /> <Content Include="README.txt" />
<None Include="Resources\redo.svg" />
<None Include="Resources\parameters.svg" /> <None Include="Resources\parameters.svg" />
<None Include="Resources\logical.svg" /> <None Include="Resources\logical.svg" />
<None Include="Resources\togglefieldcodes.svg" /> <None Include="Resources\togglefieldcodes.svg" />

View File

@ -260,6 +260,16 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property redo() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("redo", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary> '''</summary>

View File

@ -121,9 +121,6 @@
<data name="logical" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="logical" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logical.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\logical.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="togglefieldcodes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\togglefieldcodes.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"> <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> <value>..\Resources\wraptext.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@ -145,12 +142,15 @@
<data name="actions_checkcircled" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <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>
<data name="bo_validation" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="togglefieldcodes" 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> <value>..\Resources\togglefieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="open21" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\open21.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="parameters" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\parameters.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="paymentrefund" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@ -163,8 +163,8 @@
<data name="up" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\up.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="resetview" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="singlepageview" 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> <value>..\Resources\singlepageview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="open1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\open1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
@ -172,15 +172,12 @@
<data name="export" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\export.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="import" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="bo_validation" 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> <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>
<data name="rotatecounterclockwise" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\rotatecounterclockwise.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="singlepageview" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\singlepageview.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"> <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> <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>
@ -196,16 +193,22 @@
<data name="open22" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\open22.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<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="pagesetup" type="System.Resources.ResXFileRef, System.Windows.Forms"> <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> <value>..\Resources\pagesetup.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="open" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="open" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </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="itemtypechecked" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="itemtypechecked" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\itemtypechecked.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\itemtypechecked.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="parameters" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\parameters.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\redo.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
</root> </root>

View 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="Redo" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Blue{fill:#1177D7;}
</style>
<path d="M16,10V4l16,10L16,24v-6C0,18,0,26,0,26S0,10,16,10z" class="Blue" />
</svg>

View File

@ -22,7 +22,9 @@ Partial Class frmImportMain
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmImportMain)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmImportMain))
Dim SnapOptions1 As DevExpress.Utils.Controls.SnapOptions = New DevExpress.Utils.Controls.SnapOptions()
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.txtVersion = New DevExpress.XtraBars.BarStaticItem() Me.txtVersion = New DevExpress.XtraBars.BarStaticItem()
Me.txtFilesLoaded = New DevExpress.XtraBars.BarStaticItem() Me.txtFilesLoaded = New DevExpress.XtraBars.BarStaticItem()
@ -65,6 +67,7 @@ Partial Class frmImportMain
Me.SplitContainerGrids = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerGrids = New DevExpress.XtraEditors.SplitContainerControl()
Me.SplitContainerGrids1 = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerGrids1 = New DevExpress.XtraEditors.SplitContainerControl()
Me.SplitContainerGrids2 = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerGrids2 = New DevExpress.XtraEditors.SplitContainerControl()
Me.BehaviorManager = New DevExpress.Utils.Behaviors.BehaviorManager(Me.components)
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RepositoryItemComboBox1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
@ -84,6 +87,7 @@ Partial Class frmImportMain
Me.SplitContainerGrids1.SuspendLayout() Me.SplitContainerGrids1.SuspendLayout()
CType(Me.SplitContainerGrids2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerGrids2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerGrids2.SuspendLayout() Me.SplitContainerGrids2.SuspendLayout()
CType(Me.BehaviorManager, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'RibbonControl 'RibbonControl
@ -265,6 +269,7 @@ Partial Class frmImportMain
'SplitContainerControl1 'SplitContainerControl1
' '
Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainerControl1.Enabled = False
Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 158) Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 158)
Me.SplitContainerControl1.Name = "SplitContainerControl1" Me.SplitContainerControl1.Name = "SplitContainerControl1"
Me.SplitContainerControl1.Panel1.Controls.Add(Me.GridControlFiles) Me.SplitContainerControl1.Panel1.Controls.Add(Me.GridControlFiles)
@ -470,6 +475,7 @@ Partial Class frmImportMain
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BehaviorManager.SetBehaviors(Me, New DevExpress.Utils.Behaviors.Behavior() {CType(DevExpress.Utils.Behaviors.Common.SnapWindowBehavior.Create(GetType(DevExpress.Utils.BehaviorSource.SnapWindowBehaviorSourceForForm), SnapOptions1), DevExpress.Utils.Behaviors.Behavior)})
Me.ClientSize = New System.Drawing.Size(1215, 746) Me.ClientSize = New System.Drawing.Size(1215, 746)
Me.Controls.Add(Me.SplitContainerControl1) Me.Controls.Add(Me.SplitContainerControl1)
Me.Controls.Add(Me.RibbonStatusBar) Me.Controls.Add(Me.RibbonStatusBar)
@ -498,6 +504,7 @@ Partial Class frmImportMain
Me.SplitContainerGrids1.ResumeLayout(False) Me.SplitContainerGrids1.ResumeLayout(False)
CType(Me.SplitContainerGrids2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.SplitContainerGrids2, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerGrids2.ResumeLayout(False) Me.SplitContainerGrids2.ResumeLayout(False)
CType(Me.BehaviorManager, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@ -545,4 +552,5 @@ Partial Class frmImportMain
Friend WithEvents GridLookUpEdit1View As GridView Friend WithEvents GridLookUpEdit1View As GridView
Friend WithEvents colId As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colId As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents BehaviorManager As DevExpress.Utils.Behaviors.BehaviorManager
End Class End Class

View File

@ -136,4 +136,7 @@
ZWVuIiAvPg0KICA8L2c+DQo8L3N2Zz4L ZWVuIiAvPg0KICA8L2c+DQo8L3N2Zz4L
</value> </value>
</data> </data>
<metadata name="BehaviorManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View File

@ -2,6 +2,7 @@
Imports System.IO Imports System.IO
Imports System.Net.Http Imports System.Net.Http
Imports System.Xml Imports System.Xml
Imports DevExpress.Utils.Behaviors.Common
Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraGrid.Views.Grid
Imports DigitalData.Controls.SQLConfig Imports DigitalData.Controls.SQLConfig
@ -36,6 +37,22 @@ Public Class frmImportMain
Private CurrentDocument As Document Private CurrentDocument As Document
Public Sub New()
InitializeComponent()
BehaviorManager.Attach(Of PersistenceBehavior)(Me, AddressOf LoadPersistenceSettings)
End Sub
Protected Overrides Sub OnLoad(e As EventArgs)
GridControlFiles.ForceInitialize()
MyBase.OnLoad(e)
End Sub
Private Sub LoadPersistenceSettings(pBehaviour As PersistenceBehavior)
pBehaviour.Properties.StoreChildLayouts = DevExpress.Utils.DefaultBoolean.True
pBehaviour.Properties.Storage = Storage.File
pBehaviour.Properties.Path = Application.UserAppDataPath
End Sub
Private Sub frmImportMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmImportMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try Try
txtVersion.Caption = String.Format(txtVersion.Caption, Application.ProductVersion) txtVersion.Caption = String.Format(txtVersion.Caption, Application.ProductVersion)
@ -204,6 +221,7 @@ Public Class frmImportMain
Private Sub btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnLoadFiles.ItemClick Private Sub btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnLoadFiles.ItemClick
Try Try
SplitContainerControl1.Enabled = False
If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, CurrentSchema, lookupMandator.EditValue) Then If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, CurrentSchema, lookupMandator.EditValue) Then
GridControlFiles.DataSource = DocumentLoader.Files GridControlFiles.DataSource = DocumentLoader.Files
txtFilesLoaded.Caption = String.Format(txtFilesLoaded.Tag.ToString, DocumentLoader.Files.Count) txtFilesLoaded.Caption = String.Format(txtFilesLoaded.Tag.ToString, DocumentLoader.Files.Count)
@ -214,6 +232,8 @@ Public Class frmImportMain
Catch ex As Exception Catch ex As Exception
ShowError(ex, "Laden der Dokumente") ShowError(ex, "Laden der Dokumente")
Finally
SplitContainerControl1.Enabled = True
End Try End Try
End Sub End Sub
@ -321,6 +341,7 @@ Public Class frmImportMain
Try Try
GridViewFiles.ShowLoadingPanel() GridViewFiles.ShowLoadingPanel()
SetDocumentButtonsEnabled(False) SetDocumentButtonsEnabled(False)
btnLoadFiles.Enabled = False
SplitContainerGrids.Enabled = False SplitContainerGrids.Enabled = False
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle) Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
@ -335,6 +356,7 @@ Public Class frmImportMain
Finally Finally
SplitContainerGrids.Enabled = True SplitContainerGrids.Enabled = True
btnLoadFiles.Enabled = True
SetDocumentButtonsEnabled(False) SetDocumentButtonsEnabled(False)
GridViewFiles.HideLoadingPanel() GridViewFiles.HideLoadingPanel()

View File

@ -19,6 +19,7 @@ Partial Class frmRowEditor
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmRowEditor))
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.btnSave = New DevExpress.XtraBars.BarButtonItem() Me.btnSave = New DevExpress.XtraBars.BarButtonItem()
Me.btnApplyFromWinline = New DevExpress.XtraBars.BarButtonItem() Me.btnApplyFromWinline = New DevExpress.XtraBars.BarButtonItem()
@ -69,9 +70,9 @@ Partial Class frmRowEditor
' '
'btnApplyFromOriginal 'btnApplyFromOriginal
' '
Me.btnApplyFromOriginal.Caption = "Zurücksetzen" Me.btnApplyFromOriginal.Caption = "Auf Originalwert setzen"
Me.btnApplyFromOriginal.Id = 3 Me.btnApplyFromOriginal.Id = 3
Me.btnApplyFromOriginal.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.resetview Me.btnApplyFromOriginal.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.redo
Me.btnApplyFromOriginal.Name = "btnApplyFromOriginal" Me.btnApplyFromOriginal.Name = "btnApplyFromOriginal"
' '
'RibbonPage1 'RibbonPage1
@ -177,10 +178,11 @@ Partial Class frmRowEditor
Me.Controls.Add(Me.GridControl1) Me.Controls.Add(Me.GridControl1)
Me.Controls.Add(Me.RibbonStatusBar1) Me.Controls.Add(Me.RibbonStatusBar1)
Me.Controls.Add(Me.RibbonControl1) Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.SvgImage = CType(resources.GetObject("frmRowEditor.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.Name = "frmRowEditor" Me.Name = "frmRowEditor"
Me.Ribbon = Me.RibbonControl1 Me.Ribbon = Me.RibbonControl1
Me.StatusBar = Me.RibbonStatusBar1 Me.StatusBar = Me.RibbonStatusBar1
Me.Text = "frmRowEditor" Me.Text = "Zeilen Editor"
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()

View File

@ -117,4 +117,36 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="DevExpress.Data.v19.2" name="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<data name="frmRowEditor.IconOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAIIFAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ
LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3
RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh
Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm
aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lIj4NCiAgICA8cGF0
aCBkPSJNMjEuNiwxMC4zYzAtMC43LTAuMy0xLjMtMC45LTEuN0MyMC4xLDguMiwxOS4xLDgsMTcuOSw4
SDE0djkuOVYxOGg0YzEuMiwwLDIuMi0wLjIsMi45LTAuOCAgIEMyMS43LDE2LjYsMjIsMTYsMjIsMTVj
MC0wLjYtMC4yLTEuMi0wLjctMS42Yy0wLjUtMC40LTEuMS0wLjctMS44LTAuOGMwLjYtMC4yLDEuMS0w
LjUsMS41LTAuOUMyMS40LDExLjMsMjEuNiwxMC45LDIxLjYsMTAuM3ogICAgTTE2LjQsOS43aDAuOWMx
LjEsMCwxLjcsMC40LDEuNywxLjFjMCwwLjQtMC4xLDAuNy0wLjQsMC45QzE4LjQsMTEuOSwxOCwxMiwx
Ny41LDEyaC0xLjFWOS43eiBNMTksMTUuOGMtMC4zLDAuMi0wLjgsMC40LTEuMywwLjQgICBoLTEuM3Yt
Mi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAuNSwwLjlDMTkuNSwx
NS4zLDE5LjQsMTUuNiwxOSwxNS44eiBNMTcuMiwyMkgxYy0wLjUsMC0xLTAuNS0xLTFWNSAgIGMwLTAu
NSwwLjUtMSwxLTFoMjRjMC41LDAsMSwwLjUsMSwxdjguMmwtMiwyVjZIMnYxNGgxNy4yTDE3LjIsMjJ6
IE00LjEsMThoMi4ybDAuNi0yLjNoMy4ybDAuNiwyLjNIMTNMOS44LDhINy40TDQuMSwxOHogICAgTTgu
NCwxMC43YzAuMS0wLjMsMC4xLTAuNiwwLjEtMC45aDAuMWMwLDAuMywwLjEsMC42LDAuMSwwLjlsMSwz
LjNINy40TDguNCwxMC43eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxwYXRoIGQ9Ik0yOSwyMWwtOCw4
bC00LTRsOC04TDI5LDIxeiBNMzAsMjBsMS43LTEuN2MwLjQtMC40LDAuNC0xLDAtMS4zTDI5LDE0LjNj
LTAuNC0wLjQtMS0wLjQtMS4zLDBMMjYsMTZMMzAsMjB6ICAgIE0xNiwyNnY0aDRMMTYsMjZ6IiBjbGFz
cz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw==
</value>
</data>
</root> </root>

View File

@ -8,6 +8,7 @@ Imports ImporterShared.Winline
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Language
Imports DevExpress.XtraEditors.Controls Imports DevExpress.XtraEditors.Controls
Imports System.Globalization Imports System.Globalization
Imports DevExpress.XtraEditors
Public Class frmRowEditor Public Class frmRowEditor
Private ReadOnly _Columns As List(Of String) Private ReadOnly _Columns As List(Of String)
@ -15,9 +16,10 @@ Public Class frmRowEditor
Private ReadOnly _Accounts As List(Of Account) Private ReadOnly _Accounts As List(Of Account)
Private ReadOnly _DocumentRow As ImporterShared.DocumentRow Private ReadOnly _DocumentRow As ImporterShared.DocumentRow
Private ReadOnly DatePicker As New RepositoryItemDateEdit() Private ReadOnly DatePicker As New RepositoryItemDateEdit
Private ReadOnly MultilineEditor As New RepositoryItemMemoEdit() Private ReadOnly MultilineEditor As New RepositoryItemMemoEdit
Private ReadOnly AccountPicker As New RepositoryItemSearchLookUpEdit Private ReadOnly AccountPicker As New RepositoryItemSearchLookUpEdit
Private ReadOnly MaskDateEditor As New RepositoryItemTextEdit
Private Const COL_KEY = "KEY" Private Const COL_KEY = "KEY"
Private Const COL_VALUE_ORIGINAL = "VALUE_ORIGINAL" Private Const COL_VALUE_ORIGINAL = "VALUE_ORIGINAL"
@ -43,26 +45,31 @@ Public Class frmRowEditor
AccountPicker.DisplayMember = "Name" AccountPicker.DisplayMember = "Name"
AccountPicker.ValueMember = "Id" AccountPicker.ValueMember = "Id"
'DatePicker.CalendarTimeEditing = DevExpress.Utils.DefaultBoolean.False
'DatePicker.EditMask = "yyyy-MM-dd"
'DatePicker.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTimeAdvancingCaret
'DatePicker.DisplayFormat.FormatString = "yyyy-MM-dd" 'DatePicker.DisplayFormat.FormatString = "yyyy-MM-dd"
DatePicker.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime ' DatePicker.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
'DatePicker.DisplayFormat.FormatString = "d"
'DatePicker.EditFormat.FormatString = "yyyy-MM-dd" 'DatePicker.EditFormat.FormatString = "yyyy-MM-dd"
DatePicker.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime 'DatePicker.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime
'DatePicker.EditFormat.FormatString = "d"
'DatePicker.Mask.UseMaskAsDisplayFormat = True 'DatePicker.Mask.UseMaskAsDisplayFormat = True
'DatePicker.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime 'DatePicker.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime
' DatePicker.Mask.EditMask = "yyyy-MM-dd" ' DatePicker.Mask.EditMask = "yyyy-MM-dd"
'AddHandler DatePicker.ParseEditValue, AddressOf DatePicker_ParseEditValue 'AddHandler DatePicker.ParseEditValue, AddressOf DatePicker_ParseEditValue
'MaskDateEditor.Mask.EditMask = "yyyy-MM-dd"
'MaskDateEditor.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Simple
End Sub End Sub
Private Sub DatePicker_ParseEditValue(sender As Object, e As ConvertEditValueEventArgs) Private Sub DatePicker_ParseEditValue(sender As Object, e As ConvertEditValueEventArgs)
If TypeOf e.Value Is String Then
Try
Dim oDateTime = Date.ParseExact(e.Value.ToString, "yyyy-MM-dd hh:mm:ss", CultureInfo.InvariantCulture)
e.Value = oDateTime
e.Handled = True
Catch ex As Exception
End Try If TypeOf sender Is RepositoryItemDateEdit Then
Debug.WriteLine($"RepoItem # {e.Value} # {e.Value.GetType.Name}")
ElseIf TypeOf sender Is DateEdit Then
Debug.WriteLine($"DateEdit # {e.Value} # {e.Value.GetType.Name}")
End If End If
End Sub End Sub
@ -108,7 +115,14 @@ Public Class frmRowEditor
End If End If
Dim oFieldValue As FieldValue = oField.Value Dim oFieldValue As FieldValue = oField.Value
Dim oGridValue = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty) Dim oGridValue As String = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty)
If oField.Key = "Datum_Auftrag-Bestellung" And oGridValue.Length > 0 Then
If TryParseDate(oGridValue) Is Nothing Then
MsgBox($"Datumswert für '{oField.Key}' enthält einen ungüligen Wert. Bitte benutzen Sie das Format 'YYYY-MM-DD'.", MsgBoxStyle.Exclamation, Text)
Exit Sub
End If
End If
If Not oFieldValue.Final.Equals(oGridValue) Then If Not oFieldValue.Final.Equals(oGridValue) Then
oFieldValue.Final = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty) oFieldValue.Final = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty)
@ -126,36 +140,41 @@ Public Class frmRowEditor
Close() Close()
End Sub End Sub
Private Function TryParseDate(pValue As String)
Try
Return Date.ParseExact(pValue, "yyyy-MM-dd", CultureInfo.InvariantCulture)
Catch ex As Exception
Return Nothing
End Try
End Function
Private Sub btnApplyFromWinline_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnApplyFromWinline.ItemClick Private Sub btnApplyFromWinline_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnApplyFromWinline.ItemClick
Dim oSelectedRow As DataRow = GridView1.GetDataRow(GridView1.FocusedRowHandle) CopyValueToFinalColumn(COL_VALUE_EXTERNAL)
If oSelectedRow Is Nothing Then
Exit Sub
End If
oSelectedRow.Item(COL_VALUE_FINAL) = oSelectedRow.Item(COL_VALUE_EXTERNAL)
oSelectedRow.AcceptChanges()
End Sub End Sub
Private Sub btnApplyFromOriginal_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnApplyFromOriginal.ItemClick Private Sub btnApplyFromOriginal_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnApplyFromOriginal.ItemClick
CopyValueToFinalColumn(COL_VALUE_ORIGINAL)
End Sub
Private Sub CopyValueToFinalColumn(pSourceColumnName As String)
Dim oSelectedRow As DataRow = GridView1.GetDataRow(GridView1.FocusedRowHandle) Dim oSelectedRow As DataRow = GridView1.GetDataRow(GridView1.FocusedRowHandle)
If oSelectedRow Is Nothing Then If oSelectedRow Is Nothing Then
Exit Sub Exit Sub
End If End If
oSelectedRow.Item(COL_VALUE_FINAL) = oSelectedRow.Item(COL_VALUE_ORIGINAL) oSelectedRow.Item(COL_VALUE_FINAL) = oSelectedRow.Item(pSourceColumnName)
oSelectedRow.AcceptChanges() oSelectedRow.AcceptChanges()
GridView1.CloseEditor()
End Sub End Sub
Private Sub GridView1_CustomRowCellEdit(sender As Object, e As CustomRowCellEditEventArgs) Handles GridView1.CustomRowCellEdit Private Sub GridView1_CustomRowCellEdit(sender As Object, e As CustomRowCellEditEventArgs) Handles GridView1.CustomRowCellEdit
Dim oDataRow As DataRow = GridView1.GetDataRow(e.RowHandle) Dim oDataRow As DataRow = GridView1.GetDataRow(e.RowHandle)
If e.Column.FieldName = COL_VALUE_ORIGINAL Or e.Column.FieldName = COL_VALUE_FINAL Then If e.Column.FieldName = COL_VALUE_ORIGINAL Or e.Column.FieldName = COL_VALUE_FINAL Then
If oDataRow.Item(COL_KEY) = "Datum_Auftrag-Bestellung" Then If oDataRow.Item(COL_KEY) = "Datum_Auftrag-Bestellung" Then
e.RepositoryItem = DatePicker 'e.RepositoryItem = DatePicker
'e.RepositoryItem = MaskDateEditor
ElseIf e.CellValue.ToString.Length > 100 Then ElseIf e.CellValue.ToString.Length > 100 Then
e.RepositoryItem = MultilineEditor e.RepositoryItem = MultilineEditor
ElseIf oDataRow.Item(COL_KEY) = "Fakt_Kontonummer" Or oDataRow.Item(COL_KEY) = "Lief_Kontonummer" Then ElseIf oDataRow.Item(COL_KEY) = "Fakt_Kontonummer" Or oDataRow.Item(COL_KEY) = "Lief_Kontonummer" Then

View File

@ -9,8 +9,6 @@ Namespace Documents
Public Schema As Schema Public Schema As Schema
Public Mandator As Mandator Public Mandator As Mandator
Public Selected As Boolean = False
Public TemplateName As String Public TemplateName As String
Public TemplateType As Integer Public TemplateType As Integer
Public [Option] As Integer Public [Option] As Integer
@ -21,6 +19,8 @@ Namespace Documents
''' </summary> ''' </summary>
Public Property Rows As New List(Of DocumentRow) Public Property Rows As New List(Of DocumentRow)
Public Property Selected As Boolean = False
Public ReadOnly Property MandatorId As String Public ReadOnly Property MandatorId As String
Get Get
Return Mandator?.Id Return Mandator?.Id

View File

@ -1,4 +1,5 @@
Imports System.IO Imports System.Globalization
Imports System.IO
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports ImporterShared.Schemas Imports ImporterShared.Schemas
Imports ImporterShared.Winline Imports ImporterShared.Winline
@ -33,7 +34,6 @@ Namespace Documents
Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory) Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory)
For Each oFile In oFiles For Each oFile In oFiles
' TODO: Supply currently selected mandator when the mandator selection works
Dim oDocument = LoadFile(oFile, pSchema, pMandator) Dim oDocument = LoadFile(oFile, pSchema, pMandator)
Files.Add(oDocument) Files.Add(oDocument)
Next Next
@ -129,9 +129,17 @@ Namespace Documents
Where(Function(c) c.Name = oSubElement.Name). Where(Function(c) c.Name = oSubElement.Name).
SingleOrDefault() SingleOrDefault()
Dim oValue = oSubElement.Value
' TODO: Needed when we have time for date times
'If oSchemaField.DataType = Constants.ColumnType.Date Then
' Dim oDate = Date.ParseExact(oValue, "yyyy-MM-dd", CultureInfo.InvariantCulture)
' oValue = oDate.ToString("d")
'End If
oFields.Add(oSubElement.Name.ToString, New DocumentRow.FieldValue With { oFields.Add(oSubElement.Name.ToString, New DocumentRow.FieldValue With {
.Original = oSubElement.Value, .Original = oValue,
.Final = oSubElement.Value, .Final = oValue,
.DataType = oSchemaField.DataType .DataType = oSchemaField.DataType
}) })
Next Next

View File

@ -15,7 +15,7 @@
Public Original As String = "" Public Original As String = ""
Public External As String = "" Public External As String = ""
Public Final As String = "" Public Final As String = ""
Public DataType As Constants.ColumnType = Constants.ColumnType.String Public Property DataType As Constants.ColumnType = Constants.ColumnType.String
Public Overrides Function ToString() As String Public Overrides Function ToString() As String
Return Final Return Final