17 Commits

Author SHA1 Message Date
c8499322ae Merge 2026-04-28 14:56:13 +02:00
ccd1cedd28 Gui.Common: Version 2.7.2.0 2026-04-28 14:53:24 +02:00
b081dda981 GdPicture Version 14.3.3 / Nlog 5.05 2026-04-28 14:52:21 +02:00
Developer01
935c5ad5fd Merge Commit 2026-04-21 09:28:20 +02:00
Developer01
63343178b5 Subtype Usercontrol in vbproj 2026-04-21 09:27:22 +02:00
Developer01
5b9fbabf0d Verweise Oracle 2026-04-21 09:26:46 +02:00
b4eecbdb86 ZUGFERD 20007 - BT-Felder-Liste anzeigen, mehrsprachig 2026-04-02 11:46:20 +02:00
3f58acea7a ValidationException - Auswertung der Exception-Items - mehrsprachig 2026-03-25 14:41:58 +01:00
4cfc8cd46b Texte austauschen 2026-03-25 08:47:45 +01:00
dc56d783b3 ZUGFeRD REST Service: "Ablehnungscode" mehrsprachige Ausgabe 2026-03-23 13:36:43 +01:00
25e0eddfdb ZUGFeRDRESTService: HttpPost-Parameter anders abfragen. Es ist immer nur ein Parameter möglich 2026-03-17 11:29:03 +01:00
64ae4e9c76 ZUGFeRD REST Service: LanguageID in HTTPPost-Methode 2026-03-17 10:30:08 +01:00
6936d45209 GUIs.Common: Version 2.7.1.0 2026-03-06 11:18:04 +01:00
7173c89b77 GUIs.Common: Formatierbare Datumsspalten-Funktionen ergänzt 2026-03-06 11:17:06 +01:00
538e2fcde1 ValidationController: Korrekturen 2026-02-04 15:09:46 +01:00
d1dbe8096d ValidationController: BulkInsert, XML-Schema etc für die Datenbank mitnehmen. Korrekturen 2026-02-04 14:13:11 +01:00
24dbed32cc ZUGFeRdRESTService - Validation Controller: REFERENCES_Rejection-Messages auswerten und als WebMessage ausgeben 2026-02-02 14:40:55 +01:00
13 changed files with 794 additions and 366 deletions

View File

@@ -265,9 +265,7 @@
<Compile Include="DocumentViewer.Designer.vb"> <Compile Include="DocumentViewer.Designer.vb">
<DependentUpon>DocumentViewer.vb</DependentUpon> <DependentUpon>DocumentViewer.vb</DependentUpon>
</Compile> </Compile>
<Compile Include="DocumentViewer.vb"> <Compile Include="DocumentViewer.vb" />
<SubType>UserControl</SubType>
</Compile>
<Compile Include="frmViewerSettings.Designer.vb"> <Compile Include="frmViewerSettings.Designer.vb">
<DependentUpon>frmViewerSettings.vb</DependentUpon> <DependentUpon>frmViewerSettings.vb</DependentUpon>
</Compile> </Compile>

View File

