diff --git a/API_NetFramework/Properties/PublishProfiles/FolderProfile1.pubxml.user b/API_NetFramework/Properties/PublishProfiles/FolderProfile1.pubxml.user index 7394ba92..f7f03488 100644 --- a/API_NetFramework/Properties/PublishProfiles/FolderProfile1.pubxml.user +++ b/API_NetFramework/Properties/PublishProfiles/FolderProfile1.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>E:\Software-Projekte\OnDoc\PubServices\OnDoc - True|2025-01-12T13:24:46.2550852Z||;True|2025-01-12T14:00:23.9205001+01:00||;True|2025-01-07T15:08:24.2722613+01:00||;True|2025-01-06T09:25:16.5522864+01:00||;True|2024-12-22T16:49:54.0855447+01:00||;True|2024-12-08T09:59:39.7127943+01:00||;True|2024-12-08T09:26:52.1924006+01:00||;True|2024-12-02T09:50:13.5426444+01:00||;True|2024-12-01T18:53:55.8128003+01:00||;True|2024-11-26T19:32:44.7379810+01:00||;True|2024-11-25T16:02:25.7013060+01:00||;True|2024-11-24T18:56:32.4321643+01:00||;True|2024-11-24T18:48:11.3494435+01:00||;True|2024-11-24T17:50:10.7679996+01:00||;True|2024-11-22T08:35:58.1296657+01:00||;True|2024-11-13T17:47:13.0183160+01:00||;True|2024-11-13T17:46:36.5183689+01:00||;True|2024-11-11T13:42:23.6578245+01:00||;True|2024-11-09T12:11:00.0777236+01:00||;True|2024-11-09T11:54:51.8503924+01:00||; + True|2025-01-19T15:20:16.1036874Z||;True|2025-01-19T16:19:11.5720999+01:00||;True|2025-01-12T14:24:46.2550852+01:00||;True|2025-01-12T14:00:23.9205001+01:00||;True|2025-01-07T15:08:24.2722613+01:00||;True|2025-01-06T09:25:16.5522864+01:00||;True|2024-12-22T16:49:54.0855447+01:00||;True|2024-12-08T09:59:39.7127943+01:00||;True|2024-12-08T09:26:52.1924006+01:00||;True|2024-12-02T09:50:13.5426444+01:00||;True|2024-12-01T18:53:55.8128003+01:00||;True|2024-11-26T19:32:44.7379810+01:00||;True|2024-11-25T16:02:25.7013060+01:00||;True|2024-11-24T18:56:32.4321643+01:00||;True|2024-11-24T18:48:11.3494435+01:00||;True|2024-11-24T17:50:10.7679996+01:00||;True|2024-11-22T08:35:58.1296657+01:00||;True|2024-11-13T17:47:13.0183160+01:00||;True|2024-11-13T17:46:36.5183689+01:00||;True|2024-11-11T13:42:23.6578245+01:00||;True|2024-11-09T12:11:00.0777236+01:00||;True|2024-11-09T11:54:51.8503924+01:00||; @@ -82,10 +82,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 04/09/2024 19:25:14 - 01/12/2025 11:24:11 + 01/18/2025 13:55:56 - 01/12/2025 11:24:11 + 01/18/2025 13:55:56 12/26/2024 14:12:09 @@ -94,10 +94,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 12/26/2024 14:12:09 - 01/12/2025 11:23:42 + 01/18/2025 12:45:41 - 01/12/2025 11:23:42 + 01/18/2025 12:45:41 10/20/2023 22:35:02 @@ -130,13 +130,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 10/20/2023 22:35:04 - 01/12/2025 14:00:10 + 01/19/2025 13:38:20 12/23/2024 22:17:43 - 01/12/2025 14:00:10 + 01/19/2025 13:38:20 11/27/2023 09:49:58 @@ -214,10 +214,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 04/11/2022 19:09:46 - 01/09/2025 11:12:24 + 01/14/2025 20:53:13 - 01/09/2025 11:12:24 + 01/14/2025 20:53:13 08/19/2014 21:33:57 @@ -238,22 +238,22 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 04/30/2024 21:58:24 - 12/28/2024 10:07:41 + 01/19/2025 13:38:11 - 12/28/2024 10:07:41 + 01/19/2025 13:38:11 - 01/12/2025 11:24:11 + 01/19/2025 11:29:23 - 01/12/2025 11:24:11 + 01/19/2025 11:29:23 - 01/12/2025 14:24:23 + 01/19/2025 13:38:20 - 01/12/2025 14:24:23 + 01/19/2025 13:38:20 11/13/2012 13:19:34 @@ -442,10 +442,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121. 10/20/2023 22:33:58 - 01/10/2025 12:26:43 + 01/13/2025 19:24:21 - 01/10/2025 12:26:43 + 01/13/2025 19:24:21 12/28/2024 10:07:41 diff --git a/API_NetFramework/bin/DOCGEN.dll b/API_NetFramework/bin/DOCGEN.dll index 21c50ee2..6a759100 100644 Binary files a/API_NetFramework/bin/DOCGEN.dll and b/API_NetFramework/bin/DOCGEN.dll differ diff --git a/API_NetFramework/bin/DOCGEN.pdb b/API_NetFramework/bin/DOCGEN.pdb index 0c12b21d..7e28abc9 100644 Binary files a/API_NetFramework/bin/DOCGEN.pdb and b/API_NetFramework/bin/DOCGEN.pdb differ diff --git a/API_NetFramework/bin/OfficePrinter.dll b/API_NetFramework/bin/OfficePrinter.dll index 49203ebf..338635de 100644 Binary files a/API_NetFramework/bin/OfficePrinter.dll and b/API_NetFramework/bin/OfficePrinter.dll differ diff --git a/API_NetFramework/bin/OfficePrinter.pdb b/API_NetFramework/bin/OfficePrinter.pdb index 04a85dac..0cd4f248 100644 Binary files a/API_NetFramework/bin/OfficePrinter.pdb and b/API_NetFramework/bin/OfficePrinter.pdb differ diff --git a/API_NetFramework/bin/OnDocOffice.dll b/API_NetFramework/bin/OnDocOffice.dll index c529c147..6cf6cadd 100644 Binary files a/API_NetFramework/bin/OnDocOffice.dll and b/API_NetFramework/bin/OnDocOffice.dll differ diff --git a/API_NetFramework/bin/OnDocOffice.pdb b/API_NetFramework/bin/OnDocOffice.pdb index 4325354a..f14b3c86 100644 Binary files a/API_NetFramework/bin/OnDocOffice.pdb and b/API_NetFramework/bin/OnDocOffice.pdb differ diff --git a/API_NetFramework/bin/OnDoc_NetFramework.dll b/API_NetFramework/bin/OnDoc_NetFramework.dll index b382bbf7..72ba9f28 100644 Binary files a/API_NetFramework/bin/OnDoc_NetFramework.dll and b/API_NetFramework/bin/OnDoc_NetFramework.dll differ diff --git a/API_NetFramework/bin/OnDoc_NetFramework.pdb b/API_NetFramework/bin/OnDoc_NetFramework.pdb index bb97c2f1..91267137 100644 Binary files a/API_NetFramework/bin/OnDoc_NetFramework.pdb and b/API_NetFramework/bin/OnDoc_NetFramework.pdb differ diff --git a/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache b/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache index 9e3873cc..96a5cb9d 100644 Binary files a/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache and b/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache differ diff --git a/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll b/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll index b382bbf7..72ba9f28 100644 Binary files a/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll and b/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll differ diff --git a/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb b/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb index bb97c2f1..91267137 100644 Binary files a/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb and b/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.dll b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.dll index fdc5a4d8..f516114b 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.dll and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.dll differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.pdb b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.pdb index 10f31606..9ce038de 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.pdb and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/BarcodeLib.pdb differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.dll b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.dll index 0d9c0c91..6a759100 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.dll and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.dll differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.pdb b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.pdb index f8d3bcb0..7e28abc9 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.pdb and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/DOCGEN.pdb differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.dll b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.dll index 4bb6fc56..6a5785f6 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.dll and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.dll differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.pdb b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.pdb index 9150410f..2af6c559 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.pdb and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Database.pdb differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.dll b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.dll index dc7a1e44..35cf0bd7 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.dll and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.dll differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.pdb b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.pdb index be84dcbc..0ab52c16 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.pdb and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/Model.pdb differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.dll b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.dll index ec8bab14..338635de 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.dll and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.dll differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.pdb b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.pdb index bf9a752a..0cd4f248 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.pdb and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OfficePrinter.pdb differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.dll b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.dll index 2dec0cce..6cf6cadd 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.dll and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.dll differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.pdb b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.pdb index 20da657c..f14b3c86 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.pdb and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDocOffice.pdb differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.dll b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.dll index 65ce110e..72ba9f28 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.dll and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.dll differ diff --git a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.pdb b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.pdb index ea61b297..91267137 100644 Binary files a/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.pdb and b/API_NetFramework/obj/Debug/Package/PackageTmp/bin/OnDoc_NetFramework.pdb differ diff --git a/Client/Diverses/SplashScreen.Designer.cs b/Client/Diverses/SplashScreen.Designer.cs index d031eccd..fd89573c 100644 --- a/Client/Diverses/SplashScreen.Designer.cs +++ b/Client/Diverses/SplashScreen.Designer.cs @@ -54,7 +54,7 @@ this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(134, 26); this.label1.TabIndex = 1; - this.label1.Text = "Version 0.90"; + this.label1.Text = "Version 0.95"; // // label2 // @@ -64,7 +64,7 @@ this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(168, 26); this.label2.TabIndex = 2; - this.label2.Text = "16. Januar 2025"; + this.label2.Text = "19. Januar 2025"; // // SplashScreen // diff --git a/Client/DocMgmt/Dokumenterstellung.cs b/Client/DocMgmt/Dokumenterstellung.cs index 874c2048..42f0e5d8 100644 --- a/Client/DocMgmt/Dokumenterstellung.cs +++ b/Client/DocMgmt/Dokumenterstellung.cs @@ -21,6 +21,7 @@ using static BroadcastListener.Classes.Factory; using OnDoc.Helper; using DOCGEN; using System.Globalization; +using System.Threading; namespace OnDoc.DocMgmt { @@ -183,12 +184,17 @@ namespace OnDoc.DocMgmt //Erstellung Office if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice) { + Logging.Logging.Debug("Dokumentbearbeitung Erstellungsart.ErstellungInOffice", "OnDocClient", ""); string filename = AppParams.tempdir + dokumentid + "_Erstellt_." + dok.extension; + System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument)); DB db = new DB(AppParams.connectionstring); db.Save_To_DB(dokdata.Dokumentid, filename); db = null; + Logging.Logging.Debug("Dokumentbearbtung Saved", "OnDocClient", ""); System.IO.File.Delete(filename); + Logging.Logging.Debug("Dokumentbearbtung Deleted", "OnDocClient", ""); + filename = AppParams.tempdir + dokumentid +"." + dok.extension; this.filename = filename; DocFunction = 6; @@ -198,10 +204,11 @@ namespace OnDoc.DocMgmt //Bearbeiten if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten) { - string filename = AppParams.tempdir + dokumentid + "." + dok.extension; + Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentBearbeiten", "OnDocClient", ""); + //string filename = AppParams.tempdir + dokumentid + "." + dok.extension; + string filename = AppParams.tempdir + dokumentid + "_Erstellt_." + dok.extension; System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument)); DB db = new DB(AppParams.connectionstring); - db.Save_To_DB(dokdata.Dokumentid, filename); db.Get_Tabledata("Select count(*) from idvmakro_office_vorlage where office_vorlagenr=" + ucAllgemeineDokumentParam1.vorlagenr.ToString(), false, true); if (Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][0]) > 0) @@ -210,13 +217,17 @@ namespace OnDoc.DocMgmt runmacros = true; } db = null; + Logging.Logging.Debug("Dokumentbearbeitung DocFunction1", "OnDocClient", ""); DocFunction = 1; System.IO.File.Delete(filename); + filename = AppParams.tempdir + dokumentid + "." + dok.extension; + this.filename = filename; this.Close(); return; } if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentPreview) { + Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentBearbeiten", "DokumentPreview", ""); string filename = AppParams.tempdir + dokumentid + "." + dok.extension; System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument)); DB db = new DB(AppParams.connectionstring); @@ -225,6 +236,7 @@ namespace OnDoc.DocMgmt } if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF) { + Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentAlsPDF", "DokumentPreview", ""); //Generator.DocToPDF(dokumentid, ref dok); dok.extension = "pdf"; string filename = AppParams.tempdir + dokumentid + "." + dok.extension; @@ -235,6 +247,7 @@ namespace OnDoc.DocMgmt if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentSpäterBearbeiten) { + Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentSpäterBearbeiten", "DokumentPreview", ""); string filename = AppParams.tempdir + dokumentid + "." + dok.extension; System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument)); DB db = new DB(AppParams.connectionstring); diff --git a/Client/DocMgmt/Dokumentpaket.cs b/Client/DocMgmt/Dokumentpaket.cs index bd4e19b6..b9cf0a6c 100644 --- a/Client/DocMgmt/Dokumentpaket.cs +++ b/Client/DocMgmt/Dokumentpaket.cs @@ -63,6 +63,19 @@ namespace OnDoc.DocMgmt this.dokumentpaketnr = dokumentpaketnr; this.partnernr = partnernr; } + public Dokumentpaket(int dokumentpaketnr, int partnernr, int profilnr) + { + InitializeComponent(); + this.Style.TitleBar.BackColor = Theaming.Titelbar(); + this.Style.TitleBar.ForeColor = Theaming.TitelFontColor(); + this.Style.ShadowOpacity = Theaming.ShadowOpacity; + this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity; + Broadcaster().AddListener(this); + Closing += Form_Closing; + this.dokumentpaketnr = dokumentpaketnr; + this.partnernr = partnernr; + this.profilnr = profilnr; + } public Dokumentpaket(int profilnr) { @@ -232,6 +245,7 @@ namespace OnDoc.DocMgmt private void add_uc(System.Data.DataRow r) { UCAllgemeineDokumentParam newdoc = new UCAllgemeineDokumentParam(); + Logging.Logging.Debug("Dokumentpaket - Profilnr", "Dokumentpaket", this.profilnr.ToString()); newdoc.profilnr = profilnr; newdoc.Dock= DockStyle.Fill; newdoc.checkpartner = false; @@ -483,6 +497,42 @@ namespace OnDoc.DocMgmt Logging.DocLog.Info("Dokument erstellt", "Dokumentpaket", dokumentid, uc.partnernr.ToString(), "Dokument erstellt"); DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir, AppParams.RESTURI,AppParams.apikey,AppParams.Office_Fill_DocIO); clsdok dok = new clsdok("", "", ""); + if (dokdata.barcode_type == "1") + { + DB dB = new DB(AppParams.connectionstring); + dB.clear_parameter(); + dB.add_parameter("@dokumentid", dokumentid); + dB.add_parameter("@DokumentidBR", ""); + dB.add_parameter("@BARCODEFONTNAME", ""); + dB.add_parameter("@BARCODEFONTSIZE", ""); + dB.add_parameter("@BarcodeKantenlaenge", ""); + dB.Get_Tabledata("sp_get_OnDoc_barcodetype_and_value", true, false); + dokdata.barcode_content = dB.dsdaten.Tables[0].Rows[0][1].ToString(); + dokdata.barcode_formatn = dB.dsdaten.Tables[0].Rows[0][3].ToString(); + dokdata.barcode_text = dB.dsdaten.Tables[0].Rows[0][4].ToString(); + dokdata.barcode_kantenlaenge = dB.dsdaten.Tables[0].Rows[0][5].ToString(); + dokdata.Zusatz_Font = dB.dsdaten.Tables[0].Rows[0][6].ToString(); + dokdata.Zusatz_FontSize = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][7]); + dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][8]); + dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][9]); + + //dokdata.barcode_type= dB.dsdaten.Tables[0].Rows[0][3].ToString(); + string sql = ""; + sql = "select bcpt, bcpl, bcw, bch, bchorizontal from OnDocBarcodeMpping "; + sql = sql + "where orig_bcpt = " + dokdata.barcode_top.ToString() + " and orig_bcpl=" + dokdata.barcode_left.ToString() + " "; + sql = sql + "and orig_bcw=" + dokdata.barcode_width.ToString() + " and orig_bch=" + dokdata.barcode_height.ToString(); + dB.Get_Tabledata(sql, false, true); + if (dB.dsdaten.Tables[0].Rows.Count > 0) + { + Logging.Logging.Debug("Barcode-Übersteuerung" + dokdata.DokumenttypNr.ToString(), "Dokumenterstellung", ""); + dokdata.barcode_left = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpl"]); + dokdata.barcode_top = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpt"]); + dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcw"]); + dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bch"]); + } + + dB = null; + } if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice) { //panelword.Visible = true; @@ -520,9 +570,22 @@ namespace OnDoc.DocMgmt db.Save_To_DB(dokdata.Dokumentid, filename); db = null; - System.Diagnostics.Process.Start("winword.exe", filename); - clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word"); - + switch (dok.doktype) + { + case "W": + System.Diagnostics.Process.Start("winword.exe", filename); + clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word"); + break; + case "X": + System.Diagnostics.Process.Start("excel.exe", " " + filename); + clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Excel"); + break; + case "P": + System.Diagnostics.Process.Start(filename); + break; + default: + break; + } } if (uc.docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF) { diff --git a/Client/Program.cs b/Client/Program.cs index ae8286e9..7f84a81a 100644 --- a/Client/Program.cs +++ b/Client/Program.cs @@ -62,7 +62,7 @@ namespace OnDoc } string destfile = AppParams.tempdir + DateTime.Now.ToString("yyyyMMddHHmmss") + "_tmpfile.edk"; System.IO.File.Copy(args[0],destfile); - //System.IO.File.Delete(args[0]); + System.IO.File.Delete(args[0]); //EDK_Data.Load_EDK_File(args[0]); } diff --git a/Client/Start.cs b/Client/Start.cs index dd654400..64180851 100644 --- a/Client/Start.cs +++ b/Client/Start.cs @@ -188,7 +188,7 @@ namespace OnDoc private void timer1_Tick(object sender, EventArgs e) { - + string[] files = Directory.GetFiles(AppParams.tempdir); for (int i = 0; i < files.Length; i++) { @@ -206,13 +206,18 @@ namespace OnDoc private void EDK_Call(string filename) { + this.TopMost = true; + System.Windows.Forms.Application.DoEvents(); + this.BringToFront(); + this.TopMost = false; + System.Windows.Forms.Application.DoEvents(); if (dokList1.profilnr == 0) return; DB dB = new DB(AppParams.connectionstring); EDK_Data.Load_EDK_File(filename); dB.save_edk(filename, AppParams.CurrentMitarbeiter); - //System.IO.File.Delete(filename); + System.IO.File.Delete(filename); if (EDK_Data.toexecute == true) { exec_edk(filename); @@ -220,6 +225,7 @@ namespace OnDoc } private void URI_Call(string filename) { + this.BringToFront(); if (dokList1.profilnr == 0) return; if (System.IO.File.Exists(filename)) { diff --git a/Client/UIControls/DokList.Designer.cs b/Client/UIControls/DokList.Designer.cs index 09acb2a3..5993980d 100644 --- a/Client/UIControls/DokList.Designer.cs +++ b/Client/UIControls/DokList.Designer.cs @@ -36,6 +36,8 @@ namespace OnDoc.UICintrols this.dokumentAnzeigenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.dokumentBearbeitenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.dokumentLöschenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); + this.zurUnterschriftenPrüfungToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.archivierenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.druckenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.dokumentKopierenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -154,8 +156,6 @@ namespace OnDoc.UICintrols this.RibbonButtonCreateNewDoc = new System.Windows.Forms.RibbonButton(); this.ribbonButton5 = new System.Windows.Forms.RibbonButton(); this.dokwerte1 = new OnDoc.UIControls.Dokwerte(); - this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); - this.zurUnterschriftenPrüfungToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.ctxMenuDokList.SuspendLayout(); this.toolStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -188,7 +188,7 @@ namespace OnDoc.UICintrols this.historyToolStripMenuItem, this.dokumentFürPartnerErstellenToolStripMenuItem}); this.ctxMenuDokList.Name = "ctxMenuDokList"; - this.ctxMenuDokList.Size = new System.Drawing.Size(280, 390); + this.ctxMenuDokList.Size = new System.Drawing.Size(280, 368); // // dokumentAnzeigenToolStripMenuItem // @@ -213,6 +213,19 @@ namespace OnDoc.UICintrols this.dokumentLöschenToolStripMenuItem.Text = "Dokument löschen"; this.dokumentLöschenToolStripMenuItem.Click += new System.EventHandler(this.dokumentLöschenToolStripMenuItem_Click); // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(276, 6); + // + // zurUnterschriftenPrüfungToolStripMenuItem + // + this.zurUnterschriftenPrüfungToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Approval_16x16_32; + this.zurUnterschriftenPrüfungToolStripMenuItem.Name = "zurUnterschriftenPrüfungToolStripMenuItem"; + this.zurUnterschriftenPrüfungToolStripMenuItem.Size = new System.Drawing.Size(279, 22); + this.zurUnterschriftenPrüfungToolStripMenuItem.Text = "Zur Unterschriften-Prüfung"; + this.zurUnterschriftenPrüfungToolStripMenuItem.Click += new System.EventHandler(this.zurUnterschriftenPrüfungToolStripMenuItem_Click); + // // archivierenToolStripMenuItem // this.archivierenToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("archivierenToolStripMenuItem.Image"))); @@ -1050,6 +1063,8 @@ namespace OnDoc.UICintrols this.RibbonCBProfil.Name = "RibbonCBProfil"; this.RibbonCBProfil.SelectedIndex = -1; this.RibbonCBProfil.TextBoxText = ""; + this.RibbonCBProfil.DropDownItemClicked += new System.Windows.Forms.RibbonComboBox.RibbonItemEventHandler(this.RibbonCBProfil_DropDownItemClicked); + this.RibbonCBProfil.Click += new System.EventHandler(this.RibbonCBProfil_Click); // // ribbonButton1 // @@ -1270,19 +1285,6 @@ namespace OnDoc.UICintrols this.dokwerte1.Size = new System.Drawing.Size(0, 694); this.dokwerte1.TabIndex = 7; // - // toolStripMenuItem2 - // - this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(276, 6); - // - // zurUnterschriftenPrüfungToolStripMenuItem - // - this.zurUnterschriftenPrüfungToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Approval_16x16_32; - this.zurUnterschriftenPrüfungToolStripMenuItem.Name = "zurUnterschriftenPrüfungToolStripMenuItem"; - this.zurUnterschriftenPrüfungToolStripMenuItem.Size = new System.Drawing.Size(279, 22); - this.zurUnterschriftenPrüfungToolStripMenuItem.Text = "Zur Unterschriften-Prüfung"; - this.zurUnterschriftenPrüfungToolStripMenuItem.Click += new System.EventHandler(this.zurUnterschriftenPrüfungToolStripMenuItem_Click); - // // DokList // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/Client/UIControls/DokList.cs b/Client/UIControls/DokList.cs index 4aec160d..6c29dd48 100644 --- a/Client/UIControls/DokList.cs +++ b/Client/UIControls/DokList.cs @@ -50,6 +50,7 @@ using Syncfusion.Data; using Syncfusion.WinForms.Input; using Syncfusion.Windows.Forms.CellGrid.ScrollAxis; using Syncfusion.Windows.Forms.Edit.Utils; +using Syncfusion.WinForms.DataGrid.Serialization; @@ -163,9 +164,11 @@ namespace OnDoc.UICintrols Ansichten = db.dsdaten.Tables[0].Copy(); //string standardview = ""; System.Data.DataRow standardview = null; + int index = 0; + int selindex = 0; foreach (System.Data.DataRow dr in Ansichten.Rows) { - + RibbonLabel rl = new RibbonLabel(); rl.Text = dr["bezeichnung"].ToString(); rl.Tag = Convert.ToInt32(dr["id"]); @@ -190,16 +193,19 @@ namespace OnDoc.UICintrols if (Convert.ToBoolean(dr["standard"]) == true && Bezeichnung == "") { ribbonCBAnsicht.SelectedItem = rl; + selindex = index; standardview = dr; //standardview = dr["gridsettings"].ToString(); } if (rl.Text == Bezeichnung) { - ribbonCBAnsicht.SelectedItem = rl; + //ribbonCBAnsicht.SelectedItem = rl; //standardview = dr["gridsettings"].ToString(); standardview = dr; } + index = index + 1; } + if (selindex>0) { ribbonCBAnsicht.SelectedIndex=selindex; } db = null; // if (standardview != "") { refresh_view(standardview); } if (standardview != null) { refresh_view(standardview); } @@ -481,6 +487,7 @@ namespace OnDoc.UICintrols Logging.DocLog.Info("Verantwortung für Bearbeitung übernommen", "Doklist", selected_dokumentid, selected_partnernr, "Verantwortung übernommen"); } } + Logging.Logging.Debug("Vor Dok In Bearbeitung", "ondoc client", ""); db.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter); } @@ -759,7 +766,7 @@ namespace OnDoc.UICintrols public void createdocumentpaket(int partnernr, int dokumentpaketnr) { - Dokumentpaket dp = new Dokumentpaket(dokumentpaketnr, partnernr); + Dokumentpaket dp = new Dokumentpaket(dokumentpaketnr, partnernr, this.profilnr); dp.Show(); } public void createnewdoc(int partnernr, int dokumenttypnr, bool Favoriten = false, string interaktion = "Yes", string showdoc = "Yes") @@ -845,7 +852,7 @@ namespace OnDoc.UICintrols db = null; return; } - + Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", ""); db.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter); db = null; clsProcessWatch.AddToList(selected_dokumentid, filename, "Word"); @@ -1137,18 +1144,24 @@ namespace OnDoc.UICintrols OfficePrinter.OnDocOffice op = new OfficePrinter.OnDocOffice(); Filename = AppParams.tempdir + dokumentid + "." + dok.extension; fh.SaveBase64ToFile(dok.dokument, Filename); - op.PrintInWord(Filename, AppParams.wordprintmacro, AppParams.OfficeSpleep1); + string error = op.PrintInWord(Filename, AppParams.wordprintmacro, AppParams.OfficeSpleep1); + if (error != "") + { + Logging.Logging.Debug("Print Error: " + error, "OnDoc", dokumentid); + } + System.IO.File.Delete(Filename); op = null; break; case "X": - System.Diagnostics.Process.Start("winword.exe", "/w " + Filename); + Filename = AppParams.tempdir + dokumentid + "." + dok.extension; + fh.SaveBase64ToFile(dok.dokument, Filename); + System.Diagnostics.Process.Start("excel.exe", "/w " + Filename); break; case "P": - DocPreview docPreview = new DocPreview(); - docPreview.Show_Doc(dokumentid); - docPreview.printpdf(); - docPreview.Dispose(); + Filename = AppParams.tempdir + dokumentid + "." + dok.extension; + fh.SaveBase64ToFile(dok.dokument, Filename); + System.Diagnostics.Process.Start(Filename); break; default: break; @@ -1681,16 +1694,10 @@ return; } return Encoding.UTF8.GetString(Convert.FromBase64String(text)); } - //private void ribbonButton4_Click(object sender, EventArgs e) - //{ - // if (System.IO.File.Exists(@"x:\gridsettings.xml")) - // { - // using (var file = File.Open(@"x:\gridsettings.xml", FileMode.Open)) - // { - // this.sfDataGrid1.Deserialize(file); - // } - // } - //} + private void ribbonButton4_Click(object sender, EventArgs e) + { + + } private void ribbonCBAnsicht_DropDownItemClicked(object sender, System.Windows.Forms.RibbonItemEventArgs e) @@ -1739,6 +1746,7 @@ return; { MemoryStream ms = new MemoryStream(); this.sfDataGrid1.Serialize(ms); + string inputAsString = Convert.ToBase64String(ms.ToArray()); DB db = new DB(AppParams.connectionstring); @@ -1805,6 +1813,11 @@ return; private void ribbonButton4_Click_1(object sender, EventArgs e) { + //using (var file = File.Open(@"x:\DataGrid.xml", FileMode.Open)) + //{ + // this.sfDataGrid1.Deserialize(file); + //} + string bez = ribbonCBAnsicht.SelectedItem.Text.Trim(); string id = ribbonCBAnsicht.SelectedItem.Tag.ToString(); @@ -1819,7 +1832,12 @@ return; db.Exec_SQL("Update mitarbeiter_gridsettings set gridsettings='" + inputAsString + "' where id=" + id.ToString()); db = null; - + //using (var file = File.Create(@"x:\DataGrid.xml")) + //{ + // SerializationOptions options = new SerializationOptions(); + // options.SerializeSorting = false; + // this.sfDataGrid1.Serialize(file, options); + //} } @@ -2184,6 +2202,16 @@ return; { ribbonButtonToApproval_Click(sender, e); } + + private void RibbonCBProfil_Click(object sender, EventArgs e) + { + // this.profilnr = Convert.ToInt32(this.RibbonCBProfil.SelectedValue); + } + + private void RibbonCBProfil_DropDownItemClicked(object sender, System.Windows.Forms.RibbonItemEventArgs e) + { + this.profilnr = Convert.ToInt32(RibbonCBProfil.SelectedItem.Tag); + } } diff --git a/Client/UIControls/Partnersuche.Designer.cs b/Client/UIControls/Partnersuche.Designer.cs index addc9716..92192756 100644 --- a/Client/UIControls/Partnersuche.Designer.cs +++ b/Client/UIControls/Partnersuche.Designer.cs @@ -152,7 +152,7 @@ this.sfButton2.Name = "sfButton2"; this.sfButton2.Size = new System.Drawing.Size(108, 28); this.sfButton2.TabIndex = 7; - this.sfButton2.Text = "Abbruch"; + this.sfButton2.Text = "Abbrechen"; this.sfButton2.Click += new System.EventHandler(this.sfButton2_Click); // // chksaldiert diff --git a/Client/UIControls/UCAllgemeineDokumentParam.cs b/Client/UIControls/UCAllgemeineDokumentParam.cs index 30ac80d2..2887f8ca 100644 --- a/Client/UIControls/UCAllgemeineDokumentParam.cs +++ b/Client/UIControls/UCAllgemeineDokumentParam.cs @@ -262,23 +262,31 @@ namespace OnDoc.UIControls { } + Logging.Logging.Debug("Profilnr", "OnDOc", profilnr.ToString()); if (profilnr != 0) { + db.Get_Tabledata("Select * from profil where profilnr=" + profilnr, false, true); int ulinks = 0; int urechts = 0; try { - ulinks = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftlinks"].ToString()); + ulinks = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftlinks"]); cbboxunterschriftlinks.SelectedValue = ulinks; } - catch { ulinks = 0; } + catch { + ulinks = 0; + Logging.Logging.Debug("Unterschrift links nicht zugewiesen","DokPaket",ulinks.ToString()+" / "+ profilnr.ToString()); + } try { - urechts = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftrechts"].ToString()); + urechts = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftrechts"]); cbboxunterschriftrechts.SelectedValue = urechts; } - catch { urechts = 0; } + catch { + urechts = 0; + Logging.Logging.Debug("Unterschrift rechts nicht zugewiesen", "DokPaket", urechts.ToString() + " / " + profilnr.ToString()); + } } System.Data.DataTable dokwertlist = new System.Data.DataTable(); diff --git a/Client/bin/Debug/DOCGEN.dll b/Client/bin/Debug/DOCGEN.dll index 21c50ee2..6a759100 100644 Binary files a/Client/bin/Debug/DOCGEN.dll and b/Client/bin/Debug/DOCGEN.dll differ diff --git a/Client/bin/Debug/DOCGEN.pdb b/Client/bin/Debug/DOCGEN.pdb index 0c12b21d..7e28abc9 100644 Binary files a/Client/bin/Debug/DOCGEN.pdb and b/Client/bin/Debug/DOCGEN.pdb differ diff --git a/Client/bin/Debug/OfficePrinter.dll b/Client/bin/Debug/OfficePrinter.dll index 49203ebf..338635de 100644 Binary files a/Client/bin/Debug/OfficePrinter.dll and b/Client/bin/Debug/OfficePrinter.dll differ diff --git a/Client/bin/Debug/OfficePrinter.pdb b/Client/bin/Debug/OfficePrinter.pdb index 04a85dac..0cd4f248 100644 Binary files a/Client/bin/Debug/OfficePrinter.pdb and b/Client/bin/Debug/OfficePrinter.pdb differ diff --git a/Client/bin/Debug/OnDoc.exe b/Client/bin/Debug/OnDoc.exe index c110e0a9..02722f1e 100644 Binary files a/Client/bin/Debug/OnDoc.exe and b/Client/bin/Debug/OnDoc.exe differ diff --git a/Client/bin/Debug/OnDoc.pdb b/Client/bin/Debug/OnDoc.pdb index 602f6507..1dcb5c8b 100644 Binary files a/Client/bin/Debug/OnDoc.pdb and b/Client/bin/Debug/OnDoc.pdb differ diff --git a/Client/bin/Debug/OnDocClient.zip b/Client/bin/Debug/OnDocClient.zip index 660bd73e..c1eb1acc 100644 Binary files a/Client/bin/Debug/OnDocClient.zip and b/Client/bin/Debug/OnDocClient.zip differ diff --git a/Client/bin/Debug/OnDocOffice.dll b/Client/bin/Debug/OnDocOffice.dll index c529c147..6cf6cadd 100644 Binary files a/Client/bin/Debug/OnDocOffice.dll and b/Client/bin/Debug/OnDocOffice.dll differ diff --git a/Client/bin/Debug/OnDocOffice.pdb b/Client/bin/Debug/OnDocOffice.pdb index 4325354a..f14b3c86 100644 Binary files a/Client/bin/Debug/OnDocOffice.pdb and b/Client/bin/Debug/OnDocOffice.pdb differ diff --git a/Client/bin/Debug/de-DE/OnDoc.resources.dll b/Client/bin/Debug/de-DE/OnDoc.resources.dll index 08a5c326..c06254ea 100644 Binary files a/Client/bin/Debug/de-DE/OnDoc.resources.dll and b/Client/bin/Debug/de-DE/OnDoc.resources.dll differ diff --git a/Client/obj/Debug/Client.csproj.AssemblyReference.cache b/Client/obj/Debug/Client.csproj.AssemblyReference.cache index 02bdef00..bee511e6 100644 Binary files a/Client/obj/Debug/Client.csproj.AssemblyReference.cache and b/Client/obj/Debug/Client.csproj.AssemblyReference.cache differ diff --git a/Client/obj/Debug/Client.csproj.GenerateResource.cache b/Client/obj/Debug/Client.csproj.GenerateResource.cache index 83d4b43e..e95f7aa3 100644 Binary files a/Client/obj/Debug/Client.csproj.GenerateResource.cache and b/Client/obj/Debug/Client.csproj.GenerateResource.cache differ diff --git a/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 3ae16f31..11adedb0 100644 Binary files a/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Client/obj/Debug/OnDoc.exe b/Client/obj/Debug/OnDoc.exe index c110e0a9..02722f1e 100644 Binary files a/Client/obj/Debug/OnDoc.exe and b/Client/obj/Debug/OnDoc.exe differ diff --git a/Client/obj/Debug/OnDoc.pdb b/Client/obj/Debug/OnDoc.pdb index 602f6507..1dcb5c8b 100644 Binary files a/Client/obj/Debug/OnDoc.pdb and b/Client/obj/Debug/OnDoc.pdb differ diff --git a/Client/obj/Debug/de-DE/OnDoc.resources.dll b/Client/obj/Debug/de-DE/OnDoc.resources.dll index 08a5c326..c06254ea 100644 Binary files a/Client/obj/Debug/de-DE/OnDoc.resources.dll and b/Client/obj/Debug/de-DE/OnDoc.resources.dll differ diff --git a/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs b/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs index 5c61a5cd..c0b51fc5 100644 --- a/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs +++ b/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs @@ -131,6 +131,8 @@ namespace DOCGEN.Generator case "PDF": case "ACROBAT": case "FORMULAR": case "DOKUMENT": clsdok dokpdf = new clsdok("", "", ""); dokpdf.dokument= dt.Rows[0][0].ToString(); + dokpdf.extension = Extension; + dokpdf.doktype = "P"; return dokpdf; //break ; default: diff --git a/DOCGEN/bin/Debug/DOCGEN.dll b/DOCGEN/bin/Debug/DOCGEN.dll index 21c50ee2..6a759100 100644 Binary files a/DOCGEN/bin/Debug/DOCGEN.dll and b/DOCGEN/bin/Debug/DOCGEN.dll differ diff --git a/DOCGEN/bin/Debug/DOCGEN.pdb b/DOCGEN/bin/Debug/DOCGEN.pdb index 0c12b21d..7e28abc9 100644 Binary files a/DOCGEN/bin/Debug/DOCGEN.pdb and b/DOCGEN/bin/Debug/DOCGEN.pdb differ diff --git a/DOCGEN/bin/Debug/OfficePrinter.dll b/DOCGEN/bin/Debug/OfficePrinter.dll index 49203ebf..338635de 100644 Binary files a/DOCGEN/bin/Debug/OfficePrinter.dll and b/DOCGEN/bin/Debug/OfficePrinter.dll differ diff --git a/DOCGEN/bin/Debug/OfficePrinter.pdb b/DOCGEN/bin/Debug/OfficePrinter.pdb index 04a85dac..0cd4f248 100644 Binary files a/DOCGEN/bin/Debug/OfficePrinter.pdb and b/DOCGEN/bin/Debug/OfficePrinter.pdb differ diff --git a/DOCGEN/bin/Debug/OnDocOffice.dll b/DOCGEN/bin/Debug/OnDocOffice.dll index c529c147..6cf6cadd 100644 Binary files a/DOCGEN/bin/Debug/OnDocOffice.dll and b/DOCGEN/bin/Debug/OnDocOffice.dll differ diff --git a/DOCGEN/bin/Debug/OnDocOffice.pdb b/DOCGEN/bin/Debug/OnDocOffice.pdb index 4325354a..f14b3c86 100644 Binary files a/DOCGEN/bin/Debug/OnDocOffice.pdb and b/DOCGEN/bin/Debug/OnDocOffice.pdb differ diff --git a/DOCGEN/obj/Debug/DOCGEN.dll b/DOCGEN/obj/Debug/DOCGEN.dll index 21c50ee2..6a759100 100644 Binary files a/DOCGEN/obj/Debug/DOCGEN.dll and b/DOCGEN/obj/Debug/DOCGEN.dll differ diff --git a/DOCGEN/obj/Debug/DOCGEN.pdb b/DOCGEN/obj/Debug/DOCGEN.pdb index 0c12b21d..7e28abc9 100644 Binary files a/DOCGEN/obj/Debug/DOCGEN.pdb and b/DOCGEN/obj/Debug/DOCGEN.pdb differ diff --git a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache index b8155da7..f4e3165d 100644 Binary files a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache and b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache differ diff --git a/OfficePrinter/Class1.cs b/OfficePrinter/Class1.cs index 6be94a50..8deac2c2 100644 --- a/OfficePrinter/Class1.cs +++ b/OfficePrinter/Class1.cs @@ -6,6 +6,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Office.Interop.Word; + namespace OfficePrinter @@ -32,8 +33,9 @@ namespace OfficePrinter return; } - public void PrintInWord(string Filename, string printmacro, int OfficeSleep) + public string PrintInWord(string Filename, string printmacro, int OfficeSleep) { + string error = ""; Application appWord = new Application(); appWord.NormalTemplate.Saved = true; Microsoft.Office.Interop.Word.Document wordDocument = new Microsoft.Office.Interop.Word.Document(); @@ -41,20 +43,20 @@ namespace OfficePrinter Thread.Sleep(OfficeSleep); appWord.Visible = true; - if (printmacro == "") return; + if (printmacro == "") return ""; try { appWord.Run(printmacro); } - catch - { + catch (Exception e) { + error = e.Message.ToString()+" / "+printmacro; } Thread.Sleep(OfficeSleep); wordDocument.Close(); wordDocument = null; appWord.Quit(SaveChanges: false); appWord = null; - return; + return error; } diff --git a/OfficePrinter/bin/Debug/OfficePrinter.dll b/OfficePrinter/bin/Debug/OfficePrinter.dll index 49203ebf..338635de 100644 Binary files a/OfficePrinter/bin/Debug/OfficePrinter.dll and b/OfficePrinter/bin/Debug/OfficePrinter.dll differ diff --git a/OfficePrinter/bin/Debug/OfficePrinter.pdb b/OfficePrinter/bin/Debug/OfficePrinter.pdb index 04a85dac..0cd4f248 100644 Binary files a/OfficePrinter/bin/Debug/OfficePrinter.pdb and b/OfficePrinter/bin/Debug/OfficePrinter.pdb differ diff --git a/OfficePrinter/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/OfficePrinter/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 736945fd..2f8a9d32 100644 Binary files a/OfficePrinter/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/OfficePrinter/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/OfficePrinter/obj/Debug/OfficePrinter.dll b/OfficePrinter/obj/Debug/OfficePrinter.dll index 49203ebf..338635de 100644 Binary files a/OfficePrinter/obj/Debug/OfficePrinter.dll and b/OfficePrinter/obj/Debug/OfficePrinter.dll differ diff --git a/OfficePrinter/obj/Debug/OfficePrinter.pdb b/OfficePrinter/obj/Debug/OfficePrinter.pdb index 04a85dac..0cd4f248 100644 Binary files a/OfficePrinter/obj/Debug/OfficePrinter.pdb and b/OfficePrinter/obj/Debug/OfficePrinter.pdb differ diff --git a/OnDocOffice/bin/Debug/OnDocOffice.dll b/OnDocOffice/bin/Debug/OnDocOffice.dll index c529c147..6cf6cadd 100644 Binary files a/OnDocOffice/bin/Debug/OnDocOffice.dll and b/OnDocOffice/bin/Debug/OnDocOffice.dll differ diff --git a/OnDocOffice/bin/Debug/OnDocOffice.pdb b/OnDocOffice/bin/Debug/OnDocOffice.pdb index 4325354a..f14b3c86 100644 Binary files a/OnDocOffice/bin/Debug/OnDocOffice.pdb and b/OnDocOffice/bin/Debug/OnDocOffice.pdb differ diff --git a/OnDocOffice/clsoffice.cs b/OnDocOffice/clsoffice.cs index fd2d759d..c39e0ece 100644 --- a/OnDocOffice/clsoffice.cs +++ b/OnDocOffice/clsoffice.cs @@ -314,15 +314,19 @@ namespace OnDocOffice if (runmacros == true) { + Logging.Logging.Debug("Makros auslesen", "Edit_Document",dokumentid); Database.DB db = new Database.DB(connectstring); db.Get_Tabledata("Select * from ondoc_macros where dokumentid='" + dokumentid + "' order by reihenfolge", false, true); foreach (DataRow dr in db.dsdaten.Tables[0].Rows) { try { + Logging.Logging.Debug("Makro ", "Edit_Document", dr[0].ToString()); word.Run(dr[0].ToString()); } - catch (Exception e) { string a = e.Message; } + catch (Exception e) { + Logging.Logging.Debug("MakroError ", "Edit_Document", e.Message); + string a = e.Message; } } } //clsProcessWatch.AddToList(dokumentid, filename, "Word"); @@ -619,19 +623,22 @@ namespace OnDocOffice cursortm = ""; foreach (clsDocValue dv in docdata.DocValues) { - if (dv.TMBeginn.ToString().Contains("Tagesdatum")){ + if (dv.TMBeginn.ToString().Contains("Tagesdatum")) + { int a = 1; } try { - if (dv.TMBeginn.ToString().Contains("TGEDKCursor")) { - //if (dv.TMBeginn.ToString() == "TGEDKCursor" || dv.TMBeginn.ToString() == "TGEDKCursorB" || - // dv.FieldName.ToString() == "TGEDKCursor" || dv.FieldName.ToString() == "TGEDKCursorB") { + if (dv.TMBeginn.ToString().Contains("TGEDKCursor")) + { + //if (dv.TMBeginn.ToString() == "TGEDKCursor" || dv.TMBeginn.ToString() == "TGEDKCursorB" || + // dv.FieldName.ToString() == "TGEDKCursor" || dv.FieldName.ToString() == "TGEDKCursorB") { cursorpositionieren = true; cursortm = dv.TMBeginn.ToString(); //break; } - if (dv.FieldName.ToString().Contains("TGEDKCursor")){ + if (dv.FieldName.ToString().Contains("TGEDKCursor")) + { cursorpositionieren = true; cursorfeld = dv.FieldName.ToString(); //break; @@ -640,47 +647,33 @@ namespace OnDocOffice catch { } // Logging.Logging.Debug(dv.TMBeginn.ToString() + " / " + dv.TMEnd.ToString(), dv.Value.ToString(), dokumentid); dialogGenerate.add_progress((int)progressstep); - if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() == "" && !dv.TMBeginn.ToString().Contains("TGEDKCurosr")) - { - - try + + //20250119 - nur befüllte werte übermitteln' + if (dv.Value.ToString().Trim() != "") + { + if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() == "" && !dv.TMBeginn.ToString().Contains("TGEDKCurosr")) { - Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select", dokumentid); - worddoc.Bookmarks[dv.TMBeginn.ToString()].Select(); - //Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select-End", dokumentid); - word.Selection.Text = dv.Value.ToString(); - //Logging.Logging.Debug(dv.TMBeginn.ToString(), "Text-End", dokumentid); - - //pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; - //pos2 = word.Selection.End; - // Logging.Logging.Debug(dv.TMBeginn.ToString(), "Selection-End", dokumentid); - - //------------------------------ - if (dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonB" || - dv.TMBeginn.ToString().Substring(0, 23) == "XTGEDKVornameNameBetreue" || - dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonZ") - { - pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; - pos2 = word.Selection.End; - word.Selection.MoveLeft(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 1); - word.Selection.TypeText(Text: ""); - word.Selection.SetRange(Start: pos + 1, End: pos2 + 1); - - var withBlock = worddoc.Bookmarks; - withBlock.Add(Range: word.Selection.Range, Name: dv.TMBeginn.ToString()); - withBlock.DefaultSorting = Microsoft.Office.Interop.Word.WdBookmarkSortBy.wdSortByName; - withBlock.ShowHidden = false; - } - else + try { - if (dv.TMBeginn.ToString().Substring(0, 22) == "XTGEDKDirektTelefonDokZ" || - dv.TMBeginn.ToString().Substring(0, 20) == "XTGEDKVornameNameDokZ") + + Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select", dokumentid); + worddoc.Bookmarks[dv.TMBeginn.ToString()].Select(); + //Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select-End", dokumentid); + word.Selection.Text = dv.Value.ToString(); + //Logging.Logging.Debug(dv.TMBeginn.ToString(), "Text-End", dokumentid); + + //pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; + //pos2 = word.Selection.End; + // Logging.Logging.Debug(dv.TMBeginn.ToString(), "Selection-End", dokumentid); + + //------------------------------ + if (dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonB" || + dv.TMBeginn.ToString().Substring(0, 23) == "XTGEDKVornameNameBetreue" || + dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonZ") { pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; pos2 = word.Selection.End; - - word.Selection.Text = dv.Value.ToString(); word.Selection.MoveLeft(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 1); word.Selection.TypeText(Text: ""); word.Selection.SetRange(Start: pos + 1, End: pos2 + 1); @@ -692,28 +685,46 @@ namespace OnDocOffice } else { - //objWord.Visible = True - // objWord.Selection.SetRange(Start:= pos, End:= pos2) - // With docWord.Bookmarks - // .Add(Range:= objWord.Selection.Range, Name:= Dokumentdaten.Rows(i).Item("beginntextmarke")) - // .DefaultSorting = Microsoft.Office.Interop.Word.WdBookmarkSortBy.wdSortByName - // .ShowHidden = False - // End With + if (dv.TMBeginn.ToString().Substring(0, 22) == "XTGEDKDirektTelefonDokZ" || + dv.TMBeginn.ToString().Substring(0, 20) == "XTGEDKVornameNameDokZ") + { + pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; + pos2 = word.Selection.End; + + word.Selection.Text = dv.Value.ToString(); + word.Selection.MoveLeft(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 1); + word.Selection.TypeText(Text: ""); + word.Selection.SetRange(Start: pos + 1, End: pos2 + 1); + + var withBlock = worddoc.Bookmarks; + withBlock.Add(Range: word.Selection.Range, Name: dv.TMBeginn.ToString()); + withBlock.DefaultSorting = Microsoft.Office.Interop.Word.WdBookmarkSortBy.wdSortByName; + withBlock.ShowHidden = false; + } + else + { + //objWord.Visible = True + // objWord.Selection.SetRange(Start:= pos, End:= pos2) + // With docWord.Bookmarks + // .Add(Range:= objWord.Selection.Range, Name:= Dokumentdaten.Rows(i).Item("beginntextmarke")) + // .DefaultSorting = Microsoft.Office.Interop.Word.WdBookmarkSortBy.wdSortByName + // .ShowHidden = False + // End With + } } - } - //------------------------------- + //------------------------------- - //objWord.Selection.MoveLeft(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1) - // objWord.Selection.MoveLeft(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 2, Extend:= Microsoft.Office.Interop.Word.WdMovementType.wdExtend) - // If objWord.Selection.Text = " " Then - // objWord.Selection.MoveRight(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1) - // objWord.Selection.MoveLeft(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1, Extend:= Microsoft.Office.Interop.Word.WdMovementType.wdExtend) - // objWord.Selection.Delete(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1) - // End If + //objWord.Selection.MoveLeft(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1) + // objWord.Selection.MoveLeft(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 2, Extend:= Microsoft.Office.Interop.Word.WdMovementType.wdExtend) + // If objWord.Selection.Text = " " Then + // objWord.Selection.MoveRight(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1) + // objWord.Selection.MoveLeft(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1, Extend:= Microsoft.Office.Interop.Word.WdMovementType.wdExtend) + // objWord.Selection.Delete(Unit:= Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count:= 1) + // End If + } + catch { } } - catch { } - } if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() != "" && !dv.TMBeginn.ToString().Contains("TGEDKCursor")) { try @@ -737,6 +748,7 @@ namespace OnDocOffice catch { } } } + } } //word.ScreenUpdating = true; Logging.Logging.Debug("Word Befüllen Ende", "clsOffice", dokumentid); @@ -1182,6 +1194,7 @@ namespace OnDocOffice //} foreach (clsDocValue dv in docdata.DocValues) { + Logging.Logging.Debug("Fill_Bookmarks_from_Word " + dv.TMBeginn.ToString(), "OfficeLib", ""); if (docdata.Form_ohne_Unterschrift == "True") { @@ -1296,7 +1309,7 @@ namespace OnDocOffice if (bookmark != null) { bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString(), true, false); - bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString()); + //bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString()); bookmarkNavigator.InsertText(dv.Value.ToString()); bookmarkNavigator.ReplaceBookmarkContent(dv.Value.ToString(), true); //TextBodyPart bookmarkContent = bookmarkNavigator.GetBookmarkContent(); diff --git a/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache b/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache index db525065..a0a863cd 100644 Binary files a/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache and b/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache differ diff --git a/OnDocOffice/obj/Debug/OnDocOffice.dll b/OnDocOffice/obj/Debug/OnDocOffice.dll index c529c147..6cf6cadd 100644 Binary files a/OnDocOffice/obj/Debug/OnDocOffice.dll and b/OnDocOffice/obj/Debug/OnDocOffice.dll differ diff --git a/OnDocOffice/obj/Debug/OnDocOffice.pdb b/OnDocOffice/obj/Debug/OnDocOffice.pdb index 4325354a..f14b3c86 100644 Binary files a/OnDocOffice/obj/Debug/OnDocOffice.pdb and b/OnDocOffice/obj/Debug/OnDocOffice.pdb differ