Compare commits
12 Commits
157affc436
...
7816f7ff8a
| Author | SHA1 | Date | |
|---|---|---|---|
| 7816f7ff8a | |||
| 62322d1abe | |||
| ab82f41907 | |||
| 9ff1d7d0f0 | |||
| b77e7b0563 | |||
| 43e0c8c565 | |||
| 00aeb52cdd | |||
|
|
5001002ab8 | ||
|
|
8918b543de | ||
| 8cef48ea8e | |||
| dfb01f7719 | |||
| a4eec2896e |
@ -89,9 +89,14 @@ Public Class DocumentViewer
|
||||
''' </summary>
|
||||
''' <param name="pLogConfig">A LogConfig object</param>
|
||||
''' <param name="pLicenseKey">The GDPicture.NET License Key</param>
|
||||
Public Function Init(pLogConfig As LogConfig, pLicenseKey As String, pToolbarSettings As ToolbarSettings) As Boolean
|
||||
Public Function Init(pLogConfig As LogConfig, pLicenseKey As String, Optional pToolbarSettings As ToolbarSettings = Nothing) As Boolean
|
||||
_logConfig = pLogConfig
|
||||
_logger = pLogConfig.GetLogger()
|
||||
|
||||
If pToolbarSettings Is Nothing Then
|
||||
pToolbarSettings = New ToolbarSettings
|
||||
End If
|
||||
|
||||
Try
|
||||
|
||||
_email = New Email2(pLogConfig)
|
||||
@ -114,10 +119,6 @@ Public Class DocumentViewer
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'Public Function Init(pLogConfig As LogConfig, pLicenseKey As String, pToolbarSettings As ToolbarSettings) As Boolean
|
||||
' Return Init(pLogConfig, pLicenseKey, New ToolbarSettings())
|
||||
'End Function
|
||||
|
||||
''' <summary>
|
||||
''' Load a file from a path and display it
|
||||
''' </summary>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
@ -191,7 +192,11 @@ Public Class Form1
|
||||
|
||||
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("Missing Properties: [{0}]", oResult2.MissingProperties.Count)
|
||||
|
||||
@ -53,25 +53,20 @@
|
||||
<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, Version=1.2.2.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Modules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Config">
|
||||
<HintPath>..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Database, Version=2.3.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Modules\Config\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Database">
|
||||
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Interfaces, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Modules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Interfaces">
|
||||
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Jobs, Version=1.8.6.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Modules\Jobs\bin\Debug\DigitalData.Modules.Jobs.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Jobs">
|
||||
<HintPath>..\..\DDModules\Jobs\bin\Debug\DigitalData.Modules.Jobs.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.5.4.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Modules\Config\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</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>
|
||||
@ -295,7 +290,7 @@
|
||||
<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')" />
|
||||
<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>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<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>
|
||||
|
||||
@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("DDZUGFeRDService")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||
<Assembly: AssemblyTrademark("2.8.9.0")>
|
||||
<Assembly: AssemblyTrademark("2.9.1.0")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.8.9.0")>
|
||||
<Assembly: AssemblyFileVersion("2.8.9.0")>
|
||||
<Assembly: AssemblyVersion("2.9.1.0")>
|
||||
<Assembly: AssemblyFileVersion("2.9.1.0")>
|
||||
|
||||
@ -11,6 +11,7 @@ using static DigitalData.Modules.Interfaces.PropertyValues;
|
||||
using System.Data.SqlClient;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Xml.Linq;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace ZUGFeRDRESTService.Controllers
|
||||
{
|
||||
@ -68,7 +69,7 @@ namespace ZUGFeRDRESTService.Controllers
|
||||
AllowXRechnung_Filename = _AllowXRechnung,
|
||||
AllowZugferd_1_0_Schema = _AllowZugferd10,
|
||||
AllowZugferd_2_x_Schema = _AllowZugferd2x,
|
||||
AllowPeppol_3017_Schema = _AllowPeppolBISBill3x
|
||||
AllowPeppol_3_x_Schema = _AllowPeppolBISBill3x
|
||||
});
|
||||
_props = new PropertyValues(_logConfig);
|
||||
|
||||
@ -86,6 +87,12 @@ namespace ZUGFeRDRESTService.Controllers
|
||||
Concat(_propertyMap).
|
||||
ToDictionary(kv => kv.Key, kv => kv.Value);
|
||||
|
||||
if (_AllowPeppolBISBill3x == true)
|
||||
_propertyMap = oPropertyMap.
|
||||
Where(kv => kv.Value.Specification == UBL_SPEC_21).
|
||||
Concat(_propertyMap).
|
||||
ToDictionary(kv => kv.Key, kv => kv.Value);
|
||||
|
||||
_logger.Debug("Property Map filtered: [{0}] entries found.", _propertyMap.Count);
|
||||
|
||||
_logger.Debug("Validation Controller initialized!");
|
||||
@ -375,15 +382,38 @@ namespace ZUGFeRDRESTService.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (pProperty.ItemType == 3)
|
||||
{
|
||||
// Wir speichern keine Attachment-Werte in die DB
|
||||
return true;
|
||||
}
|
||||
|
||||
if (pProperty.ItemType == 0 && string.IsNullOrEmpty(pProperty.Value.ToString()))
|
||||
{
|
||||
// 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 > 900)
|
||||
{
|
||||
itemValue = pProperty.Value.Substring(1, 899);
|
||||
_logger.Warn("Value for field [{0}] is longer than 900 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", pProperty.Value),
|
||||
new SqlParameter("@ITEM_VALUE", itemValue.Replace("'", "''")),
|
||||
new SqlParameter("@CREATEDWHO", ADDED_WHO),
|
||||
new SqlParameter("@GROUP_COUNTER", pProperty.GroupCounter),
|
||||
new SqlParameter("@SPEC_NAME", pProperty.TableColumn),
|
||||
|
||||
@ -5,7 +5,6 @@ using Microsoft.Extensions.Configuration;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using DigitalData.Modules.Logging;
|
||||
using DigitalData.Modules.Interfaces.Peppol.BISBilling30CreditNote;
|
||||
using System;
|
||||
|
||||
namespace ZUGFeRDRESTService
|
||||
@ -71,7 +70,8 @@ namespace ZUGFeRDRESTService
|
||||
IsRequired = (bool)oRow["IS_REQUIRED"],
|
||||
IsGrouped = (bool)oRow["IS_GROUPED"],
|
||||
Specification = oRow["SPECIFICATION"].ToString(),
|
||||
ItemType = oRow["ITEM_TYPE"] != null ? Convert.ToInt32(oRow["ITEM_TYPE"]) : 0
|
||||
ItemType = oRow["ITEM_TYPE"] != null ? Convert.ToInt32(oRow["ITEM_TYPE"]) : 0,
|
||||
EN16931_ID = oRow["EN16931_ID"] != null ? oRow["EN16931_ID"].ToString() : "-"
|
||||
});
|
||||
}
|
||||
} else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user