@@ -71,7 +71,10 @@
</Reference> </Reference>
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DigitalData.Controls.DocumentViewer"> <Reference Include="DigitalData.Controls.DocumentViewer">
<HintPath>..\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath> <HintPath>..\..\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Controls.LookupGrid">
<HintPath>..\Controls.LookupGrid\bin\Debug\DigitalData.Controls.LookupGrid.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Base"> <Reference Include="DigitalData.Modules.Base">
<HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath> <HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
@@ -84,7 +87,8 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath> <HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.EDMI.API"> <Reference Include="DigitalData.Modules.EDMI.API, Version=1.6.1.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\EDMIAPI\bin\Debug\DigitalData.Modules.EDMI.API.dll</HintPath> <HintPath>..\..\DDModules\EDMIAPI\bin\Debug\DigitalData.Modules.EDMI.API.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Encryption, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DigitalData.Modules.Encryption, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
@@ -132,68 +136,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.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.barcode.1d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.1d.writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.barcode.2d.writer, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.barcode.2d.writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.CAD, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.CAD, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.CAD.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.CAD.DWG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.CAD.DWG.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Common, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Common, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Common.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Document, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Document, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Document.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Document.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Email, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Email, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Email.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Email.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.HTML, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.HTML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.HTML.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.HTML.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Formats, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Formats.Conversion, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Formats.Conversion.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.Imaging.Rendering, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.Imaging.Rendering.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.MSOfficeBinary, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.MSOfficeBinary.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenDocument, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenDocument.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenXML, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.OpenXML.Templating, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.OpenXML.Templating.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.PDF, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.PDF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.PDF.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.PDF.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.RTF, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.RTF, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.RTF.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\lib\net462\GdPicture.NET.14.RTF.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14.SVG, Version=14.3.19.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14.SVG, Version=14.3.3.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.3.19\lib\net462\GdPicture.NET.14.SVG.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\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.19\lib\net462\GdPicture.NET.14.wia.gateway.dll</HintPath> <HintPath>..\packages\GdPicture.14.3.3\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,12 +213,6 @@
<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>
@@ -537,12 +535,6 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput> <LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Controls.LookupGrid\LookupControl.vbproj">
<Project>{3DCD6D1A-C830-4241-B7E4-27430E7EA483}</Project>
<Name>LookupControl</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Resources\txt.png" /> <None Include="Resources\txt.png" />
@@ -827,8 +819,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.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'))" /> <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'))" />
</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.19\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.19\build\net462\GdPicture.runtimes.windows.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')" />
</Project> </Project>

View File

@@ -82,7 +82,7 @@ Public Class GridBuilder
ToList() ToList()
For Each oDateCol In oDateColumns For Each oDateCol In oDateColumns
SetDateTimeColumn(oDateCol) SetDateTimeColumn(oDateCol, "g")
Next Next
End Sub End Sub
@@ -96,19 +96,61 @@ Public Class GridBuilder
ToList() ToList()
For Each oDateCol In oDateColumns For Each oDateCol In oDateColumns
SetDateTimeColumn(oDateCol) SetDateTimeColumn(oDateCol, "g")
Next Next
End Sub End Sub
Private Sub SetDateTimeColumn(pColumn As GridColumn) ''' <summary>
''' Applies a proper datetime format string to all columns of the view.
''' </summary>
''' <remarks>The view's columns need to be loaded for this to work!</remarks>
Public Sub SetDateTimeColumns(pView As GridView, pFormatString As String)
If pView.Columns Is Nothing Then
Exit Sub
End If
Dim oDateColumns = pView.Columns.AsEnumerable.
Where(Function(column As GridColumn) column.ColumnType = GetType(Date)).
ToList()
For Each oDateCol In oDateColumns
SetDateTimeColumn(oDateCol, pFormatString)
Next
End Sub
Public Sub SetDateTimeColumns(pTreeList As TreeList, pFormatString As String)
If pTreeList.Columns Is Nothing Then
Exit Sub
End If
Dim oDateColumns = pTreeList.Columns.AsEnumerable.
Where(Function(column As TreeListColumn) column.ColumnType = GetType(Date)).
ToList()
For Each oDateCol In oDateColumns
SetDateTimeColumn(oDateCol, pFormatString)
Next
End Sub
Private Sub SetDateTimeColumn(pColumn As GridColumn, pFormatString As String)
If String.IsNullOrEmpty(pFormatString) Then
pFormatString = "g"
End If
pColumn.DisplayFormat.FormatType = FormatType.Custom pColumn.DisplayFormat.FormatType = FormatType.Custom
pColumn.DisplayFormat.FormatString = "g" pColumn.DisplayFormat.FormatString = pFormatString
pColumn.DisplayFormat.Format = DateTimeFormatInfo.CurrentInfo pColumn.DisplayFormat.Format = DateTimeFormatInfo.CurrentInfo
End Sub End Sub
Private Sub SetDateTimeColumn(pColumn As TreeListColumn) Private Sub SetDateTimeColumn(pColumn As TreeListColumn, pFormatString As String)
If String.IsNullOrEmpty(pFormatString) Then
pFormatString = "g"
End If
pColumn.Format.FormatType = FormatType.Custom pColumn.Format.FormatType = FormatType.Custom
pColumn.Format.FormatString = "g" pColumn.Format.FormatString = pFormatString
pColumn.Format.Format = DateTimeFormatInfo.CurrentInfo pColumn.Format.Format = DateTimeFormatInfo.CurrentInfo
End Sub End Sub

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.0.0")> <Assembly: AssemblyVersion("2.7.1.0")>
<Assembly: AssemblyFileVersion("2.7.0.0")> <Assembly: AssemblyFileVersion("2.7.1.0")>

