diff --git a/API_NetFramework/bin/DOCGEN.dll b/API_NetFramework/bin/DOCGEN.dll index 78eda5e7..cc18791a 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 b7365f02..9d8fee28 100644 Binary files a/API_NetFramework/bin/DOCGEN.pdb and b/API_NetFramework/bin/DOCGEN.pdb differ diff --git a/API_NetFramework/bin/Database.dll b/API_NetFramework/bin/Database.dll index 414c81c0..3f4307df 100644 Binary files a/API_NetFramework/bin/Database.dll and b/API_NetFramework/bin/Database.dll differ diff --git a/API_NetFramework/bin/Database.pdb b/API_NetFramework/bin/Database.pdb index d17e0e03..687ac543 100644 Binary files a/API_NetFramework/bin/Database.pdb and b/API_NetFramework/bin/Database.pdb differ diff --git a/API_NetFramework/bin/Model.dll b/API_NetFramework/bin/Model.dll index 69e9105c..6721748c 100644 Binary files a/API_NetFramework/bin/Model.dll and b/API_NetFramework/bin/Model.dll differ diff --git a/API_NetFramework/bin/Model.pdb b/API_NetFramework/bin/Model.pdb index c6224b79..b46440a6 100644 Binary files a/API_NetFramework/bin/Model.pdb and b/API_NetFramework/bin/Model.pdb differ diff --git a/API_NetFramework/bin/OnDocOffice.dll b/API_NetFramework/bin/OnDocOffice.dll index 6cf6cadd..d2f725f6 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 f14b3c86..3210dd03 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 a15e08fd..aa02a393 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 d53b9f90..7fe6176f 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 c3b914c6..942d193e 100644 --- a/API_NetFramework/log.txt +++ b/API_NetFramework/log.txt @@ -3161,3 +3161,91 @@ Parametername: encoder 2025-01-24 14:12:42.7725|DEBUG|OnDoc| 2025-01-24 14:12:42.7987|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 2025-01-24 14:12:42.8007|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-25 12:46:26.6233|DEBUG|OnDoc| +2025-01-25 12:46:26.6703|DEBUG|OnDoc| +2025-01-25 12:46:26.7003|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:46:26.7003|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:46:26.7993|DEBUG|OnDoc| +2025-01-25 12:46:26.8093|DEBUG|OnDoc| +2025-01-25 12:46:26.8343|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 +2025-01-25 12:46:26.8343|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-25 12:49:25.2473|DEBUG|OnDoc| +2025-01-25 12:49:25.2473|DEBUG|OnDoc| +2025-01-25 12:49:25.2793|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:49:25.2793|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:49:25.3245|DEBUG|OnDoc| +2025-01-25 12:49:25.3245|DEBUG|OnDoc| +2025-01-25 12:49:25.3505|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 +2025-01-25 12:49:25.3531|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-25 12:49:39.1964|DEBUG|OnDoc| +2025-01-25 12:49:39.2063|DEBUG|OnDoc| +2025-01-25 12:49:39.2324|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:49:39.2324|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:49:39.2704|DEBUG|OnDoc| +2025-01-25 12:49:39.2704|DEBUG|OnDoc| +2025-01-25 12:49:39.2979|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 +2025-01-25 12:49:39.2979|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-25 12:49:59.0833|DEBUG|OnDoc| +2025-01-25 12:49:59.0934|DEBUG|OnDoc| +2025-01-25 12:49:59.1164|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:49:59.1194|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:49:59.1544|DEBUG|OnDoc| +2025-01-25 12:49:59.1544|DEBUG|OnDoc| +2025-01-25 12:49:59.1804|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9656 +2025-01-25 12:49:59.1834|INFO|OnDoc|Unterschrift-Bezug: TG9656 +2025-01-25 12:50:17.9642|DEBUG|OnDoc| +2025-01-25 12:50:17.9642|DEBUG|OnDoc| +2025-01-25 12:50:17.9972|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:50:17.9972|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:50:18.0352|DEBUG|OnDoc| +2025-01-25 12:50:18.0352|DEBUG|OnDoc| +2025-01-25 12:50:18.0612|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 +2025-01-25 12:50:18.0612|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-25 12:55:10.7766|DEBUG|OnDoc| +2025-01-25 12:55:10.8086|DEBUG|OnDoc| +2025-01-25 12:55:10.8346|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:55:10.8346|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:55:10.9167|DEBUG|OnDoc| +2025-01-25 12:55:10.9167|DEBUG|OnDoc| +2025-01-25 12:55:10.9487|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 +2025-01-25 12:55:10.9487|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-25 12:55:23.2607|DEBUG|OnDoc| +2025-01-25 12:55:23.2607|DEBUG|OnDoc| +2025-01-25 12:55:23.2937|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:55:23.2937|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:55:23.3318|DEBUG|OnDoc| +2025-01-25 12:55:23.3318|DEBUG|OnDoc| +2025-01-25 12:55:23.3558|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 +2025-01-25 12:55:23.3558|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-25 12:55:42.0176|DEBUG|OnDoc| +2025-01-25 12:55:42.0276|DEBUG|OnDoc| +2025-01-25 12:55:42.0567|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234 +2025-01-25 12:55:42.0567|INFO|OnDoc|Unterschrift-Bezug: 1234 +2025-01-25 12:55:42.0996|DEBUG|OnDoc| +2025-01-25 12:55:42.0996|DEBUG|OnDoc| +2025-01-25 12:55:42.1263|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG9665 +2025-01-25 12:55:42.1263|INFO|OnDoc|Unterschrift-Bezug: TG9665 +2025-01-26 08:58:00.2714|DEBUG|OnDoc| +2025-01-26 08:58:00.3055|DEBUG|OnDoc| +2025-01-26 08:58:00.3302|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: xmniederkofler +2025-01-26 08:58:00.3302|INFO|OnDoc|Unterschrift-Bezug: xmniederkofler +2025-01-26 08:58:00.4053|DEBUG|OnDoc| +2025-01-26 08:58:00.4153|DEBUG|OnDoc| +2025-01-26 08:58:00.5190|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG4116 +2025-01-26 08:58:00.5280|INFO|OnDoc|Unterschrift-Bezug: TG4116 +2025-01-26 08:58:35.3267|DEBUG|OnDoc| +2025-01-26 08:58:35.3267|DEBUG|OnDoc| +2025-01-26 08:58:35.3521|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: xmniederkofler +2025-01-26 08:58:35.3531|INFO|OnDoc|Unterschrift-Bezug: xmniederkofler +2025-01-26 08:58:35.3903|DEBUG|OnDoc| +2025-01-26 08:58:35.3903|DEBUG|OnDoc| +2025-01-26 08:58:35.4163|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG4116 +2025-01-26 08:58:35.4163|INFO|OnDoc|Unterschrift-Bezug: TG4116 +2025-01-26 11:04:42.5815|DEBUG|OnDoc| +2025-01-26 11:04:42.6126|DEBUG|OnDoc| +2025-01-26 11:04:42.6376|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: xmniederkofler +2025-01-26 11:04:42.6376|INFO|OnDoc|Unterschrift-Bezug: xmniederkofler +2025-01-26 11:04:42.7251|DEBUG|OnDoc| +2025-01-26 11:04:42.7351|DEBUG|OnDoc| +2025-01-26 11:04:42.7621|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: TG4116 +2025-01-26 11:04:42.7621|INFO|OnDoc|Unterschrift-Bezug: TG4116 diff --git a/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache b/API_NetFramework/obj/Debug/API_NetFramework.csproj.AssemblyReference.cache index ec3db0b0..db1a81c1 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 a15e08fd..aa02a393 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 d53b9f90..7fe6176f 100644 Binary files a/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb and b/API_NetFramework/obj/Debug/OnDoc_NetFramework.pdb differ diff --git a/BarcodeLib/bin/Debug/Database.dll b/BarcodeLib/bin/Debug/Database.dll index 414c81c0..3f4307df 100644 Binary files a/BarcodeLib/bin/Debug/Database.dll and b/BarcodeLib/bin/Debug/Database.dll differ diff --git a/BarcodeLib/bin/Debug/Database.pdb b/BarcodeLib/bin/Debug/Database.pdb index d17e0e03..687ac543 100644 Binary files a/BarcodeLib/bin/Debug/Database.pdb and b/BarcodeLib/bin/Debug/Database.pdb differ diff --git a/BarcodeLib/bin/Debug/Model.dll b/BarcodeLib/bin/Debug/Model.dll index 69e9105c..6721748c 100644 Binary files a/BarcodeLib/bin/Debug/Model.dll and b/BarcodeLib/bin/Debug/Model.dll differ diff --git a/BarcodeLib/bin/Debug/Model.pdb b/BarcodeLib/bin/Debug/Model.pdb index c6224b79..b46440a6 100644 Binary files a/BarcodeLib/bin/Debug/Model.pdb and b/BarcodeLib/bin/Debug/Model.pdb differ diff --git a/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache b/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache index 867f228e..2d8e3bbf 100644 Binary files a/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache and b/BarcodeLib/obj/Debug/BarcodeLib.csproj.AssemblyReference.cache differ diff --git a/Client/Client.csproj b/Client/Client.csproj index 660ba717..0c9d5624 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -822,6 +822,7 @@ AdminDokTypGenerierung.cs + Designer Dokumenttyp.cs diff --git a/Client/DocMgmt/Dokumenterstellung.Designer.cs b/Client/DocMgmt/Dokumenterstellung.Designer.cs index c1a751fe..c3fc3b48 100644 --- a/Client/DocMgmt/Dokumenterstellung.Designer.cs +++ b/Client/DocMgmt/Dokumenterstellung.Designer.cs @@ -68,9 +68,9 @@ // btnDokumenterstellen // this.btnDokumenterstellen.Font = new System.Drawing.Font("Segoe UI Semibold", 9F); - this.btnDokumenterstellen.Location = new System.Drawing.Point(915, 638); + this.btnDokumenterstellen.Location = new System.Drawing.Point(905, 638); this.btnDokumenterstellen.Name = "btnDokumenterstellen"; - this.btnDokumenterstellen.Size = new System.Drawing.Size(124, 28); + this.btnDokumenterstellen.Size = new System.Drawing.Size(134, 28); this.btnDokumenterstellen.TabIndex = 17; this.btnDokumenterstellen.Text = "Dokument erstellen"; this.btnDokumenterstellen.Click += new System.EventHandler(this.sfButton2_Click); @@ -265,6 +265,8 @@ // this.ucAllgemeineDokumentParam1.ausDokumentpaket = false; this.ucAllgemeineDokumentParam1.barcode = false; + this.ucAllgemeineDokumentParam1.bedingt_retournierbar = false; + this.ucAllgemeineDokumentParam1.bpdokument = false; this.ucAllgemeineDokumentParam1.bpperson_error_type = 0; this.ucAllgemeineDokumentParam1.check_error = ""; this.ucAllgemeineDokumentParam1.checkpartner = true; @@ -292,6 +294,7 @@ clsdocgendata1.zustaendigmitarbeiter = null; clsdocgendata1.zustelladresse = null; this.ucAllgemeineDokumentParam1.docgendata = clsdocgendata1; + this.ucAllgemeineDokumentParam1.dokumentid = ""; this.ucAllgemeineDokumentParam1.dokumenttypnr = 0; this.ucAllgemeineDokumentParam1.genertated_dokumentid = null; this.ucAllgemeineDokumentParam1.interop = false; diff --git a/Client/DocMgmt/Dokumenterstellung.cs b/Client/DocMgmt/Dokumenterstellung.cs index 6ac72f52..d4512dbc 100644 --- a/Client/DocMgmt/Dokumenterstellung.cs +++ b/Client/DocMgmt/Dokumenterstellung.cs @@ -80,6 +80,8 @@ namespace OnDoc.DocMgmt Closing += Form_Closing; this.dokumentid=dokumentid; this.editdoc = true; + btnDokumenterstellen.Text = "Dokument bearbeiten"; + } private void Form_Closing(object sender, CancelEventArgs e) diff --git a/Client/UIControls/DokList.cs b/Client/UIControls/DokList.cs index 5706aa3b..345a23ff 100644 --- a/Client/UIControls/DokList.cs +++ b/Client/UIControls/DokList.cs @@ -462,6 +462,7 @@ namespace OnDoc.UICintrols var datarow = record as DataRowView; string documentid = datarow["dokumentid"].ToString(); dokument_bearbeiten(documentid, false); + } } public void dokument_bearbeiten(string dokid, bool newdok = false) @@ -511,16 +512,55 @@ namespace OnDoc.UICintrols else { Dokumenterstellung dokbearbeitung = new Dokumenterstellung(selected_dokumentid); - if (dokbearbeitung.ShowDialog() == DialogResult.Abort) + dokbearbeitung.ShowDialog(); + DB db1 = new DB(AppParams.connectionstring); + switch (dokbearbeitung.DocFunction) { - DB db1 = new DB(AppParams.connectionstring); - db1.Dok_in_Bearbeitung(2, selected_dokumentid, AppParams.CurrentMitarbeiter); - db1 = null; + case 0: + db1.Dok_in_Bearbeitung(2, selected_dokumentid, AppParams.CurrentMitarbeiter); + db1 = null; + break; + case 1: + Cursor = Cursors.WaitCursor; + System.Windows.Forms.Application.DoEvents(); + selected_dokumentid = dokbearbeitung.dokumentid; + selected_partnernr = dokbearbeitung.partnernr.ToString(); ; + interop = dokbearbeitung.interop; + runmacros = dokbearbeitung.runmacros; + dok = GetDoc(false); + OpenDoc(dok, true, interop, false); + Cursor = Cursors.Default; + System.Windows.Forms.Application.DoEvents(); + break; + case 6: + //DB db1 = new DB(AppParams.connectionstring); + selected_dokumentid = dokbearbeitung.dokumentid; + selected_partnernr = dokbearbeitung.partnernr.ToString(); ; + interop = dokbearbeitung.interop; + //runmacros = dokbearbeitung.runmacros; + string filename = dokbearbeitung.filename; + + + Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", ""); + //db1.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter); + //db1 = null; + clsProcessWatch.AddToList(selected_dokumentid, filename, "Word"); + break; + default: + break; } - else - { - OpenDoc(dok, true, interop, runmacros); - }; + db1 = null; + + //if (dokbearbeitung.ShowDialog() == DialogResult.Abort) + //{ + // DB db1 = new DB(AppParams.connectionstring); + // db1.Dok_in_Bearbeitung(2, selected_dokumentid, AppParams.CurrentMitarbeiter); + // db1 = null; + //} + //else + //{ + // OpenDoc(dok, true, interop, runmacros); + //}; } diff --git a/Client/UIControls/UCAllgemeineDokumentParam.cs b/Client/UIControls/UCAllgemeineDokumentParam.cs index fe701c36..e0ba07ff 100644 --- a/Client/UIControls/UCAllgemeineDokumentParam.cs +++ b/Client/UIControls/UCAllgemeineDokumentParam.cs @@ -670,7 +670,11 @@ namespace OnDoc.UIControls if (docgendata.digitaleunterschrift == true) { dokdata.As_Faksimile = "True"; } else { dokdata.As_Faksimile = "False"; } if (docgendata.frormularOhneUnterschrift==true) { dokdata.Form_ohne_Unterschrift = "True" ; } else { dokdata.Form_ohne_Unterschrift = "False"; } - + dokdata.Zustaendig_Kube = "0"; + if (this.rbzustaendigkube.Checked) + { + dokdata.Zustaendig_Kube = "1"; + }; dokdata.dokumentwerte = docgendata.dokumentwerte; dokdata.Barcode = barcode; dokdata.VorlageNr = this.vorlagenr.ToString(); @@ -1024,7 +1028,7 @@ namespace OnDoc.UIControls { rbzustaendigkube.Checked = true; rbzustaendigmitarbeiter.Checked = false; - cbboxzustaendigkube.SelectedValue = Convert.ToInt32(dr["zustaendig_kube"]); + cbboxzustaendigkube.SelectedValue = Convert.ToInt32(dr["zustaendiger"]); } else { rbzustaendigmitarbeiter.Checked = true; diff --git a/Client/bin/Debug/DOCGEN.dll b/Client/bin/Debug/DOCGEN.dll index 78eda5e7..cc18791a 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 b7365f02..9d8fee28 100644 Binary files a/Client/bin/Debug/DOCGEN.pdb and b/Client/bin/Debug/DOCGEN.pdb differ diff --git a/Client/bin/Debug/Database.dll b/Client/bin/Debug/Database.dll index 414c81c0..3f4307df 100644 Binary files a/Client/bin/Debug/Database.dll and b/Client/bin/Debug/Database.dll differ diff --git a/Client/bin/Debug/Database.pdb b/Client/bin/Debug/Database.pdb index d17e0e03..687ac543 100644 Binary files a/Client/bin/Debug/Database.pdb and b/Client/bin/Debug/Database.pdb differ diff --git a/Client/bin/Debug/Model.dll b/Client/bin/Debug/Model.dll index 69e9105c..6721748c 100644 Binary files a/Client/bin/Debug/Model.dll and b/Client/bin/Debug/Model.dll differ diff --git a/Client/bin/Debug/Model.pdb b/Client/bin/Debug/Model.pdb index c6224b79..b46440a6 100644 Binary files a/Client/bin/Debug/Model.pdb and b/Client/bin/Debug/Model.pdb differ diff --git a/Client/bin/Debug/OnDoc.exe b/Client/bin/Debug/OnDoc.exe index b53de907..c7d6b173 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 37f7b58b..293ea1c7 100644 Binary files a/Client/bin/Debug/OnDoc.pdb and b/Client/bin/Debug/OnDoc.pdb differ diff --git a/Client/bin/Debug/OnDocOffice.dll b/Client/bin/Debug/OnDocOffice.dll index 6cf6cadd..d2f725f6 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 f14b3c86..3210dd03 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 270149d0..35799445 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 e6f5088c..aa2f3b00 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 318dbd01..e7458bcf 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 705166d8..d6b8b6c5 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 b53de907..c7d6b173 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 37f7b58b..293ea1c7 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 270149d0..35799445 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 b63b2525..57161278 100644 --- a/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs +++ b/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs @@ -104,7 +104,7 @@ namespace DOCGEN.Generator OnDocOffice.clsWordEdit oo = new OnDocOffice.clsWordEdit("", "","",resturi,apikey); Logging.Logging.Debug("Generate_Word_in_Office", "Start", dokumentid); - dok.dokument = oo.Generate_Word_in_Office(ref docdata, ref dok, dt.Rows[0][0].ToString(), connectionstring, tempdir, dokumentid, Apptype,Extension,OfficeSleep,Office_Fill_DocIO, vbfilemanagement); + dok.dokument = oo.Generate_Word_in_Office(ref docdata, ref dok, dt.Rows[0][0].ToString(), connectionstring, tempdir, dokumentid, Apptype,Extension,OfficeSleep,Office_Fill_DocIO, vbfilemanagement,editdoc); Logging.Logging.Debug("Generate_Word_in_Office", "Ende", dokumentid); oo = null; } diff --git a/DOCGEN/Klassen/SyncFWord.cs b/DOCGEN/Klassen/SyncFWord.cs index 58fd4802..be78f662 100644 --- a/DOCGEN/Klassen/SyncFWord.cs +++ b/DOCGEN/Klassen/SyncFWord.cs @@ -194,7 +194,7 @@ namespace DOCGEN.Klassen } } - public string Generate_Word(string base64, clsDocData docdata, string img_UL = "", string img_UR = "", string img_faktura = "") + public string Generate_Word(string base64, clsDocData docdata, string img_UL = "", string img_UR = "", string img_faktura = "", bool serienbrief=false) { string formattype = ""; MemoryStream ms = new MemoryStream(Helper.EncodeExtensions.DecodeBase642ByteArray(base64)); @@ -288,6 +288,10 @@ namespace DOCGEN.Klassen foreach (clsDocValue dv in docdata.DocValues) { + if (dv.TMBeginn.ToString().Contains("VornameName")) + { + int a = 1; + } //if (dv.TMBeginn.ToString().Contains("TGEDKCursor")) { //break; } //if (dv.FieldName.ToString().Contains("TGEDKCursor")) { //break; } if (docdata.Form_ohne_Unterschrift == "True") @@ -316,7 +320,7 @@ namespace DOCGEN.Klassen { BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document); // if ((dv.TMBeginn.ToString() == "TGEDKVornameNameLinksB99" || dv.TMBeginn.ToString() == "TGEDKVornameNameRechtsB99") && docdata.As_Faksimile == "True") - if ((dv.TMBeginn.ToString().Contains("VornameNameLinks") || dv.TMBeginn.ToString().Contains("VornameNameRechts")) && docdata.As_Faksimile == "True") + if ((dv.TMBeginn.ToString().Contains("VornameNameLinks") || dv.TMBeginn.ToString().Contains("VornameNameRechts")) && docdata.As_Faksimile == "True" && serienbrief==true) { string funktionlinks = ""; string funktionrechts = ""; @@ -391,7 +395,7 @@ namespace DOCGEN.Klassen else { //if (docdata.As_Faksimile=="True" && (dv.TMBeginn.ToString() == "TGEDKFunktionLinksB99" || dv.TMBeginn.ToString() == "TGEDKFunktionRechtsB99")) - if (docdata.As_Faksimile == "True" && (dv.TMBeginn.ToString().Contains("FunktionLinks") || dv.TMBeginn.ToString().Contains("FunktionRechts"))) + if (docdata.As_Faksimile == "True" && (dv.TMBeginn.ToString().Contains("FunktionLinks") || dv.TMBeginn.ToString().Contains("FunktionRechts")) && serienbrief == true) { } @@ -415,8 +419,12 @@ namespace DOCGEN.Klassen { if (!dv.TMBeginn.ToString().Contains("TGEDKCursor")) { + if (dv.TMBeginn.ToString().Contains("VornameName")) + { + int a = 1; + } bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString()); - bookmarkNavigator.InsertText(dv.Value.ToString()); + //bookmarkNavigator.InsertText(dv.Value.ToString()); bookmarkNavigator.ReplaceBookmarkContent(dv.Value.ToString(), true); } } @@ -426,9 +434,13 @@ namespace DOCGEN.Klassen { if (!dv.TMBeginn.ToString().Contains("TGEDKCursor")) { + if (dv.TMBeginn.ToString().Contains("VornameName")) + { + int a = 1; + } bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString()); - bookmarkNavigator.InsertText(dv.Value.ToString()); + //bookmarkNavigator.InsertText(dv.Value.ToString()); bookmarkNavigator.ReplaceBookmarkContent(dv.Value.ToString(), true); } } @@ -479,7 +491,7 @@ namespace DOCGEN.Klassen } } - if (docdata.As_Faksimile == "True") + if (docdata.As_Faksimile == "True" && serienbrief==true) { TextSelection[] textSelections = document.FindAll("Thurgauer Kantonalbank", false, true); diff --git a/DOCGEN/bin/Debug/DOCGEN.dll b/DOCGEN/bin/Debug/DOCGEN.dll index 78eda5e7..cc18791a 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 b7365f02..9d8fee28 100644 Binary files a/DOCGEN/bin/Debug/DOCGEN.pdb and b/DOCGEN/bin/Debug/DOCGEN.pdb differ diff --git a/DOCGEN/bin/Debug/Database.dll b/DOCGEN/bin/Debug/Database.dll index 414c81c0..3f4307df 100644 Binary files a/DOCGEN/bin/Debug/Database.dll and b/DOCGEN/bin/Debug/Database.dll differ diff --git a/DOCGEN/bin/Debug/Database.pdb b/DOCGEN/bin/Debug/Database.pdb index d17e0e03..687ac543 100644 Binary files a/DOCGEN/bin/Debug/Database.pdb and b/DOCGEN/bin/Debug/Database.pdb differ diff --git a/DOCGEN/bin/Debug/Model.dll b/DOCGEN/bin/Debug/Model.dll index 69e9105c..6721748c 100644 Binary files a/DOCGEN/bin/Debug/Model.dll and b/DOCGEN/bin/Debug/Model.dll differ diff --git a/DOCGEN/bin/Debug/Model.pdb b/DOCGEN/bin/Debug/Model.pdb index c6224b79..b46440a6 100644 Binary files a/DOCGEN/bin/Debug/Model.pdb and b/DOCGEN/bin/Debug/Model.pdb differ diff --git a/DOCGEN/bin/Debug/OnDocOffice.dll b/DOCGEN/bin/Debug/OnDocOffice.dll index 6cf6cadd..d2f725f6 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 f14b3c86..3210dd03 100644 Binary files a/DOCGEN/bin/Debug/OnDocOffice.pdb and b/DOCGEN/bin/Debug/OnDocOffice.pdb differ diff --git a/DOCGEN/clsDocGen.cs b/DOCGEN/clsDocGen.cs index 68fbd5e9..3893c7a0 100644 --- a/DOCGEN/clsDocGen.cs +++ b/DOCGEN/clsDocGen.cs @@ -111,7 +111,7 @@ namespace DOCGEN dd.barcode_content = sb.barcode_content; dd.barcode_text = sb.barcode_text; - dok.dokument = sfword.Generate_Word(vorlage,dd, sb.img_unterschriftlinks,sb.img_unterschrfitrechts,sb.img_faktura); + dok.dokument = sfword.Generate_Word(vorlage,dd, sb.img_unterschriftlinks,sb.img_unterschrfitrechts,sb.img_faktura,true); db = null; dok.doktype = "D"; diff --git a/DOCGEN/obj/Debug/DOCGEN.dll b/DOCGEN/obj/Debug/DOCGEN.dll index 78eda5e7..cc18791a 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 b7365f02..9d8fee28 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 ce4da169..49769c5a 100644 Binary files a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache and b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache differ diff --git a/Database/bin/Debug/Database.dll b/Database/bin/Debug/Database.dll index 414c81c0..3f4307df 100644 Binary files a/Database/bin/Debug/Database.dll and b/Database/bin/Debug/Database.dll differ diff --git a/Database/bin/Debug/Database.pdb b/Database/bin/Debug/Database.pdb index d17e0e03..687ac543 100644 Binary files a/Database/bin/Debug/Database.pdb and b/Database/bin/Debug/Database.pdb differ diff --git a/Database/bin/Debug/Model.dll b/Database/bin/Debug/Model.dll index 69e9105c..6721748c 100644 Binary files a/Database/bin/Debug/Model.dll and b/Database/bin/Debug/Model.dll differ diff --git a/Database/bin/Debug/Model.pdb b/Database/bin/Debug/Model.pdb index c6224b79..b46440a6 100644 Binary files a/Database/bin/Debug/Model.pdb and b/Database/bin/Debug/Model.pdb differ diff --git a/Database/db.cs b/Database/db.cs index 25a70ed4..3a6e3564 100644 --- a/Database/db.cs +++ b/Database/db.cs @@ -293,7 +293,7 @@ namespace Database Get_Tabledata(sql, false, true); - if (!useoffice) { return dsdaten.Tables[0]; } + if (!useoffice || editdoc) { return dsdaten.Tables[0]; } else { VBFileManagement.VBFileManagement vm = new VBFileManagement.VBFileManagement(); @@ -427,8 +427,8 @@ namespace Database dok.sZustelladresse = ""; dok.sAnredezustelladresse = ""; dok.iZustaendiger = Convert.ToInt32(DocData.Zustaendig); + dok.bZustaendig_kube = DocData.Zustaendig_Kube == "1"; //dok.iPostzustellung = 0; - dok.bZustaendig_kube = false; dok.iMa_ausgangsarchivierung = 0; dok.iMa_eingangsarchivierung = 0; dok.sBemerkung = ""; diff --git a/Database/obj/Debug/Database.csproj.AssemblyReference.cache b/Database/obj/Debug/Database.csproj.AssemblyReference.cache index 70fa15df..2c1ff87b 100644 Binary files a/Database/obj/Debug/Database.csproj.AssemblyReference.cache and b/Database/obj/Debug/Database.csproj.AssemblyReference.cache differ diff --git a/Database/obj/Debug/Database.dll b/Database/obj/Debug/Database.dll index 414c81c0..3f4307df 100644 Binary files a/Database/obj/Debug/Database.dll and b/Database/obj/Debug/Database.dll differ diff --git a/Database/obj/Debug/Database.pdb b/Database/obj/Debug/Database.pdb index d17e0e03..687ac543 100644 Binary files a/Database/obj/Debug/Database.pdb and b/Database/obj/Debug/Database.pdb differ diff --git a/DocIO_Demo_SHU/obj/Debug/DocIO_Demo_SHU.csproj.AssemblyReference.cache b/DocIO_Demo_SHU/obj/Debug/DocIO_Demo_SHU.csproj.AssemblyReference.cache index cddc0683..87cf7138 100644 Binary files a/DocIO_Demo_SHU/obj/Debug/DocIO_Demo_SHU.csproj.AssemblyReference.cache and b/DocIO_Demo_SHU/obj/Debug/DocIO_Demo_SHU.csproj.AssemblyReference.cache differ diff --git a/Excel_Test/obj/Debug/Excel_Test.csproj.AssemblyReference.cache b/Excel_Test/obj/Debug/Excel_Test.csproj.AssemblyReference.cache index 2ab3276b..eae0e4f0 100644 Binary files a/Excel_Test/obj/Debug/Excel_Test.csproj.AssemblyReference.cache and b/Excel_Test/obj/Debug/Excel_Test.csproj.AssemblyReference.cache differ diff --git a/Model/bin/Debug/Model.dll b/Model/bin/Debug/Model.dll index 69e9105c..6721748c 100644 Binary files a/Model/bin/Debug/Model.dll and b/Model/bin/Debug/Model.dll differ diff --git a/Model/bin/Debug/Model.pdb b/Model/bin/Debug/Model.pdb index c6224b79..b46440a6 100644 Binary files a/Model/bin/Debug/Model.pdb and b/Model/bin/Debug/Model.pdb differ diff --git a/Model/clsDocData.cs b/Model/clsDocData.cs index dcab78b8..83f7ebf6 100644 --- a/Model/clsDocData.cs +++ b/Model/clsDocData.cs @@ -24,6 +24,8 @@ namespace Model public string Verantwortlich { get; set; } public string Zustaendig { get; set; } + public string Zustaendig_Kube { get; set; } + public string Team { get; set; } diff --git a/Model/obj/Debug/Model.dll b/Model/obj/Debug/Model.dll index 69e9105c..6721748c 100644 Binary files a/Model/obj/Debug/Model.dll and b/Model/obj/Debug/Model.dll differ diff --git a/Model/obj/Debug/Model.pdb b/Model/obj/Debug/Model.pdb index c6224b79..b46440a6 100644 Binary files a/Model/obj/Debug/Model.pdb and b/Model/obj/Debug/Model.pdb differ diff --git a/NativVorlagen/obj/Debug/NativVorlagen.csproj.AssemblyReference.cache b/NativVorlagen/obj/Debug/NativVorlagen.csproj.AssemblyReference.cache index 7554495b..af515be8 100644 Binary files a/NativVorlagen/obj/Debug/NativVorlagen.csproj.AssemblyReference.cache and b/NativVorlagen/obj/Debug/NativVorlagen.csproj.AssemblyReference.cache differ diff --git a/OnDocOffice/bin/Debug/Database.dll b/OnDocOffice/bin/Debug/Database.dll index 414c81c0..3f4307df 100644 Binary files a/OnDocOffice/bin/Debug/Database.dll and b/OnDocOffice/bin/Debug/Database.dll differ diff --git a/OnDocOffice/bin/Debug/Database.pdb b/OnDocOffice/bin/Debug/Database.pdb index d17e0e03..687ac543 100644 Binary files a/OnDocOffice/bin/Debug/Database.pdb and b/OnDocOffice/bin/Debug/Database.pdb differ diff --git a/OnDocOffice/bin/Debug/Model.dll b/OnDocOffice/bin/Debug/Model.dll index 69e9105c..6721748c 100644 Binary files a/OnDocOffice/bin/Debug/Model.dll and b/OnDocOffice/bin/Debug/Model.dll differ diff --git a/OnDocOffice/bin/Debug/Model.pdb b/OnDocOffice/bin/Debug/Model.pdb index c6224b79..b46440a6 100644 Binary files a/OnDocOffice/bin/Debug/Model.pdb and b/OnDocOffice/bin/Debug/Model.pdb differ diff --git a/OnDocOffice/bin/Debug/OnDocOffice.dll b/OnDocOffice/bin/Debug/OnDocOffice.dll index 6cf6cadd..d2f725f6 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 f14b3c86..3210dd03 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 c39e0ece..fc11a71a 100644 --- a/OnDocOffice/clsoffice.cs +++ b/OnDocOffice/clsoffice.cs @@ -314,7 +314,7 @@ namespace OnDocOffice if (runmacros == true) { - Logging.Logging.Debug("Makros auslesen", "Edit_Document",dokumentid); + 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) @@ -324,9 +324,11 @@ namespace OnDocOffice Logging.Logging.Debug("Makro ", "Edit_Document", dr[0].ToString()); word.Run(dr[0].ToString()); } - catch (Exception e) { + catch (Exception e) + { Logging.Logging.Debug("MakroError ", "Edit_Document", e.Message); - string a = e.Message; } + string a = e.Message; + } } } //clsProcessWatch.AddToList(dokumentid, filename, "Word"); @@ -452,7 +454,7 @@ namespace OnDocOffice return Convert.ToBase64String(imageArray); } - public string Generate_Word_in_Office(ref clsDocData docdata, ref clsdok dok, string vorlage, string connectionstring, string tempdir, string dokumentid, string apptype, string extension, int OfficeSleep, int bookmarks_docio, bool vbfilemanagment) + public string Generate_Word_in_Office(ref clsDocData docdata, ref clsdok dok, string vorlage, string connectionstring, string tempdir, string dokumentid, string apptype, string extension, int OfficeSleep, int bookmarks_docio, bool vbfilemanagment, bool editdoc) { connectstring = connectionstring; DialogGenerate dialogGenerate = new DialogGenerate(docdata.Bezeichnung.ToString()); @@ -623,25 +625,43 @@ namespace OnDocOffice cursortm = ""; foreach (clsDocValue dv in docdata.DocValues) { - if (dv.TMBeginn.ToString().Contains("Tagesdatum")) + dv.used = 0; + if (dv.TMBeginn.Contains("CompanyBBEB99")) { dv.used = 1; }; + if (dv.TMBeginn.Contains("EDKCursor")) + { + dv.used = 1; + cursortm = dv.TMBeginn; + } + if (dv.FieldName.Contains("TGEDKCursor")) { - int a = 1; + dv.used = 1; + cursorfeld = dv.FieldName; } + + + if (dv.FieldName.ToString() != "") { dv.used = 1; }; + + } + + foreach (Microsoft.Office.Interop.Word.Bookmark bm in worddoc.Bookmarks) + { + clsDocValue dv = docdata.DocValues.Find(x => x.TMBeginn == bm.Name); + if (dv != null) { dv.used = 1; } + } + foreach (clsDocValue dv in docdata.DocValues) + { + if (dv.used == 0) { continue; } try { 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")) { cursorpositionieren = true; cursorfeld = dv.FieldName.ToString(); - //break; } } catch { } @@ -650,34 +670,32 @@ namespace OnDocOffice //20250119 - nur befüllte werte übermitteln' if (dv.Value.ToString().Trim() != "") - { + { if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() == "" && !dv.TMBeginn.ToString().Contains("TGEDKCurosr")) { + if (dv.TMBeginn.Contains("Zustel")) + { + int a = 1; + } try { - - Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select", dokumentid); worddoc.Bookmarks[dv.TMBeginn.ToString()].Select(); - //Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select-End", dokumentid); + pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; word.Selection.Text = dv.Value.ToString(); - //Logging.Logging.Debug(dv.TMBeginn.ToString(), "Text-End", dokumentid); + pos2 = word.Selection.End; + + + - //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") + + + if (dv.TMBeginn.Contains("TGEDKDirektTelefonB") || dv.TMBeginn.Contains("TGEDKVornameNameBetreue") || dv.TMBeginn.Contains("TGEDKDirektTelefonZ")) { - 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); - + if (editdoc) word.Selection.TypeText(Text: " "); + word.Selection.SetRange(pos + 1, pos2 + 1); var withBlock = worddoc.Bookmarks; withBlock.Add(Range: word.Selection.Range, Name: dv.TMBeginn.ToString()); withBlock.DefaultSorting = Microsoft.Office.Interop.Word.WdBookmarkSortBy.wdSortByName; @@ -685,15 +703,11 @@ namespace OnDocOffice } else { - if (dv.TMBeginn.ToString().Substring(0, 22) == "XTGEDKDirektTelefonDokZ" || - dv.TMBeginn.ToString().Substring(0, 20) == "XTGEDKVornameNameDokZ") + if (dv.TMBeginn.Contains("TGEDKDirektTelefonDokZ") || dv.TMBeginn.Contains("TGEDKVornameNameDokZ")) { - 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.TypeText(Text: " "); word.Selection.SetRange(Start: pos + 1, End: pos2 + 1); var withBlock = worddoc.Bookmarks; @@ -703,52 +717,60 @@ 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 + word.Selection.SetRange(pos, pos2); + 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; } } - - //------------------------------- - - //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 + word.Selection.MoveLeft(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 1); + word.Selection.MoveLeft(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 2, Extend: Microsoft.Office.Interop.Word.WdMovementType.wdExtend); + if (word.Selection.Text == " ") + { + word.Selection.MoveRight(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 1); + word.Selection.MoveLeft(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 1, Extend: Microsoft.Office.Interop.Word.WdMovementType.wdExtend); + word.Selection.Delete(Unit: Microsoft.Office.Interop.Word.WdUnits.wdCharacter, Count: 1); + } } catch { } } - if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() != "" && !dv.TMBeginn.ToString().Contains("TGEDKCursor")) - { - try + if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() != "" && !dv.TMBeginn.ToString().Contains("TGEDKCursor")) { - worddoc.Bookmarks[dv.TMBeginn.ToString()].Select(); - pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; - worddoc.Bookmarks[dv.TMEnd.ToString()].Select(); - pos2 = worddoc.Bookmarks[dv.TMEnd.ToString()].Start; - word.Selection.SetRange(pos, pos2); - word.Selection.TypeText(Text: dv.Value.ToString()); + try + { + worddoc.Bookmarks[dv.TMBeginn.ToString()].Select(); + pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start; + worddoc.Bookmarks[dv.TMEnd.ToString()].Select(); + pos2 = worddoc.Bookmarks[dv.TMEnd.ToString()].Start; + word.Selection.SetRange(pos, pos2); + word.Selection.TypeText(Text: dv.Value.ToString()); + 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; + } + catch { } } - catch { } - } - if (dv.FieldName.ToString() != "" && !dv.FieldName.Contains("TGEDKCursor")) - { - try + if (dv.FieldName.ToString() != "" && !dv.FieldName.Contains("TGEDKCursor")) { - - worddoc.FormFields[dv.FieldName.ToString()].Result = dv.Value; + try + { + if (dv.FieldName.Contains("cc_")) + { + word.ActiveDocument.SelectContentControlsByTag(dv.FieldName)[1].Range.Text = dv.Value; + } + if (worddoc.FormFields[dv.FieldName].TextInput.Width != 0) + { + int fieldlen = worddoc.FormFields[dv.FieldName].TextInput.Width; + worddoc.FormFields[dv.FieldName].TextInput.Width = fieldlen + 5; + } + worddoc.FormFields[dv.FieldName.ToString()].Result = dv.Value; + } + catch { } } - catch { } } } - } } //word.ScreenUpdating = true; Logging.Logging.Debug("Word Befüllen Ende", "clsOffice", dokumentid); @@ -768,7 +790,7 @@ namespace OnDocOffice word.Activate(); Logging.Logging.Debug("Start Macros", "clsOffice", dokumentid); - run_macros(ref docdata, connectionstring); + if(!editdoc) run_macros(ref docdata, connectionstring); if (cursorpositionieren) { @@ -788,10 +810,11 @@ namespace OnDocOffice Thread.Sleep(OfficeSleep); string b64 = fh.Base64FromFile(filename); - word.Documents.Open(filename); - word.Activate(); - Logging.Logging.Debug("Word geöffnet", "clsOffice", dokumentid); - worddoc = null; + + word.Documents.Open(filename); + word.Activate(); + Logging.Logging.Debug("Word geöffnet", "clsOffice", dokumentid); + word = null; Logging.Logging.Debug("Generierung abgeschlossen", "clsOffice", dokumentid); dialogGenerate.Close(); @@ -1297,8 +1320,8 @@ namespace OnDocOffice } else { -// if (docdata.As_Faksimile == "True" && (dv.TMBeginn.ToString() == "TGEDKFunktionLinksB99" || dv.TMBeginn.ToString() == "TGEDKFunktionRechtsB99")) - if (docdata.As_Faksimile == "True" && (dv.TMBeginn.ToString().Contains("FunktionLinks") || dv.TMBeginn.ToString().Contains("FunktionRechts"))) + // if (docdata.As_Faksimile == "True" && (dv.TMBeginn.ToString() == "TGEDKFunktionLinksB99" || dv.TMBeginn.ToString() == "TGEDKFunktionRechtsB99")) + if (docdata.As_Faksimile == "True" && (dv.TMBeginn.ToString().Contains("FunktionLinks") || dv.TMBeginn.ToString().Contains("FunktionRechts"))) { } @@ -1310,11 +1333,12 @@ namespace OnDocOffice { bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString(), true, false); //bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString()); - bookmarkNavigator.InsertText(dv.Value.ToString()); + //bookmarkNavigator.InsertText(dv.Value.ToString()); bookmarkNavigator.ReplaceBookmarkContent(dv.Value.ToString(), true); //TextBodyPart bookmarkContent = bookmarkNavigator.GetBookmarkContent(); //string bookmarkText = ((Syncfusion.DocIO.DLS.WParagraph)bookmarkContent.BodyItems.FirstItem).Text; + } } diff --git a/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferences.cache index a7dfa560..2f8a9d32 100644 Binary files a/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache b/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache index d6ebbac2..b4f8b652 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 6cf6cadd..d2f725f6 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 f14b3c86..3210dd03 100644 Binary files a/OnDocOffice/obj/Debug/OnDocOffice.pdb and b/OnDocOffice/obj/Debug/OnDocOffice.pdb differ diff --git a/Vorlagen_Viewer/bin/Debug/Database.dll b/Vorlagen_Viewer/bin/Debug/Database.dll index d2585ecc..92d273ba 100644 Binary files a/Vorlagen_Viewer/bin/Debug/Database.dll and b/Vorlagen_Viewer/bin/Debug/Database.dll differ diff --git a/Vorlagen_Viewer/bin/Debug/Database.pdb b/Vorlagen_Viewer/bin/Debug/Database.pdb index eb9e7e5f..aa95d7a6 100644 Binary files a/Vorlagen_Viewer/bin/Debug/Database.pdb and b/Vorlagen_Viewer/bin/Debug/Database.pdb differ diff --git a/Vorlagen_Viewer/bin/Debug/VBFileManagement.dll b/Vorlagen_Viewer/bin/Debug/VBFileManagement.dll index a3e8b1e0..f32431bd 100644 Binary files a/Vorlagen_Viewer/bin/Debug/VBFileManagement.dll and b/Vorlagen_Viewer/bin/Debug/VBFileManagement.dll differ diff --git a/Vorlagen_Viewer/bin/Debug/VBFileManagement.pdb b/Vorlagen_Viewer/bin/Debug/VBFileManagement.pdb index 3f7ac119..5d98f371 100644 Binary files a/Vorlagen_Viewer/bin/Debug/VBFileManagement.pdb and b/Vorlagen_Viewer/bin/Debug/VBFileManagement.pdb differ diff --git a/Vorlagen_Viewer/obj/Debug/Vorlagen_Viewer.csproj.AssemblyReference.cache b/Vorlagen_Viewer/obj/Debug/Vorlagen_Viewer.csproj.AssemblyReference.cache index 7d53d449..20a15f5a 100644 Binary files a/Vorlagen_Viewer/obj/Debug/Vorlagen_Viewer.csproj.AssemblyReference.cache and b/Vorlagen_Viewer/obj/Debug/Vorlagen_Viewer.csproj.AssemblyReference.cache differ diff --git a/ZZ_BarcpdeFromFont/bin/Debug/Database.dll b/ZZ_BarcpdeFromFont/bin/Debug/Database.dll index d2585ecc..92d273ba 100644 Binary files a/ZZ_BarcpdeFromFont/bin/Debug/Database.dll and b/ZZ_BarcpdeFromFont/bin/Debug/Database.dll differ diff --git a/ZZ_BarcpdeFromFont/bin/Debug/Database.pdb b/ZZ_BarcpdeFromFont/bin/Debug/Database.pdb index eb9e7e5f..aa95d7a6 100644 Binary files a/ZZ_BarcpdeFromFont/bin/Debug/Database.pdb and b/ZZ_BarcpdeFromFont/bin/Debug/Database.pdb differ diff --git a/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.dll b/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.dll index a3e8b1e0..f32431bd 100644 Binary files a/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.dll and b/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.dll differ diff --git a/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.pdb b/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.pdb index 3f7ac119..5d98f371 100644 Binary files a/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.pdb and b/ZZ_BarcpdeFromFont/bin/Debug/VBFileManagement.pdb differ diff --git a/ZZ_BarcpdeFromFont/obj/Debug/ZZ_BarcpdeFromFont.csproj.AssemblyReference.cache b/ZZ_BarcpdeFromFont/obj/Debug/ZZ_BarcpdeFromFont.csproj.AssemblyReference.cache index 9835ced6..67a928d3 100644 Binary files a/ZZ_BarcpdeFromFont/obj/Debug/ZZ_BarcpdeFromFont.csproj.AssemblyReference.cache and b/ZZ_BarcpdeFromFont/obj/Debug/ZZ_BarcpdeFromFont.csproj.AssemblyReference.cache differ diff --git a/vbBarcodes/bin/Debug/Database.dll b/vbBarcodes/bin/Debug/Database.dll index d2585ecc..92d273ba 100644 Binary files a/vbBarcodes/bin/Debug/Database.dll and b/vbBarcodes/bin/Debug/Database.dll differ diff --git a/vbBarcodes/bin/Debug/Database.pdb b/vbBarcodes/bin/Debug/Database.pdb index eb9e7e5f..aa95d7a6 100644 Binary files a/vbBarcodes/bin/Debug/Database.pdb and b/vbBarcodes/bin/Debug/Database.pdb differ diff --git a/vbBarcodes/bin/Debug/VBFileManagement.dll b/vbBarcodes/bin/Debug/VBFileManagement.dll index a3e8b1e0..f32431bd 100644 Binary files a/vbBarcodes/bin/Debug/VBFileManagement.dll and b/vbBarcodes/bin/Debug/VBFileManagement.dll differ diff --git a/vbBarcodes/bin/Debug/VBFileManagement.pdb b/vbBarcodes/bin/Debug/VBFileManagement.pdb index 3f7ac119..5d98f371 100644 Binary files a/vbBarcodes/bin/Debug/VBFileManagement.pdb and b/vbBarcodes/bin/Debug/VBFileManagement.pdb differ diff --git a/vbBarcodes/obj/Debug/vbBarcodes.vbproj.AssemblyReference.cache b/vbBarcodes/obj/Debug/vbBarcodes.vbproj.AssemblyReference.cache index dcfe4824..dcc6c444 100644 Binary files a/vbBarcodes/obj/Debug/vbBarcodes.vbproj.AssemblyReference.cache and b/vbBarcodes/obj/Debug/vbBarcodes.vbproj.AssemblyReference.cache differ