diff --git a/API_NetFramework/bin/DOCGEN.dll b/API_NetFramework/bin/DOCGEN.dll index 9ca280ef..4c12914a 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 feaecc3d..253cf9e2 100644 Binary files a/API_NetFramework/bin/DOCGEN.pdb and b/API_NetFramework/bin/DOCGEN.pdb differ diff --git a/API_NetFramework/bin/OnDoc_NetFramework.dll b/API_NetFramework/bin/OnDoc_NetFramework.dll index e4e6967e..294ff145 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 9642746d..7f84be44 100644 Binary files a/API_NetFramework/bin/OnDoc_NetFramework.pdb and b/API_NetFramework/bin/OnDoc_NetFramework.pdb differ diff --git a/API_NetFramework/log.txt b/API_NetFramework/log.txt index 0ca5d3bc..06a4b125 100644 --- a/API_NetFramework/log.txt +++ b/API_NetFramework/log.txt @@ -31517,3 +31517,7 @@ Die Anweisung wurde beendet. 2025-09-19 10:10:48.4820|DEBUG|OnDoc| 2025-09-19 13:46:36.2973|DEBUG|OnDoc| 2025-09-19 13:46:36.3576|DEBUG|OnDoc| +2025-09-19 16:03:58.4606|DEBUG|OnDoc| +2025-09-19 16:03:58.4972|DEBUG|OnDoc| +2025-09-20 07:13:15.1591|DEBUG|OnDoc| +2025-09-20 07:13:15.1973|DEBUG|OnDoc| diff --git a/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache b/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache index 0de4fbb6..070ff4ee 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 e4e6967e..294ff145 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 9642746d..7f84be44 100644 Binary files a/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb and b/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb differ diff --git a/Client/Diverses/PartnerUmteilung.Designer.cs b/Client/Diverses/PartnerUmteilung.Designer.cs index fbbf222f..208a5f1f 100644 --- a/Client/Diverses/PartnerUmteilung.Designer.cs +++ b/Client/Diverses/PartnerUmteilung.Designer.cs @@ -37,9 +37,9 @@ this.label4 = new System.Windows.Forms.Label(); this.button1 = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.button2 = new System.Windows.Forms.Button(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); this.panel1.SuspendLayout(); this.SuspendLayout(); // @@ -58,7 +58,7 @@ this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(5, 13); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(54, 10); + this.label2.Size = new System.Drawing.Size(68, 13); this.label2.TabIndex = 1; this.label2.Text = "Vom Kunde: "; // @@ -122,24 +122,6 @@ this.panel1.TabIndex = 8; this.panel1.Visible = false; // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(3, 6); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(227, 13); - this.label5.TabIndex = 0; - this.label5.Text = "Die Dokumenmte wurden erfolgreich umgeteilt."; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(3, 19); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(293, 13); - this.label6.TabIndex = 1; - this.label6.Text = "Kundenspezifische, inhaltliche Daten wurden nicht geändert."; - // // button2 // this.button2.Location = new System.Drawing.Point(182, 54); @@ -150,6 +132,25 @@ this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.Location = new System.Drawing.Point(2, 27); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(400, 13); + this.label6.TabIndex = 1; + this.label6.Text = "Kundenspezifische Daten wurden in den Dokumenten nicht geändert."; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(3, 6); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(227, 13); + this.label5.TabIndex = 0; + this.label5.Text = "Die Dokumenmte wurden erfolgreich umgeteilt."; + // // PartnerUmteilung // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/Client/Diverses/SplashScreen.Designer.cs b/Client/Diverses/SplashScreen.Designer.cs index 0c6da0aa..13296179 100644 --- a/Client/Diverses/SplashScreen.Designer.cs +++ b/Client/Diverses/SplashScreen.Designer.cs @@ -64,7 +64,7 @@ this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(209, 26); this.label2.TabIndex = 2; - this.label2.Text = "18. September 2025"; + this.label2.Text = "21. September 2025"; this.label2.Click += new System.EventHandler(this.label2_Click); // // SplashScreen diff --git a/Client/bin/Debug/DOCGEN.dll b/Client/bin/Debug/DOCGEN.dll index 9ca280ef..4c12914a 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 feaecc3d..253cf9e2 100644 Binary files a/Client/bin/Debug/DOCGEN.pdb and b/Client/bin/Debug/DOCGEN.pdb differ diff --git a/Client/bin/Debug/OnDoc.exe b/Client/bin/Debug/OnDoc.exe index dd8cb8a4..f5bc70ef 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 ded64ea9..0f9b363b 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 170b7782..81ac9248 100644 Binary files a/Client/bin/Debug/OnDocClient.zip and b/Client/bin/Debug/OnDocClient.zip differ diff --git a/Client/bin/Debug/de-DE/OnDoc.resources.dll b/Client/bin/Debug/de-DE/OnDoc.resources.dll index 926d2f9b..42d4afac 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 2c23ec6b..477b1f72 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/OnDoc.exe b/Client/obj/Debug/OnDoc.exe index dd8cb8a4..f5bc70ef 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 ded64ea9..0f9b363b 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 926d2f9b..42d4afac 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/SyncFWord.cs b/DOCGEN/Klassen/SyncFWord.cs index efbd89fe..dc2fa42d 100644 --- a/DOCGEN/Klassen/SyncFWord.cs +++ b/DOCGEN/Klassen/SyncFWord.cs @@ -227,6 +227,46 @@ namespace DOCGEN.Klassen // signature.OwnerParagraph.AppendPicture(img); mssign = null; } + void InsertBookmark(WordDocument document, WParagraph paragraph, string name) + { + BookmarkStart bookmarkStart = new BookmarkStart(document, name); + BookmarkEnd bookmarkEnd = new BookmarkEnd(document, name); + paragraph.ChildEntities.Insert(0, bookmarkStart); + paragraph.ChildEntities.Add(bookmarkEnd); + } + void AddBookmarkToHeaderFooter(WordDocument document, HeaderFooter headerFooter, string bookmarkName) + { + int bookmarkIndex = 1; // Counter to ensure unique bookmark names + + if (headerFooter.ChildEntities.Count > 0) + { + foreach (Entity childEntity in headerFooter.ChildEntities) + { + if (childEntity is WParagraph paragraph && paragraph.ChildEntities.Count > 0) + { + InsertBookmark(document, paragraph, bookmarkName + bookmarkIndex); + bookmarkIndex++; + } + else if (childEntity is WTable table) + { + foreach (WTableRow row in table.Rows) + { + foreach (WTableCell cell in row.Cells) + { + foreach (Entity cellEntity in cell.ChildEntities) + { + if (cellEntity is WParagraph cellParagraph && cellParagraph.ChildEntities.Count > 0) + { + InsertBookmark(document, cellParagraph, bookmarkName + bookmarkIndex); + bookmarkIndex++; + } + } + } + } + } + } + } + } public string Generate_Word(string base64, clsDocData docdata, string img_UL = "", string img_UR = "", string img_faktura = "", bool serienbrief = false, bool editdoc = false) { @@ -285,7 +325,7 @@ namespace DOCGEN.Klassen insert_Logo(document, docdata); } - if (docdata.Kopfzeile_generieren == true) + if (docdata.Kopfzeile_generieren)// == true && editdoc==false) { try { @@ -297,20 +337,33 @@ namespace DOCGEN.Klassen } catch { + foreach (WSection section in document.Sections) { IWParagraph p; - - p = section.HeadersFooters.FirstPageHeader.AddParagraph(); - foreach (clsDocValue dv in docdata.DocValues) + try { - if (dv.TMBeginn.ToString() == "TGEDKCompanyBBEB99") - { - p.AppendText(dv.Value); - } + + p = section.HeadersFooters.FirstPageHeader.Paragraphs[section.HeadersFooters.FirstPageHeader.Paragraphs.Count - 1]; + } - p.AppendBookmarkStart("TGEDKCompanyBBEB99"); - p.AppendBreak(BreakType.LineBreak); + catch { p = section.HeadersFooters.FirstPageHeader.AddParagraph(); } + + + BookmarkStart bookmarkStart = new BookmarkStart(document, "TGEDKCompanyBBEB99"); + BookmarkEnd bookmarkEnd = new BookmarkEnd(document, "TGEDKCompanyBBEB99"); + p.ChildEntities.Insert(0, bookmarkStart); + p.ChildEntities.Add(bookmarkEnd); + + //foreach (clsDocValue dv in docdata.DocValues) + //{ + // if (dv.TMBeginn.ToString() == "TGEDKCompanyBBEB99") + // { + // p.AppendText(dv.Value); + // } + //} + //p.AppendBookmarkStart("TGEDKCompanyBBEB99"); + //p.AppendBreak(BreakType.LineBreak); } } } diff --git a/DOCGEN/bin/Debug/DOCGEN.dll b/DOCGEN/bin/Debug/DOCGEN.dll index 9ca280ef..4c12914a 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 feaecc3d..253cf9e2 100644 Binary files a/DOCGEN/bin/Debug/DOCGEN.pdb and b/DOCGEN/bin/Debug/DOCGEN.pdb differ diff --git a/DOCGEN/obj/Debug/DOCGEN.dll b/DOCGEN/obj/Debug/DOCGEN.dll index 9ca280ef..4c12914a 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 feaecc3d..253cf9e2 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 e55fcb33..21c0e622 100644 Binary files a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache and b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache differ diff --git a/OnDocOffice/bin/Debug/DOCGEN.dll b/OnDocOffice/bin/Debug/DOCGEN.dll index 9ca280ef..4c12914a 100644 Binary files a/OnDocOffice/bin/Debug/DOCGEN.dll and b/OnDocOffice/bin/Debug/DOCGEN.dll differ diff --git a/OnDocOffice/bin/Debug/DOCGEN.pdb b/OnDocOffice/bin/Debug/DOCGEN.pdb index feaecc3d..253cf9e2 100644 Binary files a/OnDocOffice/bin/Debug/DOCGEN.pdb and b/OnDocOffice/bin/Debug/DOCGEN.pdb differ diff --git a/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache b/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache index 3661cae8..009f716c 100644 Binary files a/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache and b/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache differ