View File

@@ -119,7 +119,7 @@ Public Class NNfrmNotification_Startup
RichEditControl1.Dock = Windows.Forms.DockStyle.Fill RichEditControl1.Dock = Windows.Forms.DockStyle.Fill
Else Else
If IO.File.Exists(oMSG_STRING) Then If IO.File.Exists(oMSG_STRING) Then
DocumentViewer1.LoadFile(oMSG_STRING) DocumentViewer1.LoadFile_FromPath(oMSG_STRING)
DocumentViewer1.Visible = True DocumentViewer1.Visible = True
DocumentViewer1.Dock = Windows.Forms.DockStyle.Fill DocumentViewer1.Dock = Windows.Forms.DockStyle.Fill
Else Else

View File

@@ -112,7 +112,7 @@ Public Class frmNotification_Startup
RichEditControl1.Dock = Windows.Forms.DockStyle.Fill RichEditControl1.Dock = Windows.Forms.DockStyle.Fill
Else Else
If IO.File.Exists(oMSG_STRING) Then If IO.File.Exists(oMSG_STRING) Then
DocumentViewer1.LoadFile(oMSG_STRING) DocumentViewer1.LoadFile_FromPath(oMSG_STRING)
DocumentViewer1.Visible = True DocumentViewer1.Visible = True
DocumentViewer1.Dock = Windows.Forms.DockStyle.Fill DocumentViewer1.Dock = Windows.Forms.DockStyle.Fill
Else Else

View File

@@ -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.19" targetFramework="net462" /> <package id="GdPicture" version="14.3.3" targetFramework="net462" />
<package id="GdPicture.runtimes.windows" version="14.3.19" targetFramework="net462" /> <package id="GdPicture.runtimes.windows" version="14.3.3" 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" />

View File

@@ -43,8 +43,7 @@ Partial Class Form1
GroupBox5 = New GroupBox() GroupBox5 = New GroupBox()
btWriteBinary = New Button() btWriteBinary = New Button()
OpenFileDialog2 = New OpenFileDialog() OpenFileDialog2 = New OpenFileDialog()
Button1 = New Button()
Button2 = New Button()
GroupBox1.SuspendLayout() GroupBox1.SuspendLayout()
GroupBox2.SuspendLayout() GroupBox2.SuspendLayout()
GroupBox3.SuspendLayout() GroupBox3.SuspendLayout()
@@ -231,32 +230,14 @@ Partial Class Form1
' '
OpenFileDialog2.FileName = "OpenFileDialog2" OpenFileDialog2.FileName = "OpenFileDialog2"
OpenFileDialog2.Filter = "XML files (*.xml)|*.xml" OpenFileDialog2.Filter = "XML files (*.xml)|*.xml"
'
' Button1
'
Button1.Location = New System.Drawing.Point(361, 47)
Button1.Name = "Button1"
Button1.Size = New System.Drawing.Size(94, 29)
Button1.TabIndex = 5
Button1.Text = "Log Folder"
Button1.UseVisualStyleBackColor = True
'
' Button2
'
Button2.Location = New System.Drawing.Point(361, 82)
Button2.Name = "Button2"
Button2.Size = New System.Drawing.Size(94, 29)
Button2.TabIndex = 13
Button2.Text = "AppFolder"
Button2.UseVisualStyleBackColor = True
' '
' Form1 ' Form1
' '
AutoScaleDimensions = New System.Drawing.SizeF(8.0F, 20.0F) 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(Button1)
Controls.Add(GroupBox5) Controls.Add(GroupBox5)
Controls.Add(GroupBox4) Controls.Add(GroupBox4)
Controls.Add(GroupBox3) Controls.Add(GroupBox3)

