From 42376fc82308d6f26c83d5476f00addddd45b90a Mon Sep 17 00:00:00 2001 From: Stefan Hutter Date: Fri, 29 May 2026 12:25:25 +0200 Subject: [PATCH] Update 20260529 --- API_NetFramework/App_Data/TableConfig.json | 54 +- API_NetFramework/CLM.aspx | 32 +- API_NetFramework/CLM.aspx.cs | 16 + API_NetFramework/JSONViewer.aspx | 98 +- API_NetFramework/JSONViewer.aspx.cs | 38 +- API_NetFramework/bin/DOCGEN.dll | Bin 85504 -> 86528 bytes API_NetFramework/bin/DOCGEN.pdb | Bin 165376 -> 165376 bytes API_NetFramework/bin/OnDoc_NetFramework.dll | Bin 371200 -> 371200 bytes API_NetFramework/bin/OnDoc_NetFramework.pdb | Bin 415232 -> 415232 bytes API_NetFramework/log.txt | 6797 +++++++++++++++++ ...etFramework.csproj.AssemblyReference.cache | Bin 95987 -> 95987 bytes .../obj/Debug/OnDoc_NetFramework.dll | Bin 371200 -> 371200 bytes .../obj/Debug/OnDoc_NetFramework.pdb | Bin 415232 -> 415232 bytes Client/DocMgmt/DokTypSelect.resx | 2 +- Client/bin/Debug/DOCGEN.dll | Bin 85504 -> 86528 bytes Client/bin/Debug/DOCGEN.pdb | Bin 165376 -> 165376 bytes Client/bin/Debug/OnDoc.exe | Bin 3785728 -> 3785728 bytes Client/bin/Debug/de-DE/OnDoc.resources.dll | Bin 7168 -> 7168 bytes .../Client.csproj.AssemblyReference.cache | Bin 291064 -> 291064 bytes .../DesignTimeResolveAssemblyReferences.cache | Bin 1921 -> 137 bytes .../OnDoc.DocMgmt.DokTypSelect.resources | Bin 38820 -> 38820 bytes Client/obj/Debug/OnDoc.exe | Bin 3785728 -> 3785728 bytes Client/obj/Debug/de-DE/OnDoc.resources.dll | Bin 7168 -> 7168 bytes DOCGEN/Klassen/SyncFWord.cs | 74 +- DOCGEN/bin/Debug/DOCGEN.dll | Bin 85504 -> 86528 bytes DOCGEN/bin/Debug/DOCGEN.pdb | Bin 165376 -> 165376 bytes DOCGEN/obj/Debug/DOCGEN.dll | Bin 85504 -> 86528 bytes DOCGEN/obj/Debug/DOCGEN.pdb | Bin 165376 -> 165376 bytes .../DocGen.csproj.AssemblyReference.cache | Bin 69140 -> 69140 bytes OnDocOffice/bin/Debug/DOCGEN.dll | Bin 85504 -> 86528 bytes OnDocOffice/bin/Debug/DOCGEN.pdb | Bin 165376 -> 165376 bytes ...OnDocOffice.csproj.AssemblyReference.cache | Bin 43743 -> 42378 bytes Versandstrasse/bin/Debug/DOCGEN.dll | Bin 85504 -> 86528 bytes Versandstrasse/bin/Debug/DOCGEN.pdb | Bin 165376 -> 165376 bytes ...sandstrasse.csproj.AssemblyReference.cache | Bin 36754 -> 36754 bytes 35 files changed, 7025 insertions(+), 86 deletions(-) diff --git a/API_NetFramework/App_Data/TableConfig.json b/API_NetFramework/App_Data/TableConfig.json index 1d4505cef..d9676cf11 100644 --- a/API_NetFramework/App_Data/TableConfig.json +++ b/API_NetFramework/App_Data/TableConfig.json @@ -3,52 +3,74 @@ { "key": "Ondoc_Versandstrasse_Paket", "displayName": "Ondoc_Versandstrasse_Paket", - "sqlList": "SELECT ID, erstellt_am as Name from Ondoc_Versandstrasse_Paket order by Id desc", + "sqlList": "SELECT ID, convert(varchar(10),erstellt_am,104)+' '+' ' + convert(VARCHAR(8), erstellt_am, 14) as Erstellt_am, convert(varchar(10),versendet_am,104)+' '+' ' + convert(VARCHAR(8), versendet_am, 14) as Versendet_am, Ersteller, Aktiv, isnull(signed,1) as Signed from Ondoc_Versandstrasse_Paket [FILTER] order by Id desc", "sqlById": "SELECT paket as JsonData from Ondoc_Versandstrasse_Paket where id= @id ", "idField": "ID", "displayField": "ID", "jsonField": "JsonData", "Buttons": "Öffnen;PaketAnzeige", - "AnzeigeDokument": "SELECT paket as JsonData from Ondoc_Versandstrasse_Paket where id= @id ", - "FilterColumns": "" + "AnzeigeDokument": "Select paket as JsonData from Ondoc_versandstrasse_paket where id=@id", + "FilterColumns": "ID" }, { - "key": "NLOGApiDoc", - "displayName": "APIDoc", - "sqlList": "SELECT ID, CreatedOn, GUID from edoka_journale.dbo.nlogapidoc where message='Input JSON' and isnull(div,'')<>'' order by Id desc", + "key": "APIDokumente", + "displayName": "API-Dokumente/Pakete", + "sqlList": "SELECT ID, Erstellt_am, GUID from edoka_journale.dbo.view_api_dokumente [FILTER] order by Id desc", "sqlById": "SELECT div as JsonData from edoka_journale.dbo.nlogapidoc where id= @id ", "idField": "ID", "displayField": "ID", "jsonField": "JsonData", - "Buttons": "Öffnen;DokumenteAnzeigen", + "Buttons": "Öffnen", + "AnzeigeDokument": "SELECT EDOKA.dbo.BinaryToBase64(EDOKA.dbo.Doks.Dokument) FROM edoka_journale.dbo.NLOGApiDoc INNER JOIN EDOKA.dbo.Doks ON edoka_journale.dbo.NLOGApiDoc.Div COLLATE SQL_Latin1_General_CP1_CI_AS = EDOKA.dbo.Doks.DokumentID WHERE edoka_journale.dbo.NLOGApiDoc.GUID = @id AND edoka_journale.dbo.NLOGApiDoc.Div LIKE 'OFFEDK%'", + "FilterColumns": "ID;GUID" + }, + { + "key": "APIArchivierung", + "displayName": "API-Archivierung", + "sqlList": "SELECT ID, Erstellt_am, GUID from edoka_journale.dbo.View_API_Archivierung [FILTER] order by Id desc", + "sqlById": "SELECT div as JsonData from edoka_journale.dbo.nlogapidoc where id= @id ", + "idField": "ID", + "displayField": "ID", + "jsonField": "JsonData", + "Buttons": "Öffnen", "AnzeigeDokument": "", - "FilterColumns": "id;GUID" - + "FilterColumns": "ID;GUID" + }, + { + "key": "NLOGApiDoc", + "displayName": "API-NLOGApiDoc - last 500", + "sqlList": "SELECT top 500 [id],[Origin],[Message],[LogLevel],[CreatedOn],[UserID],case when len([Div])>30 then substring(div,1,27)+'...' else [div] end as DIV,[GUID] from edoka_journale.dbo.NLOGApiDoc [FILTER] order by id desc", + "sqlById": "", + "idField": "ID", + "displayField": "ID", + "jsonField": "JsonData", + "Buttons": "", + "AnzeigeDokument": "", + "FilterColumns": "ID;GUID" }, { "key": "CLMDokumente", "displayName": "CLM-Dokumente", - "sqlList": "SELECT ID, clmdokumentid as CLM_ID, GUID, Erstellt_Am, Aktiv, Archivstatus, Archiviert from ondoc_clm_dokumente [FILTER] order by Id desc", + "sqlList": "SELECT ID, clmdokumentid as CLM_ID, GUID, convert(varchar(10),erstellt_am,104)+' '+' ' + convert(VARCHAR(8), erstellt_am, 14) as Erstellt_am , Aktiv, Archivstatus, Archiviert from ondoc_clm_dokumente [FILTER] order by Id desc", "sqlById": "SELECT jsondata as JsonData from ondoc_clm_dokumente where id= @id ", "idField": "ID", "displayField": "ID", "jsonField": "JsonData", "Buttons": "Öffnen;Anzeigen", "AnzeigeDokument": "SELECT dbo.BinaryToBase64(dokument) FROM dbo.OnDoc_CLM_Dokumente INNER JOIN dbo.Doks ON dbo.OnDoc_CLM_Dokumente.dokumentid = dbo.Doks.DokumentID where dbo.ondoc_clm_dokumente.id=@id", - "FilterColumns": "clmdokumentid;archivstatus" + "FilterColumns": "clmdokumentid;guid;archivstatus" }, { "key": "CLMJournal", "displayName": "CLM-Journal", - "sqlList": "SELECT ID, clmdokumentid as CLM_ID, Dokumentid, GUID, Erstellt_Am, Aktiv, Archivstatus, Archiviert, Archiviert_am from ondoc_clm_dokumente [FILTER] order by Id desc", - "sqlById": " ", + "sqlList": "SELECT ID, clmdokumentid as CLM_ID, Dokumentid, GUID, convert(varchar(10),erstellt_am,104)+' '+' ' + convert(VARCHAR(8), erstellt_am, 14) as Erstellt_am, Aktiv, Archivstatus, Archiviert, isnull(convert(varchar(10),archiviert_am,104)+' '+ convert(VARCHAR(8), archiviert_am, 14) ,'') as Archiviert_am from ondoc_clm_dokumente [FILTER] order by Id desc", + "sqlById": "", "idField": "ID", "displayField": "ID", "jsonField": "", "Buttons": "Anzeigen", "AnzeigeDokument": "SELECT dbo.BinaryToBase64(dokument) FROM dbo.OnDoc_CLM_Dokumente INNER JOIN dbo.Doks ON dbo.OnDoc_CLM_Dokumente.dokumentid = dbo.Doks.DokumentID where dbo.ondoc_clm_dokumente.id=@id", - "FilterColumns": "clmdokumentid;archivstatus;dokumentid" + "FilterColumns": "clmdokumentid;guid;archivstatus;dokumentid" } - ] -} \ No newline at end of file +} diff --git a/API_NetFramework/CLM.aspx b/API_NetFramework/CLM.aspx index f3b29fdc2..cea0e0b5d 100644 --- a/API_NetFramework/CLM.aspx +++ b/API_NetFramework/CLM.aspx @@ -311,7 +311,7 @@ function generateFromJson() { var jsonText = editor.getValue(); - alert("Hallo"); + $.ajax({ type: "POST", @@ -323,15 +323,24 @@ "Authorization": "Bearer " + "pZkuG6l6ORCEckqQimPK58PO1A9EnkMtL5oCgRX9WiWnD4xeH7ikGzhWnTBy/vk8J4Iiz8gCSx9uFHA4+DvITG0roO97sk82d/0BCjVlwLWINpXlJfGYEF3X96AdoCQvb3ruwv/tVqEHsSU5aNfyxBAe+EhLTHQ8t7ysgJZWh98=" }, success: function (response) { - var pdfWindow = window.open(""); - pdfWindow.document.write(""); - //alert("Server Response: " + response.file); + + PageMethods.SaveTempFile( + response.file, + function (response) { + window.open("/PDFViewer.aspx", "_blank").focus(); + var a = 1; + }, + function (err) { + alert(err.get_message()); + } + ); }, error: function (err) { alert("Error: " + err.responseText); } }); + } function showDoc(tableKey, id) { @@ -339,15 +348,20 @@ tableKey, id, function (result) { - var pdfWindow = window.open(""); - pdfWindow.document.write(""); + PageMethods.SaveTempFile( + result, + function (result) { + window.open("/PDFViewer.aspx", "_blank").focus(); + }, + function (err) { + alert(err.get_message()); + } + ); }, function (err) { - - alert(err.get_message()) + alert(err.get_message()); } ); - } function loadJson(tableKey, id) { diff --git a/API_NetFramework/CLM.aspx.cs b/API_NetFramework/CLM.aspx.cs index c141e92e1..2e751b5ac 100644 --- a/API_NetFramework/CLM.aspx.cs +++ b/API_NetFramework/CLM.aspx.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; +using System.IO; using System.Linq; using System.Web; using System.Web.Http.Results; @@ -203,10 +204,25 @@ namespace WebApp con.Open(); string doc = cmd.ExecuteScalar()?.ToString(); con.Close(); + System.IO.File.WriteAllBytes(@"d:\apps\ondoc\admintemp\vp.pdf", Convert.FromBase64String(doc)); return doc; } } [WebMethod] + public static object SaveTempFile(string base64) + { + var ms = new MemoryStream(Convert.FromBase64String(base64)); + using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write)) + { + byte[] bytes = new byte[ms.Length]; + ms.Read(bytes, 0, (int)ms.Length); + file.Write(bytes, 0, bytes.Length); + ms.Close(); + } + return "OK"; + + } + [WebMethod] public static object GetJson(string table, string id) { var config = TableConfigProvider.LoadConfig(); diff --git a/API_NetFramework/JSONViewer.aspx b/API_NetFramework/JSONViewer.aspx index ada5ddfac..61d34a957 100644 --- a/API_NetFramework/JSONViewer.aspx +++ b/API_NetFramework/JSONViewer.aspx @@ -12,9 +12,9 @@ -<%----%> + <%----%> <%----%> - <%----%> + <%----%>