diff --git a/EDIDocumentImport/ImporterForm.vbproj b/EDIDocumentImport/ImporterForm.vbproj index f3f2a01..2c2b70d 100644 --- a/EDIDocumentImport/ImporterForm.vbproj +++ b/EDIDocumentImport/ImporterForm.vbproj @@ -170,18 +170,18 @@ Form - - frmMandatorSelection.vb - - - Form - frmRowEditor.vb Form + + frmXmlEditor.vb + + + Form + @@ -226,12 +226,12 @@ frmMain.vb - - frmMandatorSelection.vb - frmRowEditor.vb + + frmXmlEditor.vb + VbMyResourcesResXFileCodeGenerator @@ -262,6 +262,12 @@ + + + + + + diff --git a/EDIDocumentImport/My Project/Resources.Designer.vb b/EDIDocumentImport/My Project/Resources.Designer.vb index d09efb8..feca4b6 100644 --- a/EDIDocumentImport/My Project/Resources.Designer.vb +++ b/EDIDocumentImport/My Project/Resources.Designer.vb @@ -80,6 +80,26 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property actions_send() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("actions_send", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property actions_send1() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("actions_send1", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' @@ -130,6 +150,26 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property logical() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("logical", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property mailmergepreview() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("mailmergepreview", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' @@ -190,6 +230,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property parameters() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("parameters", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' @@ -280,6 +330,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. + ''' + Friend ReadOnly Property togglefieldcodes() As DevExpress.Utils.Svg.SvgImage + Get + Dim obj As Object = ResourceManager.GetObject("togglefieldcodes", resourceCulture) + Return CType(obj,DevExpress.Utils.Svg.SvgImage) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' diff --git a/EDIDocumentImport/My Project/Resources.resx b/EDIDocumentImport/My Project/Resources.resx index cffff6a..3535f98 100644 --- a/EDIDocumentImport/My Project/Resources.resx +++ b/EDIDocumentImport/My Project/Resources.resx @@ -118,68 +118,41 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\singlepageview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\logical.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\open22.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\resetview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\preview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\tilelabels.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\import.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\open1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\tableproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\itemtypechecked.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\bo_validation.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - - ..\Resources\up.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\togglefieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\wraptext.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\open21.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\tableproperties.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\export.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\save.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\preview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\open2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\mailmergepreview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\tilelabels.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\actions_checkcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a - - ..\Resources\pagesetup.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\bo_validation.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\open21.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a ..\Resources\deletetablerows.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a @@ -187,7 +160,52 @@ ..\Resources\showallfieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\up.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\resetview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\open1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\export.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\import.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + ..\Resources\rotatecounterclockwise.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + ..\Resources\singlepageview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\open2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\actions_send1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\actions_send.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\open22.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\pagesetup.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\open.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\itemtypechecked.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + ..\Resources\parameters.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + \ No newline at end of file diff --git a/EDIDocumentImport/My Project/licenses.licx b/EDIDocumentImport/My Project/licenses.licx index c259fc3..328d271 100644 --- a/EDIDocumentImport/My Project/licenses.licx +++ b/EDIDocumentImport/My Project/licenses.licx @@ -1,18 +1,20 @@ -DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.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.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.XtraLayout.LayoutControl, DevExpress.XtraLayout.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.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.XtraEditors.DateEdit, DevExpress.XtraEditors.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.UserDesigner.XRDesignDockManager, DevExpress.XtraReports.v19.2.Extensions, 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.GridLookUpEdit, DevExpress.XtraGrid.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.XtraEditors.Repository.RepositoryItemComboBox, 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.ComboBoxEdit, 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.XtraEditors.TextEdit, DevExpress.XtraEditors.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/EDIDocumentImport/Resources/actions_send.svg b/EDIDocumentImport/Resources/actions_send.svg new file mode 100644 index 0000000..c0372ba --- /dev/null +++ b/EDIDocumentImport/Resources/actions_send.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/EDIDocumentImport/Resources/actions_send1.svg b/EDIDocumentImport/Resources/actions_send1.svg new file mode 100644 index 0000000..c0372ba --- /dev/null +++ b/EDIDocumentImport/Resources/actions_send1.svg @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/EDIDocumentImport/Resources/logical.svg b/EDIDocumentImport/Resources/logical.svg new file mode 100644 index 0000000..77a949b --- /dev/null +++ b/EDIDocumentImport/Resources/logical.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/EDIDocumentImport/Resources/mailmergepreview.svg b/EDIDocumentImport/Resources/mailmergepreview.svg new file mode 100644 index 0000000..18b743c --- /dev/null +++ b/EDIDocumentImport/Resources/mailmergepreview.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/EDIDocumentImport/Resources/parameters.svg b/EDIDocumentImport/Resources/parameters.svg new file mode 100644 index 0000000..3987fed --- /dev/null +++ b/EDIDocumentImport/Resources/parameters.svg @@ -0,0 +1,19 @@ + + + + + + + + \ No newline at end of file diff --git a/EDIDocumentImport/Resources/togglefieldcodes.svg b/EDIDocumentImport/Resources/togglefieldcodes.svg new file mode 100644 index 0000000..31917a1 --- /dev/null +++ b/EDIDocumentImport/Resources/togglefieldcodes.svg @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/EDIDocumentImport/frmImportMain.Designer.vb b/EDIDocumentImport/frmImportMain.Designer.vb index dd6fc77..7e5a8cc 100644 --- a/EDIDocumentImport/frmImportMain.Designer.vb +++ b/EDIDocumentImport/frmImportMain.Designer.vb @@ -1,4 +1,7 @@ - +Imports DevExpress.XtraEditors +Imports DevExpress.XtraGrid.Views.Grid + + Partial Class frmImportMain Inherits DevExpress.XtraBars.Ribbon.RibbonForm @@ -29,25 +32,50 @@ Partial Class frmImportMain Me.btnOpenOutputDirectory = New DevExpress.XtraBars.BarButtonItem() Me.btnOpenSchemaDirectory = New DevExpress.XtraBars.BarButtonItem() Me.btnReloadFile = New DevExpress.XtraBars.BarButtonItem() + Me.btnTransferAllFiles = New DevExpress.XtraBars.BarButtonItem() + Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() + Me.btnShowXml = New DevExpress.XtraBars.BarButtonItem() + Me.btnOpenLogDirectory = New DevExpress.XtraBars.BarButtonItem() + Me.btnOpenConfigDirectory = New DevExpress.XtraBars.BarButtonItem() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPageGroup4 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.RibbonPageGroup5 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() 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.colSelected = New DevExpress.XtraGrid.Columns.GridColumn() - Me.colFilename = New DevExpress.XtraGrid.Columns.GridColumn() + Me.GridViewFiles = New DevExpress.XtraGrid.Views.BandedGrid.AdvBandedGridView() + Me.gridBand3 = New DevExpress.XtraGrid.Views.BandedGrid.GridBand() + Me.colSelected = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn() + Me.colMandator = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn() + Me.cmbMandators = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() + Me.colCreatedAt = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn() + Me.colFilename = New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn() + Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() + Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl() + Me.lookupMandator = New DevExpress.XtraEditors.GridLookUpEdit() + Me.GridLookUpEdit1View = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.colId = New DevExpress.XtraGrid.Columns.GridColumn() + Me.colName = 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() - Me.txtMandator = New DevExpress.XtraBars.BarStaticItem() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RepositoryItemComboBox1, 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.cmbMandators, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.PanelControl1.SuspendLayout() + CType(Me.lookupMandator.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridLookUpEdit1View, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainerMain.SuspendLayout() CType(Me.SplitContainerGrids, System.ComponentModel.ISupportInitialize).BeginInit() @@ -61,15 +89,15 @@ Partial Class frmImportMain '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.btnLoadFiles, Me.btnTransferFile, Me.btnOpenInputDirectory, Me.btnOpenOutputDirectory, Me.btnOpenSchemaDirectory, Me.btnReloadFile, Me.txtMandator}) + 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.btnTransferAllFiles, Me.BarButtonItem1, Me.btnShowXml, Me.btnOpenLogDirectory, Me.btnOpenConfigDirectory}) Me.RibbonControl.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl.MaxItemId = 13 + Me.RibbonControl.MaxItemId = 23 Me.RibbonControl.Name = "RibbonControl" - Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) + Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage2}) + Me.RibbonControl.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemComboBox1}) 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.Size = New System.Drawing.Size(1215, 158) Me.RibbonControl.StatusBar = Me.RibbonStatusBar Me.RibbonControl.Toolbar.ShowCustomizeItem = False ' @@ -99,7 +127,7 @@ Partial Class frmImportMain ' Me.btnTransferFile.Caption = "Aktuelle Datei übermitteln" Me.btnTransferFile.Id = 4 - Me.btnTransferFile.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.actions_checkcircled + Me.btnTransferFile.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.actions_send1 Me.btnTransferFile.Name = "btnTransferFile" ' 'btnOpenInputDirectory @@ -126,38 +154,109 @@ Partial Class frmImportMain 'btnReloadFile ' Me.btnReloadFile.Caption = "Aktuelle Datei neu laden" + Me.btnReloadFile.Enabled = False Me.btnReloadFile.Id = 11 Me.btnReloadFile.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.rotatecounterclockwise Me.btnReloadFile.Name = "btnReloadFile" ' + 'btnTransferAllFiles + ' + Me.btnTransferAllFiles.Caption = "Ausgewählte Dateien übermitteln" + Me.btnTransferAllFiles.Enabled = False + Me.btnTransferAllFiles.Id = 13 + Me.btnTransferAllFiles.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.actions_send + Me.btnTransferAllFiles.Name = "btnTransferAllFiles" + ' + 'BarButtonItem1 + ' + Me.BarButtonItem1.Caption = "Belegvorschau für aktuelle Datei anzeigen" + Me.BarButtonItem1.Enabled = False + Me.BarButtonItem1.Id = 14 + Me.BarButtonItem1.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.mailmergepreview + Me.BarButtonItem1.Name = "BarButtonItem1" + ' + 'btnShowXml + ' + Me.btnShowXml.Caption = "XML-Datei anzeigen" + Me.btnShowXml.Enabled = False + Me.btnShowXml.Id = 15 + Me.btnShowXml.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.togglefieldcodes + Me.btnShowXml.Name = "btnShowXml" + ' + 'btnOpenLogDirectory + ' + Me.btnOpenLogDirectory.Caption = "Logverzeichnis öffnen" + Me.btnOpenLogDirectory.Id = 16 + Me.btnOpenLogDirectory.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.logical + Me.btnOpenLogDirectory.Name = "btnOpenLogDirectory" + ' + 'btnOpenConfigDirectory + ' + Me.btnOpenConfigDirectory.Caption = "Konfigurationsverzeichnis öffnen" + Me.btnOpenConfigDirectory.Id = 17 + Me.btnOpenConfigDirectory.ImageOptions.SvgImage = Global.ImporterForm.My.Resources.Resources.parameters + Me.btnOpenConfigDirectory.Name = "btnOpenConfigDirectory" + ' 'RibbonPage1 ' - Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2}) + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup4, Me.RibbonPageGroup3}) Me.RibbonPage1.Name = "RibbonPage1" - Me.RibbonPage1.Text = "RibbonPage1" + Me.RibbonPage1.Text = "Start" ' 'RibbonPageGroup1 ' 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 = "Start" + Me.RibbonPageGroup1.Text = "Einlesen" + ' + 'RibbonPageGroup4 + ' + Me.RibbonPageGroup4.ItemLinks.Add(Me.BarButtonItem1) + Me.RibbonPageGroup4.ItemLinks.Add(Me.btnShowXml) + Me.RibbonPageGroup4.Name = "RibbonPageGroup4" + Me.RibbonPageGroup4.Text = "Auswertung" + ' + 'RibbonPageGroup3 + ' + Me.RibbonPageGroup3.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far + Me.RibbonPageGroup3.ItemLinks.Add(Me.btnTransferFile) + Me.RibbonPageGroup3.ItemLinks.Add(Me.btnTransferAllFiles) + Me.RibbonPageGroup3.Name = "RibbonPageGroup3" + Me.RibbonPageGroup3.Text = "Übermittlung" + ' + 'RibbonPage2 + ' + Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup5, Me.RibbonPageGroup2}) + Me.RibbonPage2.Name = "RibbonPage2" + Me.RibbonPage2.Text = "Erweitert" + ' + 'RibbonPageGroup5 + ' + Me.RibbonPageGroup5.ItemLinks.Add(Me.btnOpenInputDirectory) + Me.RibbonPageGroup5.ItemLinks.Add(Me.btnOpenOutputDirectory) + Me.RibbonPageGroup5.ItemLinks.Add(Me.btnOpenSchemaDirectory) + Me.RibbonPageGroup5.Name = "RibbonPageGroup5" + Me.RibbonPageGroup5.Text = "Verzeichnisse" ' '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.ItemLinks.Add(Me.btnOpenLogDirectory) + Me.RibbonPageGroup2.ItemLinks.Add(Me.btnOpenConfigDirectory) Me.RibbonPageGroup2.Name = "RibbonPageGroup2" Me.RibbonPageGroup2.Text = "Debugging" ' + 'RepositoryItemComboBox1 + ' + Me.RepositoryItemComboBox1.AutoHeight = False + Me.RepositoryItemComboBox1.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.RepositoryItemComboBox1.Name = "RepositoryItemComboBox1" + ' 'RibbonStatusBar ' Me.RibbonStatusBar.ItemLinks.Add(Me.txtVersion) Me.RibbonStatusBar.ItemLinks.Add(Me.txtFilesLoaded) - Me.RibbonStatusBar.ItemLinks.Add(Me.txtMandator) Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 722) Me.RibbonStatusBar.Name = "RibbonStatusBar" Me.RibbonStatusBar.Ribbon = Me.RibbonControl @@ -166,57 +265,155 @@ Partial Class frmImportMain 'SplitContainerControl1 ' Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 132) + Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 158) Me.SplitContainerControl1.Name = "SplitContainerControl1" Me.SplitContainerControl1.Panel1.Controls.Add(Me.GridControlFiles) + Me.SplitContainerControl1.Panel1.Controls.Add(Me.PanelControl1) Me.SplitContainerControl1.Panel1.Text = "Panel1" Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerMain) Me.SplitContainerControl1.Panel2.Text = "Panel2" - Me.SplitContainerControl1.Size = New System.Drawing.Size(1215, 590) - Me.SplitContainerControl1.SplitterPosition = 362 + Me.SplitContainerControl1.Size = New System.Drawing.Size(1215, 564) + Me.SplitContainerControl1.SplitterPosition = 360 Me.SplitContainerControl1.TabIndex = 2 ' 'GridControlFiles ' Me.GridControlFiles.Dock = System.Windows.Forms.DockStyle.Fill - Me.GridControlFiles.Location = New System.Drawing.Point(0, 0) + Me.GridControlFiles.Location = New System.Drawing.Point(0, 33) Me.GridControlFiles.MainView = Me.GridViewFiles Me.GridControlFiles.MenuManager = Me.RibbonControl Me.GridControlFiles.Name = "GridControlFiles" - Me.GridControlFiles.Size = New System.Drawing.Size(362, 590) + Me.GridControlFiles.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.cmbMandators}) + Me.GridControlFiles.Size = New System.Drawing.Size(360, 531) 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.colSelected, Me.colFilename}) + Me.GridViewFiles.Bands.AddRange(New DevExpress.XtraGrid.Views.BandedGrid.GridBand() {Me.gridBand3}) + Me.GridViewFiles.Columns.AddRange(New DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn() {Me.colSelected, Me.colFilename, Me.colMandator, Me.colCreatedAt}) Me.GridViewFiles.GridControl = Me.GridControlFiles Me.GridViewFiles.Name = "GridViewFiles" + Me.GridViewFiles.OptionsView.ShowBands = False Me.GridViewFiles.OptionsView.ShowDetailButtons = False + Me.GridViewFiles.OptionsView.ShowGroupPanel = False Me.GridViewFiles.OptionsView.ShowIndicator = False ' + 'gridBand3 + ' + Me.gridBand3.Caption = "gridBand3" + Me.gridBand3.Columns.Add(Me.colSelected) + Me.gridBand3.Columns.Add(Me.colMandator) + Me.gridBand3.Columns.Add(Me.colCreatedAt) + Me.gridBand3.Columns.Add(Me.colFilename) + Me.gridBand3.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right + Me.gridBand3.Name = "gridBand3" + Me.gridBand3.VisibleIndex = 0 + Me.gridBand3.Width = 296 + ' 'colSelected ' 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.MaxWidth = 30 - Me.colSelected.MinWidth = 30 + Me.colSelected.MinWidth = 27 Me.colSelected.Name = "colSelected" + Me.colSelected.OptionsColumn.FixedWidth = True Me.colSelected.UnboundType = DevExpress.Data.UnboundColumnType.[Boolean] Me.colSelected.Visible = True - Me.colSelected.VisibleIndex = 0 - Me.colSelected.Width = 30 + Me.colSelected.Width = 27 + ' + 'colMandator + ' + Me.colMandator.Caption = "Mandant" + Me.colMandator.ColumnEdit = Me.cmbMandators + Me.colMandator.FieldName = "MandatorId" + Me.colMandator.Name = "colMandator" + Me.colMandator.Width = 144 + ' + 'cmbMandators + ' + Me.cmbMandators.AutoHeight = False + Me.cmbMandators.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.cmbMandators.Items.AddRange(New Object() {"SIVT"}) + Me.cmbMandators.Name = "cmbMandators" + ' + 'colCreatedAt + ' + Me.colCreatedAt.Caption = "Eingegangen" + Me.colCreatedAt.FieldName = "CreatedAt" + Me.colCreatedAt.Name = "colCreatedAt" + Me.colCreatedAt.OptionsColumn.AllowEdit = False + Me.colCreatedAt.OptionsColumn.ReadOnly = True + Me.colCreatedAt.Visible = True + Me.colCreatedAt.Width = 125 ' 'colFilename ' Me.colFilename.Caption = "Dateiname" Me.colFilename.FieldName = "Name" Me.colFilename.Name = "colFilename" + Me.colFilename.OptionsColumn.AllowEdit = False + Me.colFilename.OptionsColumn.ReadOnly = True + Me.colFilename.RowIndex = 1 Me.colFilename.Visible = True - Me.colFilename.VisibleIndex = 1 - Me.colFilename.Width = 333 + Me.colFilename.Width = 296 + ' + 'PanelControl1 + ' + Me.PanelControl1.AutoSize = True + Me.PanelControl1.Controls.Add(Me.LabelControl1) + Me.PanelControl1.Controls.Add(Me.lookupMandator) + Me.PanelControl1.Dock = System.Windows.Forms.DockStyle.Top + Me.PanelControl1.Location = New System.Drawing.Point(0, 0) + Me.PanelControl1.Name = "PanelControl1" + Me.PanelControl1.Size = New System.Drawing.Size(360, 33) + Me.PanelControl1.TabIndex = 2 + ' + 'LabelControl1 + ' + Me.LabelControl1.Appearance.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LabelControl1.Appearance.Options.UseFont = True + Me.LabelControl1.Location = New System.Drawing.Point(5, 9) + Me.LabelControl1.Name = "LabelControl1" + Me.LabelControl1.Size = New System.Drawing.Size(50, 13) + Me.LabelControl1.TabIndex = 2 + Me.LabelControl1.Text = "Mandant" + ' + 'lookupMandator + ' + Me.lookupMandator.Location = New System.Drawing.Point(75, 6) + Me.lookupMandator.MenuManager = Me.RibbonControl + Me.lookupMandator.Name = "lookupMandator" + Me.lookupMandator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.lookupMandator.Properties.PopupView = Me.GridLookUpEdit1View + Me.lookupMandator.Size = New System.Drawing.Size(280, 20) + Me.lookupMandator.TabIndex = 1 + ' + 'GridLookUpEdit1View + ' + Me.GridLookUpEdit1View.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colId, Me.colName}) + Me.GridLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus + Me.GridLookUpEdit1View.Name = "GridLookUpEdit1View" + Me.GridLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = False + Me.GridLookUpEdit1View.OptionsView.ShowGroupPanel = False + ' + 'colId + ' + Me.colId.Caption = "Id" + Me.colId.FieldName = "Id" + Me.colId.Name = "colId" + Me.colId.Visible = True + Me.colId.VisibleIndex = 0 + ' + 'colName + ' + Me.colName.Caption = "Name" + Me.colName.FieldName = "Name" + Me.colName.Name = "colName" + Me.colName.Visible = True + Me.colName.VisibleIndex = 1 ' 'SplitContainerMain ' @@ -227,7 +424,7 @@ Partial Class frmImportMain Me.SplitContainerMain.Panel1.Text = "Panel1" Me.SplitContainerMain.Panel2.Text = "Panel2" Me.SplitContainerMain.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel1 - Me.SplitContainerMain.Size = New System.Drawing.Size(843, 590) + Me.SplitContainerMain.Size = New System.Drawing.Size(845, 564) Me.SplitContainerMain.SplitterPosition = 588 Me.SplitContainerMain.TabIndex = 1 ' @@ -241,7 +438,7 @@ Partial Class frmImportMain Me.SplitContainerGrids.Panel1.Text = "Panel1" Me.SplitContainerGrids.Panel2.Controls.Add(Me.SplitContainerGrids2) Me.SplitContainerGrids.Panel2.Text = "Panel2" - Me.SplitContainerGrids.Size = New System.Drawing.Size(843, 590) + Me.SplitContainerGrids.Size = New System.Drawing.Size(845, 564) Me.SplitContainerGrids.SplitterPosition = 288 Me.SplitContainerGrids.TabIndex = 0 ' @@ -253,7 +450,7 @@ Partial Class frmImportMain Me.SplitContainerGrids1.Name = "SplitContainerGrids1" Me.SplitContainerGrids1.Panel1.Text = "Panel1" Me.SplitContainerGrids1.Panel2.Text = "Panel2" - Me.SplitContainerGrids1.Size = New System.Drawing.Size(843, 288) + Me.SplitContainerGrids1.Size = New System.Drawing.Size(845, 288) Me.SplitContainerGrids1.SplitterPosition = 118 Me.SplitContainerGrids1.TabIndex = 0 ' @@ -265,17 +462,10 @@ Partial Class frmImportMain Me.SplitContainerGrids2.Name = "SplitContainerGrids2" Me.SplitContainerGrids2.Panel1.Text = "Panel1" Me.SplitContainerGrids2.Panel2.Text = "Panel2" - Me.SplitContainerGrids2.Size = New System.Drawing.Size(843, 292) + Me.SplitContainerGrids2.Size = New System.Drawing.Size(845, 266) Me.SplitContainerGrids2.SplitterPosition = 126 Me.SplitContainerGrids2.TabIndex = 0 ' - 'txtMandator - ' - Me.txtMandator.Caption = "Mandant: Keiner" - Me.txtMandator.Id = 12 - Me.txtMandator.Name = "txtMandator" - Me.txtMandator.Tag = "Mandant: {0}" - ' 'frmImportMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -289,10 +479,17 @@ Partial Class frmImportMain Me.StatusBar = Me.RibbonStatusBar Me.Text = "WebService Multitool für WinLine" CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RepositoryItemComboBox1, 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.cmbMandators, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.PanelControl1.ResumeLayout(False) + Me.PanelControl1.PerformLayout() + CType(Me.lookupMandator.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridLookUpEdit1View, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerMain.ResumeLayout(False) CType(Me.SplitContainerGrids, System.ComponentModel.ISupportInitialize).EndInit() @@ -312,15 +509,12 @@ Partial Class frmImportMain Friend WithEvents RibbonStatusBar As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents SplitContainerControl1 As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents GridControlFiles As DevExpress.XtraGrid.GridControl - 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 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 @@ -328,5 +522,27 @@ Partial Class frmImportMain Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem Friend WithEvents SplitContainerMain As DevExpress.XtraEditors.SplitContainerControl Friend WithEvents btnReloadFile As DevExpress.XtraBars.BarButtonItem - Friend WithEvents txtMandator As DevExpress.XtraBars.BarStaticItem + Friend WithEvents btnTransferAllFiles As DevExpress.XtraBars.BarButtonItem + Friend WithEvents RibbonPageGroup3 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents btnShowXml As DevExpress.XtraBars.BarButtonItem + Friend WithEvents btnOpenLogDirectory As DevExpress.XtraBars.BarButtonItem + Friend WithEvents btnOpenConfigDirectory As DevExpress.XtraBars.BarButtonItem + Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents RibbonPageGroup5 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RepositoryItemComboBox1 As DevExpress.XtraEditors.Repository.RepositoryItemComboBox + Friend WithEvents GridViewFiles As DevExpress.XtraGrid.Views.BandedGrid.AdvBandedGridView + Friend WithEvents colSelected As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn + Friend WithEvents colCreatedAt As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn + Friend WithEvents colMandator As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn + Friend WithEvents colFilename As DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn + Friend WithEvents gridBand3 As DevExpress.XtraGrid.Views.BandedGrid.GridBand + Friend WithEvents cmbMandators As DevExpress.XtraEditors.Repository.RepositoryItemComboBox + Friend WithEvents PanelControl1 As PanelControl + Friend WithEvents LabelControl1 As LabelControl + Friend WithEvents lookupMandator As GridLookUpEdit + Friend WithEvents GridLookUpEdit1View As GridView + Friend WithEvents colId As DevExpress.XtraGrid.Columns.GridColumn + Friend WithEvents colName As DevExpress.XtraGrid.Columns.GridColumn End Class diff --git a/EDIDocumentImport/frmImportMain.vb b/EDIDocumentImport/frmImportMain.vb index c6d60c9..70d9622 100644 --- a/EDIDocumentImport/frmImportMain.vb +++ b/EDIDocumentImport/frmImportMain.vb @@ -1,5 +1,6 @@ Imports System.ComponentModel Imports System.IO +Imports System.Net.Http Imports System.Xml Imports DevExpress.XtraGrid Imports DevExpress.XtraGrid.Views.Grid @@ -32,6 +33,7 @@ Public Class frmImportMain Private CurrentSchemaName As String Private CurrentSchema As Schema + Private CurrentDocument As Document Private Sub frmImportMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -50,10 +52,7 @@ Public Class frmImportMain Message = New Message(LogConfig) GridBuilder = New GridBuilder(GridViewFiles) - GridBuilder. - WithDefaults. - WithReadOnlyOptions. - WithClipboardHandler() + GridBuilder.WithDefaults.WithClipboardHandler() FileEx = New DigitalData.Modules.Filesystem.File(LogConfig) @@ -70,7 +69,6 @@ Public Class frmImportMain End If End If - ' Initialize Database Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString) Database = New MSSQLServer(LogConfig, oConnectionString) @@ -78,7 +76,7 @@ Public Class frmImportMain WebService = New WebService(LogConfig, ConfigManager.Config) PositionData = New PositionData(LogConfig, Winline) Catch ex As Exception - Message.Error(ex, "Fehler beim Initialisieren der Anwendung Daten") + ShowError(ex, "Initialisieren der Anwendungs Daten") End Try ' Load WinLine Data @@ -87,12 +85,19 @@ Public Class frmImportMain Winline.LoadMandators() Winline.LoadEconomicYears() Winline.LoadDocumentKinds(Winline.Mandators) - Winline.LoadTemplateConfiguration() - For Each oMandator In Winline.Mandators + + ' TODO: Comment in when we finally use the database for additional configuration + 'Winline.LoadTemplateConfiguration() + + For Each oMandator As Mandator In Winline.Mandators Winline.LoadAccounts(oMandator) Next + + lookupMandator.Properties.DataSource = Winline.Mandators + lookupMandator.ForceInitialize() + lookupMandator.Properties.View.BestFitColumns() Catch ex As Exception - Message.Error(ex, "Fehler beim Laden der WinLine Daten") + ShowError(ex, "Laden der WinLine Daten") End Try Try @@ -106,7 +111,7 @@ Public Class frmImportMain Grids = CreateGridsAndColumns(CurrentSchema) Catch ex As Exception - Message.Error(ex, "Fehler beim Laden der Vorlagen Daten") + ShowError(ex, "Laden der Vorlagen Daten") End Try txtVersion.Caption = String.Format(txtVersion.Tag.ToString, My.Application.Info.Version.ToString) @@ -120,28 +125,28 @@ Public Class frmImportMain For Each oTable In pSchema.Tables If oTableCounter = 0 Then Dim oGrid = GridLoader.GetGridFromElement(oTable) - AddHandler oGrid.DoubleClick, AddressOf Grid_DoubleClick + AddHandler oGrid.DoubleClick, AddressOf Grid_MouseDoubleClick 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 + AddHandler oGrid.DoubleClick, AddressOf Grid_MouseDoubleClick 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 + AddHandler oGrid.DoubleClick, AddressOf Grid_MouseDoubleClick 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 + AddHandler oGrid.DoubleClick, AddressOf Grid_MouseDoubleClick SplitContainerGrids2.Panel2.Controls.Add(oGrid) oGrids.Add(oGrid) End If @@ -160,55 +165,103 @@ Public Class frmImportMain Return oGrids End Function - 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) + Private Sub Grid_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles GridControlFiles.MouseDoubleClick + Try + Dim oGrid As GridControl = DirectCast(sender, GridControl) + Dim oView As GridView = DirectCast(oGrid.FocusedView, GridView) + Dim oHitInfo = oView.CalcHitInfo(e.Location) - If Not oView.IsDataRow(oView.FocusedRowHandle) Then - Exit Sub - End If + If Not oHitInfo.InDataRow 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 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 oAccounts = Winline.Accounts. - Where(Function(a) a.Mandator = CurrentDocument.Mandator). - ToList() + Dim oAccounts = Winline.Accounts. + Where(Function(a) a.Mandator = CurrentDocument.Mandator.Id). + ToList() - Dim oForm As New frmRowEditor(oColumns, oDocumentRow, oAccounts) - If oForm.ShowDialog() = DialogResult.OK Then - 'Dim oModifiedRow = oForm.DocumentRow + Dim oForm As New frmRowEditor(oColumns, oDocumentRow, oAccounts) + If oForm.ShowDialog() = DialogResult.OK Then + Dim oModifiedRow = oForm.DocumentRow + Dim oIndex = CurrentDocument.Rows.IndexOf(oModifiedRow) + 'Dim oGuid = CurrentDocument.Rows. + ' Where(Function(r) r.Id = oModifiedRow.Id). + ' Select(Function(r) r.Id) - 'For Each oField In oModifiedRow.Fields - ' oRow.Item(oField.Key) = oField.Value.Final + CurrentDocument.Rows.Item(oIndex) = oModifiedRow + LoadDocument(CurrentDocument) + End If + Catch ex As Exception + ShowError(ex, "Laden der Detailzeilen") - 'Next - - 'oRow.AcceptChanges() - End If + End Try End Sub Private Sub btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnLoadFiles.ItemClick - If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, CurrentSchema) Then - GridControlFiles.DataSource = DocumentLoader.Files - txtFilesLoaded.Caption = String.Format(txtFilesLoaded.Tag.ToString, DocumentLoader.Files.Count) + Try + If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, CurrentSchema, lookupMandator.EditValue) Then + GridControlFiles.DataSource = DocumentLoader.Files + txtFilesLoaded.Caption = String.Format(txtFilesLoaded.Tag.ToString, DocumentLoader.Files.Count) + End If + Catch ex As Exceptions.NoMandatorException + MsgBox("Es konnte kein passender Mandant anhand der geladenen Daten ermittelt werden. Bitte wählen Sie einen aus der Liste.", MsgBoxStyle.Information, Text) + + Catch ex As Exception + ShowError(ex, "Laden der Dokumente") + + End Try + End Sub + + Private Sub btnReloadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReloadFile.ItemClick + Dim oCurrentMandator As Mandator = TryCast(lookupMandator.EditValue, Mandator) + If oCurrentMandator Is Nothing Then + MsgBox("Bitte wählen Sie einen Mandanten aus, bevor Sie fortfahren!", MsgBoxStyle.Exclamation, Text) + Exit Sub End If + + Dim oResult As DialogResult = MsgBox($"Wollen Sie wirklich die aktuelle Datei mit dem gewählten Mandanten ({oCurrentMandator.Name}) neu laden? Alle von Ihnen getätigten Änderungen werden dabei verworfen.", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text) + + Try + If oResult = DialogResult.Yes Then + Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle) + + Dim oNewDocument = DocumentLoader.LoadFile(oDocument.File, CurrentSchema, lookupMandator.EditValue) + Dim oIndex = DocumentLoader.Files.IndexOf(oDocument) + DocumentLoader.Files.Item(oIndex) = oNewDocument + + LoadDocument(oNewDocument) + End If + + Catch ex As Exceptions.NoMandatorException + MsgBox("Es konnte kein passender Mandant anhand der geladenen Daten ermittelt werden. Bitte wählen Sie einen aus der Liste.", MsgBoxStyle.Information, Text) + + Catch ex As Exception + ShowError(ex, "Neuladen des Dokuments") + + End Try End Sub Private Sub GridViewFiles_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewFiles.FocusedRowChanged + Try + Dim oDocument As Document = GridViewFiles.GetRow(e.FocusedRowHandle) - Dim oDocument As Document = GridViewFiles.GetRow(e.FocusedRowHandle) - If LoadDocument(oDocument) Then - CurrentDocument = oDocument - Else - MsgBox("Das Laden des Dokuments ist fehlgeschlagen!", MsgBoxStyle.Critical, Text) - End If + If oDocument Is Nothing Then + Exit Sub + End If + + lookupMandator.EditValue = oDocument.Mandator + LoadDocument(oDocument) + Catch ex As Exception + ShowError(ex, "Laden des Dokuments") + End Try End Sub - Private Function LoadDocument(pDocument As Document) + Private Sub LoadDocument(pDocument As Document) Try Dim oDatasources As New Dictionary(Of String, DataTable) @@ -246,68 +299,92 @@ Public Class frmImportMain oDataTable.AcceptChanges() Next - Return True + CurrentDocument = pDocument + SetDocumentButtonsEnabled(True) Catch ex As Exception + SetDocumentButtonsEnabled(False) Logger.Error(ex) - Return False + Throw ex End Try - End Function + End Sub + + Private Sub SetDocumentButtonsEnabled(pEnabled As Boolean) + btnShowXml.Enabled = pEnabled + btnReloadFile.Enabled = pEnabled + btnTransferFile.Enabled = pEnabled + ' TODO: Implement all file transfer first + ' btnTransferAllFiles.Enabled = pEnabled + End Sub + 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() + SetDocumentButtonsEnabled(False) SplitContainerGrids.Enabled = False + + Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle) Await WebService.TransferDocumentToWinline(oDocument) - MsgBox("Document successfully transferred to WinLine!", MsgBoxStyle.Information, Text) + MsgBox("Datei erfolgreich in die WinLine übertragen!", MsgBoxStyle.Information, Text) + Catch ex As HttpRequestException + ShowError(ex, "Übertragung zur WinLine", "Die Verbindung zum WinLine Server ist fehlgeschlagen. Bitte prüfen Sie die Konfiguration des Programs und den Zustand des WinLine Servers") Catch ex As Exception - MsgBox("Error while transferring to WinLine: " & ex.Message, MsgBoxStyle.Critical, Text) - Logger.Error(ex) + ShowError(ex, "Übertragung zur WinLine") + Finally SplitContainerGrids.Enabled = True + SetDocumentButtonsEnabled(False) GridViewFiles.HideLoadingPanel() End Try End Sub Private Sub btnOpenInputDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenInputDirectory.ItemClick - TryOpenDirectory(ConfigManager.Config.InputDirectory) + TryOpenDirectory(ConfigManager.Config.InputDirectory, "Eingangsverzeichnis") 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")) + Dim oOutputDirectory = IO.Path.Combine(FileEx.GetAppDataPath("Digital Data", "EDI Document Importer"), "WebService") + TryOpenDirectory(oOutputDirectory, "Ausgabeverzeichnis") End Sub Private Sub btnOpenSchemaDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenSchemaDirectory.ItemClick - TryOpenDirectory(ConfigManager.Config.SchemaDirectory) + TryOpenDirectory(ConfigManager.Config.SchemaDirectory, "Vorlagenverzeichnis") End Sub - Private Sub TryOpenDirectory(pPath As String) - Try + Private Sub TryOpenDirectory(pPath As String, pDisplayName As String) + If Directory.Exists(pPath) Then 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, CurrentSchema) - 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 + Else + MsgBox($"{pDisplayName} nicht konfiguriert oder nicht gefunden!", MsgBoxStyle.Exclamation, Text) End If End Sub + + + + Private Sub btnOpenLogDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenLogDirectory.ItemClick + TryOpenDirectory(LogConfig.LogDirectory, "Logverzeichnis") + End Sub + + Private Sub btnOpenConfigDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenConfigDirectory.ItemClick + Dim oUserConfigDirectory = New FileInfo(ConfigManager.UserConfigPath).Directory + TryOpenDirectory(oUserConfigDirectory.FullName, "Konfigurationsverzeichnis") + End Sub + + Private Sub ShowError(pException As Exception, pFunction As String, Optional pDetails As String = "") + Dim oMessage = $"In der Funktion '{pFunction}' ist folgender Fehler aufgetreten:{vbNewLine}{vbNewLine}{pException.Message}" + If pDetails <> String.Empty Then + oMessage &= $"{vbNewLine}{pDetails}" + End If + + Logger.Error(pException) + MsgBox(oMessage, MsgBoxStyle.Critical, Text) + End Sub + + Private Sub btnShowXml_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnShowXml.ItemClick + Dim oForm As New frmXmlEditor With {.FileName = CurrentDocument.FullName} + oForm.Show() + End Sub End Class \ No newline at end of file diff --git a/EDIDocumentImport/frmImportMain_old.vb b/EDIDocumentImport/frmImportMain_old.vb index c44843f..a57a691 100644 --- a/EDIDocumentImport/frmImportMain_old.vb +++ b/EDIDocumentImport/frmImportMain_old.vb @@ -120,7 +120,7 @@ Public Class frmImportMain_old Private Sub btnLoadDocuments_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnLoadDocuments.ItemClick Try - If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, Nothing) = True Then + If DocumentLoader.LoadFiles(ConfigManager.Config.InputDirectory, Nothing, Nothing) = True Then RibbonGroupDataTransmission.Enabled = True RibbonGroupDocument.Enabled = True @@ -159,19 +159,19 @@ Public Class frmImportMain_old ' Load XML File in the sidebar RichEditXml.LoadDocument(pDocument.FullName, DocumentFormat.PlainText) - If pDocument.Mandator Is Nothing Then - Dim oForm As New frmMandatorSelection() With { - .Mandators = Winline.Mandators, - .SelectedMandator = Nothing - } - Dim oResult = oForm.ShowDialog() + 'If pDocument.Mandator Is Nothing Then + ' Dim oForm As New frmMandatorSelection() With { + ' .Mandators = Winline.Mandators, + ' .SelectedMandator = Nothing + ' } + ' Dim oResult = oForm.ShowDialog() - If oResult <> DialogResult.OK Then - Exit Sub - End If + ' If oResult <> DialogResult.OK Then + ' Exit Sub + ' End If - pDocument.Mandator = oForm.SelectedMandator.Id - End If + ' pDocument.Mandator = oForm.SelectedMandator + 'End If Try Select Case pDocument.Type diff --git a/EDIDocumentImport/frmMandatorSelection.Designer.vb b/EDIDocumentImport/frmMandatorSelection.Designer.vb deleted file mode 100644 index 7236fdb..0000000 --- a/EDIDocumentImport/frmMandatorSelection.Designer.vb +++ /dev/null @@ -1,115 +0,0 @@ - _ -Partial Class frmMandatorSelection - Inherits DevExpress.XtraEditors.XtraForm - - 'Form overrides dispose to clean up the component list. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - MyBase.Dispose(disposing) - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - _ - Private Sub InitializeComponent() - Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMandatorSelection)) - Me.GridMandators = New DevExpress.XtraGrid.GridControl() - Me.ViewMandators = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() - Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() - Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl() - Me.SimpleButton2 = New DevExpress.XtraEditors.SimpleButton() - CType(Me.GridMandators, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.ViewMandators, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.PanelControl1.SuspendLayout() - Me.SuspendLayout() - ' - 'GridMandators - ' - Me.GridMandators.Dock = System.Windows.Forms.DockStyle.Top - Me.GridMandators.Location = New System.Drawing.Point(0, 0) - Me.GridMandators.MainView = Me.ViewMandators - Me.GridMandators.Name = "GridMandators" - Me.GridMandators.Size = New System.Drawing.Size(606, 292) - Me.GridMandators.TabIndex = 0 - Me.GridMandators.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.ViewMandators}) - ' - 'ViewMandators - ' - Me.ViewMandators.GridControl = Me.GridMandators - Me.ViewMandators.Name = "ViewMandators" - ' - 'PanelControl1 - ' - Me.PanelControl1.Controls.Add(Me.LabelControl1) - Me.PanelControl1.Controls.Add(Me.SimpleButton2) - Me.PanelControl1.Controls.Add(Me.SimpleButton1) - Me.PanelControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.PanelControl1.Location = New System.Drawing.Point(0, 292) - Me.PanelControl1.Name = "PanelControl1" - Me.PanelControl1.Size = New System.Drawing.Size(606, 61) - Me.PanelControl1.TabIndex = 1 - ' - 'SimpleButton1 - ' - Me.SimpleButton1.DialogResult = System.Windows.Forms.DialogResult.OK - Me.SimpleButton1.Location = New System.Drawing.Point(465, 6) - Me.SimpleButton1.Name = "SimpleButton1" - Me.SimpleButton1.Size = New System.Drawing.Size(129, 43) - Me.SimpleButton1.TabIndex = 0 - Me.SimpleButton1.Text = "OK" - ' - 'LabelControl1 - ' - Me.LabelControl1.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.LabelControl1.Appearance.Options.UseFont = True - Me.LabelControl1.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.Vertical - Me.LabelControl1.Location = New System.Drawing.Point(12, 6) - Me.LabelControl1.Name = "LabelControl1" - Me.LabelControl1.Size = New System.Drawing.Size(312, 45) - Me.LabelControl1.TabIndex = 1 - Me.LabelControl1.Text = "Für das Dokument konnte kein eindeutiger Mandant bestimmt werden. Bitte wählen si" & - "e einen Mandanten aus der Liste oder klicken Sie auf Überspringen." - ' - 'SimpleButton2 - ' - Me.SimpleButton2.DialogResult = System.Windows.Forms.DialogResult.Ignore - Me.SimpleButton2.Location = New System.Drawing.Point(330, 6) - Me.SimpleButton2.Name = "SimpleButton2" - Me.SimpleButton2.Size = New System.Drawing.Size(129, 43) - Me.SimpleButton2.TabIndex = 0 - Me.SimpleButton2.Text = "Überspringen" - ' - 'frmMandatorSelection - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(606, 353) - Me.Controls.Add(Me.PanelControl1) - Me.Controls.Add(Me.GridMandators) - Me.IconOptions.SvgImage = CType(resources.GetObject("frmMandatorSelection.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) - Me.Name = "frmMandatorSelection" - Me.Text = "Mandanten Auswahl" - CType(Me.GridMandators, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.ViewMandators, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.PanelControl1.ResumeLayout(False) - Me.ResumeLayout(False) - - End Sub - - Friend WithEvents GridMandators As DevExpress.XtraGrid.GridControl - Friend WithEvents ViewMandators As DevExpress.XtraGrid.Views.Grid.GridView - Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl - Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton - Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl - Friend WithEvents SimpleButton2 As DevExpress.XtraEditors.SimpleButton -End Class diff --git a/EDIDocumentImport/frmMandatorSelection.vb b/EDIDocumentImport/frmMandatorSelection.vb deleted file mode 100644 index 94c672a..0000000 --- a/EDIDocumentImport/frmMandatorSelection.vb +++ /dev/null @@ -1,10 +0,0 @@ -Imports ImporterShared.Winline - -Public Class frmMandatorSelection - Public Property Mandators As List(Of Mandator) - Public Property SelectedMandator As Mandator - - Private Sub frmMandatorSelection_Load(sender As Object, e As EventArgs) Handles MyBase.Load - MsgBox("TODO: Mach et!") - End Sub -End Class \ No newline at end of file diff --git a/EDIDocumentImport/frmRowEditor.vb b/EDIDocumentImport/frmRowEditor.vb index 65f3ee6..278b2cd 100644 --- a/EDIDocumentImport/frmRowEditor.vb +++ b/EDIDocumentImport/frmRowEditor.vb @@ -6,6 +6,8 @@ Imports ImporterShared.DocumentRow Imports DevExpress.XtraEditors.Repository Imports ImporterShared.Winline Imports DigitalData.Modules.Language +Imports DevExpress.XtraEditors.Controls +Imports System.Globalization Public Class frmRowEditor Private ReadOnly _Columns As List(Of String) @@ -41,10 +43,27 @@ Public Class frmRowEditor AccountPicker.DisplayMember = "Name" AccountPicker.ValueMember = "Id" - 'DatePicker.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime - 'DatePicker.EditFormat.FormatString = "dd/MM/yyyy" - 'DatePicker.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime 'DatePicker.DisplayFormat.FormatString = "yyyy-MM-dd" + DatePicker.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime + 'DatePicker.EditFormat.FormatString = "yyyy-MM-dd" + DatePicker.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime + 'DatePicker.Mask.UseMaskAsDisplayFormat = True + 'DatePicker.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime + ' DatePicker.Mask.EditMask = "yyyy-MM-dd" + + 'AddHandler DatePicker.ParseEditValue, AddressOf DatePicker_ParseEditValue + End Sub + + 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 + End If End Sub Private Sub frmRowEditor_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -89,13 +108,18 @@ Public Class frmRowEditor End If Dim oFieldValue As FieldValue = oField.Value - oFieldValue.Final = Utils.Notnull(oRow.Item(COL_VALUE_FINAL), String.Empty) + Dim oGridValue = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty) - If _DocumentRow.Fields.ContainsKey(oField.Key) Then - _DocumentRow.Fields.Item(oField.Key) = oFieldValue - Else - _DocumentRow.Fields.Add(oField.Key, oFieldValue) + If Not oFieldValue.Final.Equals(oGridValue) Then + oFieldValue.Final = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty) + + If _DocumentRow.Fields.ContainsKey(oField.Key) Then + _DocumentRow.Fields.Item(oField.Key) = oFieldValue + Else + _DocumentRow.Fields.Add(oField.Key, oFieldValue) + End If End If + Next DialogResult = DialogResult.OK diff --git a/EDIDocumentImport/frmXmlEditor.Designer.vb b/EDIDocumentImport/frmXmlEditor.Designer.vb new file mode 100644 index 0000000..6783e05 --- /dev/null +++ b/EDIDocumentImport/frmXmlEditor.Designer.vb @@ -0,0 +1,55 @@ + _ +Partial Class frmXmlEditor + Inherits DevExpress.XtraEditors.XtraForm + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.RichEditControl1 = New DevExpress.XtraRichEdit.RichEditControl() + Me.SuspendLayout() + ' + 'RichEditControl1 + ' + Me.RichEditControl1.Appearance.Text.Font = New System.Drawing.Font("Consolas", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.RichEditControl1.Appearance.Text.Options.UseFont = True + Me.RichEditControl1.Cursor = System.Windows.Forms.Cursors.Default + Me.RichEditControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.RichEditControl1.Location = New System.Drawing.Point(0, 0) + Me.RichEditControl1.Name = "RichEditControl1" + Me.RichEditControl1.Options.HorizontalRuler.Visibility = DevExpress.XtraRichEdit.RichEditRulerVisibility.Hidden + Me.RichEditControl1.Options.VerticalRuler.Visibility = DevExpress.XtraRichEdit.RichEditRulerVisibility.Hidden + Me.RichEditControl1.ReadOnly = True + Me.RichEditControl1.Size = New System.Drawing.Size(831, 687) + Me.RichEditControl1.TabIndex = 0 + Me.RichEditControl1.Text = "RichEditControl1" + ' + 'frmXmlEditor + ' + Me.Appearance.Options.UseFont = True + Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(831, 687) + Me.Controls.Add(Me.RichEditControl1) + Me.Font = New System.Drawing.Font("Consolas", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Name = "frmXmlEditor" + Me.Text = "frmXmlEditor" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents RichEditControl1 As DevExpress.XtraRichEdit.RichEditControl +End Class diff --git a/EDIDocumentImport/frmMandatorSelection.resx b/EDIDocumentImport/frmXmlEditor.resx similarity index 72% rename from EDIDocumentImport/frmMandatorSelection.resx rename to EDIDocumentImport/frmXmlEditor.resx index 4185b21..1af7de1 100644 --- a/EDIDocumentImport/frmMandatorSelection.resx +++ b/EDIDocumentImport/frmXmlEditor.resx @@ -117,29 +117,4 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z - LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl - dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAOkDAAAC77u/ - PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi - IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv - MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh - Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg - MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z - ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5HcmVlbntmaWxsOiMwMzlD - MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh - Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQoJLnN0MntkaXNwbGF5Om5vbmU7fQoJLnN0M3tk - aXNwbGF5OmlubGluZTtmaWxsOiNGRkIxMTU7fQoJLnN0NHtkaXNwbGF5OmlubGluZTt9Cgkuc3Q1e2Rp - c3BsYXk6aW5saW5lO29wYWNpdHk6MC43NTt9Cgkuc3Q2e2Rpc3BsYXk6aW5saW5lO29wYWNpdHk6MC41 - O30KCS5zdDd7ZGlzcGxheTppbmxpbmU7ZmlsbDojMDM5QzIzO30KCS5zdDh7ZGlzcGxheTppbmxpbmU7 - ZmlsbDojRDExQzFDO30KCS5zdDl7ZGlzcGxheTppbmxpbmU7ZmlsbDojMTE3N0Q3O30KCS5zdDEwe2Rp - c3BsYXk6aW5saW5lO2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU+DQogIDxnIGlkPSJPcmdhbml6YXRpb24i - Pg0KICAgIDxwYXRoIGQ9Ik0yNywxMmgtOVY2aC00djZoLTJWMkg4djEwSDVjLTAuNiwwLTEsMC41LTEs - MXYxNmMwLDAuNSwwLjQsMSwxLDFoMjJjMC42LDAsMS0wLjUsMS0xVjEzICAgQzI4LDEyLjUsMjcuNiwx - MiwyNywxMnogTTEyLDIwSDh2LTRoNFYyMHogTTE4LDIwaC00di00aDRWMjB6IE0yNCwyMGgtNHYtNGg0 - VjIweiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2Zz4L - - \ No newline at end of file diff --git a/EDIDocumentImport/frmXmlEditor.vb b/EDIDocumentImport/frmXmlEditor.vb new file mode 100644 index 0000000..884f513 --- /dev/null +++ b/EDIDocumentImport/frmXmlEditor.vb @@ -0,0 +1,22 @@ +Public Class frmXmlEditor + Public Property FileName As String + + Private Sub frmXmlEditor_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If FileName Is Nothing OrElse FileName = String.Empty Then + MsgBox("Kein Dateiname übergeben!", MsgBoxStyle.Critical, Text) + Exit Sub + End If + + If Not IO.File.Exists(FileName) Then + MsgBox("Datei existiert nicht!", MsgBoxStyle.Critical, Text) + Exit Sub + End If + + Try + Dim oContents = IO.File.ReadAllText(FileName) + RichEditControl1.Text = oContents + Catch ex As Exception + MsgBox($"Fehler beim Laden der Datei: {ex.Message}", MsgBoxStyle.Critical, Text) + End Try + End Sub +End Class \ No newline at end of file diff --git a/ImporterShared/Documents/Document.vb b/ImporterShared/Documents/Document.vb index acd8c33..c1f4253 100644 --- a/ImporterShared/Documents/Document.vb +++ b/ImporterShared/Documents/Document.vb @@ -1,18 +1,15 @@ Imports System.IO Imports ImporterShared.Schemas +Imports ImporterShared.Winline Namespace Documents Public Class Document Public File As FileInfo Public Type As DocumentType Public Schema As Schema - Public Mandator As String - Public Selected As Boolean = False + Public Mandator As Mandator - ''' - ''' TODO: Set before submitting to web services - ''' - Public CreatedAt As Date + Public Selected As Boolean = False Public TemplateName As String Public TemplateType As Integer @@ -24,6 +21,18 @@ Namespace Documents ''' Public Property Rows As New List(Of DocumentRow) + Public ReadOnly Property MandatorId As String + Get + Return Mandator?.Id + End Get + End Property + + Public ReadOnly Property CreatedAt As Date + Get + Return File?.CreationTime + End Get + End Property + Public ReadOnly Property FullName As String Get Return File?.FullName diff --git a/ImporterShared/Documents/DocumentLoader.vb b/ImporterShared/Documents/DocumentLoader.vb index 12a4de4..5c7a006 100644 --- a/ImporterShared/Documents/DocumentLoader.vb +++ b/ImporterShared/Documents/DocumentLoader.vb @@ -1,6 +1,7 @@ Imports System.IO Imports DigitalData.Modules.Logging Imports ImporterShared.Schemas +Imports ImporterShared.Winline Namespace Documents Public Class DocumentLoader @@ -17,7 +18,7 @@ Namespace Documents End Sub - Public Function LoadFiles(pInputDirectory As String, pSchema As Schema) As Boolean + Public Function LoadFiles(pInputDirectory As String, pSchema As Schema, pMandator As Mandator) As Boolean If pInputDirectory = String.Empty Then Throw New ArgumentNullException("InputDirectory") End If @@ -32,7 +33,8 @@ Namespace Documents Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory) For Each oFile In oFiles - Dim oDocument = LoadFile(oFile, pSchema) + ' TODO: Supply currently selected mandator when the mandator selection works + Dim oDocument = LoadFile(oFile, pSchema, pMandator) Files.Add(oDocument) Next @@ -40,12 +42,12 @@ Namespace Documents Catch ex As Exception Logger.Error(ex) - Throw New IOException($"Could not load files from directory {pInputDirectory}", ex) + Throw ex End Try End Function - Public Function LoadFile(pFileInfo As FileInfo, pSchema As Schema) As Document + Public Function LoadFile(pFileInfo As FileInfo, pSchema As Schema, pMandator As Mandator) As Document Dim oFileList As New List(Of FileInfo) From {pFileInfo} Logger.Info("Loading file [{0}]", pFileInfo.Name) @@ -54,11 +56,11 @@ Namespace Documents Select(AddressOf WrapFileInfo). Select(Function(d) IncludeSchema(d, pSchema)). Select(Function(d) LoadDocumentData(d, pSchema)). - Select(Function(d) MatchDataFromWinLine(d, Winline.Mandators)). + Select(Function(d) MatchDataFromWinLine(d, Winline.Mandators, pMandator)). SingleOrDefault() Catch ex As Exception Logger.Error(ex) - Return Nothing + Throw ex End Try End Function @@ -154,20 +156,26 @@ Namespace Documents End Function - Private Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Winline.Mandator)) As Document + Private Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Mandator), pMandator As Mandator) As Document Dim oMandators As List(Of Winline.Mandator) = pMandators. Where(Function(m) m.IsWhitelisted = True). OrderBy(Function(m) m.Order). ToList() - Dim oMandator = Winline.FindMatchingMandatorFromOrder(pDocument) + Dim oMandator As Mandator = Nothing + If pMandator IsNot Nothing Then + oMandator = pMandator + Else + oMandator = Winline.FindMatchingMandatorFromOrder(pDocument) + End If If oMandator Is Nothing Then Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name) + Throw New Exceptions.NoMandatorException($"Mandator not found for file [{pDocument.File.Name}]") End If pDocument = MatchDocumentData(pDocument, oMandator) - pDocument.Mandator = oMandator.Id + pDocument.Mandator = oMandator Return pDocument End Function diff --git a/ImporterShared/Winline/Data.vb b/ImporterShared/Winline/Data.vb index eee6a63..dca7603 100644 --- a/ImporterShared/Winline/Data.vb +++ b/ImporterShared/Winline/Data.vb @@ -522,7 +522,7 @@ Namespace Winline Public Function LoadTemplateConfiguration() As Boolean Try - 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 oSql = $"SELECT * FROM [DD_ECM].[dbo].[VWEDI_XML_ITEMS]" Dim oTable As DataTable = Database.GetDatatable(oSql) Dim oItems As New List(Of TemplateColumn) @@ -533,7 +533,8 @@ Namespace Winline .Type = oRow.Item("XML_TYPE"), .Template = oRow.Item("TEMPLATE_NAME"), .[Function] = oRow.Item("FUNCTION_ID"), - .[ReadOnly] = oRow.Item("READ_ONLY") + .[ReadOnly] = oRow.Item("IS_READ_ONLY"), + .[Visible] = oRow.Item("IS_VISIBLE") } oItems.Add(oColumn) diff --git a/ImporterShared/Winline/Entities/TemplateColumn.vb b/ImporterShared/Winline/Entities/TemplateColumn.vb index 24be314..fcd1d6f 100644 --- a/ImporterShared/Winline/Entities/TemplateColumn.vb +++ b/ImporterShared/Winline/Entities/TemplateColumn.vb @@ -6,6 +6,7 @@ Public IsHead As Boolean Public Template As String Public [ReadOnly] As Boolean + Public Visible As Boolean Public [Function] As Constants.XmlFunction End Class diff --git a/ImporterShared/Winline/WebService.vb b/ImporterShared/Winline/WebService.vb index 0ff0eab..a28e448 100644 --- a/ImporterShared/Winline/WebService.vb +++ b/ImporterShared/Winline/WebService.vb @@ -76,7 +76,7 @@ Namespace Winline ' 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 oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pDocument.Mandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}" Dim oClient As New HttpClient() Logger.Info("Creating HTTP Request to [{0}]", oWS.BaseUrl)