View File

@@ -414,11 +414,11 @@ Public Class Form1
End Function End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Process.Start("explorer.exe", _logConfig.LogDirectory) ' Process.Start("explorer.exe", _logConfig.LogDirectory)
End Sub 'End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click 'Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Process.Start("explorer.exe", System.Windows.Forms.Application.UserAppDataPath()) ' Process.Start("explorer.exe", System.Windows.Forms.Application.UserAppDataPath())
End Sub 'End Sub
End Class End Class

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<RootNamespace>ZUGFeRDTest</RootNamespace> <RootNamespace>ZUGFeRDTest</RootNamespace>
<TargetFramework>net8.0-windows</TargetFramework> <TargetFramework>net462</TargetFramework>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<StartupObject>ZUGFeRDTest.My.MyApplication</StartupObject> <StartupObject>ZUGFeRDTest.My.MyApplication</StartupObject>
<MyType>WindowsForms</MyType> <MyType>WindowsForms</MyType>
@@ -17,15 +17,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="GdPicture" Version="14.3.18" /> <PackageReference Include="GdPicture" Version="14.3.3" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.1" /> <PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.1" />
<PackageReference Include="NLog" Version="6.0.4" /> <PackageReference Include="NLog" Version="5.0.5" />
<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\DigitalData.Modules.Config.dll</HintPath> <HintPath>..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference> </Reference>
@@ -41,160 +37,23 @@
<Reference Include="DigitalData.Modules.Logging"> <Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDModules\Logging\bin\Debug\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="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" />
<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.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <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.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" />
<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.Runtime.Serialization" />
<Reference Include="System.Security" /> <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.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.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.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
</ItemGroup> </ItemGroup>
@@ -212,12 +71,4 @@
<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>

View File

