Compare commits
9 Commits
07332a4990
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 538e2fcde1 | |||
| d1dbe8096d | |||
| 24dbed32cc | |||
|
|
e1d5c2961d | ||
|
|
0ef5a3b339 | ||
|
|
8cdd6e8026 | ||
|
|
4310cd79b7 | ||
|
|
1d17afb400 | ||
|
|
4085d05368 |
21
Controls.DocumentViewer/DocumentViewer.Designer.vb
generated
21
Controls.DocumentViewer/DocumentViewer.Designer.vb
generated
@@ -346,7 +346,7 @@ Partial Class DocumentViewer
|
|||||||
'
|
'
|
||||||
'SpreadsheetControl1
|
'SpreadsheetControl1
|
||||||
'
|
'
|
||||||
Me.SpreadsheetControl1.Location = New System.Drawing.Point(31, 152)
|
Me.SpreadsheetControl1.Location = New System.Drawing.Point(83, 177)
|
||||||
Me.SpreadsheetControl1.MenuManager = Me.BarManager1
|
Me.SpreadsheetControl1.MenuManager = Me.BarManager1
|
||||||
Me.SpreadsheetControl1.Name = "SpreadsheetControl1"
|
Me.SpreadsheetControl1.Name = "SpreadsheetControl1"
|
||||||
Me.SpreadsheetControl1.ReadOnly = True
|
Me.SpreadsheetControl1.ReadOnly = True
|
||||||
@@ -377,30 +377,21 @@ Partial Class DocumentViewer
|
|||||||
'
|
'
|
||||||
'RichEditControl1
|
'RichEditControl1
|
||||||
'
|
'
|
||||||
Me.RichEditControl1.Location = New System.Drawing.Point(395, 238)
|
Me.RichEditControl1.Location = New System.Drawing.Point(571, 238)
|
||||||
Me.RichEditControl1.MenuManager = Me.BarManager1
|
Me.RichEditControl1.MenuManager = Me.BarManager1
|
||||||
Me.RichEditControl1.Name = "RichEditControl1"
|
Me.RichEditControl1.Name = "RichEditControl1"
|
||||||
Me.RichEditControl1.Size = New System.Drawing.Size(400, 200)
|
Me.RichEditControl1.Size = New System.Drawing.Size(400, 200)
|
||||||
Me.RichEditControl1.TabIndex = 5
|
Me.RichEditControl1.TabIndex = 5
|
||||||
Me.RichEditControl1.Visible = False
|
Me.RichEditControl1.Visible = False
|
||||||
'
|
'
|
||||||
'lblInfo
|
|
||||||
'
|
|
||||||
Me.lblInfo.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
|
||||||
Me.lblInfo.AutoSize = True
|
|
||||||
Me.lblInfo.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
||||||
Me.lblInfo.ForeColor = System.Drawing.Color.Red
|
|
||||||
Me.lblInfo.Location = New System.Drawing.Point(3, 533)
|
|
||||||
Me.lblInfo.Name = "lblInfo"
|
|
||||||
Me.lblInfo.Size = New System.Drawing.Size(47, 15)
|
|
||||||
Me.lblInfo.TabIndex = 10
|
|
||||||
Me.lblInfo.Text = "Infotext"
|
|
||||||
'
|
|
||||||
'DocumentViewer
|
'DocumentViewer
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.BackColor = System.Drawing.SystemColors.ControlLightLight
|
Me.Controls.Add(Me.RichEditControl1)
|
||||||
|
Me.Controls.Add(Me.lbFileNotLoaded)
|
||||||
|
Me.Controls.Add(Me.SpreadsheetControl1)
|
||||||
|
Me.Controls.Add(Me.GdViewer)
|
||||||
Me.Controls.Add(Me.barDockControlLeft)
|
Me.Controls.Add(Me.barDockControlLeft)
|
||||||
Me.Controls.Add(Me.barDockControlRight)
|
Me.Controls.Add(Me.barDockControlRight)
|
||||||
Me.Controls.Add(Me.barDockControlBottom)
|
Me.Controls.Add(Me.barDockControlBottom)
|
||||||
|
|||||||
@@ -164,6 +164,26 @@
|
|||||||
NC42LTAuOCw2LjUtMi4xbDcuOSw3LjljMC4zLDAuMywwLjksMC4zLDEuMiwwbDEuMi0xLjJDMzAuMSwy
|
NC42LTAuOCw2LjUtMi4xbDcuOSw3LjljMC4zLDAuMywwLjksMC4zLDEuMiwwbDEuMi0xLjJDMzAuMSwy
|
||||||
OC4yLDMwLjEsMjcuNiwyOS43LDI3LjN6IE00LDEzYzAtNSw0LTksOS05YzUsMCw5LDQsOSw5ICAgcy00
|
OC4yLDMwLjEsMjcuNiwyOS43LDI3LjN6IE00LDEzYzAtNSw0LTksOS05YzUsMCw5LDQsOSw5ICAgcy00
|
||||||
LDktOSw5QzgsMjIsNCwxOCw0LDEzeiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2Zz4L
|
LDktOSw5QzgsMjIsNCwxOCw0LDEzeiIgY2xhc3M9IkJsYWNrIiAvPg0KICA8L2c+DQo8L3N2Zz4L
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnSearch2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||||
|
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||||
|
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/
|
||||||
|
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||||
|
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||||
|
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||||
|
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||||
|
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
|
||||||
|
ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz
|
||||||
|
OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp
|
||||||
|
dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM
|
||||||
|
MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5
|
||||||
|
YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu
|
||||||
|
MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x
|
||||||
|
LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N
|
||||||
|
Cjwvc3ZnPgs=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnPrevHighlight.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="btnPrevHighlight.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
@@ -226,26 +246,6 @@
|
|||||||
ICAgYzAuOS0zLDMuNy01LDctNXM2LjEsMiw3LDVDMjkuMSwyNiwyNi4zLDI4LDIzLDI4eiBNMjMsMjZj
|
ICAgYzAuOS0zLDMuNy01LDctNXM2LjEsMiw3LDVDMjkuMSwyNiwyNi4zLDI4LDIzLDI4eiBNMjMsMjZj
|
||||||
LTEuNywwLTMtMS4zLTMtM3MxLjMtMywzLTNzMywxLjMsMywzUzI0LjcsMjYsMjMsMjZ6IiBjbGFzcz0i
|
LTEuNywwLTMtMS4zLTMtM3MxLjMtMywzLTNzMywxLjMsMywzUzI0LjcsMjYsMjMsMjZ6IiBjbGFzcz0i
|
||||||
QmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs=
|
QmxhY2siIC8+DQogIDwvZz4NCjwvc3ZnPgs=
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnSearch2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
|
||||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
|
||||||
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANoCAAAC77u/
|
|
||||||
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
|
||||||
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
|
||||||
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
|
||||||
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
|
||||||
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z
|
|
||||||
ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz
|
|
||||||
OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp
|
|
||||||
dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9Ilpvb20iPg0KICAgIDxwYXRoIGQ9Ik0yNy43LDI1LjNM
|
|
||||||
MjAuNSwxOGMxLTEuNCwxLjUtMy4yLDEuNS01YzAtNS00LTktOS05cy05LDQtOSw5YzAsNSw0LDksOSw5
|
|
||||||
YzEuOSwwLDMuNi0wLjYsNS0xLjVsNy4zLDcuMyAgIGMwLjMsMC4zLDAuOSwwLjMsMS4yLDBsMS4yLTEu
|
|
||||||
MkMyOC4xLDI2LjIsMjguMSwyNS42LDI3LjcsMjUuM3ogTTYsMTNjMC0zLjksMy4xLTcsNy03czcsMy4x
|
|
||||||
LDcsN2MwLDMuOS0zLjEsNy03LDdTNiwxNi45LDYsMTN6IiBjbGFzcz0iQmxhY2siIC8+DQogIDwvZz4N
|
|
||||||
Cjwvc3ZnPgs=
|
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="PrintDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="PrintDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
|||||||
@@ -492,12 +492,6 @@ Public Class DocumentViewer
|
|||||||
End Sub
|
End Sub
|
||||||
Private Function DoLoadFile(FilePath As String, Optional ViewOverride As String = "") As Boolean
|
Private Function DoLoadFile(FilePath As String, Optional ViewOverride As String = "") As Boolean
|
||||||
Try
|
Try
|
||||||
' Ensure the embedded GdViewer control exists before using it
|
|
||||||
If Not EnsureViewerReady() Then
|
|
||||||
_logger?.Warn("GdViewer control is not initialized yet. Delaying load.")
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
|
|
||||||
lblInfo.Visible = False
|
lblInfo.Visible = False
|
||||||
Dim oFileInfo = New FileInfo(FilePath)
|
Dim oFileInfo = New FileInfo(FilePath)
|
||||||
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
||||||
@@ -510,6 +504,14 @@ Public Class DocumentViewer
|
|||||||
SpreadsheetControl1.Dock = DockStyle.None
|
SpreadsheetControl1.Dock = DockStyle.None
|
||||||
RichEditControl1.Dock = DockStyle.None
|
RichEditControl1.Dock = DockStyle.None
|
||||||
|
|
||||||
|
Dim override_Spreadsheet As Boolean = False
|
||||||
|
If oExtension.ToLower = ".xlsx" Then
|
||||||
|
If oFileInfo.Length > 15000 Then
|
||||||
|
_logger.Info("Override")
|
||||||
|
override_Spreadsheet = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If ViewOverride = "Richtext" Then
|
If ViewOverride = "Richtext" Then
|
||||||
RichEditControl1.LoadDocument(FilePath, GetDocumentFormat(oExtension))
|
RichEditControl1.LoadDocument(FilePath, GetDocumentFormat(oExtension))
|
||||||
RichEditControl1.Visible = True
|
RichEditControl1.Visible = True
|
||||||
@@ -519,6 +521,16 @@ Public Class DocumentViewer
|
|||||||
_ViewerMode = ViewerMode.Richtext
|
_ViewerMode = ViewerMode.Richtext
|
||||||
lblInfo.Visible = True
|
lblInfo.Visible = True
|
||||||
lblInfo.Text = "This docx-file contains a generic error and will be displayed in a reduced viewer. Please try to open the file in WORD"
|
lblInfo.Text = "This docx-file contains a generic error and will be displayed in a reduced viewer. Please try to open the file in WORD"
|
||||||
|
ElseIf override_Spreadsheet = True Then
|
||||||
|
Dim oFormat = GetSpreadsheetFormat(oExtension)
|
||||||
|
SpreadsheetControl1.LoadDocument(FilePath, oFormat)
|
||||||
|
|
||||||
|
Dim oRange = SpreadsheetControl1.ActiveWorksheet.GetUsedRange()
|
||||||
|
oRange.AutoFitColumns()
|
||||||
|
|
||||||
|
SpreadsheetControl1.Visible = True
|
||||||
|
GdViewer.Visible = False
|
||||||
|
SpreadsheetControl1.Dock = DockStyle.Fill
|
||||||
Else
|
Else
|
||||||
_ViewOverride = ""
|
_ViewOverride = ""
|
||||||
Select Case oExtension.ToUpper
|
Select Case oExtension.ToUpper
|
||||||
@@ -533,6 +545,12 @@ Public Class DocumentViewer
|
|||||||
GdViewer.Visible = False
|
GdViewer.Visible = False
|
||||||
SpreadsheetControl1.Dock = DockStyle.Fill
|
SpreadsheetControl1.Dock = DockStyle.Fill
|
||||||
|
|
||||||
|
'Case ".EML", ".DOC", ".DOCX", ".ODT", ".RTF", ".TXT"
|
||||||
|
' RichEditControl1.LoadDocument(FilePath, GetDocumentFormat(oExtension))
|
||||||
|
|
||||||
|
' RichEditControl1.Visible = True
|
||||||
|
' GdViewer.Visible = False
|
||||||
|
' RichEditControl1.Dock = DockStyle.Fill
|
||||||
Case Else
|
Case Else
|
||||||
Select Case oExtension.ToUpper
|
Select Case oExtension.ToUpper
|
||||||
Case ".EML", ".DOC", ".DOCX", ".XLS", ".XLSX", ".ODT", ".RTF", ".TXT"
|
Case ".EML", ".DOC", ".DOCX", ".XLS", ".XLSX", ".ODT", ".RTF", ".TXT"
|
||||||
@@ -578,8 +596,111 @@ Public Class DocumentViewer
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
Private Function DoLoadFile(FilePath As String) As Boolean
|
||||||
|
Try
|
||||||
|
' Ensure the embedded GdViewer control exists before using it
|
||||||
|
If Not EnsureViewerReady() Then
|
||||||
|
_logger?.Warn("GdViewer control is not initialized yet. Delaying load.")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
lblInfo.Visible = False
|
||||||
|
Dim oFileInfo = New FileInfo(FilePath)
|
||||||
|
Dim oExtension As String = oFileInfo.Extension.ToUpper
|
||||||
|
|
||||||
|
lbFileNotLoaded.Visible = False
|
||||||
|
|
||||||
|
SpreadsheetControl1.Visible = False
|
||||||
|
RichEditControl1.Visible = False
|
||||||
|
|
||||||
|
SpreadsheetControl1.Dock = DockStyle.None
|
||||||
|
RichEditControl1.Dock = DockStyle.None
|
||||||
|
Dim Override_SSheet_Filesize As Boolean = False
|
||||||
|
If oExtension.ToLower = ".xlsx" Then
|
||||||
|
If oFileInfo.Length > 100000 Then
|
||||||
|
_logger.Info("Override Spreadsheet as xlsx is too big")
|
||||||
|
Override_SSheet_Filesize = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Override_SSheet_Filesize Then
|
||||||
|
Dim oFormat = GetSpreadsheetFormat(oExtension)
|
||||||
|
SpreadsheetControl1.LoadDocument(FilePath, oFormat)
|
||||||
|
|
||||||
|
Dim oRange = SpreadsheetControl1.ActiveWorksheet.GetUsedRange()
|
||||||
|
oRange.AutoFitColumns()
|
||||||
|
|
||||||
|
If ViewOverride = "Richtext" Then
|
||||||
|
RichEditControl1.LoadDocument(FilePath, GetDocumentFormat(oExtension))
|
||||||
|
RichEditControl1.Visible = True
|
||||||
|
GdViewer.Visible = False
|
||||||
|
RichEditControl1.Dock = DockStyle.Fill
|
||||||
|
_ViewOverride = "Richtext"
|
||||||
|
_ViewerMode = ViewerMode.Richtext
|
||||||
|
lblInfo.Visible = True
|
||||||
|
lblInfo.Text = "This docx-file contains a generic error and will be displayed in a reduced viewer. Please try to open the file in WORD"
|
||||||
|
Else
|
||||||
|
_ViewOverride = ""
|
||||||
|
Select Case oExtension.ToUpper
|
||||||
|
Case ".CSV"
|
||||||
|
Dim oFormat = GetSpreadsheetFormat(oExtension)
|
||||||
|
SpreadsheetControl1.LoadDocument(FilePath, oFormat)
|
||||||
|
|
||||||
|
Dim oRange = SpreadsheetControl1.ActiveWorksheet.GetUsedRange()
|
||||||
|
oRange.AutoFitColumns()
|
||||||
|
|
||||||
|
SpreadsheetControl1.Visible = True
|
||||||
|
GdViewer.Visible = False
|
||||||
|
SpreadsheetControl1.Dock = DockStyle.Fill
|
||||||
|
Case ".EML", ".DOC", ".DOCX", ".ODT", ".RTF", ".TXT"
|
||||||
|
RichEditControl1.LoadDocument(FilePath, GetDocumentFormat(oExtension))
|
||||||
|
|
||||||
|
RichEditControl1.Visible = True
|
||||||
|
GdViewer.Visible = False
|
||||||
|
RichEditControl1.Dock = DockStyle.Fill
|
||||||
|
Case Else
|
||||||
|
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
||||||
|
GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter
|
||||||
|
GdViewer.ForceTemporaryMode = True
|
||||||
|
GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter
|
||||||
|
If Viewer_ForceTemporaryMode = True Then
|
||||||
|
GdViewer.ForceTemporaryMode = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
GdViewer.AnnotationDropShadow = True
|
||||||
|
GdViewer.BackColor = Color.White
|
||||||
|
|
||||||
|
Dim oGDPState As GdPicture14.GdPictureStatus = GdViewer.DisplayFromFile(FilePath)
|
||||||
|
If oGDPState <> GdPictureStatus.OK Then
|
||||||
|
_logger.Warn($"GdPictureStatus is [{oGDPState}]")
|
||||||
|
If oExtension.ToUpper = ".DOCX" And oGDPState = GdPictureStatus.GenericError Then
|
||||||
|
DoLoadFile(FilePath, "Richtext")
|
||||||
|
Else
|
||||||
|
Dim oFileName = IO.Path.GetFileName(FilePath)
|
||||||
|
lbFileNotLoaded.Text = String.Format("Datei konnte nicht geladen werden:{0}{1}", vbCrLf, oFileName)
|
||||||
|
lbFileNotLoaded.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
If GdViewer.Visible = False Then
|
||||||
|
GdViewer.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Error(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
' Ensures the embedded GdViewer control exists and is added to the visual tree
|
' Ensures the embedded GdViewer control exists and is added to the visual tree
|
||||||
|
Private Function EnsureViewerReady() As Boolean
|
||||||
|
Try
|
||||||
|
' If the control field is Nothing (e.g., designer not yet created), try to lazy-create and add it
|
||||||
|
If GdViewer Is Nothing Then
|
||||||
Private Function EnsureViewerReady() As Boolean
|
Private Function EnsureViewerReady() As Boolean
|
||||||
Try
|
Try
|
||||||
' If the control field is Nothing (e.g., designer not yet created), try to lazy-create and add it
|
' If the control field is Nothing (e.g., designer not yet created), try to lazy-create and add it
|
||||||
@@ -606,14 +727,60 @@ Public Class DocumentViewer
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub FitToPage()
|
Private Sub FitToPage()
|
||||||
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer
|
If Not GdViewer Is Nothing Then
|
||||||
|
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FitToWidth()
|
Private Sub FitToWidth()
|
||||||
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
If Not GdViewer Is Nothing Then
|
||||||
|
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function DoLoadFile(Stream As Stream, Extension As String) As Boolean
|
Private Function DoLoadFile(Stream As Stream, Extension As String) As Boolean
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
SpreadsheetControl1.Visible = False
|
||||||
|
SpreadsheetControl1.Dock = DockStyle.None
|
||||||
|
|
||||||
|
Select Case Extension.ToUpper
|
||||||
|
|
||||||
|
Case ".CSV"
|
||||||
|
SpreadsheetControl1.LoadDocument(Stream, GetSpreadsheetFormat(Extension))
|
||||||
|
|
||||||
|
Dim oRange = SpreadsheetControl1.ActiveWorksheet.GetUsedRange()
|
||||||
|
oRange.AutoFitColumns()
|
||||||
|
|
||||||
|
SpreadsheetControl1.Visible = True
|
||||||
|
SpreadsheetControl1.Dock = DockStyle.Fill
|
||||||
|
|
||||||
|
Case Else
|
||||||
|
If Not GdViewer Is Nothing Then
|
||||||
|
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
||||||
|
GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter
|
||||||
|
If Viewer_ForceTemporaryMode = True Then
|
||||||
|
GdViewer.ForceTemporaryMode = True
|
||||||
|
End If
|
||||||
|
GdViewer.AnnotationDropShadow = True
|
||||||
|
|
||||||
|
GdViewer.DisplayFromStream(Stream)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
UpdateMainUi()
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Error(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
Private Function StreamFile(Stream As Stream, Extension As String) As Boolean
|
||||||
Try
|
Try
|
||||||
|
|
||||||
SpreadsheetControl1.Visible = False
|
SpreadsheetControl1.Visible = False
|
||||||
@@ -633,9 +800,7 @@ Public Class DocumentViewer
|
|||||||
Case Else
|
Case Else
|
||||||
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
GdViewer.ZoomMode = ViewerZoomMode.ZoomModeWidthViewer
|
||||||
GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter
|
GdViewer.DocumentAlignment = ViewerDocumentAlignment.DocumentAlignmentTopCenter
|
||||||
If Viewer_ForceTemporaryMode = True Then
|
GdViewer.ForceTemporaryMode = True
|
||||||
GdViewer.ForceTemporaryMode = True
|
|
||||||
End If
|
|
||||||
GdViewer.AnnotationDropShadow = True
|
GdViewer.AnnotationDropShadow = True
|
||||||
|
|
||||||
GdViewer.DisplayFromStream(Stream)
|
GdViewer.DisplayFromStream(Stream)
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' indem Sie "*" wie unten gezeigt eingeben:
|
' indem Sie "*" wie unten gezeigt eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.0.1.0")>
|
<Assembly: AssemblyVersion("2.1.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.0.1.0")>
|
<Assembly: AssemblyFileVersion("2.1.0.0")>
|
||||||
|
|||||||
@@ -1,20 +1,28 @@
|
|||||||
Imports System.Drawing
|
Imports System.Drawing
|
||||||
Imports System.Windows.Forms
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
|
|
||||||
Public Class ClassSnapPanel
|
Public Class ClassSnapPanel
|
||||||
Inherits Panel
|
Inherits Panel
|
||||||
|
|
||||||
Private _ShowGrid As Boolean = True
|
Private _ShowGrid As Boolean = True
|
||||||
Private _GridSize As Integer = 16
|
Private _GridSize As Integer = 16
|
||||||
|
Private _NeedsScrollUpdate As Boolean = False
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
Me.AutoScroll = True ' Scrollbars aktivieren
|
Me.AutoScroll = True
|
||||||
|
Me.DoubleBuffered = True ' Flackern reduzieren
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Property GridSize As Integer
|
Public Property GridSize As Integer
|
||||||
Get
|
Get
|
||||||
Return _GridSize
|
Return _GridSize
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
_GridSize = value
|
If value > 0 AndAlso value <> _GridSize Then
|
||||||
Refresh()
|
_GridSize = value
|
||||||
|
Invalidate()
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -23,55 +31,146 @@ Public Class ClassSnapPanel
|
|||||||
Return _ShowGrid
|
Return _ShowGrid
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
_ShowGrid = value
|
If value <> _ShowGrid Then
|
||||||
Refresh()
|
_ShowGrid = value
|
||||||
|
Invalidate()
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Protected Overrides Sub OnControlAdded(e As ControlEventArgs)
|
Protected Overrides Sub OnControlAdded(e As ControlEventArgs)
|
||||||
AddHandler e.Control.LocationChanged, AddressOf AlignToGrid
|
|
||||||
AddHandler e.Control.DragDrop, AddressOf AlignToGrid
|
|
||||||
MyBase.OnControlAdded(e)
|
MyBase.OnControlAdded(e)
|
||||||
UpdateScrollArea()
|
AddHandler e.Control.LocationChanged, AddressOf AlignToGrid
|
||||||
|
AddHandler e.Control.MouseUp, AddressOf AlignToGrid
|
||||||
|
ScheduleScrollUpdate()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Overrides Sub OnControlRemoved(e As ControlEventArgs)
|
Protected Overrides Sub OnControlRemoved(e As ControlEventArgs)
|
||||||
RemoveHandler e.Control.LocationChanged, AddressOf AlignToGrid
|
|
||||||
RemoveHandler e.Control.DragDrop, AddressOf AlignToGrid
|
|
||||||
MyBase.OnControlRemoved(e)
|
MyBase.OnControlRemoved(e)
|
||||||
UpdateScrollArea()
|
RemoveHandler e.Control.LocationChanged, AddressOf AlignToGrid
|
||||||
|
RemoveHandler e.Control.MouseUp, AddressOf AlignToGrid
|
||||||
|
ScheduleScrollUpdate()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Overrides Sub OnPaint(e As System.Windows.Forms.PaintEventArgs)
|
Protected Overrides Sub OnLayout(levent As LayoutEventArgs)
|
||||||
If _ShowGrid Then
|
MyBase.OnLayout(levent)
|
||||||
ControlPaint.DrawGrid(e.Graphics, ClientRectangle, New Size(_GridSize, _GridSize), BackColor)
|
ScheduleScrollUpdate()
|
||||||
End If
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Sub OnPaint(e As PaintEventArgs)
|
||||||
MyBase.OnPaint(e)
|
MyBase.OnPaint(e)
|
||||||
|
|
||||||
|
If Not Me.DesignMode AndAlso _ShowGrid Then
|
||||||
|
Dim scrollOffset As Point = Me.AutoScrollPosition
|
||||||
|
Dim gridRect As New Rectangle(-scrollOffset.X, -scrollOffset.Y, Me.ClientSize.Width, Me.ClientSize.Height)
|
||||||
|
ControlPaint.DrawGrid(e.Graphics, gridRect, New Size(_GridSize, _GridSize), Me.BackColor)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AlignToGrid(sender As Object, e As EventArgs)
|
Private Sub AlignToGrid(sender As Object, e As EventArgs)
|
||||||
If _ShowGrid Then
|
If Not _ShowGrid OrElse Me.DesignMode Then Return
|
||||||
Dim item As Control = CType(sender, Control)
|
|
||||||
Dim x As Integer = Math.Round(item.Left / _GridSize) * _GridSize
|
Dim ctrl As Control = CType(sender, Control)
|
||||||
Dim y As Integer = Math.Round(item.Top / _GridSize) * _GridSize
|
Dim x As Integer = Math.Floor(ctrl.Left / _GridSize) * _GridSize
|
||||||
item.Location = New Point(x, y)
|
Dim y As Integer = Math.Floor(ctrl.Top / _GridSize) * _GridSize
|
||||||
UpdateScrollArea()
|
ctrl.Location = New Point(x, y)
|
||||||
|
ScheduleScrollUpdate()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ScheduleScrollUpdate()
|
||||||
|
If Not _NeedsScrollUpdate Then
|
||||||
|
_NeedsScrollUpdate = True
|
||||||
|
BeginInvoke(New MethodInvoker(Sub()
|
||||||
|
UpdateScrollArea()
|
||||||
|
_NeedsScrollUpdate = False
|
||||||
|
End Sub))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateScrollArea()
|
Private Sub UpdateScrollArea()
|
||||||
Dim maxWidth As Integer = 0
|
Dim maxWidth As Integer = 0
|
||||||
Dim maxHeight As Integer = 0
|
Dim maxHeight As Integer = 0
|
||||||
|
|
||||||
' Größte X- und Y-Koordinate der enthaltenen Controls bestimmen
|
For Each ctrl As Control In Me.Controls
|
||||||
For Each ctrl As Control In Controls
|
maxWidth = Math.Max(maxWidth, ctrl.Right)
|
||||||
Dim right As Integer = ctrl.Right
|
maxHeight = Math.Max(maxHeight, ctrl.Bottom)
|
||||||
Dim bottom As Integer = ctrl.Bottom
|
|
||||||
|
|
||||||
If right > maxWidth Then maxWidth = right
|
|
||||||
If bottom > maxHeight Then maxHeight = bottom
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' Scrollbereich setzen
|
|
||||||
Me.AutoScrollMinSize = New Size(maxWidth, maxHeight)
|
Me.AutoScrollMinSize = New Size(maxWidth, maxHeight)
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
'Public Class ClassSnapPanel
|
||||||
|
' Inherits Panel
|
||||||
|
|
||||||
|
' Private _ShowGrid As Boolean = True
|
||||||
|
' Private _GridSize As Integer = 16
|
||||||
|
' Public Sub New()
|
||||||
|
' Me.AutoScroll = True ' Scrollbars aktivieren
|
||||||
|
' End Sub
|
||||||
|
' Public Property GridSize As Integer
|
||||||
|
' Get
|
||||||
|
' Return _GridSize
|
||||||
|
' End Get
|
||||||
|
' Set(value As Integer)
|
||||||
|
' _GridSize = value
|
||||||
|
' Refresh()
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property ShowGrid As Boolean
|
||||||
|
' Get
|
||||||
|
' Return _ShowGrid
|
||||||
|
' End Get
|
||||||
|
' Set(value As Boolean)
|
||||||
|
' _ShowGrid = value
|
||||||
|
' Refresh()
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Protected Overrides Sub OnControlAdded(e As ControlEventArgs)
|
||||||
|
' AddHandler e.Control.LocationChanged, AddressOf AlignToGrid
|
||||||
|
' AddHandler e.Control.DragDrop, AddressOf AlignToGrid
|
||||||
|
' MyBase.OnControlAdded(e)
|
||||||
|
' UpdateScrollArea()
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' Protected Overrides Sub OnControlRemoved(e As ControlEventArgs)
|
||||||
|
' RemoveHandler e.Control.LocationChanged, AddressOf AlignToGrid
|
||||||
|
' RemoveHandler e.Control.DragDrop, AddressOf AlignToGrid
|
||||||
|
' MyBase.OnControlRemoved(e)
|
||||||
|
' UpdateScrollArea()
|
||||||
|
' End Sub
|
||||||
|
' Protected Overrides Sub OnPaint(e As System.Windows.Forms.PaintEventArgs)
|
||||||
|
' If _ShowGrid Then
|
||||||
|
' ControlPaint.DrawGrid(e.Graphics, ClientRectangle, New Size(_GridSize, _GridSize), BackColor)
|
||||||
|
' End If
|
||||||
|
' MyBase.OnPaint(e)
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' Private Sub AlignToGrid(sender As Object, e As EventArgs)
|
||||||
|
' If _ShowGrid Then
|
||||||
|
' Dim item As Control = CType(sender, Control)
|
||||||
|
' Dim x As Integer = Math.Round(item.Left / _GridSize) * _GridSize
|
||||||
|
' Dim y As Integer = Math.Round(item.Top / _GridSize) * _GridSize
|
||||||
|
' item.Location = New Point(x, y)
|
||||||
|
' UpdateScrollArea()
|
||||||
|
' End If
|
||||||
|
' End Sub
|
||||||
|
' Private Sub UpdateScrollArea()
|
||||||
|
' Dim maxWidth As Integer = 0
|
||||||
|
' Dim maxHeight As Integer = 0
|
||||||
|
|
||||||
|
' ' Größte X- und Y-Koordinate der enthaltenen Controls bestimmen
|
||||||
|
' For Each ctrl As Control In Controls
|
||||||
|
' Dim right As Integer = ctrl.Right
|
||||||
|
' Dim bottom As Integer = ctrl.Bottom
|
||||||
|
|
||||||
|
' If right > maxWidth Then maxWidth = right
|
||||||
|
' If bottom > maxHeight Then maxHeight = bottom
|
||||||
|
' Next
|
||||||
|
|
||||||
|
' ' Scrollbereich setzen
|
||||||
|
' Me.AutoScrollMinSize = New Size(maxWidth, maxHeight)
|
||||||
|
' End Sub
|
||||||
|
'End Class
|
||||||
|
|||||||
@@ -132,68 +132,68 @@
|
|||||||
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
|
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.CAD, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.CAD, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.Common, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.Common, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.Document, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.Document, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.Email, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.Email, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.HTML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.HTML, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.Imaging, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.Imaging, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.PDF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.PDF, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.RTF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.RTF, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.SVG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.SVG, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL">
|
<Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
@@ -209,6 +209,12 @@
|
|||||||
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.22.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.22.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.6.22.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.6.22.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NativeSDK.Settings, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\NativeSDK.Settings.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="NativeSDK.Settings.Edition, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\NativeSDK.Settings.Edition.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -821,8 +827,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
|
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
|
||||||
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
|
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets'))" />
|
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
|
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
|
||||||
<Import Project="..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" />
|
<Import Project="..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets')" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -103,6 +103,18 @@
|
|||||||
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral" />
|
<assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="GdPicture.NET.14" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-14.3.19.0" newVersion="14.3.19.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="GdPicture.NET.14.Common" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-14.3.19.0" newVersion="14.3.19.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="GdPicture.NET.14.Imaging" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-14.3.19.0" newVersion="14.3.19.0" />
|
||||||
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
|
||||||
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
|
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
|
||||||
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />
|
||||||
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
|
<package id="GdPicture" version="14.3.19" targetFramework="net462" />
|
||||||
<package id="GdPicture.runtimes.windows" version="14.3.3" targetFramework="net462" />
|
<package id="GdPicture.runtimes.windows" version="14.3.19" targetFramework="net462" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
|
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.Bcl.Cryptography" version="9.0.0" targetFramework="net462" />
|
<package id="Microsoft.Bcl.Cryptography" version="9.0.0" targetFramework="net462" />
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraSpreadsheet.SpreadsheetControl, DevExpress.XtraSpreadsheet.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
|||||||
@@ -78,8 +78,7 @@
|
|||||||
<Reference Include="DevExpress.XtraRichEdit.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
<Reference Include="DevExpress.XtraRichEdit.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="DevExpress.XtraSpreadsheet.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
<Reference Include="DevExpress.XtraSpreadsheet.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="DigitalData.Controls.DocumentViewer, Version=1.9.4.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="DigitalData.Controls.DocumentViewer">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
<HintPath>..\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.GUIs.Common">
|
<Reference Include="DigitalData.GUIs.Common">
|
||||||
|
|||||||
23
GUIs.Test.TestGUI/frmDocViewPure.Designer.vb
generated
23
GUIs.Test.TestGUI/frmDocViewPure.Designer.vb
generated
@@ -22,18 +22,10 @@ Partial Class frmDocViewPure
|
|||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.SpreadsheetControl1 = New DevExpress.XtraSpreadsheet.SpreadsheetControl()
|
|
||||||
Me.Button1 = New System.Windows.Forms.Button()
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
|
Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'SpreadsheetControl1
|
|
||||||
'
|
|
||||||
Me.SpreadsheetControl1.Location = New System.Drawing.Point(349, 187)
|
|
||||||
Me.SpreadsheetControl1.Name = "SpreadsheetControl1"
|
|
||||||
Me.SpreadsheetControl1.Size = New System.Drawing.Size(400, 200)
|
|
||||||
Me.SpreadsheetControl1.TabIndex = 0
|
|
||||||
Me.SpreadsheetControl1.Text = "SpreadsheetControl1"
|
|
||||||
'
|
|
||||||
'Button1
|
'Button1
|
||||||
'
|
'
|
||||||
Me.Button1.Location = New System.Drawing.Point(546, 25)
|
Me.Button1.Location = New System.Drawing.Point(546, 25)
|
||||||
@@ -43,19 +35,26 @@ Partial Class frmDocViewPure
|
|||||||
Me.Button1.Text = "unload"
|
Me.Button1.Text = "unload"
|
||||||
Me.Button1.UseVisualStyleBackColor = True
|
Me.Button1.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'DocumentViewer1
|
||||||
|
'
|
||||||
|
Me.DocumentViewer1.FileLoaded = False
|
||||||
|
Me.DocumentViewer1.Location = New System.Drawing.Point(12, 54)
|
||||||
|
Me.DocumentViewer1.Name = "DocumentViewer1"
|
||||||
|
Me.DocumentViewer1.Size = New System.Drawing.Size(661, 386)
|
||||||
|
Me.DocumentViewer1.TabIndex = 2
|
||||||
|
'
|
||||||
'frmDocViewPure
|
'frmDocViewPure
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||||
|
Me.Controls.Add(Me.DocumentViewer1)
|
||||||
Me.Controls.Add(Me.Button1)
|
Me.Controls.Add(Me.Button1)
|
||||||
Me.Controls.Add(Me.SpreadsheetControl1)
|
|
||||||
Me.Name = "frmDocViewPure"
|
Me.Name = "frmDocViewPure"
|
||||||
Me.Text = "frmDocViewPure"
|
Me.Text = "frmDocViewPure"
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend WithEvents SpreadsheetControl1 As DevExpress.XtraSpreadsheet.SpreadsheetControl
|
|
||||||
Friend WithEvents Button1 As Button
|
Friend WithEvents Button1 As Button
|
||||||
|
Friend WithEvents DocumentViewer1 As DigitalData.Controls.DocumentViewer.DocumentViewer
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
Public Class frmDocViewPure
|
Public Class frmDocViewPure
|
||||||
Private Sub frmDocViewPure_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmDocViewPure_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
SpreadsheetControl1.LoadDocument("E:\35MB.xlsx")
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -10,7 +9,7 @@ Public Class frmDocViewPure
|
|||||||
'SpreadsheetControl1.Document.Dispose()
|
'SpreadsheetControl1.Document.Dispose()
|
||||||
'SpreadsheetControl1.Dispose()
|
'SpreadsheetControl1.Dispose()
|
||||||
'SpreadsheetControl1 = Nothing
|
'SpreadsheetControl1 = Nothing
|
||||||
SpreadsheetControl1.CreateNewDocument()
|
' SpreadsheetControl1.CreateNewDocument()
|
||||||
GC.Collect()
|
GC.Collect()
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
56
GUIs.Test.TestGUI/frmFilesystem.Designer.vb
generated
56
GUIs.Test.TestGUI/frmFilesystem.Designer.vb
generated
@@ -23,10 +23,8 @@ Partial Class frmFilesystem
|
|||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.Button1 = New System.Windows.Forms.Button()
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
Me.Button2 = New System.Windows.Forms.Button()
|
Me.btnStreamSimpleFile = New System.Windows.Forms.Button()
|
||||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||||
Me.Button3 = New System.Windows.Forms.Button()
|
|
||||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
|
||||||
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
||||||
Me.txtServiceAddress = New DevExpress.XtraEditors.TextEdit()
|
Me.txtServiceAddress = New DevExpress.XtraEditors.TextEdit()
|
||||||
Me.Label1 = New System.Windows.Forms.Label()
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
@@ -40,52 +38,35 @@ Partial Class frmFilesystem
|
|||||||
'
|
'
|
||||||
'Button1
|
'Button1
|
||||||
'
|
'
|
||||||
Me.Button1.Location = New System.Drawing.Point(59, 343)
|
Me.Button1.Location = New System.Drawing.Point(42, 234)
|
||||||
Me.Button1.Name = "Button1"
|
Me.Button1.Name = "Button1"
|
||||||
Me.Button1.Size = New System.Drawing.Size(288, 23)
|
Me.Button1.Size = New System.Drawing.Size(288, 23)
|
||||||
Me.Button1.TabIndex = 0
|
Me.Button1.TabIndex = 0
|
||||||
Me.Button1.Text = "CreateDateDirectory"
|
Me.Button1.Text = "CreateDateDirectory"
|
||||||
Me.Button1.UseVisualStyleBackColor = True
|
Me.Button1.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'Button2
|
'btnStreamSimpleFile
|
||||||
'
|
'
|
||||||
Me.Button2.Location = New System.Drawing.Point(6, 71)
|
Me.btnStreamSimpleFile.Location = New System.Drawing.Point(6, 19)
|
||||||
Me.Button2.Name = "Button2"
|
Me.btnStreamSimpleFile.Name = "btnStreamSimpleFile"
|
||||||
Me.Button2.Size = New System.Drawing.Size(288, 23)
|
Me.btnStreamSimpleFile.Size = New System.Drawing.Size(288, 23)
|
||||||
Me.Button2.TabIndex = 1
|
Me.btnStreamSimpleFile.TabIndex = 1
|
||||||
Me.Button2.Text = "Stream simple file"
|
Me.btnStreamSimpleFile.Text = "Stream simple file"
|
||||||
Me.Button2.UseVisualStyleBackColor = True
|
Me.btnStreamSimpleFile.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'GroupBox1
|
'GroupBox1
|
||||||
'
|
'
|
||||||
Me.GroupBox1.Controls.Add(Me.Button3)
|
Me.GroupBox1.Controls.Add(Me.btnStreamSimpleFile)
|
||||||
Me.GroupBox1.Controls.Add(Me.TextBox1)
|
|
||||||
Me.GroupBox1.Controls.Add(Me.Button2)
|
|
||||||
Me.GroupBox1.Location = New System.Drawing.Point(36, 153)
|
Me.GroupBox1.Location = New System.Drawing.Point(36, 153)
|
||||||
Me.GroupBox1.Name = "GroupBox1"
|
Me.GroupBox1.Name = "GroupBox1"
|
||||||
Me.GroupBox1.Size = New System.Drawing.Size(709, 157)
|
Me.GroupBox1.Size = New System.Drawing.Size(709, 58)
|
||||||
Me.GroupBox1.TabIndex = 2
|
Me.GroupBox1.TabIndex = 2
|
||||||
Me.GroupBox1.TabStop = False
|
Me.GroupBox1.TabStop = False
|
||||||
Me.GroupBox1.Text = "Stream simple file"
|
Me.GroupBox1.Text = "Stream simple file"
|
||||||
'
|
'
|
||||||
'Button3
|
|
||||||
'
|
|
||||||
Me.Button3.Location = New System.Drawing.Point(6, 19)
|
|
||||||
Me.Button3.Name = "Button3"
|
|
||||||
Me.Button3.Size = New System.Drawing.Size(181, 23)
|
|
||||||
Me.Button3.TabIndex = 3
|
|
||||||
Me.Button3.Text = "1. Choose file"
|
|
||||||
Me.Button3.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'TextBox1
|
|
||||||
'
|
|
||||||
Me.TextBox1.Location = New System.Drawing.Point(6, 45)
|
|
||||||
Me.TextBox1.Name = "TextBox1"
|
|
||||||
Me.TextBox1.Size = New System.Drawing.Size(669, 20)
|
|
||||||
Me.TextBox1.TabIndex = 2
|
|
||||||
'
|
|
||||||
'txtServiceAddress
|
'txtServiceAddress
|
||||||
'
|
'
|
||||||
|
Me.txtServiceAddress.EditValue = "172.24.12.12"
|
||||||
Me.txtServiceAddress.Location = New System.Drawing.Point(36, 37)
|
Me.txtServiceAddress.Location = New System.Drawing.Point(36, 37)
|
||||||
Me.txtServiceAddress.Name = "txtServiceAddress"
|
Me.txtServiceAddress.Name = "txtServiceAddress"
|
||||||
Me.txtServiceAddress.Size = New System.Drawing.Size(485, 20)
|
Me.txtServiceAddress.Size = New System.Drawing.Size(485, 20)
|
||||||
@@ -96,9 +77,9 @@ Partial Class frmFilesystem
|
|||||||
Me.Label1.AutoSize = True
|
Me.Label1.AutoSize = True
|
||||||
Me.Label1.Location = New System.Drawing.Point(33, 21)
|
Me.Label1.Location = New System.Drawing.Point(33, 21)
|
||||||
Me.Label1.Name = "Label1"
|
Me.Label1.Name = "Label1"
|
||||||
Me.Label1.Size = New System.Drawing.Size(81, 13)
|
Me.Label1.Size = New System.Drawing.Size(136, 13)
|
||||||
Me.Label1.TabIndex = 6
|
Me.Label1.TabIndex = 6
|
||||||
Me.Label1.Text = "ServiceAdresse"
|
Me.Label1.Text = "EDMI Service Adresse: (IP)"
|
||||||
'
|
'
|
||||||
'txtServicePort
|
'txtServicePort
|
||||||
'
|
'
|
||||||
@@ -114,7 +95,7 @@ Partial Class frmFilesystem
|
|||||||
'
|
'
|
||||||
Me.Button4.Location = New System.Drawing.Point(36, 89)
|
Me.Button4.Location = New System.Drawing.Point(36, 89)
|
||||||
Me.Button4.Name = "Button4"
|
Me.Button4.Name = "Button4"
|
||||||
Me.Button4.Size = New System.Drawing.Size(75, 23)
|
Me.Button4.Size = New System.Drawing.Size(85, 23)
|
||||||
Me.Button4.TabIndex = 8
|
Me.Button4.TabIndex = 8
|
||||||
Me.Button4.Text = "Connect"
|
Me.Button4.Text = "Connect"
|
||||||
Me.Button4.UseVisualStyleBackColor = True
|
Me.Button4.UseVisualStyleBackColor = True
|
||||||
@@ -123,7 +104,7 @@ Partial Class frmFilesystem
|
|||||||
'
|
'
|
||||||
Me.txtStatus.Location = New System.Drawing.Point(527, 37)
|
Me.txtStatus.Location = New System.Drawing.Point(527, 37)
|
||||||
Me.txtStatus.Name = "txtStatus"
|
Me.txtStatus.Name = "txtStatus"
|
||||||
Me.txtStatus.Size = New System.Drawing.Size(100, 20)
|
Me.txtStatus.Size = New System.Drawing.Size(184, 20)
|
||||||
Me.txtStatus.TabIndex = 9
|
Me.txtStatus.TabIndex = 9
|
||||||
'
|
'
|
||||||
'frmFilesystem
|
'frmFilesystem
|
||||||
@@ -141,7 +122,6 @@ Partial Class frmFilesystem
|
|||||||
Me.Name = "frmFilesystem"
|
Me.Name = "frmFilesystem"
|
||||||
Me.Text = "frmFilesystem"
|
Me.Text = "frmFilesystem"
|
||||||
Me.GroupBox1.ResumeLayout(False)
|
Me.GroupBox1.ResumeLayout(False)
|
||||||
Me.GroupBox1.PerformLayout()
|
|
||||||
CType(Me.txtServiceAddress.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.txtServiceAddress.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(Me.txtServicePort.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.txtServicePort.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
@@ -150,10 +130,8 @@ Partial Class frmFilesystem
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend WithEvents Button1 As Button
|
Friend WithEvents Button1 As Button
|
||||||
Friend WithEvents Button2 As Button
|
Friend WithEvents btnStreamSimpleFile As Button
|
||||||
Friend WithEvents GroupBox1 As GroupBox
|
Friend WithEvents GroupBox1 As GroupBox
|
||||||
Friend WithEvents Button3 As Button
|
|
||||||
Friend WithEvents TextBox1 As TextBox
|
|
||||||
Friend WithEvents SaveFileDialog1 As SaveFileDialog
|
Friend WithEvents SaveFileDialog1 As SaveFileDialog
|
||||||
Friend WithEvents txtServiceAddress As DevExpress.XtraEditors.TextEdit
|
Friend WithEvents txtServiceAddress As DevExpress.XtraEditors.TextEdit
|
||||||
Friend WithEvents Label1 As Label
|
Friend WithEvents Label1 As Label
|
||||||
|
|||||||
@@ -9,9 +9,11 @@ Imports DigitalData.Modules.EDMI.API
|
|||||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.ZooFlow.State
|
Imports DigitalData.Modules.ZooFlow.State
|
||||||
|
Imports DigitalData.Services.EDMIService
|
||||||
|
Imports DigitalData.Services.EDMIService.GlobalState
|
||||||
|
|
||||||
Public Class frmFilesystem
|
Public Class frmFilesystem
|
||||||
Private Client As Client
|
Private EDMIClient As Client
|
||||||
Private Logger As Logger
|
Private Logger As Logger
|
||||||
|
|
||||||
Private Const STATUS_CONNECTED = "Connection Established"
|
Private Const STATUS_CONNECTED = "Connection Established"
|
||||||
@@ -59,17 +61,73 @@ Public Class frmFilesystem
|
|||||||
Dim oDateString = MYDD_Filesystem.CreateDateDirectory("E:\")
|
Dim oDateString = MYDD_Filesystem.CreateDateDirectory("E:\")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
Private Sub Button3_Click(sender As Object, e As EventArgs)
|
||||||
If SaveFileDialog1.ShowDialog = DialogResult.OK Then
|
If SaveFileDialog1.ShowDialog = DialogResult.OK Then
|
||||||
' Fallback: einfache Textdatei schreiben
|
' Fallback: einfache Textdatei schreiben
|
||||||
System.IO.File.WriteAllText(SaveFileDialog1.FileName, "Some text data")
|
System.IO.File.WriteAllText(SaveFileDialog1.FileName, "Some text data")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Async Function Button2_ClickAsync(sender As Object, e As EventArgs) As Task Handles Button2.Click
|
Public Class SecureStorageHandler
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||||
|
Try
|
||||||
|
Dim oIPAddress = txtServiceAddress.Text
|
||||||
|
Dim oPort = Integer.Parse(txtServicePort.Text)
|
||||||
|
|
||||||
|
EDMIClient = New Client(LogConfig, oIPAddress, oPort)
|
||||||
|
|
||||||
|
txtStatus.Text = STATUS_CONNECTING
|
||||||
|
Dim oResult = EDMIClient.Connect()
|
||||||
|
|
||||||
|
If oResult = True Then
|
||||||
|
ServiceAddress = $"{oIPAddress}:{oPort}"
|
||||||
|
ServiceOnline = True
|
||||||
|
txtStatus.Text = STATUS_CONNECTED
|
||||||
|
txtStatus.BackColor = Color.LightGreen
|
||||||
|
My.Application.Service.Client = EDMIClient
|
||||||
|
Logger.Debug("Loading client config..")
|
||||||
|
Dim oClientConfig = My.Application.Service.Client.ClientConfig
|
||||||
|
Logger.Debug("Establishing ECM connection..")
|
||||||
|
Dim oECMConnectionString = oClientConfig.ConnectionStringECM
|
||||||
|
My.DatabaseECM = New MSSQLServer(LogConfig, oECMConnectionString)
|
||||||
|
Logger.Debug("Establishing IDB connection..")
|
||||||
|
Dim oIDBConnectionString = oClientConfig.ConnectionStringIDB
|
||||||
|
My.DatabaseIDB = New MSSQLServer(LogConfig, oIDBConnectionString)
|
||||||
|
|
||||||
|
Logger.Debug("Establishing Database connection with fallback..")
|
||||||
|
My.Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
||||||
|
Else
|
||||||
|
ServiceAddress = ""
|
||||||
|
ServiceOnline = True
|
||||||
|
txtStatus.Text = STATUS_FAILED
|
||||||
|
txtStatus.BackColor = Color.LightCoral
|
||||||
|
' TODO: Make a connection test that is as elaborate as this one :D
|
||||||
|
'Select Case oResult
|
||||||
|
' Case ClassService.ConnectionTestResult.NotFound
|
||||||
|
' lblStatus.Text = "Dienst konnte nicht gefunden werden. Bitte überprüfen sie Addresse und Port."
|
||||||
|
' Case ClassService.ConnectionTestResult.EmptyURI
|
||||||
|
' lblStatus.Text = "Bitte tragen Sie eine gültige Dienst Adresse ein."
|
||||||
|
' Case ClassService.ConnectionTestResult.Authentication
|
||||||
|
' lblStatus.Text = "Authentifizierungsfehler. Prüfen Sie, ob sich Ihr Gerät in der korrekten Domäne befindet."
|
||||||
|
' Case Else
|
||||||
|
' lblStatus.Text = "Unbekannter Fehler."
|
||||||
|
'End Select
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
If Logger IsNot Nothing Then Logger.Error(ex)
|
||||||
|
MsgBox("Fehler beim Verbindungsaufbau", MsgBoxStyle.Critical, Text)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button2_ClickAsync(sender As Object, e As EventArgs) Handles btnStreamSimpleFile.Click
|
||||||
' Import a file via EDMI Globix ImportFile API to test Service.EDMIService ImportFileMethod
|
' Import a file via EDMI Globix ImportFile API to test Service.EDMIService ImportFileMethod
|
||||||
Try
|
Try
|
||||||
If Client Is Nothing OrElse ServiceOnline = False Then
|
If EDMIClient Is Nothing OrElse ServiceOnline = False Then
|
||||||
MsgBox("Bitte zuerst Verbindung zum EDMI Service herstellen.", MsgBoxStyle.Exclamation, Text)
|
MsgBox("Bitte zuerst Verbindung zum EDMI Service herstellen.", MsgBoxStyle.Exclamation, Text)
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
@@ -92,7 +150,7 @@ Public Class frmFilesystem
|
|||||||
.LanguageId = 1031
|
.LanguageId = 1031
|
||||||
}
|
}
|
||||||
|
|
||||||
Dim oObjectStore As String = "SelectedDocType.ObjectStore"
|
Dim oObjectStore As String = "WORK"
|
||||||
Dim oIDBDoctypeId As Long = 1
|
Dim oIDBDoctypeId As Long = 1
|
||||||
Dim oObjectKind As String = "DOC"
|
Dim oObjectKind As String = "DOC"
|
||||||
Dim oProfileId As Integer = 1
|
Dim oProfileId As Integer = 1
|
||||||
@@ -105,89 +163,11 @@ Public Class frmFilesystem
|
|||||||
Logger.Debug("ProfileId: [{0}]", oProfileId)
|
Logger.Debug("ProfileId: [{0}]", oProfileId)
|
||||||
Logger.Debug("IDB DoctypeId: [{0}]", oIDBDoctypeId)
|
Logger.Debug("IDB DoctypeId: [{0}]", oIDBDoctypeId)
|
||||||
|
|
||||||
Logger.Info("Running Import")
|
|
||||||
|
|
||||||
Dim oResult = Await My.Application.Service.Client.Globix_ImportFileAsync(
|
|
||||||
oFilePath, oProfileId, oAttributes, oObjectStore, oObjectKind, oIDBDoctypeId, oOptions)
|
|
||||||
|
|
||||||
Logger.Info("Import result: [{0}]", oResult.OK)
|
|
||||||
Logger.Info("Imported file got ObjectId [{0}]", oResult.ObjectId)
|
|
||||||
|
|
||||||
If oResult.OK Then
|
|
||||||
MsgBox("Alles OK")
|
|
||||||
Else
|
|
||||||
Logger.Warn("Import failed with message: [{0}] and details [{1}]", oResult.ErrorMessage, oResult.ErrorDetails)
|
|
||||||
Dim oMsg As String, oTitle As String
|
|
||||||
If My.Application.User.Language = "de-DE" Then
|
|
||||||
oMsg = $"Die Datei wurde nicht verarbeitet.{vbNewLine}{vbNewLine}Fehler: {oResult.ErrorMessage}"
|
|
||||||
oTitle = "Achtung"
|
|
||||||
Else
|
|
||||||
oMsg = $"Unexpected Error in FileFlow{vbNewLine}{vbNewLine}Fehler: {oResult.ErrorMessage}"
|
|
||||||
oTitle = "Attention"
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
MsgBox("Fehler")
|
|
||||||
End If
|
|
||||||
End Using
|
End Using
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If Logger IsNot Nothing Then Logger.Error(ex)
|
If Logger IsNot Nothing Then Logger.Error(ex)
|
||||||
MsgBox("Fehler beim Datei-Import.", MsgBoxStyle.Critical, Text)
|
MsgBox("Fehler beim Datei-Import.", MsgBoxStyle.Critical, Text)
|
||||||
End Try
|
End Try
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
Public Class SecureStorageHandler
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
|
||||||
Try
|
|
||||||
Dim oIPAddress = txtServiceAddress.Text
|
|
||||||
Dim oPort = Integer.Parse(txtServicePort.Text)
|
|
||||||
|
|
||||||
Client = New Client(LogConfig, oIPAddress, oPort)
|
|
||||||
|
|
||||||
txtStatus.Text = STATUS_CONNECTING
|
|
||||||
Dim oResult = Client.Connect()
|
|
||||||
|
|
||||||
If oResult = True Then
|
|
||||||
ServiceAddress = $"{oIPAddress}:{oPort}"
|
|
||||||
ServiceOnline = True
|
|
||||||
txtStatus.Text = STATUS_CONNECTED
|
|
||||||
My.Application.Service.Client = Client
|
|
||||||
Logger.Debug("Loading client config..")
|
|
||||||
Dim oClientConfig = My.Application.Service.Client.ClientConfig
|
|
||||||
Logger.Debug("Establishing ECM connection..")
|
|
||||||
Dim oECMConnectionString = oClientConfig.ConnectionStringECM
|
|
||||||
My.DatabaseECM = New MSSQLServer(My.LogConfig, oECMConnectionString)
|
|
||||||
Logger.Debug("Establishing IDB connection..")
|
|
||||||
Dim oIDBConnectionString = oClientConfig.ConnectionStringIDB
|
|
||||||
My.DatabaseIDB = New MSSQLServer(My.LogConfig, oIDBConnectionString)
|
|
||||||
|
|
||||||
Logger.Debug("Establishing Database connection with fallback..")
|
|
||||||
My.Database = New DatabaseWithFallback(LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB)
|
|
||||||
Else
|
|
||||||
ServiceAddress = ""
|
|
||||||
ServiceOnline = True
|
|
||||||
txtStatus.Text = STATUS_FAILED
|
|
||||||
' TODO: Make a connection test that is as elaborate as this one :D
|
|
||||||
'Select Case oResult
|
|
||||||
' Case ClassService.ConnectionTestResult.NotFound
|
|
||||||
' lblStatus.Text = "Dienst konnte nicht gefunden werden. Bitte überprüfen sie Addresse und Port."
|
|
||||||
' Case ClassService.ConnectionTestResult.EmptyURI
|
|
||||||
' lblStatus.Text = "Bitte tragen Sie eine gültige Dienst Adresse ein."
|
|
||||||
' Case ClassService.ConnectionTestResult.Authentication
|
|
||||||
' lblStatus.Text = "Authentifizierungsfehler. Prüfen Sie, ob sich Ihr Gerät in der korrekten Domäne befindet."
|
|
||||||
' Case Else
|
|
||||||
' lblStatus.Text = "Unbekannter Fehler."
|
|
||||||
'End Select
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
If Logger IsNot Nothing Then Logger.Error(ex)
|
|
||||||
MsgBox("Fehler beim Verbindungsaufbau", MsgBoxStyle.Critical, Text)
|
|
||||||
End Try
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -161,7 +161,15 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.6" newVersion="8.0.0.6" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="GdPicture.NET.14" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-14.3.19.0" newVersion="14.3.19.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="GdPicture.NET.14.Common" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-14.3.19.0" newVersion="14.3.19.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
<dependentAssembly>
|
<dependentAssembly>
|
||||||
<assemblyIdentity name="GdPicture.NET.14" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
<assemblyIdentity name="GdPicture.NET.14" publicKeyToken="f52a2e60ad468dbb" culture="neutral" />
|
||||||
|
|||||||
4
GUIs.Test.ZUGFeRDTest/Form1.Designer.vb
generated
4
GUIs.Test.ZUGFeRDTest/Form1.Designer.vb
generated
@@ -252,7 +252,7 @@ Partial Class Form1
|
|||||||
'
|
'
|
||||||
' Form1
|
' Form1
|
||||||
'
|
'
|
||||||
AutoScaleDimensions = New System.Drawing.SizeF(8F, 20F)
|
AutoScaleDimensions = New System.Drawing.SizeF(8.0F, 20.0F)
|
||||||
AutoScaleMode = AutoScaleMode.Font
|
AutoScaleMode = AutoScaleMode.Font
|
||||||
ClientSize = New System.Drawing.Size(879, 690)
|
ClientSize = New System.Drawing.Size(879, 690)
|
||||||
Controls.Add(Button2)
|
Controls.Add(Button2)
|
||||||
@@ -296,6 +296,4 @@ Partial Class Form1
|
|||||||
Friend WithEvents btWriteBinary As Button
|
Friend WithEvents btWriteBinary As Button
|
||||||
Friend WithEvents ButtonValidateXMLOnly As Button
|
Friend WithEvents ButtonValidateXMLOnly As Button
|
||||||
Friend WithEvents OpenFileDialog2 As OpenFileDialog
|
Friend WithEvents OpenFileDialog2 As OpenFileDialog
|
||||||
Friend WithEvents Button1 As Button
|
|
||||||
Friend WithEvents Button2 As Button
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -99,14 +99,14 @@ Public Class Form1
|
|||||||
Dim oEN16931_ID = oRow.Item("EN16931_ID")
|
Dim oEN16931_ID = oRow.Item("EN16931_ID")
|
||||||
|
|
||||||
Args.PropertyMapList.Add(New XmlItemProperty() With {
|
Args.PropertyMapList.Add(New XmlItemProperty() With {
|
||||||
.XMLPath = xmlPath,
|
.xmlPath = xmlPath,
|
||||||
.Description = description,
|
.description = description,
|
||||||
.TableName = tableName,
|
.tableName = tableName,
|
||||||
.TableColumn = tableColumn,
|
.tableColumn = tableColumn,
|
||||||
.IsRequired = isRequired,
|
.isRequired = isRequired,
|
||||||
.IsGrouped = isGrouped,
|
.isGrouped = isGrouped,
|
||||||
.GroupScope = groupScope,
|
.groupScope = groupScope,
|
||||||
.Specification = specification,
|
.specification = specification,
|
||||||
.ItemType = oItemType,
|
.ItemType = oItemType,
|
||||||
.EN16931_ID = oEN16931_ID
|
.EN16931_ID = oEN16931_ID
|
||||||
})
|
})
|
||||||
@@ -159,9 +159,41 @@ Public Class Form1
|
|||||||
|
|
||||||
If oResult = DialogResult.OK Then
|
If oResult = DialogResult.OK Then
|
||||||
Try
|
Try
|
||||||
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
|
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName, True)
|
||||||
|
Dim oZFResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
|
||||||
Dim oZUGFERD = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
Dim oZUGFERD = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
||||||
Console.WriteLine()
|
WriteLog("Specification: " & oZFResult.Specification)
|
||||||
|
'WriteLog("XML-Schema: " & oResult.UsedXMLSchema)
|
||||||
|
WriteLog("Embedded File Name: " & oZFResult.DataFileName)
|
||||||
|
|
||||||
|
Dim oSpecification = oZFResult.Specification
|
||||||
|
|
||||||
|
If oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_10 Then
|
||||||
|
oSpecification = ZUGFeRDInterface.ZUGFERD_SPEC_DEFAULT
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oPropertyMap = oArgs.PropertyMapList.
|
||||||
|
Where(Function(kv) kv.Specification = oSpecification).
|
||||||
|
ToDictionary(Function(kv) kv.XMLPath, Function(kv) kv)
|
||||||
|
|
||||||
|
Dim oResult2 = _zugferd.PropertyValues.CheckPropertyValues(oZFResult.SchemaObject, oPropertyMap, "test")
|
||||||
|
|
||||||
|
WriteLog("Valid Properties: [{0}]", oResult2.ValidProperties.Count)
|
||||||
|
For Each Prop In oResult2.ValidProperties
|
||||||
|
If Prop.Value.Length > 250 Then
|
||||||
|
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value.Substring(0, 250))
|
||||||
|
Else
|
||||||
|
WriteLog("Property: [{0}] = [{1}]", Prop.Description, Prop.Value)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
WriteLog("--------------------------------")
|
||||||
|
WriteLog("Missing Properties: [{0}]", oResult2.MissingProperties.Count)
|
||||||
|
For Each Prop In oResult2.MissingProperties
|
||||||
|
WriteLog("Missing Property: [{0}]", Prop.ToString) ''Prop.Description
|
||||||
|
Next
|
||||||
|
|
||||||
|
WriteLog("--------------------------------")
|
||||||
Catch ex As DigitalData.Modules.Interfaces.Exceptions.ZUGFeRDExecption
|
Catch ex As DigitalData.Modules.Interfaces.Exceptions.ZUGFeRDExecption
|
||||||
Dim oErrorCode = GetRejectionCodeNumber(ex.ErrorCode)
|
Dim oErrorCode = GetRejectionCodeNumber(ex.ErrorCode)
|
||||||
Dim oMessage = oErrorCode + " - (" + ex.ErrorCode.ToString() + ") - " + ex.Message
|
Dim oMessage = oErrorCode + " - (" + ex.ErrorCode.ToString() + ") - " + ex.Message
|
||||||
@@ -169,6 +201,7 @@ Public Class Form1
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message)
|
MsgBox(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
MsgBox("Finished - check log")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -227,7 +260,7 @@ Public Class Form1
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
If oDialogResult = DialogResult.OK Then
|
If oDialogResult = DialogResult.OK Then
|
||||||
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName)
|
Dim oDoc = _zugferd.ValidateZUGFeRDFileWithGDPicture(OpenFileDialog1.FileName, True)
|
||||||
Dim oResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
|
Dim oResult = _zugferd.ValidateZUGFeRDDocument(oDoc)
|
||||||
oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
oResult = _zugferd.SerializeZUGFeRDDocument(oDoc)
|
||||||
|
|
||||||
|
|||||||
@@ -17,26 +17,185 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="GdPicture" Version="14.3.16" />
|
<PackageReference Include="GdPicture" Version="14.3.18" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" />
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" />
|
||||||
<PackageReference Include="NLog" Version="6.0.4" />
|
<PackageReference Include="NLog" Version="6.0.4" />
|
||||||
|
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\BouncyCastle.Cryptography.2.5.0\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Config">
|
<Reference Include="DigitalData.Modules.Config">
|
||||||
<HintPath>..\..\DDModules\Config\bin\Debug\net8.0-windows\DigitalData.Modules.Config.dll</HintPath>
|
<HintPath>..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Database">
|
<Reference Include="DigitalData.Modules.Database">
|
||||||
<HintPath>..\..\DDModules\Database\bin\Debug\net8.0-windows\DigitalData.Modules.Database.dll</HintPath>
|
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Interfaces">
|
<Reference Include="DigitalData.Modules.Interfaces">
|
||||||
<HintPath>..\..\DDModules\Interfaces\bin\Debug\net8.0-windows\DigitalData.Modules.Interfaces.dll</HintPath>
|
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Jobs">
|
<Reference Include="DigitalData.Modules.Jobs">
|
||||||
<HintPath>..\..\DDModules\Jobs\bin\Debug\net8.0-windows\DigitalData.Modules.Jobs.dll</HintPath>
|
<HintPath>..\..\DDModules\Jobs\bin\Debug\DigitalData.Modules.Jobs.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DigitalData.Modules.Logging">
|
<Reference Include="DigitalData.Modules.Logging">
|
||||||
<HintPath>..\..\DDModules\Logging_.NET8\bin\Debug\net8.0-windows\DigitalData.Modules.Logging.dll</HintPath>
|
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="DocumentFormat.OpenXml.Framework, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.CAD, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.Common, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.Document, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.Email, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.HTML, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.Imaging, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.PDF, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.RTF, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.SVG, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.SVG.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="GdPicture.NET.14.wia.gateway, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6973b5c22dcf45f7, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="NativeSDK.Settings, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\NativeSDK.Settings.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="NativeSDK.Settings.Edition, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\NativeSDK.Settings.Edition.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json.Bson, Version=1.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.Bson.1.0.2\lib\net45\Newtonsoft.Json.Bson.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.5.1.0\lib\net46\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="OpenMcdf, Version=2.4.1.0, Culture=neutral, PublicKeyToken=fdbb1629d7c00800, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\OpenMcdf.2.4.1\lib\net40\OpenMcdf.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="protobuf-net, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\protobuf-net.3.2.46\lib\net462\protobuf-net.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="protobuf-net.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\protobuf-net.Core.3.2.46\lib\net462\protobuf-net.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="RtfPipe, Version=2.0.7677.4303, Culture=neutral, PublicKeyToken=5f6ab4ce530296d2, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\RtfPipe.2.0.7677.4303\lib\net45\RtfPipe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.IO.Packaging, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.IO.Packaging.8.0.1\lib\net462\System.IO.Packaging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http.Formatting, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.6.0.0\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.Security" />
|
||||||
|
<Reference Include="System.Security.Cryptography.Pkcs, Version=8.0.0.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Security.Cryptography.Pkcs.8.0.1\lib\net462\System.Security.Cryptography.Pkcs.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Text.Json, Version=8.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Text.Json.8.0.6\lib\net462\System.Text.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
|
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="WindowsBase" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -53,5 +212,12 @@
|
|||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
<Import Project="..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets')" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.targets'))" />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -4,8 +4,8 @@
|
|||||||
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
|
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
|
||||||
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
|
||||||
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net461" />
|
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net461" />
|
||||||
<package id="GdPicture" version="14.3.14" targetFramework="net48" />
|
<package id="GdPicture" version="14.3.19" targetFramework="net462" />
|
||||||
<package id="GdPicture.runtimes.windows" version="14.3.14" targetFramework="net48" />
|
<package id="GdPicture.runtimes.windows" version="14.3.19" targetFramework="net462" />
|
||||||
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
|
<package id="Microsoft.AspNet.WebApi.Client" version="6.0.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
|
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net462" />
|
||||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
|
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
|
||||||
@@ -18,17 +18,14 @@
|
|||||||
<package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" />
|
<package id="protobuf-net.Core" version="3.2.46" targetFramework="net462" />
|
||||||
<package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" />
|
<package id="RtfPipe" version="2.0.7677.4303" targetFramework="net462" />
|
||||||
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
|
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
|
||||||
<package id="System.CodeDom" version="8.0.0" targetFramework="net462" />
|
|
||||||
<package id="System.Collections.Immutable" version="8.0.0" targetFramework="net462" />
|
<package id="System.Collections.Immutable" version="8.0.0" targetFramework="net462" />
|
||||||
<package id="System.Data.SqlClient" version="4.8.6" targetFramework="net462" />
|
|
||||||
<package id="System.IO.Packaging" version="8.0.1" targetFramework="net462" />
|
<package id="System.IO.Packaging" version="8.0.1" targetFramework="net462" />
|
||||||
<package id="System.Management" version="8.0.0" targetFramework="net462" />
|
|
||||||
<package id="System.Memory" version="4.6.0" targetFramework="net462" />
|
<package id="System.Memory" version="4.6.0" targetFramework="net462" />
|
||||||
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
|
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
|
||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
|
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
|
||||||
<package id="System.Security.Cryptography.Pkcs" version="8.0.1" targetFramework="net462" />
|
<package id="System.Security.Cryptography.Pkcs" version="8.0.1" targetFramework="net462" />
|
||||||
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
|
<package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net462" />
|
||||||
<package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
|
<package id="System.Text.Json" version="8.0.6" targetFramework="net462" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||||
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
|
<package id="System.ValueTuple" version="4.6.1" targetFramework="net48" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -86,14 +86,7 @@ Namespace Methods.GlobalIndexer.ImportFile
|
|||||||
oAutoAttributes = oAutomaticIndexing.ApplyAutomaticeAttributes(oUserAttributes, pData.File.FileInfoRaw, User)
|
oAutoAttributes = oAutomaticIndexing.ApplyAutomaticeAttributes(oUserAttributes, pData.File.FileInfoRaw, User)
|
||||||
|
|
||||||
' Import the file
|
' Import the file
|
||||||
Dim oNewFile As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState)
|
Dim oResponse = ImportFile(pData)
|
||||||
Dim oResponse = oNewFile.Run(New NewFile.NewFileRequest With {
|
|
||||||
.File = pData.File,
|
|
||||||
.IDBDoctypeId = pData.IDBDoctypeId,
|
|
||||||
.KindType = pData.KindType,
|
|
||||||
.StoreName = pData.StoreName,
|
|
||||||
.User = User
|
|
||||||
})
|
|
||||||
|
|
||||||
If oResponse.OK Then
|
If oResponse.OK Then
|
||||||
Logger.Info("Import of file [{0}] under ObjectId [{1}] successful!", pData.File.FileName, oResponse.ObjectId)
|
Logger.Info("Import of file [{0}] under ObjectId [{1}] successful!", pData.File.FileName, oResponse.ObjectId)
|
||||||
@@ -147,7 +140,16 @@ Namespace Methods.GlobalIndexer.ImportFile
|
|||||||
Return New Globix_ImportFileResponse(ex)
|
Return New Globix_ImportFileResponse(ex)
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
Private Function ImportFile(pData As Globix_ImportFileRequest) As NewFile.NewFileResponse
|
||||||
|
Dim oNewFile As New NewFile.NewFileMethod(LogConfig, DatabaseIDB, DatabaseECM, GlobalState)
|
||||||
|
Return oNewFile.Run(New NewFile.NewFileRequest With {
|
||||||
|
.File = pData.File,
|
||||||
|
.IDBDoctypeId = pData.IDBDoctypeId,
|
||||||
|
.KindType = pData.KindType,
|
||||||
|
.StoreName = pData.StoreName,
|
||||||
|
.User = User
|
||||||
|
})
|
||||||
|
End Function
|
||||||
Private Function GetVirtualPath(pFileInfo As FileInfo, pPathConvention As String, pUser As UserState, pUserAttributes As List(Of UserAttributeValue), pAutoAttributes As List(Of UserAttributeValue))
|
Private Function GetVirtualPath(pFileInfo As FileInfo, pPathConvention As String, pUser As UserState, pUserAttributes As List(Of UserAttributeValue), pAutoAttributes As List(Of UserAttributeValue))
|
||||||
Logger.Info("Generating virtual path for file [{0}]", pFileInfo.Name)
|
Logger.Info("Generating virtual path for file [{0}]", pFileInfo.Name)
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
using System;
|
using DigitalData.Modules.Interfaces;
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using DigitalData.Modules.Interfaces;
|
|
||||||
using static DigitalData.Modules.Interfaces.Exceptions;
|
|
||||||
using static DigitalData.Modules.Interfaces.ZUGFeRDInterface;
|
|
||||||
using static DigitalData.Modules.Interfaces.PropertyValues;
|
|
||||||
using System.Data.SqlClient;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using System.Xml.Linq;
|
using System;
|
||||||
using Newtonsoft.Json.Linq;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
using static DigitalData.Modules.Interfaces.Exceptions;
|
||||||
|
using static DigitalData.Modules.Interfaces.PropertyValues;
|
||||||
|
using static DigitalData.Modules.Interfaces.ZUGFeRDInterface;
|
||||||
|
|
||||||
namespace ZUGFeRDRESTService.Controllers
|
namespace ZUGFeRDRESTService.Controllers
|
||||||
{
|
{
|
||||||
@@ -26,6 +26,29 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
public const string ADDED_WHO = "ZUGFeRD REST Service";
|
public const string ADDED_WHO = "ZUGFeRD REST Service";
|
||||||
public const string MESSAGEID_DOMAIN = "test.wisag.de";
|
public const string MESSAGEID_DOMAIN = "test.wisag.de";
|
||||||
|
|
||||||
|
public const string VALIDATION_SUCCESS = "VALIDATION SUCCESS";
|
||||||
|
public const string REFERENCES_Rejection_30001 = "REFERENCES_Rejection_30001";
|
||||||
|
public const string REFERENCES_Rejection_30002 = "REFERENCES_Rejection_30002";
|
||||||
|
public const string REFERENCES_Rejection_30003_1 = "REFERENCES_Rejection_30003_1";
|
||||||
|
public const string REFERENCES_Rejection_30003_2 = "REFERENCES_Rejection_30003_2";
|
||||||
|
public const string REFERENCES_Rejection_30003_3 = "REFERENCES_Rejection_30003_3";
|
||||||
|
public const string REFERENCES_Rejection_30004_1 = "REFERENCES_Rejection_30004_1";
|
||||||
|
public const string REFERENCES_Rejection_30004_2 = "REFERENCES_Rejection_30004_2";
|
||||||
|
public const string REFERENCES_Rejection_30004_3 = "REFERENCES_Rejection_30004_3";
|
||||||
|
public const string REFERENCES_Rejection_30005_1 = "REFERENCES_Rejection_30005_1";
|
||||||
|
public const string REFERENCES_Rejection_30005_2 = "REFERENCES_Rejection_30005_2";
|
||||||
|
public const string REFERENCES_Rejection_30006 = "REFERENCES_Rejection_30006";
|
||||||
|
public const string REFERENCES_Rejection_30007 = "REFERENCES_Rejection_30007";
|
||||||
|
public const string REFERENCES_Rejection_30007_1 = "REFERENCES_Rejection_30007_1";
|
||||||
|
public const string REFERENCES_Rejection_30008 = "REFERENCES_Rejection_30008";
|
||||||
|
public const string REFERENCES_Rejection_30009 = "REFERENCES_Rejection_30009";
|
||||||
|
public const string REFERENCES_Rejection_30010 = "REFERENCES_Rejection_30010";
|
||||||
|
public const string REFERENCES_Rejection_30011 = "REFERENCES_Rejection_30011";
|
||||||
|
public const string REFERENCES_Rejection_30012 = "REFERENCES_Rejection_30012";
|
||||||
|
public const string AMOUNT_CALC_REJECTION = "AMOUNT_CALC_REJECTION";
|
||||||
|
|
||||||
|
private List<string> _ValidationErrors;
|
||||||
|
|
||||||
private const int MAX_FILE_SIZE_DEFAULT = 25;
|
private const int MAX_FILE_SIZE_DEFAULT = 25;
|
||||||
|
|
||||||
private readonly ZUGFeRDInterface _zugferd;
|
private readonly ZUGFeRDInterface _zugferd;
|
||||||
@@ -83,6 +106,28 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
|
|
||||||
_RecjectionMessageList = database.GetRejectionMessageList();
|
_RecjectionMessageList = database.GetRejectionMessageList();
|
||||||
|
|
||||||
|
_ValidationErrors = new List<String>() {
|
||||||
|
REFERENCES_Rejection_30001,
|
||||||
|
REFERENCES_Rejection_30002,
|
||||||
|
REFERENCES_Rejection_30003_1,
|
||||||
|
REFERENCES_Rejection_30003_2,
|
||||||
|
REFERENCES_Rejection_30003_3,
|
||||||
|
REFERENCES_Rejection_30004_1,
|
||||||
|
REFERENCES_Rejection_30004_2,
|
||||||
|
REFERENCES_Rejection_30004_3,
|
||||||
|
REFERENCES_Rejection_30005_1,
|
||||||
|
REFERENCES_Rejection_30005_2,
|
||||||
|
REFERENCES_Rejection_30006,
|
||||||
|
REFERENCES_Rejection_30007,
|
||||||
|
REFERENCES_Rejection_30007_1,
|
||||||
|
REFERENCES_Rejection_30008,
|
||||||
|
REFERENCES_Rejection_30009,
|
||||||
|
REFERENCES_Rejection_30010,
|
||||||
|
REFERENCES_Rejection_30011,
|
||||||
|
REFERENCES_Rejection_30012,
|
||||||
|
AMOUNT_CALC_REJECTION
|
||||||
|
};
|
||||||
|
|
||||||
_logger.Debug("Validation Controller initialized!");
|
_logger.Debug("Validation Controller initialized!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +210,6 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
|
|
||||||
if (oFileSizeIsOK == false)
|
if (oFileSizeIsOK == false)
|
||||||
{
|
{
|
||||||
//throw new ZUGFeRDExecption(ErrorType.FileTooBig, "FileTooBig");
|
|
||||||
throw new ZUGFeRDExecption(ErrorCodes.FileSizeLimitReachedException, _MaxFileSizeInMegabytes.ToString(), string.Empty, "FileTooBig");
|
throw new ZUGFeRDExecption(ErrorCodes.FileSizeLimitReachedException, _MaxFileSizeInMegabytes.ToString(), string.Empty, "FileTooBig");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,6 +218,7 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
if (file.FileName.EndsWith(".pdf", StringComparison.OrdinalIgnoreCase))
|
if (file.FileName.EndsWith(".pdf", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
oZugferdResult = _zugferd.ExtractZUGFeRDFileWithGDPicture(oStream);
|
oZugferdResult = _zugferd.ExtractZUGFeRDFileWithGDPicture(oStream);
|
||||||
|
oZugferdResult.ReceiptFileType = "PDF";
|
||||||
}
|
}
|
||||||
else if (file.FileName.EndsWith(".xml", StringComparison.OrdinalIgnoreCase))
|
else if (file.FileName.EndsWith(".xml", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
@@ -185,6 +230,7 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
};
|
};
|
||||||
|
|
||||||
oZugferdResult = _zugferd.SerializeZUGFeRDDocument(oResult);
|
oZugferdResult = _zugferd.SerializeZUGFeRDDocument(oResult);
|
||||||
|
oZugferdResult.ReceiptFileType = "XML";
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Info("Detected Specification was: [{0}]", oZugferdResult.Specification);
|
_logger.Info("Detected Specification was: [{0}]", oZugferdResult.Specification);
|
||||||
@@ -194,7 +240,6 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
if (oFilteredPropertyMap.Count == 0)
|
if (oFilteredPropertyMap.Count == 0)
|
||||||
{
|
{
|
||||||
_logger.Warn("No properties found in property map for specification [{0}]", oZugferdResult.Specification);
|
_logger.Warn("No properties found in property map for specification [{0}]", oZugferdResult.Specification);
|
||||||
//throw new ZUGFeRDExecption(ErrorType.UnsupportedFormat, "Unsupported Format");
|
|
||||||
throw new ZUGFeRDExecption(ErrorCodes.UnsupportedFerdException, "Unsupported Format");
|
throw new ZUGFeRDExecption(ErrorCodes.UnsupportedFerdException, "Unsupported Format");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -219,24 +264,21 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
|
|
||||||
if (oPropertyResult.MissingProperties.Count > 0)
|
if (oPropertyResult.MissingProperties.Count > 0)
|
||||||
{
|
{
|
||||||
//throw new ZUGFeRDExecption(ErrorType.MissingProperties, "Missing Properties");
|
|
||||||
throw new ZUGFeRDExecption(ErrorCodes.MissingValueException, "Missing Properties");
|
throw new ZUGFeRDExecption(ErrorCodes.MissingValueException, "Missing Properties");
|
||||||
}
|
}
|
||||||
|
|
||||||
Tuple<bool, string> oValidateResult = ValidateBuyerOrderReference(oPropertyResult.ValidProperties);
|
Tuple<bool, string> oValidateResult = ValidateBuyerOrderReference(oPropertyResult.ValidProperties, oZugferdResult);
|
||||||
|
|
||||||
if (oValidateResult.Item1 == false)
|
if (oValidateResult.Item1 == false)
|
||||||
{
|
{
|
||||||
//throw new ZUGFeRDExecption(ErrorType.UnknownError, "Unknown Error");
|
|
||||||
throw new ZUGFeRDExecption(ErrorCodes.UnhandledException, "Unknown Error");
|
throw new ZUGFeRDExecption(ErrorCodes.UnhandledException, "Unknown Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
string oValidateResultString = oValidateResult.Item2;
|
string oValidateResultString = oValidateResult.Item2;
|
||||||
|
|
||||||
if (oValidateResultString == "ALL REFERENCES CHECKED POSITIVE")
|
if (oValidateResultString.Equals(VALIDATION_SUCCESS))
|
||||||
{
|
{
|
||||||
string oMessage = "Die hochgeladene Datei ist eine gültige-ZUGFeRD Rechnung";
|
string oMessage = "Die hochgeladene Datei ist eine gültige-ZUGFeRD Rechnung";
|
||||||
|
|
||||||
_logger.Info($"Responding with message: [{oMessage}]");
|
_logger.Info($"Responding with message: [{oMessage}]");
|
||||||
|
|
||||||
return new ValidationResponse()
|
return new ValidationResponse()
|
||||||
@@ -244,10 +286,10 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
status = RESPONSE_OK,
|
status = RESPONSE_OK,
|
||||||
message = oMessage
|
message = oMessage
|
||||||
};
|
};
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
string oMessage = oValidateResultString;
|
string oMessage = oValidateResultString;
|
||||||
|
|
||||||
_logger.Info($"Responding with message: [{oMessage}]");
|
_logger.Info($"Responding with message: [{oMessage}]");
|
||||||
|
|
||||||
return new ValidationResponse()
|
return new ValidationResponse()
|
||||||
@@ -256,7 +298,8 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
message = oMessage
|
message = oMessage
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (ZUGFeRDExecption ex)
|
catch (ZUGFeRDExecption ex)
|
||||||
{
|
{
|
||||||
@@ -315,6 +358,8 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
}
|
}
|
||||||
catch (ValidationException ex)
|
catch (ValidationException ex)
|
||||||
{
|
{
|
||||||
|
_logger.Error(ex);
|
||||||
|
|
||||||
var rejectionCodeNumber = this.GetRejectionCodeNumber(ex.ErrorCode);
|
var rejectionCodeNumber = this.GetRejectionCodeNumber(ex.ErrorCode);
|
||||||
|
|
||||||
// Der gesamte Ausgabetext muss anhand des ErrorCodes ermittelt werden
|
// Der gesamte Ausgabetext muss anhand des ErrorCodes ermittelt werden
|
||||||
@@ -348,20 +393,20 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tuple<bool, string> ValidateBuyerOrderReference(List<ValidProperty> pProperties)
|
/// <summary>
|
||||||
|
/// Hier wird eine externe Prozedur gerufen, PRCUST_INV_CHECK_FROM_PORTAL,
|
||||||
|
/// die das Ergebnis der Referenzpruefung liefert.
|
||||||
|
/// </summary>
|
||||||
|
private Tuple<bool, string> ValidateBuyerOrderReference(List<ValidProperty> pProperties, ZugferdResult pZugferdResult)
|
||||||
{
|
{
|
||||||
var oMessageId = GetMessageId();
|
var oMessageId = GetMessageId();
|
||||||
_logger.Debug("Created new MessageId: [{0}]", oMessageId);
|
_logger.Debug("Created new MessageId: [{0}]", oMessageId);
|
||||||
|
|
||||||
_logger.Debug("Inserting properties into database.");
|
_logger.Debug("Inserting properties into database.");
|
||||||
foreach (var oItem in pProperties)
|
if (!BulkInsertDataToDatabase(oMessageId, pProperties, pZugferdResult))
|
||||||
{
|
{
|
||||||
var oResult = InsertPropertyMap(oItem, oMessageId);
|
_logger.Warn("Error while Inserting properties into database!");
|
||||||
|
return new Tuple<bool, string>(false, string.Empty);
|
||||||
if (oResult == false)
|
|
||||||
{
|
|
||||||
_logger.Warn("Error while inserting the Property [{0}] into the Database!", oItem.Description);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Debug("Calling validation prodecure.");
|
_logger.Debug("Calling validation prodecure.");
|
||||||
@@ -377,6 +422,64 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
if (_database.MSSQL.ExecuteNonQuery(oCommand))
|
if (_database.MSSQL.ExecuteNonQuery(oCommand))
|
||||||
{
|
{
|
||||||
string oReturnValue = (string)oCommand.Parameters["@MSG_OUTPUT"].Value;
|
string oReturnValue = (string)oCommand.Parameters["@MSG_OUTPUT"].Value;
|
||||||
|
|
||||||
|
_logger.Debug("Validation Result message from DB: " + oReturnValue);
|
||||||
|
|
||||||
|
if (oReturnValue.Equals("ALL REFERENCES CHECKED POSITIVE", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
_logger.Debug("Validation Success");
|
||||||
|
oReturnValue = VALIDATION_SUCCESS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Gehe durch die möglichen Fehler, und ermittle Rückmeldung
|
||||||
|
foreach (var oRejectionItem in _ValidationErrors)
|
||||||
|
{
|
||||||
|
if (oReturnValue.Contains(oRejectionItem, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
_logger.Debug("oRejectionItem match: " + oRejectionItem);
|
||||||
|
|
||||||
|
var oDbMessage = this.GetRejectionMessage(oRejectionItem);
|
||||||
|
|
||||||
|
//Jetzt müssen ggf Platzhalter ersetzt werden.
|
||||||
|
if (oRejectionItem == REFERENCES_Rejection_30003_2)
|
||||||
|
{
|
||||||
|
string oReplaceParam1 = GetReplaceText1_30003_2(pProperties);
|
||||||
|
string oReplaceParam2 = GetReplaceText2_30003_2(pProperties);
|
||||||
|
|
||||||
|
oReturnValue = oDbMessage.Replace("@REPLACE_PARAM1", oReplaceParam1);
|
||||||
|
oReturnValue = oReturnValue.Replace("@REPLACE_PARAM2", oReplaceParam2);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (oRejectionItem == REFERENCES_Rejection_30003_3)
|
||||||
|
{
|
||||||
|
string oReplaceParam1 = GetReplaceText1_30003_3(pProperties);
|
||||||
|
|
||||||
|
oReturnValue = oDbMessage.Replace("@REPLACE_PARAM1", oReplaceParam1);
|
||||||
|
}
|
||||||
|
else if (oRejectionItem == REFERENCES_Rejection_30001)
|
||||||
|
{
|
||||||
|
// TODO - BUKR?
|
||||||
|
oReturnValue = oDbMessage.Replace("@REPLACE_PARAM1", "9999");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
oReturnValue = oDbMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Der REJECTION-Code wird in alle Meldungen eingefügt.
|
||||||
|
if (!string.IsNullOrEmpty(oRejectionItem) && oReturnValue.Contains("@REJECTION_CODE", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
var rejectionCodeNumber = GetRejectionCodeNumber(oRejectionItem);
|
||||||
|
oReturnValue = Regex.Replace(oReturnValue, "@REJECTION_CODE", "Ablehnungscode: " + rejectionCodeNumber, RegexOptions.IgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_logger.Debug("Validation terminal Result message: " + oReturnValue);
|
||||||
return new Tuple<bool, string>(true, oReturnValue);
|
return new Tuple<bool, string>(true, oReturnValue);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -393,65 +496,327 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetReplaceText1_30003_3(List<ValidProperty> pProperties)
|
||||||
|
{
|
||||||
|
string oReplaceParam1 = string.Empty;
|
||||||
|
|
||||||
|
// BuyerOrderReferencedDocument
|
||||||
|
var itemBT13 = pProperties.Where(i => i.TableColumn == "INVOICE_REFERENCE").FirstOrDefault();
|
||||||
|
string valueBt13 = "-";
|
||||||
|
if (itemBT13 != null)
|
||||||
|
{
|
||||||
|
valueBt13 = string.IsNullOrEmpty(itemBT13.Value) ? "-" : itemBT13.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam1 += "<li>[BuyerOrderReferencedDocument] (BT-13) = [" + valueBt13 + "]</li>";
|
||||||
|
|
||||||
|
|
||||||
|
// BuyerReference
|
||||||
|
var itemBT10 = pProperties.Where(i => i.TableColumn == "INVOICE_REFERENCE3").FirstOrDefault();
|
||||||
|
string valueBt10 = "-";
|
||||||
|
if (itemBT10 != null)
|
||||||
|
{
|
||||||
|
valueBt10 = string.IsNullOrEmpty(itemBT10.Value) ? "-" : itemBT10.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam1 += "<li>[BuyerReference] (BT-10) = [" + valueBt10 + "]</li>";
|
||||||
|
|
||||||
|
|
||||||
|
// CostCenter
|
||||||
|
var itemBT19 = pProperties.Where(i => i.TableColumn == "INVOICE_COST_CENTER").FirstOrDefault();
|
||||||
|
string valueBt19 = "-";
|
||||||
|
if (itemBT19 != null)
|
||||||
|
{
|
||||||
|
valueBt19 = string.IsNullOrEmpty(itemBT19.Value) ? "-" : itemBT19.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam1 += "<li>[CostCenter] (BT-19) = [" + valueBt19 + "]</li>";
|
||||||
|
|
||||||
|
// BuyerID
|
||||||
|
var itemBT46 = pProperties.Where(i => i.TableColumn == "INVOICE_BUYER_ID").FirstOrDefault();
|
||||||
|
string valueBt46 = "-";
|
||||||
|
if (itemBT46 != null)
|
||||||
|
{
|
||||||
|
valueBt46 = string.IsNullOrEmpty(itemBT46.Value) ? "-" : itemBT46.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam1 += "<li>[BuyerTradeParty] (BT-46) = [" + valueBt46 + "]</li>";
|
||||||
|
|
||||||
|
oReplaceParam1 = "<ul>" + oReplaceParam1 + "</ul>";
|
||||||
|
_logger.Debug("oReplaceParam1-Text: " + oReplaceParam1);
|
||||||
|
|
||||||
|
return oReplaceParam1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetReplaceText2_30003_2(List<ValidProperty> pProperties)
|
||||||
|
{
|
||||||
|
string oReplaceParam2 = string.Empty;
|
||||||
|
|
||||||
|
// BuyerTradeParty.Name
|
||||||
|
var itemBT44 = pProperties.Where(i => i.TableColumn == "INVOICE_BUYER_NAME").FirstOrDefault();
|
||||||
|
string valueBt44 = "-";
|
||||||
|
if (itemBT44 != null)
|
||||||
|
{
|
||||||
|
valueBt44 = string.IsNullOrEmpty(itemBT44.Value) ? "-" : itemBT44.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam2 += "<li>[BuyerTradeParty.Name] (BT-44) = [" + valueBt44 + "]</li>";
|
||||||
|
|
||||||
|
// BuyerTradeParty.PostalTradeAddress.LineTwo
|
||||||
|
var itemBT51 = pProperties.Where(i => i.TableColumn == "INVOICE_BUYER_ADRESS2").FirstOrDefault();
|
||||||
|
string valueBt51 = "-";
|
||||||
|
if (itemBT51 != null)
|
||||||
|
{
|
||||||
|
valueBt51 = string.IsNullOrEmpty(itemBT51.Value) ? "-" : itemBT51.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam2 += "<li>[BuyerTradeParty.PostalTradeAddress.LineTwo] (BT-51) = [" + valueBt51 + "]</li>";
|
||||||
|
|
||||||
|
oReplaceParam2 = "<ul>" + oReplaceParam2 + "</ul>";
|
||||||
|
_logger.Debug("oReplaceParam2-Text: " + oReplaceParam2);
|
||||||
|
|
||||||
|
return oReplaceParam2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetReplaceText1_30003_2(List<ValidProperty> pProperties)
|
||||||
|
{
|
||||||
|
string oReplaceParam1 = string.Empty;
|
||||||
|
|
||||||
|
// BuyerOrderReferencedDocument
|
||||||
|
var itemBT13 = pProperties.Where(i => i.TableColumn == "INVOICE_REFERENCE").FirstOrDefault();
|
||||||
|
string valueBt13 = "-";
|
||||||
|
if (itemBT13 != null)
|
||||||
|
{
|
||||||
|
valueBt13 = string.IsNullOrEmpty(itemBT13.Value) ? "-" : itemBT13.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam1 += "<li>[BuyerOrderReferencedDocument] (BT-13) = [" + valueBt13 + "]</li>";
|
||||||
|
|
||||||
|
|
||||||
|
// BuyerReference
|
||||||
|
var itemBT10 = pProperties.Where(i => i.TableColumn == "INVOICE_REFERENCE3").FirstOrDefault();
|
||||||
|
string valueBt10 = "-";
|
||||||
|
if (itemBT10 != null)
|
||||||
|
{
|
||||||
|
valueBt10 = string.IsNullOrEmpty(itemBT10.Value) ? "-" : itemBT10.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam1 += "<li>[BuyerReference] (BT-10) = [" + valueBt10 + "]</li>";
|
||||||
|
|
||||||
|
|
||||||
|
// CostCenter
|
||||||
|
var itemBT19 = pProperties.Where(i => i.TableColumn == "INVOICE_COST_CENTER").FirstOrDefault();
|
||||||
|
string valueBt19 = "-";
|
||||||
|
if (itemBT19 != null)
|
||||||
|
{
|
||||||
|
valueBt19 = string.IsNullOrEmpty(itemBT19.Value) ? "-" : itemBT19.Value;
|
||||||
|
}
|
||||||
|
oReplaceParam1 += "<li>[CostCenter] (BT-19) = [" + valueBt19 + "]</li>";
|
||||||
|
|
||||||
|
oReplaceParam1 = "<ul>" + oReplaceParam1 + "</ul>";
|
||||||
|
_logger.Debug("oReplaceParam1-Text: " + oReplaceParam1);
|
||||||
|
|
||||||
|
return oReplaceParam1;
|
||||||
|
}
|
||||||
|
|
||||||
public string GetMessageId()
|
public string GetMessageId()
|
||||||
{
|
{
|
||||||
return $"{Guid.NewGuid()}@{MESSAGEID_DOMAIN}";
|
return $"{Guid.NewGuid()}@{MESSAGEID_DOMAIN}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool InsertPropertyMap(ValidProperty pProperty, string pMessageId)
|
private bool BulkInsertDataToDatabase(string pMessageId, List<ValidProperty> pProperties, ZugferdResult pZugferdResult)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(pMessageId))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!DeleteExistingPropertyValues(pMessageId))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
DataTable oDataTable = PrepareDataTable(pMessageId, pProperties, pZugferdResult);
|
||||||
|
|
||||||
|
// ColumnList initialisieren
|
||||||
|
List<string> oColumnNames = new List<string> {
|
||||||
|
"REFERENCE_GUID",
|
||||||
|
"ITEM_DESCRIPTION",
|
||||||
|
"ITEM_VALUE",
|
||||||
|
"GROUP_COUNTER",
|
||||||
|
"SPEC_NAME",
|
||||||
|
"IS_REQUIRED"
|
||||||
|
};
|
||||||
|
|
||||||
|
bool oBulkResult = BulkInsert(oDataTable, "TBEDMI_ITEM_VALUE", oColumnNames);
|
||||||
|
|
||||||
|
if (!oBulkResult)
|
||||||
|
{
|
||||||
|
_logger.Error("Bulk Insert for MessageId [{0}] failed!", pMessageId);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_logger.Info("Bulk Insert finished. [{0}] rows inserted for MessageId [{1}].", oDataTable.Rows.Count, pMessageId);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool BulkInsert(DataTable pDataTable, string pDestinationTable, List<string> pColumnNames)
|
||||||
|
{
|
||||||
|
using (var oSqlBulkCopy = new SqlBulkCopy(_database.MSSQL.GetConnection()))
|
||||||
|
{
|
||||||
|
oSqlBulkCopy.DestinationTableName = pDestinationTable;
|
||||||
|
foreach (var columnItem in pColumnNames)
|
||||||
|
{
|
||||||
|
oSqlBulkCopy.ColumnMappings.Add(new SqlBulkCopyColumnMapping(columnItem, columnItem));
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
oSqlBulkCopy.WriteToServer(pDataTable);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.Error(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataTable PrepareDataTable(string pMessageId, List<ValidProperty> pProperties, ZugferdResult pDocument)
|
||||||
|
{
|
||||||
|
DataTable oDataTable = new DataTable();
|
||||||
|
oDataTable.Columns.Add(new DataColumn("REFERENCE_GUID", typeof(string)));
|
||||||
|
oDataTable.Columns.Add(new DataColumn("ITEM_DESCRIPTION", typeof(string)));
|
||||||
|
oDataTable.Columns.Add(new DataColumn("ITEM_VALUE", typeof(string)));
|
||||||
|
oDataTable.Columns.Add(new DataColumn("GROUP_COUNTER", typeof(Int32)));
|
||||||
|
oDataTable.Columns.Add(new DataColumn("SPEC_NAME", typeof(string)));
|
||||||
|
oDataTable.Columns.Add(new DataColumn("IS_REQUIRED", typeof(bool)));
|
||||||
|
|
||||||
|
// Erste Zeile enthält die Spezifikation
|
||||||
|
DataRow oFirstRow = oDataTable.NewRow();
|
||||||
|
oFirstRow["REFERENCE_GUID"] = pMessageId;
|
||||||
|
oFirstRow["ITEM_DESCRIPTION"] = "Verwendete Spezifikation der E-Rechnung";
|
||||||
|
oFirstRow["ITEM_VALUE"] = pDocument.Specification;
|
||||||
|
oFirstRow["GROUP_COUNTER"] = 0;
|
||||||
|
oFirstRow["SPEC_NAME"] = "ZUGFERD_SPECIFICATION";
|
||||||
|
oFirstRow["IS_REQUIRED"] = false;
|
||||||
|
|
||||||
|
_logger.Debug("Mapping Property [ZUGFERD_SPECIFICATION] with value [{0}]", pDocument.Specification);
|
||||||
|
oDataTable.Rows.Add(oFirstRow);
|
||||||
|
|
||||||
|
//' Zweite Zeile enthält das verwendete XML Schema
|
||||||
|
DataRow oSecondRow = oDataTable.NewRow();
|
||||||
|
oSecondRow["REFERENCE_GUID"] = pMessageId;
|
||||||
|
oSecondRow["ITEM_DESCRIPTION"] = "Verwendetes XML-Schema (XSD) der E-Rechnung";
|
||||||
|
oSecondRow["ITEM_VALUE"] = pDocument.UsedXMLSchema;
|
||||||
|
oSecondRow["GROUP_COUNTER"] = 0;
|
||||||
|
oSecondRow["SPEC_NAME"] = "ZUGFERD_XML_SCHEMA";
|
||||||
|
oSecondRow["IS_REQUIRED"] = false;
|
||||||
|
|
||||||
|
_logger.Debug("Mapping Property [ZUGFERD_XML_SCHEMA] with value [{0}]", pDocument.UsedXMLSchema);
|
||||||
|
oDataTable.Rows.Add(oSecondRow);
|
||||||
|
|
||||||
|
//' Dritte Zeile enthält das verwendete Datei-Format des Belegs (PDF/XML)
|
||||||
|
if (pDocument.ReceiptFileType != null)
|
||||||
|
{
|
||||||
|
DataRow oThirdRow = oDataTable.NewRow();
|
||||||
|
oThirdRow["REFERENCE_GUID"] = pMessageId;
|
||||||
|
oThirdRow["ITEM_DESCRIPTION"] = "Dateityp der E-Rechnung";
|
||||||
|
oThirdRow["ITEM_VALUE"] = pDocument.ReceiptFileType;
|
||||||
|
oThirdRow["GROUP_COUNTER"] = 0;
|
||||||
|
oThirdRow["SPEC_NAME"] = "RECEIPT_FILE_TYPE";
|
||||||
|
oThirdRow["IS_REQUIRED"] = false;
|
||||||
|
|
||||||
|
_logger.Debug("Mapping Property [RECEIPT_FILE_TYPE] with value [{0}]", pDocument.ReceiptFileType);
|
||||||
|
oDataTable.Rows.Add(oThirdRow);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var propertyItem in pProperties)
|
||||||
|
{
|
||||||
|
|
||||||
|
// ItemType = 3 => eingebettete Datei, nicht den base64 speichern
|
||||||
|
if (propertyItem.ItemType == 3)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ItemType = 0 (normale texte) dürfen nicht leer sein - leere Werte werden überlesen
|
||||||
|
if (propertyItem.ItemType == 0 && string.IsNullOrEmpty(propertyItem.Value))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If GroupCounter is -1, it means this is a default property that can only occur once.
|
||||||
|
// Set the actual inserted value to 0
|
||||||
|
var oGroupCounterValue = propertyItem.GroupCounter < 0 ? 0 : propertyItem.GroupCounter;
|
||||||
|
|
||||||
|
if (propertyItem.Value.Length > 4000)
|
||||||
|
{
|
||||||
|
_logger.Warn("Value for field [{0}] is longer than 4000 characters, will be truncated!", propertyItem.TableColumn);
|
||||||
|
propertyItem.Value = propertyItem.Value.Substring(0, 4000);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Description mit BT-Feld aufbereiten
|
||||||
|
var betterDescription = propertyItem.Description;
|
||||||
|
if (!string.IsNullOrEmpty(propertyItem.EN16931_ID))
|
||||||
|
{
|
||||||
|
betterDescription = propertyItem.EN16931_ID + " (" + propertyItem.Description + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
DataRow newRow = oDataTable.NewRow();
|
||||||
|
newRow["REFERENCE_GUID"] = pMessageId;
|
||||||
|
newRow["ITEM_DESCRIPTION"] = betterDescription;
|
||||||
|
newRow["ITEM_VALUE"] = propertyItem.Value;
|
||||||
|
newRow["GROUP_COUNTER"] = oGroupCounterValue;
|
||||||
|
newRow["SPEC_NAME"] = propertyItem.TableColumn;
|
||||||
|
newRow["IS_REQUIRED"] = propertyItem.IsRequired;
|
||||||
|
|
||||||
|
_logger.Debug("Mapping Property [{0}] with value [{1}]", propertyItem.TableColumn, propertyItem.Value);
|
||||||
|
oDataTable.Rows.Add(newRow);
|
||||||
|
}
|
||||||
|
|
||||||
|
return oDataTable;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool DeleteExistingPropertyValues(string pMessageId)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (pProperty.ItemType == 3)
|
var delItemValueSQL = "DELETE FROM TBEDMI_ITEM_VALUE WHERE REFERENCE_GUID = '" + pMessageId + "';";
|
||||||
|
var oCommand = new SqlCommand(delItemValueSQL);
|
||||||
|
var retValue = _database.MSSQL.ExecuteNonQuery(oCommand);
|
||||||
|
|
||||||
|
if (!retValue)
|
||||||
{
|
{
|
||||||
// Wir speichern keine Attachment-Werte in die DB
|
_logger.Warn("DELETE FROM TBEDMI_ITEM_VALUE NOT successfull");
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pProperty.ItemType == 0 && string.IsNullOrEmpty(pProperty.Value.ToString()))
|
_logger.Debug("DELETE FROM TBEDMI_ITEM_VALUE successfull");
|
||||||
{
|
|
||||||
// Leere Texte speichern wir nicht in der DB
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var oSql = $"INSERT INTO {pProperty.TableName} " +
|
|
||||||
"(REFERENCE_GUID, ITEM_DESCRIPTION, ITEM_VALUE, CREATEDWHO, SPEC_NAME, GROUP_COUNTER, IS_REQUIRED) VALUES " +
|
|
||||||
"(@REFERENCE_GUID, @ITEM_DESCRIPTION, @ITEM_VALUE, @CREATEDWHO, @SPEC_NAME, @GROUP_COUNTER, @IS_REQUIRED)";
|
|
||||||
|
|
||||||
string itemValue = string.Empty;
|
|
||||||
if (pProperty.Value.Length > 4000)
|
|
||||||
{
|
|
||||||
itemValue = pProperty.Value.Substring(1, 4000);
|
|
||||||
_logger.Warn("Value for field [{0}] is longer than 4000 characters, will be truncated!", pProperty.TableColumn);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
itemValue = pProperty.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
var oParams = new SqlParameter[]
|
|
||||||
{
|
|
||||||
new SqlParameter("@REFERENCE_GUID", pMessageId),
|
|
||||||
new SqlParameter("@ITEM_DESCRIPTION", pProperty.Description),
|
|
||||||
new SqlParameter("@ITEM_VALUE", itemValue.Replace("'", "''")),
|
|
||||||
new SqlParameter("@CREATEDWHO", ADDED_WHO),
|
|
||||||
new SqlParameter("@GROUP_COUNTER", pProperty.GroupCounter),
|
|
||||||
new SqlParameter("@SPEC_NAME", pProperty.TableColumn),
|
|
||||||
new SqlParameter("@IS_REQUIRED", pProperty.IsRequired)
|
|
||||||
};
|
|
||||||
|
|
||||||
var oCommand = new SqlCommand(oSql);
|
|
||||||
oCommand.Parameters.AddRange(oParams);
|
|
||||||
|
|
||||||
return _database.MSSQL.ExecuteNonQuery(oCommand);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.Error(ex);
|
_logger.Error(ex);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var delItemFilesSQL = "DELETE FROM TBEDMI_ITEM_FILES WHERE REFERENCE_GUID = '" + pMessageId + "';";
|
||||||
|
var oCommand = new SqlCommand(delItemFilesSQL);
|
||||||
|
var retValue = _database.MSSQL.ExecuteNonQuery(oCommand);
|
||||||
|
|
||||||
|
if (!retValue)
|
||||||
|
{
|
||||||
|
_logger.Warn("DELETE FROM TBEDMI_ITEM_FILES NOT successfull");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
_logger.Debug("DELETE FROM TBEDMI_ITEM_FILES successfull");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.Error(ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Ermittelt die Ausgabe-nachricht für einen Fehlercode
|
/// Ermittelt die Ausgabe-nachricht für einen Fehlercode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -463,9 +828,27 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
|
|
||||||
// Sprache wird man vielleicht mal auswählen können
|
// Sprache wird man vielleicht mal auswählen können
|
||||||
var language = "de-DE";
|
var language = "de-DE";
|
||||||
var searchTitle = "ZUGFERD_Rejection_" + pErrorCode + "_Web";
|
var searchTitle = string.Empty;
|
||||||
|
|
||||||
var messageItem = _RecjectionMessageList.Where(i => i.Title.Equals(searchTitle, StringComparison.OrdinalIgnoreCase) && i.Language == language).FirstOrDefault();
|
if (pErrorCode.Contains("2000"))
|
||||||
|
{
|
||||||
|
searchTitle = "ZUGFERD_Rejection_" + pErrorCode + "_Web";
|
||||||
|
}
|
||||||
|
else if (pErrorCode.Contains("REFERENCES_Rejection_3000"))
|
||||||
|
{
|
||||||
|
searchTitle = pErrorCode + "_Web";
|
||||||
|
}
|
||||||
|
else if (pErrorCode.Contains("AMOUNT_CALC"))
|
||||||
|
{
|
||||||
|
searchTitle = "AMOUNT_CALC_REJECTION_Web";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// else-Fall muss noch geklärt werden.
|
||||||
|
searchTitle = "AMOUNT_CALC_REJECTION_Web";
|
||||||
|
}
|
||||||
|
|
||||||
|
var messageItem = _RecjectionMessageList.Where(i => i.Title.Equals(searchTitle, StringComparison.OrdinalIgnoreCase) && i.Language.Equals(language, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
||||||
if (messageItem != null)
|
if (messageItem != null)
|
||||||
{
|
{
|
||||||
_logger.Info("GetRejectionMessage() - messageItem: '" + messageItem.String1 + "'");
|
_logger.Info("GetRejectionMessage() - messageItem: '" + messageItem.String1 + "'");
|
||||||
@@ -508,5 +891,16 @@ namespace ZUGFeRDRESTService.Controllers
|
|||||||
return "20010";
|
return "20010";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetRejectionCodeNumber(string rejectionCode)
|
||||||
|
{
|
||||||
|
if (rejectionCode.StartsWith("REFERENCES_Rejection_"))
|
||||||
|
{
|
||||||
|
var retValue = rejectionCode.Replace("REFERENCES_Rejection_", "");
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rejectionCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"Zugferd": {
|
"Zugferd": {
|
||||||
"AllowZugferd10": true,
|
"AllowZugferd10": true,
|
||||||
"AllowZugferd2x": false,
|
"AllowZugferd2x": true,
|
||||||
"AllowZugferd23x": false,
|
"AllowZugferd23x": true,
|
||||||
"AllowFacturX": false,
|
"AllowFacturX": true,
|
||||||
"AllowXRechnung": false,
|
"AllowXRechnung": true,
|
||||||
"AllowPeppolBISBill3x": false
|
"AllowPeppolBISBill3x": true
|
||||||
},
|
},
|
||||||
"GDPictureVersion": "",
|
"GDPictureVersion": "",
|
||||||
"MaxFileSizeInMegabytes": 25
|
"MaxFileSizeInMegabytes": 25
|
||||||
|
|||||||
Reference in New Issue
Block a user