update 20250921

master
Stefan Hutter 3 months ago
parent d81d620468
commit 23cbc17319

Binary file not shown.

Binary file not shown.

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

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

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -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);
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save