@@ -1,18 +1,21 @@
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 Microsoft.CodeAnalysis.CSharp.Syntax;
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 Microsoft.VisualStudio.Web.CodeGeneration.Contracts.Messaging;
using Newtonsoft.Json.Linq; using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Net.Http;
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 +29,37 @@ 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_30002_1 = "REFERENCES_Rejection_30002_1";
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";
public const string GERMAN = "de-DE";
public const string ENGLISH = "en-US";
public const string FRENCH = "fr-FR";
public const string SPAIN = "es-ES";
private List<string> _ValidationErrors;
private List<string> _AllowedLanguageCodes;
private string _UserLanguageCode = GERMAN;
private const int MAX_FILE_SIZE_DEFAULT = 25; private const int MAX_FILE_SIZE_DEFAULT = 25;
private readonly ZUGFeRDInterface _zugferd; private readonly ZUGFeRDInterface _zugferd;
@@ -33,10 +67,9 @@ namespace ZUGFeRDRESTService.Controllers
private readonly DigitalData.Modules.Logging.LogConfig _logConfig; private readonly DigitalData.Modules.Logging.LogConfig _logConfig;
private readonly DigitalData.Modules.Logging.Logger _logger; private readonly DigitalData.Modules.Logging.Logger _logger;
private readonly DigitalData.Modules.Filesystem.File _file; //private readonly DigitalData.Modules.Filesystem.File _file;
private readonly PropertyValues _props; private readonly PropertyValues _props;
//private readonly Dictionary<string, XmlItemProperty> _propertyMap = new Dictionary<string, XmlItemProperty>();
private readonly List<XmlItemProperty> _propertyMapList = new List<XmlItemProperty>(); private readonly List<XmlItemProperty> _propertyMapList = new List<XmlItemProperty>();
private readonly List<RejectionStringRow> _RecjectionMessageList = new List<RejectionStringRow>(); private readonly List<RejectionStringRow> _RecjectionMessageList = new List<RejectionStringRow>();
@@ -54,8 +87,6 @@ namespace ZUGFeRDRESTService.Controllers
{ {
_logConfig = logging.LogConfig; _logConfig = logging.LogConfig;
_logger = _logConfig.GetLogger(); _logger = _logConfig.GetLogger();
_file = new DigitalData.Modules.Filesystem.File(_logConfig);
_logger.Debug("Validation Controller initializing"); _logger.Debug("Validation Controller initializing");
// Read config file and assign all option flags related to // Read config file and assign all option flags related to
@@ -82,7 +113,37 @@ namespace ZUGFeRDRESTService.Controllers
_logger.Debug("Property Map list initial: [{0}] entries found. [{1}] entries will be available.", oPropertyMapList.Count, _propertyMapList.Count); _logger.Debug("Property Map list initial: [{0}] entries found. [{1}] entries will be available.", oPropertyMapList.Count, _propertyMapList.Count);
_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
};
_AllowedLanguageCodes = new List<string>()
{
GERMAN,
ENGLISH,
FRENCH,
SPAIN,
};
_logger.Debug("Validation Controller initialized!"); _logger.Debug("Validation Controller initialized!");
} }
@@ -146,14 +207,58 @@ namespace ZUGFeRDRESTService.Controllers
/// </summary> /// </summary>
/// <param name="file">This parameter's name needs to correspond to the html form's file-input name</param> /// <param name="file">This parameter's name needs to correspond to the html form's file-input name</param>
/// <param name="user_id">This is the email address which the user supplied</param> /// <param name="user_id">This is the email address which the user supplied</param>
/// <param name="language_id">This is language code which the user supplied (en-US, de-DE)</param>
[HttpPost] [HttpPost]
public ValidationResponse Post(IFormFile file, string user_id) public ValidationResponse Post(IFormCollection collection)
{ {
_logger.Info("Start processing request to ValidationController"); _logger.Info("Start processing request to ValidationController");
ZugferdResult oZugferdResult = null; ZugferdResult oZugferdResult = null;
CheckPropertyValuesResult oPropertyResult = new CheckPropertyValuesResult(); CheckPropertyValuesResult oPropertyResult = new CheckPropertyValuesResult();
var oUserId = string.Empty;
var oLanguageId = GERMAN;
IFormFile file = collection.Files[0];
foreach (var keyItem in collection.Keys)
{
if (keyItem == "user_id")
{
oUserId = collection[keyItem];
}
else if (keyItem == "language_id")
{
oLanguageId = collection[keyItem];
}
}
if (!string.IsNullOrEmpty(oUserId))
{
_logger.Info("UserID set to [{0}].", oUserId);
}
else
{
_logger.Info("UserID is empty!");
}
if (string.IsNullOrEmpty(oLanguageId))
{
_logger.Info("Language code was empty. Set to default 'de-DE'");
// DEFAULT-Sprache = Deutsch de-DE
_UserLanguageCode = GERMAN;
}
else if (_AllowedLanguageCodes.Where(i => i.Equals(oLanguageId, StringComparison.OrdinalIgnoreCase)).FirstOrDefault() != null)
{
_logger.Info("Language code is allowed. Set to [{0}].", oLanguageId);
_UserLanguageCode = oLanguageId;
}
else
{
_logger.Info("Language code was unknown: [{0}]. Set to default 'de-DE'", oLanguageId);
_UserLanguageCode = GERMAN;
}
try try
{ {
using Stream oStream = file.OpenReadStream(); using Stream oStream = file.OpenReadStream();
@@ -165,7 +270,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 +278,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,23 +290,23 @@ 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);
var oFilteredPropertyMap = _zugferd.FilterPropertyMap(_propertyMapList, oZugferdResult.Specification); var oFilteredPropertyMap = _zugferd.FilterPropertyMap(_propertyMapList, oZugferdResult.Specification);
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
{ {
_logger.Debug("Property map contains [{0}] entries for specification [{1}]", oFilteredPropertyMap.Count, oZugferdResult.Specification); _logger.Debug("Property map contains [{0}] entries for specification [{1}]", oFilteredPropertyMap.Count, oZugferdResult.Specification);
} }
_logger.Info("Starting structural check against the database."); _logger.Info("Starting structural check against the database.");
oPropertyResult = _props.CheckPropertyValues(oZugferdResult.SchemaObject, oFilteredPropertyMap, "MESSAGEID"); oPropertyResult = _props.CheckPropertyValues(oZugferdResult.SchemaObject, oFilteredPropertyMap, "MESSAGEID");
@@ -219,24 +324,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 +346,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 +358,8 @@ namespace ZUGFeRDRESTService.Controllers
message = oMessage message = oMessage
}; };
} }
}; }
} }
catch (ZUGFeRDExecption ex) catch (ZUGFeRDExecption ex)
{ {
@@ -282,26 +385,24 @@ namespace ZUGFeRDRESTService.Controllers
oMessage = Regex.Replace(oMessage, "@REPLACE_PARAM2", ex.Param2, RegexOptions.IgnoreCase); oMessage = Regex.Replace(oMessage, "@REPLACE_PARAM2", ex.Param2, RegexOptions.IgnoreCase);
} }
// Der REJECTION-Code wird in alle Meldungen eingefügt.
if (!string.IsNullOrEmpty(rejectionCodeNumber) && oMessage.Contains("@REJECTION_CODE", StringComparison.OrdinalIgnoreCase))
{
oMessage = Regex.Replace(oMessage, "@REJECTION_CODE", "Ablehnungscode: " + rejectionCodeNumber, RegexOptions.IgnoreCase);
}
// Determine if any errors should be sent in the response // Determine if any errors should be sent in the response
switch (ex.ErrorCode) switch (ex.ErrorCode)
{ {
case ErrorCodes.MissingValueException: case ErrorCodes.MissingValueException:
oErrors.AddRange(from item in oPropertyResult.MissingProperties
select (item.EN16931_ID + " (" + item.Description + ")")); var oErrorsText = GetMissingValuesListString(oPropertyResult.MissingProperties);
if (!string.IsNullOrEmpty(oErrorsText) && oMessage.Contains("@REPLACE_PARAM3", StringComparison.OrdinalIgnoreCase))
{
oMessage = Regex.Replace(oMessage, "@REPLACE_PARAM3", oErrorsText, RegexOptions.IgnoreCase);
}
break; break;
default: default:
break; break;
} }
} }
else else
{ {
oMessage = "Alte Logik. Meldung nicht gefunden"; oMessage = "Alte Logik. Meldung nicht gefunden";
} }
_logger.Info($"Responding with message: [{oMessage}]"); _logger.Info($"Responding with message: [{oMessage}]");
@@ -315,21 +416,61 @@ 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
string oMessage = this.GetRejectionMessage(rejectionCodeNumber); string oMessage = this.GetRejectionMessage(rejectionCodeNumber);
List<string> oErrors = ex.ValidationErrors.Select(e => // Wenn es ValidationErrors gibt, werden diese nun übersetzt und in eine Liste übertragen werden
{
return $"Element '{e.ElementName}' mit Wert '{e.ElementValue}': {e.ErrorMessageDE}";
}).ToList();
var mainText = GetTextByToken("ItemValueText");
var resultList = new List<string>();
foreach (var errorItem in ex.ValidationErrors)
{
var resultString = mainText;
if (!string.IsNullOrEmpty(errorItem.ElementName))
{
// replace @ITEM_NAME => e.ElementName
resultString = resultString.Replace("@ITEM_NAME", errorItem.ElementName, StringComparison.OrdinalIgnoreCase);
}
if (!string.IsNullOrEmpty(errorItem.ElementValue))
{
// replace ITEM_VALUE => e.ElementValue
resultString = resultString.Replace("@ITEM_VALUE", errorItem.ElementValue, StringComparison.OrdinalIgnoreCase);
}
var itemErrorText = GetTextByToken(errorItem.ErrorMessageToken);
if (!string.IsNullOrEmpty(itemErrorText))
{
// attach itemErrorText
resultString += " " + itemErrorText;
}
_logger.Debug($"resultString: [{resultString}]");
resultList.Add(resultString);
}
// wenn ergebnisse vorliegen, in html transformieren und anhängen
if (resultList.Count > 0)
{
var htmlResultString = "<ul>";
foreach (var resultItem in resultList)
{
htmlResultString += " <li>" + resultItem + "</li>" + Environment.NewLine;
}
htmlResultString += " </ul>";
oMessage += " " + htmlResultString;
}
return new ValidationResponse() return new ValidationResponse()
{ {
status = RESPONSE_ERROR, status = RESPONSE_ERROR,
message = oMessage, message = oMessage
errors = oErrors
}; };
} }
catch (Exception ex) catch (Exception ex)
@@ -348,20 +489,73 @@ namespace ZUGFeRDRESTService.Controllers
} }
} }
private Tuple<bool, string> ValidateBuyerOrderReference(List<ValidProperty> pProperties) private string GetMissingValuesListString(List<MissingProperty> missingProperties)
{
if (missingProperties == null || missingProperties.Count == 0)
{
return string.Empty;
}
string retValue = "<ul>";
foreach (var missingProperty in missingProperties)
{
var searchToken = missingProperty.EN16931_ID + "_Description";
var descriptionTranslated = GetTextByToken(searchToken);
var rowString = "<li>" + missingProperty.EN16931_ID + " (" + descriptionTranslated + ")</li>";
retValue += rowString;
}
retValue += "</ul>";
return retValue;
}
/// <summary>
/// Holt sprachgenauen Text anhand eines Titel-Tokens
/// </summary>
/// <returns></returns>
private string GetTextByToken(string tokenValue)
{
RejectionStringRow stringRow = null;
if (!string.IsNullOrEmpty(tokenValue))
{
stringRow = _RecjectionMessageList.Where(i => i.Title.Equals(tokenValue, StringComparison.OrdinalIgnoreCase) &&
i.Language.Equals(_UserLanguageCode, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
if (stringRow == null &&
!_UserLanguageCode.Equals(GERMAN, StringComparison.OrdinalIgnoreCase))
{
// Wenn kein sprachgenauer Text vorliegt, hole den deutschen Text.
stringRow = _RecjectionMessageList.Where(i => i.Title.Equals(tokenValue, StringComparison.OrdinalIgnoreCase) &&
i.Language.Equals(GERMAN, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
}
}
string retValue = string.Empty;
if (stringRow != null)
{
retValue = !string.IsNullOrEmpty(stringRow.String1) ? stringRow.String1.Trim() : string.Empty;
}
_logger.Debug($"Token [{tokenValue}] - String1 [{retValue}]");
return retValue;
}
/// <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 +571,57 @@ 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;
}
break;
}
}
}
_logger.Debug("Validation terminal Result message: " + oReturnValue);
return new Tuple<bool, string>(true, oReturnValue); return new Tuple<bool, string>(true, oReturnValue);
} }
@@ -390,86 +635,391 @@ namespace ZUGFeRDRESTService.Controllers
{ {
_logger.Error(e); _logger.Error(e);
return new Tuple<bool, string>(false, string.Empty); return new Tuple<bool, string>(false, string.Empty);
} }
} }
public string GetMessageId() 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;
}
private 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;
}
private 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>
public string GetRejectionMessage(string pErrorCode) private string GetRejectionMessage(string pErrorCode)
{ {
_logger.Info("GetRejectionMessage() - errorCode.ToString(): '" + pErrorCode.ToString() + "'"); _logger.Info("GetRejectionMessage() - errorCode.ToString(): '" + pErrorCode.ToString() + "'");
if (_RecjectionMessageList == null) return string.Empty; if (_RecjectionMessageList == null) return string.Empty;
// Sprache wird man vielleicht mal auswählen können var searchTitle = string.Empty;
var language = "de-DE";
var searchTitle = "ZUGFERD_Rejection_" + pErrorCode + "_Web";
var messageItem = _RecjectionMessageList.Where(i => i.Title.Equals(searchTitle, StringComparison.OrdinalIgnoreCase) && i.Language.Equals(language, StringComparison.OrdinalIgnoreCase)).FirstOrDefault(); if (pErrorCode.Contains("2000"))
if (messageItem != null)
{ {
_logger.Info("GetRejectionMessage() - messageItem: '" + messageItem.String1 + "'"); searchTitle = "ZUGFERD_Rejection_" + pErrorCode + "_Web";
return messageItem.String1; }
else if (pErrorCode.Contains("REFERENCES_Rejection_3000"))
{
searchTitle = pErrorCode + "_Web";
}
else if (pErrorCode.Contains("AMOUNT_CALC"))
{
searchTitle = "AMOUNT_CALC_REJECTION_Web";
}
else
{
searchTitle = "ZUGFERD_Rejection_20006_Web";
}
// Sprachgenauen Text suchen.
var messageItem = _RecjectionMessageList.Where(i => i.Title.Equals(searchTitle, StringComparison.OrdinalIgnoreCase) &&
i.Language.Equals(_UserLanguageCode, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
if (messageItem == null &&
!_UserLanguageCode.Equals(GERMAN, StringComparison.OrdinalIgnoreCase)) {
_logger.Info("GetRejectionMessage() - Es wurde kein passender Text für die Sprache [{0}] gefunden.", _UserLanguageCode);
// Wenn kein sprachgenauer Text vorliegt, hole den deutschen Text.
messageItem = _RecjectionMessageList.Where(i => i.Title.Equals(searchTitle, StringComparison.OrdinalIgnoreCase) &&
i.Language.Equals(GERMAN, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
}
if (messageItem != null && !string.IsNullOrEmpty(pErrorCode))
{
var resultText = string.Empty;
// Der REJECTION-Code wird in allen Meldungen ausgetauscht.
if (messageItem.String1.Contains("@REJECTION_CODE", StringComparison.OrdinalIgnoreCase))
{
var substituteText = this.GetLabelText("Ablehnungscode", _UserLanguageCode);
substituteText = string.IsNullOrEmpty(substituteText) ? "Ablehnungscode" : substituteText;
substituteText = substituteText + ": " + pErrorCode;
resultText = Regex.Replace(messageItem.String1, "@REJECTION_CODE", substituteText, RegexOptions.IgnoreCase);
}
else
{
resultText = messageItem.String1;
}
_logger.Info("GetRejectionMessage() - messageItem: '" + resultText + "'");
return resultText;
} }
else else
{ {
@@ -478,6 +1028,15 @@ namespace ZUGFeRDRESTService.Controllers
} }
} }
private string GetLabelText(string pLabel, string pLanguage)
{
// Sprachgenauen Text suchen.
var messageItem = _RecjectionMessageList.Where(i => i.Title.Equals(pLabel, StringComparison.OrdinalIgnoreCase) &&
i.Language.Equals(pLanguage, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
return messageItem != null ? messageItem.String1 : string.Empty;
}
private string GetRejectionCodeNumber(ErrorCodes rejectionCode) private string GetRejectionCodeNumber(ErrorCodes rejectionCode)
{ {
switch (rejectionCode) switch (rejectionCode)

View File

@@ -15,7 +15,12 @@
<label>Benutzerkennung/Email:</label> <label>Benutzerkennung/Email:</label>
<input type="email" name="user_id" required /> <input type="email" name="user_id" required />
</p> </p>
<p>
<label>Sprachcode (de-DE etc.):</label>
<input type="text" name="language_id" value="de-DE" required />
</p>
<button type="submit">Submit</button> <button type="submit">Submit</button>
</form> </form>

View File

@@ -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