diff --git a/MultiTool.Form/Exceptions.vb b/MultiTool.Form/Exceptions.vb
deleted file mode 100644
index ac41eee..0000000
--- a/MultiTool.Form/Exceptions.vb
+++ /dev/null
@@ -1,49 +0,0 @@
-Public Class Exceptions
- Public MustInherit Class DocumentShowException
- Inherits ApplicationException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class WebServiceException
- Inherits ApplicationException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class NoMandatorException
- Inherits DocumentShowException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class MultipleAccountsException
- Inherits DocumentShowException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class NoAccountException
- Inherits DocumentShowException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class MalformedXmlException
- Inherits ApplicationException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-End Class
diff --git a/MultiTool.Form/FormHelpers.vb b/MultiTool.Form/FormHelpers.vb
index 374a777..299221b 100644
--- a/MultiTool.Form/FormHelpers.vb
+++ b/MultiTool.Form/FormHelpers.vb
@@ -1,4 +1,5 @@
Imports DigitalData.Modules.Logging
+Imports MultiTool.Shared.Exceptions
Public Class FormHelper
Private ReadOnly Logger As Logger
@@ -13,6 +14,15 @@ Public Class FormHelper
oMessage &= $"{vbNewLine}{pDetails}"
End If
+ If TypeOf pException Is MultiToolException Then
+ oMessage &= $"{vbNewLine}"
+
+ Select Case pException.GetType()
+ Case GetType(MissingAttributeException)
+ oMessage &= $"Fehlendes Attribut: '{pException.Message}'"
+ End Select
+ End If
+
Logger.Error(pException)
MsgBox(oMessage, MsgBoxStyle.Critical, Application.ProductName)
End Sub
diff --git a/MultiTool.Form/MultiTool.Form.vbproj b/MultiTool.Form/MultiTool.Form.vbproj
index 5ba36e9..7e66a6f 100644
--- a/MultiTool.Form/MultiTool.Form.vbproj
+++ b/MultiTool.Form/MultiTool.Form.vbproj
@@ -156,7 +156,6 @@
-
frmImportMain.vb
diff --git a/MultiTool.Form/Reports/OrderReport.Designer.vb b/MultiTool.Form/Reports/OrderReport.Designer.vb
index 9b2ea8d..c395a74 100644
--- a/MultiTool.Form/Reports/OrderReport.Designer.vb
+++ b/MultiTool.Form/Reports/OrderReport.Designer.vb
@@ -1,9 +1,9 @@
- _
+
Partial Public Class OrderReport
Inherits DevExpress.XtraReports.UI.XtraReport
'XtraReport 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()
@@ -17,7 +17,7 @@ Partial Public Class OrderReport
'NOTE: The following procedure is required by the Designer
'It can be modified using the Designer.
'Do not modify it using the code editor.
- _
+
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Title = New DevExpress.XtraReports.UI.XRControlStyle()
@@ -32,9 +32,11 @@ Partial Public Class OrderReport
Me.PageInfo = New DevExpress.XtraReports.UI.XRControlStyle()
Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand()
Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand()
+ Me.XrPageInfo1 = New DevExpress.XtraReports.UI.XRPageInfo()
Me.pageInfo1 = New DevExpress.XtraReports.UI.XRPageInfo()
Me.pageInfo2 = New DevExpress.XtraReports.UI.XRPageInfo()
Me.ReportHeader = New DevExpress.XtraReports.UI.ReportHeaderBand()
+ Me.XrLabel2 = New DevExpress.XtraReports.UI.XRLabel()
Me.XrLabel1 = New DevExpress.XtraReports.UI.XRLabel()
Me.Detail = New DevExpress.XtraReports.UI.DetailBand()
Me.XrTable2 = New DevExpress.XtraReports.UI.XRTable()
@@ -58,30 +60,29 @@ Partial Public Class OrderReport
Me.tableCell29 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell30 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell31 = New DevExpress.XtraReports.UI.XRTableCell()
+ Me.XrTableCell13 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell33 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell34 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell35 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell36 = New DevExpress.XtraReports.UI.XRTableCell()
+ Me.XrTableCell7 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell37 = New DevExpress.XtraReports.UI.XRTableCell()
- Me.tableCell38 = New DevExpress.XtraReports.UI.XRTableCell()
Me.Detail1 = New DevExpress.XtraReports.UI.DetailBand()
+ Me.XrLabel3 = New DevExpress.XtraReports.UI.XRLabel()
Me.table4 = New DevExpress.XtraReports.UI.XRTable()
Me.tableRow5 = New DevExpress.XtraReports.UI.XRTableRow()
Me.tableCell39 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell40 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell41 = New DevExpress.XtraReports.UI.XRTableCell()
+ Me.XrTableCell14 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell43 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell44 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell45 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell46 = New DevExpress.XtraReports.UI.XRTableCell()
+ Me.XrTableCell8 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell47 = New DevExpress.XtraReports.UI.XRTableCell()
- Me.tableCell48 = New DevExpress.XtraReports.UI.XRTableCell()
Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand()
Me.label2 = New DevExpress.XtraReports.UI.XRLabel()
- Me.XrTableCell13 = New DevExpress.XtraReports.UI.XRTableCell()
- Me.XrTableCell14 = New DevExpress.XtraReports.UI.XRTableCell()
- Me.XrPageInfo1 = New DevExpress.XtraReports.UI.XRPageInfo()
- Me.XrLabel2 = New DevExpress.XtraReports.UI.XRLabel()
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -212,6 +213,16 @@ Partial Public Class OrderReport
Me.BottomMargin.HeightF = 50.0!
Me.BottomMargin.Name = "BottomMargin"
'
+ 'XrPageInfo1
+ '
+ Me.XrPageInfo1.LocationFloat = New DevExpress.Utils.PointFloat(775.6297!, 11.99999!)
+ Me.XrPageInfo1.Name = "XrPageInfo1"
+ Me.XrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.UserName
+ Me.XrPageInfo1.SizeF = New System.Drawing.SizeF(176.6621!, 26.0!)
+ Me.XrPageInfo1.StyleName = "PageInfo"
+ Me.XrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight
+ Me.XrPageInfo1.TextFormatString = "Benutzer {0} "
+ '
'pageInfo1
'
Me.pageInfo1.LocationFloat = New DevExpress.Utils.PointFloat(12.0!, 12.0!)
@@ -236,6 +247,18 @@ Partial Public Class OrderReport
Me.ReportHeader.HeightF = 76.24998!
Me.ReportHeader.Name = "ReportHeader"
'
+ 'XrLabel2
+ '
+ Me.XrLabel2.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Head].[Subtitle]")})
+ Me.XrLabel2.Font = New System.Drawing.Font("Arial", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+ Me.XrLabel2.LocationFloat = New DevExpress.Utils.PointFloat(9.999998!, 43.24999!)
+ Me.XrLabel2.Multiline = True
+ Me.XrLabel2.Name = "XrLabel2"
+ Me.XrLabel2.Padding = New DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100.0!)
+ Me.XrLabel2.SizeF = New System.Drawing.SizeF(240.625!, 23.0!)
+ Me.XrLabel2.StylePriority.UseFont = False
+ Me.XrLabel2.Text = "XrLabel1"
+ '
'XrLabel1
'
Me.XrLabel1.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Head].[Title]")})
@@ -393,7 +416,7 @@ Partial Public Class OrderReport
'
'tableRow4
'
- Me.tableRow4.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.tableCell29, Me.tableCell30, Me.tableCell31, Me.XrTableCell13, Me.tableCell33, Me.tableCell34, Me.tableCell35, Me.tableCell36, Me.tableCell37, Me.tableCell38})
+ Me.tableRow4.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.tableCell29, Me.tableCell30, Me.tableCell31, Me.XrTableCell13, Me.tableCell33, Me.tableCell34, Me.tableCell35, Me.tableCell36, Me.XrTableCell7, Me.tableCell37})
Me.tableRow4.Name = "tableRow4"
Me.tableRow4.Weight = 1.0R
'
@@ -422,13 +445,21 @@ Partial Public Class OrderReport
Me.tableCell31.Text = "Artikelnummer" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Lieferant"
Me.tableCell31.Weight = 0.13529574805877542R
'
+ 'XrTableCell13
+ '
+ Me.XrTableCell13.Multiline = True
+ Me.XrTableCell13.Name = "XrTableCell13"
+ Me.XrTableCell13.StyleName = "DetailCaption2"
+ Me.XrTableCell13.Text = "Bezeichnung"
+ Me.XrTableCell13.Weight = 0.33636051965423341R
+ '
'tableCell33
'
Me.tableCell33.Multiline = True
Me.tableCell33.Name = "tableCell33"
Me.tableCell33.StyleName = "DetailCaption2"
Me.tableCell33.Text = "Menge " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "bestellt"
- Me.tableCell33.Weight = 0.070741164831997841R
+ Me.tableCell33.Weight = 0.079624397816746934R
'
'tableCell34
'
@@ -436,53 +467,65 @@ Partial Public Class OrderReport
Me.tableCell34.Name = "tableCell34"
Me.tableCell34.StyleName = "DetailCaption2"
Me.tableCell34.Text = "Menge" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "geliefert"
- Me.tableCell34.Weight = 0.070741164831997813R
+ Me.tableCell34.Weight = 0.081859175152859093R
'
'tableCell35
'
Me.tableCell35.Name = "tableCell35"
Me.tableCell35.StyleName = "DetailCaption2"
Me.tableCell35.Text = "Colli"
- Me.tableCell35.Weight = 0.080547574694777982R
+ Me.tableCell35.Weight = 0.0763367774354287R
'
'tableCell36
'
Me.tableCell36.Name = "tableCell36"
Me.tableCell36.StyleName = "DetailCaption2"
- Me.tableCell36.Text = "Preis"
- Me.tableCell36.Weight = 0.0838350777271746R
+ Me.tableCell36.Text = "EDI Preis"
+ Me.tableCell36.Weight = 0.12804829712156557R
+ '
+ 'XrTableCell7
+ '
+ Me.XrTableCell7.Multiline = True
+ Me.XrTableCell7.Name = "XrTableCell7"
+ Me.XrTableCell7.StyleName = "DetailCaption2"
+ Me.XrTableCell7.Text = "DFÜ Preis"
+ Me.XrTableCell7.Weight = 0.12804829712156557R
'
'tableCell37
'
Me.tableCell37.Name = "tableCell37"
Me.tableCell37.StyleName = "DetailCaption2"
Me.tableCell37.Text = "Steuer"
- Me.tableCell37.Weight = 0.068044700696266031R
- '
- 'tableCell38
- '
- Me.tableCell38.Name = "tableCell38"
- Me.tableCell38.StyleName = "DetailCaption2"
- Me.tableCell38.Text = "Gesamt"
- Me.tableCell38.Weight = 0.11284432305230034R
+ Me.tableCell37.Weight = 0.068250408158832127R
'
'Detail1
'
- Me.Detail1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.table4})
- Me.Detail1.HeightF = 25.0!
+ Me.Detail1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel3, Me.table4})
+ Me.Detail1.HeightF = 47.45839!
Me.Detail1.Name = "Detail1"
'
+ 'XrLabel3
+ '
+ Me.XrLabel3.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
+ Me.XrLabel3.Borders = DevExpress.XtraPrinting.BorderSide.None
+ Me.XrLabel3.LocationFloat = New DevExpress.Utils.PointFloat(0!, 27.08333!)
+ Me.XrLabel3.Name = "XrLabel3"
+ Me.XrLabel3.SizeF = New System.Drawing.SizeF(1080.0!, 2.083333!)
+ Me.XrLabel3.StyleName = "GroupFooterBackground3"
+ Me.XrLabel3.StylePriority.UseBackColor = False
+ Me.XrLabel3.StylePriority.UseBorders = False
+ '
'table4
'
Me.table4.LocationFloat = New DevExpress.Utils.PointFloat(0!, 0!)
Me.table4.Name = "table4"
Me.table4.OddStyleName = "DetailData3_Odd"
Me.table4.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.tableRow5})
- Me.table4.SizeF = New System.Drawing.SizeF(1080.0!, 25.0!)
+ Me.table4.SizeF = New System.Drawing.SizeF(1080.0!, 27.08333!)
'
'tableRow5
'
- Me.tableRow5.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.tableCell39, Me.tableCell40, Me.tableCell41, Me.XrTableCell14, Me.tableCell43, Me.tableCell44, Me.tableCell45, Me.tableCell46, Me.tableCell47, Me.tableCell48})
+ Me.tableRow5.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.tableCell39, Me.tableCell40, Me.tableCell41, Me.XrTableCell14, Me.tableCell43, Me.tableCell44, Me.tableCell45, Me.tableCell46, Me.XrTableCell8, Me.tableCell47})
Me.tableRow5.Name = "tableRow5"
Me.tableRow5.Weight = 11.5R
'
@@ -509,47 +552,60 @@ Partial Public Class OrderReport
Me.tableCell41.StyleName = "DetailData2"
Me.tableCell41.Weight = 0.13529577138268081R
'
+ 'XrTableCell14
+ '
+ Me.XrTableCell14.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text3]")})
+ Me.XrTableCell14.Multiline = True
+ Me.XrTableCell14.Name = "XrTableCell14"
+ Me.XrTableCell14.StyleName = "DetailData2"
+ Me.XrTableCell14.Text = "XrTableCell14"
+ Me.XrTableCell14.Weight = 0.33636054406554738R
+ '
'tableCell43
'
Me.tableCell43.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text4]")})
Me.tableCell43.Name = "tableCell43"
Me.tableCell43.StyleName = "DetailData2"
- Me.tableCell43.Weight = 0.071202788477602807R
+ Me.tableCell43.Weight = 0.079624397542049044R
'
'tableCell44
'
Me.tableCell44.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text5]")})
Me.tableCell44.Name = "tableCell44"
Me.tableCell44.StyleName = "DetailData2"
- Me.tableCell44.Weight = 0.064886613001650051R
+ Me.tableCell44.Weight = 0.081859113670350772R
'
'tableCell45
'
Me.tableCell45.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text6]")})
Me.tableCell45.Name = "tableCell45"
Me.tableCell45.StyleName = "DetailData2"
- Me.tableCell45.Weight = 0.0859405029841838R
+ Me.tableCell45.Weight = 0.076336839401331791R
'
'tableCell46
'
Me.tableCell46.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text7]")})
+ Me.tableCell46.Multiline = True
Me.tableCell46.Name = "tableCell46"
Me.tableCell46.StyleName = "DetailData2"
- Me.tableCell46.Weight = 0.083835016066706125R
+ Me.tableCell46.Weight = 0.12804829751327446R
+ '
+ 'XrTableCell8
+ '
+ Me.XrTableCell8.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text8]")})
+ Me.XrTableCell8.Multiline = True
+ Me.XrTableCell8.Name = "XrTableCell8"
+ Me.XrTableCell8.StyleName = "DetailData2"
+ Me.XrTableCell8.Text = "XrTableCell8"
+ Me.XrTableCell8.Weight = 0.12804829751327446R
'
'tableCell47
'
- Me.tableCell47.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text8]")})
+ Me.tableCell47.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text9]")})
Me.tableCell47.Name = "tableCell47"
Me.tableCell47.StyleName = "DetailData2"
- Me.tableCell47.Weight = 0.068044762421027555R
- '
- 'tableCell48
- '
- Me.tableCell48.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text10]")})
- Me.tableCell48.Name = "tableCell48"
- Me.tableCell48.StyleName = "DetailData2"
- Me.tableCell48.Weight = 0.11284430609809028R
+ Me.tableCell47.TextFormatString = "{0:0%}"
+ Me.tableCell47.Weight = 0.068250408205432642R
'
'GroupFooter1
'
@@ -567,45 +623,6 @@ Partial Public Class OrderReport
Me.label2.StyleName = "GroupFooterBackground3"
Me.label2.StylePriority.UseBorders = False
'
- 'XrTableCell13
- '
- Me.XrTableCell13.Multiline = True
- Me.XrTableCell13.Name = "XrTableCell13"
- Me.XrTableCell13.StyleName = "DetailCaption2"
- Me.XrTableCell13.Text = "Bezeichnung"
- Me.XrTableCell13.Weight = 0.28372574859168509R
- '
- 'XrTableCell14
- '
- Me.XrTableCell14.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Text3]")})
- Me.XrTableCell14.Multiline = True
- Me.XrTableCell14.Name = "XrTableCell14"
- Me.XrTableCell14.StyleName = "DetailData2"
- Me.XrTableCell14.Text = "XrTableCell14"
- Me.XrTableCell14.Weight = 0.28372577170476931R
- '
- 'XrPageInfo1
- '
- Me.XrPageInfo1.LocationFloat = New DevExpress.Utils.PointFloat(775.6297!, 11.99999!)
- Me.XrPageInfo1.Name = "XrPageInfo1"
- Me.XrPageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.UserName
- Me.XrPageInfo1.SizeF = New System.Drawing.SizeF(176.6621!, 26.0!)
- Me.XrPageInfo1.StyleName = "PageInfo"
- Me.XrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight
- Me.XrPageInfo1.TextFormatString = "Benutzer {0} "
- '
- 'XrLabel2
- '
- Me.XrLabel2.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Head].[Subtitle]")})
- Me.XrLabel2.Font = New System.Drawing.Font("Arial", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
- Me.XrLabel2.LocationFloat = New DevExpress.Utils.PointFloat(9.999998!, 43.24999!)
- Me.XrLabel2.Multiline = True
- Me.XrLabel2.Name = "XrLabel2"
- Me.XrLabel2.Padding = New DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100.0!)
- Me.XrLabel2.SizeF = New System.Drawing.SizeF(240.625!, 23.0!)
- Me.XrLabel2.StylePriority.UseFont = False
- Me.XrLabel2.Text = "XrLabel1"
- '
'ObjectDataSource1
'
Me.ObjectDataSource1.DataSource = GetType(MultiTool.[Shared].ReportSource)
@@ -661,7 +678,6 @@ Partial Public Class OrderReport
Friend WithEvents tableCell35 As DevExpress.XtraReports.UI.XRTableCell
Friend WithEvents tableCell36 As DevExpress.XtraReports.UI.XRTableCell
Friend WithEvents tableCell37 As DevExpress.XtraReports.UI.XRTableCell
- Friend WithEvents tableCell38 As DevExpress.XtraReports.UI.XRTableCell
Friend WithEvents Detail1 As DevExpress.XtraReports.UI.DetailBand
Friend WithEvents table4 As DevExpress.XtraReports.UI.XRTable
Friend WithEvents tableRow5 As DevExpress.XtraReports.UI.XRTableRow
@@ -673,7 +689,6 @@ Partial Public Class OrderReport
Friend WithEvents tableCell45 As DevExpress.XtraReports.UI.XRTableCell
Friend WithEvents tableCell46 As DevExpress.XtraReports.UI.XRTableCell
Friend WithEvents tableCell47 As DevExpress.XtraReports.UI.XRTableCell
- Friend WithEvents tableCell48 As DevExpress.XtraReports.UI.XRTableCell
Friend WithEvents GroupFooter1 As DevExpress.XtraReports.UI.GroupFooterBand
Friend WithEvents label2 As DevExpress.XtraReports.UI.XRLabel
Friend WithEvents XrLabel1 As DevExpress.XtraReports.UI.XRLabel
@@ -695,4 +710,7 @@ Partial Public Class OrderReport
Friend WithEvents XrTableCell14 As DevExpress.XtraReports.UI.XRTableCell
Friend WithEvents XrPageInfo1 As DevExpress.XtraReports.UI.XRPageInfo
Friend WithEvents XrLabel2 As DevExpress.XtraReports.UI.XRLabel
+ Friend WithEvents XrTableCell7 As DevExpress.XtraReports.UI.XRTableCell
+ Friend WithEvents XrTableCell8 As DevExpress.XtraReports.UI.XRTableCell
+ Friend WithEvents XrLabel3 As DevExpress.XtraReports.UI.XRLabel
End Class
diff --git a/MultiTool.Form/frmImportMain.vb b/MultiTool.Form/frmImportMain.vb
index 025ca05..6666dce 100644
--- a/MultiTool.Form/frmImportMain.vb
+++ b/MultiTool.Form/frmImportMain.vb
@@ -15,6 +15,7 @@ Imports MultiTool.Shared.Documents
Imports MultiTool.Shared.Schemas
Imports MultiTool.Shared.Winline
Imports MultiTool.Shared.Constants
+Imports MultiTool.Shared.Exceptions
Imports DevExpress.XtraReports.UI
Imports MultiTool.Shared.Documents.DocumentRow
Imports DevExpress.XtraGrid.Columns
@@ -24,7 +25,7 @@ Public Class frmImportMain
Private Logger As Logger
Private ConfigManager As ConfigManager(Of Config)
Private Database As MSSQLServer
- Private Winline As Data
+ Private Winline As WinlineData
Private FileEx As DigitalData.Modules.Filesystem.File
Private WebService As WebService
Private DocumentLoader As DocumentLoader
@@ -94,7 +95,7 @@ Public Class frmImportMain
' Initialize Database
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
Database = New MSSQLServer(LogConfig, oConnectionString)
- Winline = New Data(LogConfig, Database, ConfigManager.Config)
+ Winline = New WinlineData(LogConfig, Database, ConfigManager.Config)
WebService = New WebService(LogConfig, ConfigManager.Config, Application.UserAppDataPath)
AddHandler WebService.WebServiceProgress, AddressOf WebService_Progress
Catch ex As Exception
@@ -256,11 +257,11 @@ Public Class frmImportMain
txtFilesLoaded.Caption = String.Format(My.Resources.frmImportMainExtra._0__Dateien_geladen, DocumentLoader.Files.Count)
End If
- Catch ex As Exceptions.NoMandatorException
+ Catch ex As NoMandatorException
MsgBox(My.Resources.frmImportMainExtra.Es_konnte_kein_passender_Mandant_ermittelt_werden, MsgBoxStyle.Information, Text)
Catch ex As Exception
- FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Detailzeilen)
+ FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Dokumente)
Finally
SplitContainerGrids.Enabled = True
@@ -292,8 +293,11 @@ Public Class frmImportMain
LoadDocument(oNewDocument)
End If
- Catch ex As Exceptions.NoMandatorException
- MsgBox(My.Resources.frmImportMainExtra.Es_konnte_kein_passender_Mandant_ermittelt_werden, MsgBoxStyle.Information, Text)
+ Catch ex As NoMandatorException
+ FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Neuladen_des_Dokuments, My.Resources.frmImportMainExtra.Es_konnte_kein_passender_Mandant_ermittelt_werden)
+
+ Catch ex As MissingAttributeException
+ FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Neuladen_des_Dokuments, "Ein benötigtes Attribut wurde nicht gefunden.")
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Neuladen_des_Dokuments)
@@ -525,8 +529,9 @@ Public Class frmImportMain
{"Menge_bestellt", "Text4"},
{"Menge_geliefert", "Text5"},
{"Colli", "Text6"},
- {"Einzelpreis", "Text7"},
- {"Umsatzsteuerprozent_Zeile", "Text8"}
+ {"Einzelpreis[Original]", "Text7"},
+ {"Einzelpreis[Final]", "Text8"},
+ {"Umsatzsteuerprozent_Zeile", "Text9"}
})
Dim oHeadRow = oDocument.Rows.
diff --git a/MultiTool.Form/frmRowEditor.vb b/MultiTool.Form/frmRowEditor.vb
index 1e001a8..592789f 100644
--- a/MultiTool.Form/frmRowEditor.vb
+++ b/MultiTool.Form/frmRowEditor.vb
@@ -46,7 +46,7 @@ Public Class frmRowEditor
End Get
End Property
- Public Sub New(pLogConfig As LogConfig, pColumns As List(Of String), pDocumentRow As DocumentRow, pMandator As Mandator, pWinline As Data)
+ Public Sub New(pLogConfig As LogConfig, pColumns As List(Of String), pDocumentRow As DocumentRow, pMandator As Mandator, pWinline As WinlineData)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
diff --git a/MultiTool.Shared/Documents/DocumentLoader.vb b/MultiTool.Shared/Documents/DocumentLoader.vb
index 0e09f76..ab248e5 100644
--- a/MultiTool.Shared/Documents/DocumentLoader.vb
+++ b/MultiTool.Shared/Documents/DocumentLoader.vb
@@ -1,6 +1,7 @@
Imports System.Globalization
Imports System.IO
Imports DigitalData.Modules.Logging
+Imports MultiTool.Shared.Exceptions
Imports MultiTool.Shared.Schemas
Imports MultiTool.Shared.Winline
@@ -8,7 +9,7 @@ Namespace Documents
Public Class DocumentLoader
Inherits BaseClass
- Private ReadOnly Winline As Winline.Data
+ Private ReadOnly Winline As WinlineData
Public Property Files As New List(Of Document)
Public Event FileLoadComplete As EventHandler(Of FileLoadInfo)
@@ -18,7 +19,7 @@ Namespace Documents
Public FilesTotal As Integer
End Structure
- Public Sub New(pLogConfig As LogConfig, pWinline As Winline.Data)
+ Public Sub New(pLogConfig As LogConfig, pWinline As WinlineData)
MyBase.New(pLogConfig, pLogConfig.GetLogger())
Winline = pWinline
End Sub
@@ -39,14 +40,23 @@ Namespace Documents
Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory)
For Each oFile In oFiles
- Dim oDocument = LoadFile(oFile, pSchema, pMandator)
- Files.Add(oDocument)
+ Try
+ Dim oDocument = LoadFile(oFile, pSchema, pMandator)
+ Files.Add(oDocument)
- Dim oInfo As FileLoadInfo
- oInfo.FilesLoaded = Files.Count
- oInfo.FilesTotal = oFiles.Count
+ Dim oInfo As FileLoadInfo
+ oInfo.FilesLoaded = Files.Count
+ oInfo.FilesTotal = oFiles.Count
- RaiseEvent FileLoadComplete(Me, oInfo)
+ RaiseEvent FileLoadComplete(Me, oInfo)
+ Catch ex As MissingAttributeException
+ Logger.Error(ex)
+ Throw New DocumentLoaderException($"Missing Attribute '{ex.Message}' in File '{oFile.Name}'")
+
+ Catch ex As Exception
+ Logger.Error(ex)
+ Throw ex
+ End Try
Next
Return True
diff --git a/MultiTool.Shared/Exceptions.vb b/MultiTool.Shared/Exceptions.vb
index ac41eee..7d811a4 100644
--- a/MultiTool.Shared/Exceptions.vb
+++ b/MultiTool.Shared/Exceptions.vb
@@ -1,5 +1,8 @@
Public Class Exceptions
- Public MustInherit Class DocumentShowException
+ '''
+ ''' Abstract class
+ '''
+ Public MustInherit Class MultiToolException
Inherits ApplicationException
Public Sub New(message As String)
@@ -7,43 +10,59 @@
End Sub
End Class
+ ''' -----------------------------------------------
+
+ Public Class DocumentLoaderException
+ Inherits MultiToolException
+
+ Public Sub New(message As String)
+ MyBase.New(message)
+ End Sub
+ End Class
+
Public Class WebServiceException
- Inherits ApplicationException
+ Inherits MultiToolException
+
+ Public Sub New(message As String)
+ MyBase.New(message)
+ End Sub
+ End Class
+
+ Public Class MissingAttributeException
+ Inherits MultiToolException
+
+ Public Sub New(attributeName As String)
+ MyBase.New(attributeName)
+ End Sub
+ End Class
+ Public Class MultipleAccountsException
+ Inherits MultiToolException
+
+ Public Sub New(message As String)
+ MyBase.New(message)
+ End Sub
+ End Class
+ Public Class NoAccountException
+ Inherits MultiToolException
+
+ Public Sub New(message As String)
+ MyBase.New(message)
+ End Sub
+ End Class
+ Public Class NoMandatorException
+ Inherits MultiToolException
+
+ Public Sub New(message As String)
+ MyBase.New(message)
+ End Sub
+ End Class
+ Public Class MalformedXmlException
+ Inherits MultiToolException
+
+ Public Sub New(message As String)
+ MyBase.New(message)
+ End Sub
+ End Class
+
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
End Class
-
- Public Class NoMandatorException
- Inherits DocumentShowException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class MultipleAccountsException
- Inherits DocumentShowException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class NoAccountException
- Inherits DocumentShowException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-
- Public Class MalformedXmlException
- Inherits ApplicationException
-
- Public Sub New(message As String)
- MyBase.New(message)
- End Sub
- End Class
-End Class
diff --git a/MultiTool.Shared/MultiTool.Shared.vbproj b/MultiTool.Shared/MultiTool.Shared.vbproj
index aa76c04..6d88842 100644
--- a/MultiTool.Shared/MultiTool.Shared.vbproj
+++ b/MultiTool.Shared/MultiTool.Shared.vbproj
@@ -136,7 +136,7 @@
-
+
diff --git a/MultiTool.Shared/Schemas/Report/ReportPosition.vb b/MultiTool.Shared/Schemas/Report/ReportPosition.vb
index da922f6..cfff74a 100644
--- a/MultiTool.Shared/Schemas/Report/ReportPosition.vb
+++ b/MultiTool.Shared/Schemas/Report/ReportPosition.vb
@@ -11,4 +11,14 @@
Public Property Text8 As String
Public Property Text9 As String
Public Property Text10 As String
+ Public Property Text11 As String
+ Public Property Text12 As String
+ Public Property Text13 As String
+ Public Property Text14 As String
+ Public Property Text15 As String
+ Public Property Text16 As String
+ Public Property Text17 As String
+ Public Property Text18 As String
+ Public Property Text19 As String
+ Public Property Text20 As String
End Class
diff --git a/MultiTool.Shared/Winline/Data.vb b/MultiTool.Shared/Winline/WinlineData.vb
similarity index 98%
rename from MultiTool.Shared/Winline/Data.vb
rename to MultiTool.Shared/Winline/WinlineData.vb
index aae2b02..5ae4fc0 100644
--- a/MultiTool.Shared/Winline/Data.vb
+++ b/MultiTool.Shared/Winline/WinlineData.vb
@@ -6,7 +6,7 @@ Imports System.Text.RegularExpressions
Namespace Winline
- Public Class Data
+ Public Class WinlineData
Inherits BaseClass
Private ReadOnly Database As MSSQLServer
@@ -411,7 +411,13 @@ Namespace Winline
Where(Function(r) r.Name.ToUpper.EndsWith("T026")).
ToList()
Dim oEANNumbers = oPositions.
- Select(Function(p) p.Fields.Item("Artikelnummer").Original).
+ Select(Function(p)
+ If p.Fields.ContainsKey("Artikelnummer") Then
+ Return p.Fields.Item("Artikelnummer").Original
+ Else
+ Throw New Exceptions.MissingAttributeException("Artikelnummer")
+ End If
+ End Function).
Distinct().
ToList()