diff --git a/API_NetFramework/API_NetFramework.csproj b/API_NetFramework/API_NetFramework.csproj
index 80910609..50776435 100644
--- a/API_NetFramework/API_NetFramework.csproj
+++ b/API_NetFramework/API_NetFramework.csproj
@@ -231,6 +231,7 @@
+
diff --git a/API_NetFramework/API_NetFramework.csproj.user b/API_NetFramework/API_NetFramework.csproj.user
index 49c01a40..998c3f4a 100644
--- a/API_NetFramework/API_NetFramework.csproj.user
+++ b/API_NetFramework/API_NetFramework.csproj.user
@@ -10,7 +10,7 @@
Debug|Any CPU
ApiControllerEmptyScaffolder
- root/Common
+ root/Common/Web API
600
True
False
diff --git a/API_NetFramework/Controllers/ArchivController.cs b/API_NetFramework/Controllers/ArchivController.cs
index ac95eeb7..e0c809a1 100644
--- a/API_NetFramework/Controllers/ArchivController.cs
+++ b/API_NetFramework/Controllers/ArchivController.cs
@@ -260,7 +260,7 @@ namespace API_NetFramework.Controllers
try
{
APILogging.Log((HttpRequestMessage)Request, "Start ArchivDocFromIRIS DokumentID: " + dokumentid, LogLevelType.Debug);
- if (dokumentid.Substring(0, 6).ToUpper() == "ONDOC00")
+ if (dokumentid.Substring(0, 9).ToUpper() == "OFFEDK008")
{
return (ArchivDocFromDatabase(dokumentid));
}
diff --git a/API_NetFramework/Controllers/MailController.cs b/API_NetFramework/Controllers/MailController.cs
new file mode 100644
index 00000000..13907b57
--- /dev/null
+++ b/API_NetFramework/Controllers/MailController.cs
@@ -0,0 +1,25 @@
+using API_NetFramework.Controllers;
+using API_NetFramework.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+
+namespace OnDocAPI_NetFramework.Controllers
+{
+ public class MailController : ApiController
+ {
+ [HttpGet]
+ [Route("API/SendMail")]
+ public IHttpActionResult SendMail(string empfaenger, string betreff, string message, string dokumentid, string ondoclink)
+ {
+ APILogging.Log((HttpRequestMessage)Request, "Mailversand: " + empfaenger+""+betreff, LogLevelType.Debug);
+
+
+
+ return Content(HttpStatusCode.OK, empfaenger + ": Mail versandt");
+ }
+ }
+}
diff --git a/API_NetFramework/bin/DOCGEN.dll b/API_NetFramework/bin/DOCGEN.dll
index ea541a45..144f4cc0 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 334dc463..32a75ecb 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 aacaf3ea..86794518 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 c8bc2e35..f17aee3e 100644
Binary files a/API_NetFramework/bin/Database.pdb and b/API_NetFramework/bin/Database.pdb differ
diff --git a/API_NetFramework/bin/Helper.dll b/API_NetFramework/bin/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/API_NetFramework/bin/Helper.dll and b/API_NetFramework/bin/Helper.dll differ
diff --git a/API_NetFramework/bin/Helper.pdb b/API_NetFramework/bin/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/API_NetFramework/bin/Helper.pdb and b/API_NetFramework/bin/Helper.pdb differ
diff --git a/API_NetFramework/bin/Model.dll b/API_NetFramework/bin/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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
new file mode 100644
index 00000000..b1b5be8c
Binary files /dev/null and b/API_NetFramework/bin/OnDocOffice.dll differ
diff --git a/API_NetFramework/bin/OnDocOffice.pdb b/API_NetFramework/bin/OnDocOffice.pdb
new file mode 100644
index 00000000..55235846
Binary files /dev/null and b/API_NetFramework/bin/OnDocOffice.pdb differ
diff --git a/API_NetFramework/bin/OnDoc_API.zip b/API_NetFramework/bin/OnDoc_API.zip
new file mode 100644
index 00000000..b0d2e038
Binary files /dev/null and b/API_NetFramework/bin/OnDoc_API.zip differ
diff --git a/API_NetFramework/bin/OnDoc_NetFramework.dll b/API_NetFramework/bin/OnDoc_NetFramework.dll
index 944fb741..37faf968 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 828905c4..93615593 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 44bb54f6..9344eade 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/API_NetFramework.csproj.CoreCompileInputs.cache b/API_NetFramework/obj/Debug/API_NetFramework.csproj.CoreCompileInputs.cache
index e46bd410..0a842afe 100644
--- a/API_NetFramework/obj/Debug/API_NetFramework.csproj.CoreCompileInputs.cache
+++ b/API_NetFramework/obj/Debug/API_NetFramework.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-fd071c09c7dba1a10d40b75954ad2f0d5d3e0976027671a6eb97b96a5125f413
+e3bd8e83aa5c2a0e3a79dc6a52be63d1040407a3b479c3366beaa1e996e86770
diff --git a/API_NetFramework/obj/Debug/API_NetFramework.csproj.FileListAbsolute.txt b/API_NetFramework/obj/Debug/API_NetFramework.csproj.FileListAbsolute.txt
index ec0f2b51..51567fb2 100644
--- a/API_NetFramework/obj/Debug/API_NetFramework.csproj.FileListAbsolute.txt
+++ b/API_NetFramework/obj/Debug/API_NetFramework.csproj.FileListAbsolute.txt
@@ -297,3 +297,5 @@ E:\Software-Projekte\OnDoc\OnDoc\API_NetFramework\bin\Syncfusion.Compression.Bas
E:\Software-Projekte\OnDoc\OnDoc\API_NetFramework\bin\Syncfusion.OfficeChart.Base.dll
E:\Software-Projekte\OnDoc\OnDoc\API_NetFramework\bin\Syncfusion.Compression.Base.xml
E:\Software-Projekte\OnDoc\OnDoc\API_NetFramework\bin\Syncfusion.OfficeChart.Base.xml
+E:\Software-Projekte\OnDoc\OnDoc\API_NetFramework\bin\OnDocOffice.dll
+E:\Software-Projekte\OnDoc\OnDoc\API_NetFramework\bin\OnDocOffice.pdb
diff --git a/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll b/API_NetFramework/obj/Debug/OnDoc_NetFramework.dll
index 944fb741..37faf968 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 828905c4..93615593 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 aacaf3ea..86794518 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 c8bc2e35..f17aee3e 100644
Binary files a/BarcodeLib/bin/Debug/Database.pdb and b/BarcodeLib/bin/Debug/Database.pdb differ
diff --git a/BarcodeLib/bin/Debug/Helper.dll b/BarcodeLib/bin/Debug/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/BarcodeLib/bin/Debug/Helper.dll and b/BarcodeLib/bin/Debug/Helper.dll differ
diff --git a/BarcodeLib/bin/Debug/Helper.pdb b/BarcodeLib/bin/Debug/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/BarcodeLib/bin/Debug/Helper.pdb and b/BarcodeLib/bin/Debug/Helper.pdb differ
diff --git a/BarcodeLib/bin/Debug/Model.dll b/BarcodeLib/bin/Debug/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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 ebba9df0..4231cfb3 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 262caf89..43d8efe8 100644
--- a/Client/Client.csproj
+++ b/Client/Client.csproj
@@ -7,7 +7,7 @@
{1CBBE5F6-4562-4EEF-BC9B-177F30901E23}
WinExe
OnDoc
- OnDoc
+ update
v4.8.1
512
true
diff --git a/Client/DocMgmt/DokTypSelect.cs b/Client/DocMgmt/DokTypSelect.cs
index 0eb9dc75..9db4677a 100644
--- a/Client/DocMgmt/DokTypSelect.cs
+++ b/Client/DocMgmt/DokTypSelect.cs
@@ -71,6 +71,7 @@ namespace OnDoc.DocMgmt
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
if (this.favoriten) { Load_Favoriten(""); }
else { load_standard(""); }
+
}
@@ -121,7 +122,7 @@ namespace OnDoc.DocMgmt
if (dr["Parentid"].ToString() == "0")
{
//Creates a TreeNode if the parent equals 0
- TreeNodeAdv root = new TreeNodeAdv(dr["bezeichnung"].ToString());
+ TreeNodeAdv root = new TreeNodeAdv(dr["bezeichnung"].ToString() );
root.Tag = Convert.ToInt32(dr["id"]) * -1;
root.TagObject = dr;
root.LeftImageIndices = new int[] { 0 };
@@ -161,7 +162,7 @@ namespace OnDoc.DocMgmt
if (dr["bezeichnung"].ToString() == "Dokumentpakete")
{
//Creates a TreeNode if the parent equals 0
- TreeNodeAdv root = new TreeNodeAdv(dr["bezeichnung"].ToString());
+ TreeNodeAdv root = new TreeNodeAdv(dr["bezeichnung"].ToString() );
root.Tag = Convert.ToInt32(dr["id"]) * -1;
root.TagObject = dr;
root.LeftImageIndices = new int[] { 0 };
@@ -213,7 +214,7 @@ namespace OnDoc.DocMgmt
foreach (System.Data.DataRow row in dr.GetChildRows("TreeParentChild"))
{
//Creating a TreeNode for each row
- TreeNodeAdv cChild = new TreeNodeAdv(row["bezeichnung"].ToString());
+ TreeNodeAdv cChild = new TreeNodeAdv(row["bezeichnung"].ToString() );
cChild.Tag = Convert.ToInt32(row["id"]) * -1;
cChild.LeftImageIndices = new int[] { 0 };
cChild.TagObject = row;
@@ -221,7 +222,7 @@ namespace OnDoc.DocMgmt
pNode.Nodes.Add(cChild);
//Recursively build the tree
PopulateTree(row, cChild);
- PopulateSubTree(row, cChild);
+ //PopulateSubTree(row, cChild);
}
}
diff --git a/Client/DocMgmt/Dokumenterstellung.cs b/Client/DocMgmt/Dokumenterstellung.cs
index 2b4c3192..f2c5bf95 100644
--- a/Client/DocMgmt/Dokumenterstellung.cs
+++ b/Client/DocMgmt/Dokumenterstellung.cs
@@ -100,7 +100,10 @@ namespace OnDoc.DocMgmt
private void sfButton2_Click(object sender, EventArgs e)
{
+ Cursor = Cursors.WaitCursor;
Dokument_Erstellen();
+ Cursor = Cursors.Default;
+
}
public void Dokument_Erstellen()
{
@@ -121,11 +124,11 @@ namespace OnDoc.DocMgmt
{
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir);
clsdok dok = new clsdok("", "", "");
- dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
+ dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata, ucAllgemeineDokumentParam1.ErstellungInOffice);
interop = ucAllgemeineDokumentParam1.interop;
- if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
+ if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten || ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
{
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
@@ -133,11 +136,6 @@ namespace OnDoc.DocMgmt
db.Save_To_DB(dokdata.Dokumentid, filename);
db = null;
DocFunction = 1;
-
- //if (dok.extension.Substring(0,1).ToUpper() == "D") { System.Diagnostics.Process.Start("winword.exe", filename); }
- //if (dok.extension.Substring(0, 1).ToUpper() == "X") { System.Diagnostics.Process.Start("excel.exe", filename); }
- //clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
-
this.Close();
return;
}
diff --git a/Client/DocMgmt/frmToApproval.cs b/Client/DocMgmt/frmToApproval.cs
index 41850364..911149f9 100644
--- a/Client/DocMgmt/frmToApproval.cs
+++ b/Client/DocMgmt/frmToApproval.cs
@@ -57,6 +57,7 @@ namespace OnDoc.DocMgmt
cbboxunterschriftrechts.Enabled = false;
pxapproval2.Visible = true;
}
+
if (Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0]["approved"])){
cbboxunterschriftlinks.Enabled = false;
pxapproval1.Visible = true;
@@ -64,13 +65,29 @@ namespace OnDoc.DocMgmt
pxapproval2.Visible = true;
btntoapproval.Enabled = false;
}
-
+ if (Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0]["approval1"]))
+ {
+ cbboxunterschriftlinks.Enabled = false;
+ pxapproval1.Visible = true;
+ }
+ if (Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0]["approval2"]))
+ {
+ cbboxunterschriftrechts.Enabled = false;
+ pxapproval2.Visible = true;
+ }
}
private void btntoapproval_Click(object sender, EventArgs e)
{
+
DB dB = new DB(AppParams.connectionstring);
-
+
+
+
+ string sql = "Update dokument_Bewilligung set aktiv=0, mutiert_am=getdate(), mutierer = " + AppParams.CurrentMitarbieter.ToString();
+ sql = sql + " where dokumentid='" + dokumentid + "' and abgelehnt=0 and bewilligt=0";
+ dB.Exec_SQL(sql);
+
dB.Get_Tabledata_for_Update("select top 1 * from dokument_bewilligung where id=-2", false, true);
if (pxapproval1.Visible == false)
diff --git a/Client/Helper/FileHelper.cs b/Client/Helper/FileHelper.cs
index f02b01cf..d48881d9 100644
--- a/Client/Helper/FileHelper.cs
+++ b/Client/Helper/FileHelper.cs
@@ -32,5 +32,11 @@ namespace OnDoc.Helper
stream.Position = 0;
return stream;
}
+
+ public String Base64FromFile(string filename)
+ {
+ Byte[] bytes = File.ReadAllBytes(filename);
+ return Convert.ToBase64String(bytes);
+ }
}
}
diff --git a/Client/UIControls/Administrator/Dokumenttyp.Designer.cs b/Client/UIControls/Administrator/Dokumenttyp.Designer.cs
index 2aedbaae..c8f85eed 100644
--- a/Client/UIControls/Administrator/Dokumenttyp.Designer.cs
+++ b/Client/UIControls/Administrator/Dokumenttyp.Designer.cs
@@ -138,6 +138,7 @@
this.label16 = new System.Windows.Forms.Label();
this.rbNr = new System.Windows.Forms.RadioButton();
this.label15 = new System.Windows.Forms.Label();
+ this.chkboxInOffice = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).BeginInit();
this.tabControlAdv1.SuspendLayout();
this.tabPageAdv1.SuspendLayout();
@@ -576,6 +577,7 @@
//
// GroupBox2
//
+ this.GroupBox2.Controls.Add(this.chkboxInOffice);
this.GroupBox2.Controls.Add(this.cbaktiv);
this.GroupBox2.Controls.Add(this.rbDokumenterstellungPerson);
this.GroupBox2.Controls.Add(this.rbDokumenterstellungBP);
@@ -1360,6 +1362,14 @@
this.label15.TabIndex = 7;
this.label15.Text = "Sort";
//
+ // chkboxInOffice
+ //
+ this.chkboxInOffice.Location = new System.Drawing.Point(293, 71);
+ this.chkboxInOffice.Name = "chkboxInOffice";
+ this.chkboxInOffice.Size = new System.Drawing.Size(187, 24);
+ this.chkboxInOffice.TabIndex = 26;
+ this.chkboxInOffice.Text = "Erstellung mit Office";
+ //
// Dokumenttyp
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -1514,5 +1524,6 @@
private Syncfusion.Windows.Forms.Tools.TreeViewAdv TreeDokumenttyp;
internal System.Windows.Forms.CheckBox chkbearbeitungdirekt;
internal System.Windows.Forms.CheckBox chkinterop;
+ internal System.Windows.Forms.CheckBox chkboxInOffice;
}
}
\ No newline at end of file
diff --git a/Client/UIControls/Administrator/Dokumenttyp.cs b/Client/UIControls/Administrator/Dokumenttyp.cs
index 47a5ad9e..d22d8ee2 100644
--- a/Client/UIControls/Administrator/Dokumenttyp.cs
+++ b/Client/UIControls/Administrator/Dokumenttyp.cs
@@ -162,7 +162,12 @@ namespace OnDoc.UIControls.Administrator
}
catch { chkinterop.Checked = false; }
-
+ try
+ {
+ chkboxInOffice.Checked = Convert.ToBoolean(r["erstellunginoffice"]) == true;
+ }
+ catch
+ { chkboxInOffice.Checked = false; }
Update_Vorlagenfelder();
}
@@ -251,6 +256,12 @@ namespace OnDoc.UIControls.Administrator
{
chkaktiv.Checked = false;
}
+ if (Convert.ToBoolean(dr["erstellunginoffice"]) == true)
+ {
+ chkboxInOffice.Checked = true;
+ }
+ else
+ { chkboxInOffice.Checked= false; }
}
private void txtfeldname_TextChanged(object sender, EventArgs e)
@@ -304,7 +315,7 @@ namespace OnDoc.UIControls.Administrator
r["ebanking_moeglich"] = cbebanking_moeglich.Checked == true;
r["BearbeitungDirket"] = chkbearbeitungdirekt.Checked==true;
r["interop"] = chkinterop.Checked == true;
-
+ r["erstellungInOffice"] = chkboxInOffice.Checked == true;
if (cbOfficeDokument.Checked) { r["genresultat_type"] = 1; }
if (cbPDFDokument.Checked) { r["genresultat_type"] = 2; }
if (cbPDFDirekteArchivierung.Checked) { r["genresultat_type"] = 3; }
diff --git a/Client/UIControls/DokList.Designer.cs b/Client/UIControls/DokList.Designer.cs
index d8e7c60d..8f8f9fc0 100644
--- a/Client/UIControls/DokList.Designer.cs
+++ b/Client/UIControls/DokList.Designer.cs
@@ -112,12 +112,12 @@ namespace OnDoc.UICintrols
this.RibbonButtonBerechtigungsgruppe = new System.Windows.Forms.RibbonButton();
this.RibbonPanelDiverses = new System.Windows.Forms.RibbonPanel();
this.ribbonButtonBCK = new System.Windows.Forms.RibbonButton();
+ this.ribbonPanel4 = new System.Windows.Forms.RibbonPanel();
+ this.ribbonbuttonlogin = new System.Windows.Forms.RibbonButton();
this.pdfConfig1 = new Syncfusion.Pdf.PdfConfig();
this.lblToApprove = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.RibbonButtonCreateNewDoc = new System.Windows.Forms.RibbonButton();
- this.ribbonPanel4 = new System.Windows.Forms.RibbonPanel();
- this.ribbonbuttonlogin = new System.Windows.Forms.RibbonButton();
((System.ComponentModel.ISupportInitialize)(this.sfDataGrid1)).BeginInit();
this.ctxMenuDokList.SuspendLayout();
this.toolStrip1.SuspendLayout();
@@ -890,6 +890,20 @@ namespace OnDoc.UICintrols
this.ribbonButtonBCK.Text = "BCK";
this.ribbonButtonBCK.Click += new System.EventHandler(this.ribbonButton3_Click);
//
+ // ribbonPanel4
+ //
+ this.ribbonPanel4.Items.Add(this.ribbonbuttonlogin);
+ this.ribbonPanel4.Name = "ribbonPanel4";
+ this.ribbonPanel4.Text = "";
+ //
+ // ribbonbuttonlogin
+ //
+ this.ribbonbuttonlogin.Image = ((System.Drawing.Image)(resources.GetObject("ribbonbuttonlogin.Image")));
+ this.ribbonbuttonlogin.LargeImage = ((System.Drawing.Image)(resources.GetObject("ribbonbuttonlogin.LargeImage")));
+ this.ribbonbuttonlogin.Name = "ribbonbuttonlogin";
+ this.ribbonbuttonlogin.SmallImage = ((System.Drawing.Image)(resources.GetObject("ribbonbuttonlogin.SmallImage")));
+ this.ribbonbuttonlogin.Click += new System.EventHandler(this.ribbonbuttonlogin_Click);
+ //
// lblToApprove
//
this.lblToApprove.AutoSize = true;
@@ -914,20 +928,6 @@ namespace OnDoc.UICintrols
this.RibbonButtonCreateNewDoc.Text = "Dokument";
this.RibbonButtonCreateNewDoc.Click += new System.EventHandler(this.RibbonButtonCreateNewDoc_Click);
//
- // ribbonPanel4
- //
- this.ribbonPanel4.Items.Add(this.ribbonbuttonlogin);
- this.ribbonPanel4.Name = "ribbonPanel4";
- this.ribbonPanel4.Text = "";
- //
- // ribbonbuttonlogin
- //
- this.ribbonbuttonlogin.Image = ((System.Drawing.Image)(resources.GetObject("ribbonbuttonlogin.Image")));
- this.ribbonbuttonlogin.LargeImage = ((System.Drawing.Image)(resources.GetObject("ribbonbuttonlogin.LargeImage")));
- this.ribbonbuttonlogin.Name = "ribbonbuttonlogin";
- this.ribbonbuttonlogin.SmallImage = ((System.Drawing.Image)(resources.GetObject("ribbonbuttonlogin.SmallImage")));
- this.ribbonbuttonlogin.Click += new System.EventHandler(this.ribbonbuttonlogin_Click);
- //
// DokList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
diff --git a/Client/UIControls/DokList.resx b/Client/UIControls/DokList.resx
index 72f1efee..ef9b3ad9 100644
--- a/Client/UIControls/DokList.resx
+++ b/Client/UIControls/DokList.resx
@@ -469,23 +469,20 @@
- iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVFhH7cEBAQAAAIIg/69uSEAAAADAuRoQIAABnXhJ
- QwAAAABJRU5ErkJggg==
+ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wgAADsIBFShKgAAAABpJREFUWEftwQEBAAAAgiD/r25IQAAAAMC5GhAgAAGdeElDAAAAAElFTkSuQmCC
- iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAaSURBVFhH7cEBAQAAAIIg/69uSEAAAADAuRoQIAABnXhJ
- QwAAAABJRU5ErkJggg==
+ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wgAADsIBFShKgAAAABpJREFUWEftwQEBAAAAgiD/r25IQAAAAMC5GhAgAAGdeElDAAAAAElFTkSuQmCC
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAATSURBVDhPYxgFo2AUjAIwYGAAAAQQAAGnRHxjAAAAAElF
- TkSuQmCC
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wgAADsIBFShKgAAAABNJREFUOE9jGAWjYBSMAjBgYAAABBAAAadEfGMAAAAASUVORK5CYII=
diff --git a/Client/UIControls/UCAllgemeineDokumentParam.cs b/Client/UIControls/UCAllgemeineDokumentParam.cs
index e3e77241..54f8ea1c 100644
--- a/Client/UIControls/UCAllgemeineDokumentParam.cs
+++ b/Client/UIControls/UCAllgemeineDokumentParam.cs
@@ -45,6 +45,16 @@ namespace OnDoc.UIControls
public string genertated_dokumentid { get; set; }
+ public bool ErstellungInOffice = false;
+ public int vorlagenr = 0;
+ public bool kopfzeile_generieren = false;
+ public string barcode_zusatz = "";
+ public int barcode_top = 0;
+ public int barcode_left = 0;
+ public int barcode_width = 0;
+ public int barcode_height = 0;
+ public int barcode_horizontal = 0;
+
public UCAllgemeineDokumentParam()
{
InitializeComponent();
@@ -105,6 +115,17 @@ namespace OnDoc.UIControls
this.cbfaksimile.Enabled = Convert.ToBoolean(dr["unterschrift_faksimile"]) == true;
this.cbfaksimile.Checked = false;
this.cbformularohneunterschrfit.Checked = false;
+ try {
+ if (Convert.ToBoolean(dr["ErstellungInOffice"]) == true){
+ this.ErstellungInOffice = true;
+ }
+ else
+ {
+ ErstellungInOffice = false;
+ }
+ }
+ catch { ErstellungInOffice=false; }
+
if (dr["Versandstrasse_moeglich"].ToString() == "") { docgendata.versandstrasse_moeglich = false; }
else
{
@@ -123,6 +144,28 @@ namespace OnDoc.UIControls
catch { interop = false; }
barcode = Convert.ToBoolean(dr["Vertrag"])== true;
+ try
+ {
+ if (dr["physichses_archiv"].ToString() == "1") { this.barcode_zusatz = " U"; }
+ if (dr["physichses_archiv"].ToString() == "2") { this.barcode_zusatz = " F"; }
+ }
+ catch { }
+
+
+ db.Get_Tabledata("Select office_vorlagenr,kopfzeile_generieren, bcpt,bcpl, bcw, bch, bchorizontal from office_vorlage where office_vorlagenr="+dr["office_vorlagenr"].ToString(),false,true);
+ this.vorlagenr = Convert.ToInt32(dr["office_vorlagenr"]);
+ this.kopfzeile_generieren = false;
+ this.barcode_left = Convert.ToInt32(dr["bcpl"]);
+ this.barcode_top = Convert.ToInt32(dr["bcpt"]);
+ this.barcode_width = Convert.ToInt32(dr["bcw"]);
+ this.barcode_height = Convert.ToInt32(dr["bch"]);
+ this.barcode_horizontal = Convert.ToInt32(dr["bchorizontal"]);
+ try
+ {
+ if (Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0][1]) == true) { this.kopfzeile_generieren = true; }
+ }
+ catch { }
+
}
else
{
@@ -173,7 +216,7 @@ namespace OnDoc.UIControls
gridDokwertlist.QueryImageCellStyle += gridDokwertlist_QueryImageCellStyle;
gridDokwertlist.Columns["userinterface"].FilterPredicates.Add(new Syncfusion.Data.FilterPredicate() { FilterType=Syncfusion.Data.FilterType.Equals,FilterValue=true });
- db = null;
+ db = null;
Refresh_Team();
this.cbboxteam.SelectedIndex = 0;
}
@@ -365,6 +408,7 @@ namespace OnDoc.UIControls
docgendata.dokumentdatum = DateDokumentDatum.DateTimeText.ToString();
docgendata.bezeichnung = txtbezeichnung.Text;
docgendata.erstellungsart = Erstellungsart.DokumentPreview;
+ if (ErstellungInOffice == true) { docgendata.erstellungsart = Erstellungsart.ErstellungInOffice; }
if (rbDokumentbearbeiten.Checked) { docgendata.erstellungsart = Erstellungsart.DokumentBearbeiten; }
if (rbEditlater.Checked) { docgendata.erstellungsart = Erstellungsart.DokumentSpäterBearbeiten; }
if (rbasPDF.Checked) { docgendata.erstellungsart = Erstellungsart.DokumentAlsPDF; }
@@ -392,6 +436,15 @@ namespace OnDoc.UIControls
if (docgendata.digitaleunterschrift == true) { dokdata.As_Faksimile = "True"; } else { dokdata.As_Faksimile = "False"; }
dokdata.dokumentwerte = docgendata.dokumentwerte;
dokdata.Barcode = barcode;
+ dokdata.VorlageNr = this.vorlagenr.ToString();
+ dokdata.Kopfzeile_generieren = this.kopfzeile_generieren;
+ dokdata.barcode_zusatz = barcode_zusatz;
+ dokdata.barcode_left = barcode_left;
+ dokdata.barcode_width = barcode_width;
+ dokdata.barcode_top = barcode_top;
+ dokdata.barcode_height = barcode_height;
+ dokdata.barcode_zusatz = barcode_zusatz;
+
}
private void sfButton1_Click(object sender, EventArgs e)
diff --git a/Client/bin/Debug/DOCGEN.dll b/Client/bin/Debug/DOCGEN.dll
index ea541a45..144f4cc0 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 334dc463..32a75ecb 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 aacaf3ea..86794518 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 c8bc2e35..f17aee3e 100644
Binary files a/Client/bin/Debug/Database.pdb and b/Client/bin/Debug/Database.pdb differ
diff --git a/Client/bin/Debug/Helper.dll b/Client/bin/Debug/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/Client/bin/Debug/Helper.dll and b/Client/bin/Debug/Helper.dll differ
diff --git a/Client/bin/Debug/Helper.pdb b/Client/bin/Debug/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/Client/bin/Debug/Helper.pdb and b/Client/bin/Debug/Helper.pdb differ
diff --git a/Client/bin/Debug/Model.dll b/Client/bin/Debug/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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 32c8b41d..93dd5243 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 b5bddde4..86dbfc1c 100644
Binary files a/Client/bin/Debug/OnDoc.pdb and b/Client/bin/Debug/OnDoc.pdb differ
diff --git a/Client/bin/Debug/OnDoc.zip b/Client/bin/Debug/OnDoc.zip
new file mode 100644
index 00000000..c7b7b3aa
Binary files /dev/null and b/Client/bin/Debug/OnDoc.zip differ
diff --git a/Client/bin/Debug/OnDocOffice.dll b/Client/bin/Debug/OnDocOffice.dll
index b4077973..b1b5be8c 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 9e928f28..55235846 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 b78fc476..8190b5d7 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/Client.csproj.nuget.dgspec.json b/Client/obj/Client.csproj.nuget.dgspec.json
index 0ea93585..ad51d4e9 100644
--- a/Client/obj/Client.csproj.nuget.dgspec.json
+++ b/Client/obj/Client.csproj.nuget.dgspec.json
@@ -158,6 +158,9 @@
},
"E:\\Software-Projekte\\OnDoc\\OnDoc\\Model\\Model.csproj": {
"projectPath": "E:\\Software-Projekte\\OnDoc\\OnDoc\\Model\\Model.csproj"
+ },
+ "E:\\Software-Projekte\\OnDoc\\OnDoc\\OnDocOffice\\OnDocOffice.csproj": {
+ "projectPath": "E:\\Software-Projekte\\OnDoc\\OnDoc\\OnDocOffice\\OnDocOffice.csproj"
}
}
}
@@ -227,6 +230,28 @@
"net481": {}
}
},
+ "E:\\Software-Projekte\\OnDoc\\OnDoc\\OnDocOffice\\OnDocOffice.csproj": {
+ "restore": {
+ "projectUniqueName": "E:\\Software-Projekte\\OnDoc\\OnDoc\\OnDocOffice\\OnDocOffice.csproj",
+ "projectName": "OnDocOffice",
+ "projectPath": "E:\\Software-Projekte\\OnDoc\\OnDoc\\OnDocOffice\\OnDocOffice.csproj",
+ "frameworks": {
+ "net481": {
+ "projectReferences": {
+ "E:\\Software-Projekte\\OnDoc\\OnDoc\\Helper\\Helper.csproj": {
+ "projectPath": "E:\\Software-Projekte\\OnDoc\\OnDoc\\Helper\\Helper.csproj"
+ },
+ "E:\\Software-Projekte\\OnDoc\\OnDoc\\Model\\Model.csproj": {
+ "projectPath": "E:\\Software-Projekte\\OnDoc\\OnDoc\\Model\\Model.csproj"
+ }
+ }
+ }
+ }
+ },
+ "frameworks": {
+ "net481": {}
+ }
+ },
"E:\\Software-Projekte\\OnDoc\\OnDoc\\VBFileManagement\\VBFileManagement.vbproj": {
"restore": {
"projectUniqueName": "E:\\Software-Projekte\\OnDoc\\OnDoc\\VBFileManagement\\VBFileManagement.vbproj",
diff --git a/Client/obj/Debug/Client.csproj.AssemblyReference.cache b/Client/obj/Debug/Client.csproj.AssemblyReference.cache
index 5e504928..f45e3cca 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 da666993..ba68f339 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 849e08f1..e48a0f4d 100644
Binary files a/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Client/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/Client/obj/Debug/OnDoc.UICintrols.DokList.resources b/Client/obj/Debug/OnDoc.UICintrols.DokList.resources
index 6c4a56ef..68c36fbf 100644
Binary files a/Client/obj/Debug/OnDoc.UICintrols.DokList.resources and b/Client/obj/Debug/OnDoc.UICintrols.DokList.resources differ
diff --git a/Client/obj/Debug/OnDoc.exe b/Client/obj/Debug/OnDoc.exe
index 32c8b41d..93dd5243 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 b5bddde4..86dbfc1c 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 b78fc476..8190b5d7 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/Client/obj/project.assets.json b/Client/obj/project.assets.json
index 4ad9de71..535b8942 100644
--- a/Client/obj/project.assets.json
+++ b/Client/obj/project.assets.json
@@ -311,7 +311,8 @@
"dependencies": {
"Database": "1.0.0",
"Helper": "1.0.0",
- "Model": "1.0.0"
+ "Model": "1.0.0",
+ "OnDocOffice": "1.0.0"
},
"compile": {
"bin/placeholder/DocGen.dll": {}
@@ -356,6 +357,19 @@
"bin/placeholder/OfficePrinter.dll": {}
}
},
+ "OnDocOffice/1.0.0": {
+ "type": "project",
+ "dependencies": {
+ "Helper": "1.0.0",
+ "Model": "1.0.0"
+ },
+ "compile": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ }
+ },
"VBFileManagement/1.0.0": {
"type": "project",
"compile": {
@@ -676,7 +690,8 @@
"dependencies": {
"Database": "1.0.0",
"Helper": "1.0.0",
- "Model": "1.0.0"
+ "Model": "1.0.0",
+ "OnDocOffice": "1.0.0"
},
"compile": {
"bin/placeholder/DocGen.dll": {}
@@ -721,6 +736,19 @@
"bin/placeholder/OfficePrinter.dll": {}
}
},
+ "OnDocOffice/1.0.0": {
+ "type": "project",
+ "dependencies": {
+ "Helper": "1.0.0",
+ "Model": "1.0.0"
+ },
+ "compile": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ }
+ },
"VBFileManagement/1.0.0": {
"type": "project",
"compile": {
@@ -1041,7 +1069,8 @@
"dependencies": {
"Database": "1.0.0",
"Helper": "1.0.0",
- "Model": "1.0.0"
+ "Model": "1.0.0",
+ "OnDocOffice": "1.0.0"
},
"compile": {
"bin/placeholder/DocGen.dll": {}
@@ -1086,6 +1115,19 @@
"bin/placeholder/OfficePrinter.dll": {}
}
},
+ "OnDocOffice/1.0.0": {
+ "type": "project",
+ "dependencies": {
+ "Helper": "1.0.0",
+ "Model": "1.0.0"
+ },
+ "compile": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ }
+ },
"VBFileManagement/1.0.0": {
"type": "project",
"compile": {
@@ -1406,7 +1448,8 @@
"dependencies": {
"Database": "1.0.0",
"Helper": "1.0.0",
- "Model": "1.0.0"
+ "Model": "1.0.0",
+ "OnDocOffice": "1.0.0"
},
"compile": {
"bin/placeholder/DocGen.dll": {}
@@ -1451,6 +1494,19 @@
"bin/placeholder/OfficePrinter.dll": {}
}
},
+ "OnDocOffice/1.0.0": {
+ "type": "project",
+ "dependencies": {
+ "Helper": "1.0.0",
+ "Model": "1.0.0"
+ },
+ "compile": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ }
+ },
"VBFileManagement/1.0.0": {
"type": "project",
"compile": {
@@ -1771,7 +1827,8 @@
"dependencies": {
"Database": "1.0.0",
"Helper": "1.0.0",
- "Model": "1.0.0"
+ "Model": "1.0.0",
+ "OnDocOffice": "1.0.0"
},
"compile": {
"bin/placeholder/DocGen.dll": {}
@@ -1816,6 +1873,19 @@
"bin/placeholder/OfficePrinter.dll": {}
}
},
+ "OnDocOffice/1.0.0": {
+ "type": "project",
+ "dependencies": {
+ "Helper": "1.0.0",
+ "Model": "1.0.0"
+ },
+ "compile": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ },
+ "runtime": {
+ "bin/placeholder/OnDocOffice.dll": {}
+ }
+ },
"VBFileManagement/1.0.0": {
"type": "project",
"compile": {
@@ -2848,6 +2918,11 @@
"path": "../OfficePrinter/OfficePrinter.csproj",
"msbuildProject": "../OfficePrinter/OfficePrinter.csproj"
},
+ "OnDocOffice/1.0.0": {
+ "type": "project",
+ "path": "../OnDocOffice/OnDocOffice.csproj",
+ "msbuildProject": "../OnDocOffice/OnDocOffice.csproj"
+ },
"VBFileManagement/1.0.0": {
"type": "project",
"path": "../VBFileManagement/VBFileManagement.vbproj",
diff --git a/Client/obj/project.nuget.cache b/Client/obj/project.nuget.cache
index a461b7c1..c1e9bdf0 100644
--- a/Client/obj/project.nuget.cache
+++ b/Client/obj/project.nuget.cache
@@ -1,6 +1,6 @@
{
"version": 2,
- "dgSpecHash": "LwjOZBX8J9I=",
+ "dgSpecHash": "yvBt3tq7lIs=",
"success": true,
"projectFilePath": "E:\\Software-Projekte\\OnDoc\\OnDoc\\Client\\Client.csproj",
"expectedPackageFiles": [
diff --git a/DOCGEN/DocGen.csproj b/DOCGEN/DocGen.csproj
index cbae1281..49ad2954 100644
--- a/DOCGEN/DocGen.csproj
+++ b/DOCGEN/DocGen.csproj
@@ -138,6 +138,10 @@
{a1fd0973-89a7-4588-877d-373835d6e00c}
Model
+
+ {ff8f7808-3af7-467c-947b-d8d3c6bf7bd7}
+ OnDocOffice
+
diff --git a/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs b/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs
index 920ae80a..b258e310 100644
--- a/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs
+++ b/DOCGEN/Klassen/DocGenerator_from_EDOKA.cs
@@ -11,6 +11,7 @@ using Model;
using System.Diagnostics;
using NLog;
using System.Security.Policy;
+using OfficePrinter;
namespace DOCGEN.Generator
{
@@ -42,7 +43,7 @@ namespace DOCGEN.Generator
this.tempdir = tempdir;
}
- public clsdok Generate_Doc_EDOKA(string dokumentid, ref clsDocData docdata )
+ public clsdok Generate_Doc_EDOKA(string dokumentid, ref clsDocData docdata, bool useoffice = false )
{
DB db = new DB(connectionstring);
DataTable dt = new DataTable();
@@ -59,7 +60,14 @@ namespace DOCGEN.Generator
SyncFWord sfword = new SyncFWord();
generate_docdata(dokumentid, ref docdata);
clsdok dok = new clsdok("", "", "");
- dok.dokument= sfword.Generate_Word(dt.Rows[0][0].ToString(), docdata);
+ if (useoffice == false) {
+ dok.dokument = sfword.Generate_Word(dt.Rows[0][0].ToString(), docdata);
+ } else
+ {
+ OnDocOffice.clsWordEdit oo = new OnDocOffice.clsWordEdit("", "","");
+ dok.dokument = oo.Generate_Word_in_Office(ref docdata, ref dok, dt.Rows[0][0].ToString(), connectionstring, tempdir, dokumentid, Apptype);
+ }
+
dok.doktype = "D";
dok.extension = dt2.Rows[0][1].ToString();
//if (dok.extension.ToUpper()=="DOTM") { dok.extension = "docm"; }
diff --git a/DOCGEN/bin/Debug/DOCGEN.dll b/DOCGEN/bin/Debug/DOCGEN.dll
index ea541a45..144f4cc0 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 334dc463..32a75ecb 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 aacaf3ea..86794518 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 c8bc2e35..f17aee3e 100644
Binary files a/DOCGEN/bin/Debug/Database.pdb and b/DOCGEN/bin/Debug/Database.pdb differ
diff --git a/DOCGEN/bin/Debug/Helper.dll b/DOCGEN/bin/Debug/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/DOCGEN/bin/Debug/Helper.dll and b/DOCGEN/bin/Debug/Helper.dll differ
diff --git a/DOCGEN/bin/Debug/Helper.pdb b/DOCGEN/bin/Debug/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/DOCGEN/bin/Debug/Helper.pdb and b/DOCGEN/bin/Debug/Helper.pdb differ
diff --git a/DOCGEN/bin/Debug/Model.dll b/DOCGEN/bin/Debug/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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
new file mode 100644
index 00000000..b1b5be8c
Binary files /dev/null and b/DOCGEN/bin/Debug/OnDocOffice.dll differ
diff --git a/DOCGEN/bin/Debug/OnDocOffice.pdb b/DOCGEN/bin/Debug/OnDocOffice.pdb
new file mode 100644
index 00000000..55235846
Binary files /dev/null and b/DOCGEN/bin/Debug/OnDocOffice.pdb differ
diff --git a/DOCGEN/obj/Debug/DOCGEN.csproj.FileListAbsolute.txt b/DOCGEN/obj/Debug/DOCGEN.csproj.FileListAbsolute.txt
index 06d961a5..e225bb35 100644
--- a/DOCGEN/obj/Debug/DOCGEN.csproj.FileListAbsolute.txt
+++ b/DOCGEN/obj/Debug/DOCGEN.csproj.FileListAbsolute.txt
@@ -132,3 +132,5 @@ E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\FastReport.xml
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DocGen.csproj.Up2Date
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DOCGEN.dll
E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\obj\Debug\DOCGEN.pdb
+E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\OnDocOffice.dll
+E:\Software-Projekte\OnDoc\OnDoc\DOCGEN\bin\Debug\OnDocOffice.pdb
diff --git a/DOCGEN/obj/Debug/DOCGEN.dll b/DOCGEN/obj/Debug/DOCGEN.dll
index ea541a45..144f4cc0 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 334dc463..32a75ecb 100644
Binary files a/DOCGEN/obj/Debug/DOCGEN.pdb and b/DOCGEN/obj/Debug/DOCGEN.pdb differ
diff --git a/DOCGEN/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/DOCGEN/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index cb6a7087..b21ceba7 100644
Binary files a/DOCGEN/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/DOCGEN/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache
index 394ed364..aacc90cc 100644
Binary files a/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache and b/DOCGEN/obj/Debug/DocGen.csproj.AssemblyReference.cache differ
diff --git a/DOCGEN/obj/Debug/DocGen.csproj.CoreCompileInputs.cache b/DOCGEN/obj/Debug/DocGen.csproj.CoreCompileInputs.cache
index be8c1828..1ff49c47 100644
--- a/DOCGEN/obj/Debug/DocGen.csproj.CoreCompileInputs.cache
+++ b/DOCGEN/obj/Debug/DocGen.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-0a239b9ab18e54ef74fccb23ad3fd662228282573aa6dcf292e80f21c2df4095
+4da3193ff40a54fa181ed15ea9573eaab157bd10f4799f82d43d0e49007a526c
diff --git a/Database/bin/Debug/Database.dll b/Database/bin/Debug/Database.dll
index aacaf3ea..86794518 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 c8bc2e35..f17aee3e 100644
Binary files a/Database/bin/Debug/Database.pdb and b/Database/bin/Debug/Database.pdb differ
diff --git a/Database/bin/Debug/Helper.dll b/Database/bin/Debug/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/Database/bin/Debug/Helper.dll and b/Database/bin/Debug/Helper.dll differ
diff --git a/Database/bin/Debug/Helper.pdb b/Database/bin/Debug/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/Database/bin/Debug/Helper.pdb and b/Database/bin/Debug/Helper.pdb differ
diff --git a/Database/bin/Debug/Model.dll b/Database/bin/Debug/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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 3a70402b..457abd3f 100644
--- a/Database/db.cs
+++ b/Database/db.cs
@@ -182,7 +182,7 @@ namespace Database
#endregion
public string generate_key(string dbkey)
{
- string skey = "OFFEDK000";
+ string skey = "OFFEDK008";
string s = "";
s = DateTime.Now.Year.ToString().Trim();
string dt = s;
diff --git a/Database/obj/Debug/Database.csproj.AssemblyReference.cache b/Database/obj/Debug/Database.csproj.AssemblyReference.cache
index 38e0af0b..67e964d7 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 aacaf3ea..86794518 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 c8bc2e35..f17aee3e 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 03f7deeb..0d0aaf37 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/Helper/bin/Debug/Helper.dll b/Helper/bin/Debug/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/Helper/bin/Debug/Helper.dll and b/Helper/bin/Debug/Helper.dll differ
diff --git a/Helper/bin/Debug/Helper.pdb b/Helper/bin/Debug/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/Helper/bin/Debug/Helper.pdb and b/Helper/bin/Debug/Helper.pdb differ
diff --git a/Helper/clsFileHelper.cs b/Helper/clsFileHelper.cs
index 5e05d8c8..c17eb62c 100644
--- a/Helper/clsFileHelper.cs
+++ b/Helper/clsFileHelper.cs
@@ -47,5 +47,11 @@ namespace Helper
stream.Position = 0;
return stream;
}
+
+ public String Base64FromFile(string filename)
+ {
+ Byte[] bytes = File.ReadAllBytes(filename);
+ return Convert.ToBase64String(bytes);
+ }
}
}
diff --git a/Helper/obj/Debug/Helper.dll b/Helper/obj/Debug/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/Helper/obj/Debug/Helper.dll and b/Helper/obj/Debug/Helper.dll differ
diff --git a/Helper/obj/Debug/Helper.pdb b/Helper/obj/Debug/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/Helper/obj/Debug/Helper.pdb and b/Helper/obj/Debug/Helper.pdb differ
diff --git a/Model/bin/Debug/Model.dll b/Model/bin/Debug/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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 6d573a5f..1e1a9a91 100644
--- a/Model/clsDocData.cs
+++ b/Model/clsDocData.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Security.Permissions;
+using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
@@ -33,8 +34,23 @@ namespace Model
public string Direct_to_Archive { get; set; }
public string Result_as_PDF { get; set; }
+ public bool Kopfzeile_generieren { get; set; } = false;
- public bool Barcode { get; set; }
+ public string barcode_zusatz { get; set; } = "";
+ public int barcode_top { get; set; } = 0;
+ public int barcode_left { get; set; } = 0;
+ public int barcode_width { get; set; }=0;
+ public int barcode_height { get; set; } = 0;
+ public int barcode_horizontal { get; set; } = 0;
+
+ public string barcode_font { get; set; } = "Bar 25i c HR";
+ public int barcode_fontsize { get; set; } = 26;
+ public string Zusatz_Font { get; set; } = "Arial";
+ public int Zusatz_FontSize { get; set; } = 8;
+
+
+
+public bool Barcode { get; set; }
public bool PrintLogo { get; set; } = false;
public string UseEDOKA_Values { get; set; }
diff --git a/Model/clsdocgendata.cs b/Model/clsdocgendata.cs
index 9fe4436f..b94c707f 100644
--- a/Model/clsdocgendata.cs
+++ b/Model/clsdocgendata.cs
@@ -13,7 +13,9 @@ namespace Model
DokumentSpäterBearbeiten,
DokumentAlsPDF,
DokumentAlsPDFArchivieren,
- DokumentPreview
+ DokumentPreview,
+ ErstellungInOffice
+
}
public class clsdocgendata
@@ -45,5 +47,7 @@ namespace Model
public string logo { get; set; } = "";
public DataTable dokumentwerte { get; set; }
+ public bool erstelling_in_office { get; set; } = false;
+
}
}
diff --git a/Model/obj/Debug/Model.dll b/Model/obj/Debug/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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 e250a7d0..28b4e57f 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/Class1.cs b/OnDocOffice/Class1.cs
index 1beb259b..7c5c7169 100644
--- a/OnDocOffice/Class1.cs
+++ b/OnDocOffice/Class1.cs
@@ -1,5 +1,6 @@
using Microsoft.Office.Interop.Excel;
using Microsoft.Office.Interop.Word;
+using Model;
using System;
using System.Collections.Generic;
using System.Data;
@@ -8,6 +9,7 @@ using System.Linq.Expressions;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
+using Microsoft.Office;
namespace OnDocOffice
{
@@ -82,8 +84,11 @@ namespace OnDocOffice
public string connectstring { get; set; }
public string filename { get; set; }
public string dokumentid { get; set; }
- public
+
+ public bool is_protected { get; set; } = false;
+ public
Microsoft.Office.Interop.Word.Application word;
+ Microsoft.Office.Interop.Word.Document worddoc;
Document doc = null;
@@ -94,7 +99,6 @@ namespace OnDocOffice
this.dokumentid = dokumentid;
}
-
public bool Start_Application()
{
try
@@ -125,7 +129,7 @@ namespace OnDocOffice
{
word.Run(dr[0].ToString());
}
- catch ( Exception e) { string a = e.Message;}
+ catch (Exception e) { string a = e.Message; }
}
}
//clsProcessWatch.AddToList(dokumentid, filename, "Word");
@@ -156,5 +160,298 @@ namespace OnDocOffice
{
}
+
+ public string Generate_Word_in_Office(ref clsDocData docdata, ref clsdok dok, string vorlage, string connectionstring, string tempdir, string dokumentid, string apptype)
+ {
+ this.dokumentid = docdata.Dokumentid;
+ string filename = tempdir + dokumentid + "." + apptype;
+ int pos = 0;
+ int pos2 = 0;
+
+ Helper.clsFileHelper fh = new Helper.clsFileHelper();
+ fh.SaveBase64ToFile(vorlage, filename);
+ Start_Application();
+ worddoc = word.Documents.Open(filename);
+
+
+ if (worddoc.ProtectionType != Microsoft.Office.Interop.Word.WdProtectionType.wdNoProtection)
+ {
+ worddoc.Unprotect(Password: "Australia");
+ is_protected = true;
+ }
+
+ bool cursorpositionieren = false;
+ if (docdata.Kopfzeile_generieren == true)
+ {
+ Kopfzeile_generieren();
+ }
+ foreach (clsDocValue dv in docdata.DocValues)
+ {
+
+ try
+ {
+ if (dv.TMBeginn.ToString() == "TGEDKCursor" || dv.TMBeginn.ToString() == "TGEDKCursorB" ||
+ dv.FieldName.ToString() == "TGEDKCursor" || dv.FieldName.ToString() == "TGEDKCursorB") { cursorpositionieren = true; }
+ }
+ catch { }
+
+ if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() == "")
+ {
+ try
+ {
+ worddoc.Bookmarks[dv.TMBeginn.ToString()].Select();
+ word.Selection.Text = dv.Value.ToString();
+
+ pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start;
+ pos2 = word.Selection.End;
+
+
+ if (dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonB" ||
+ dv.TMBeginn.ToString().Substring(0, 23) == "XTGEDKVornameNameBetreue" ||
+ dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonZ")
+ {
+ 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
+ {
+ if (dv.TMBeginn.ToString().Substring(0, 22) == "XTGEDKDirektTelefonDokZ" ||
+ dv.TMBeginn.ToString().Substring(0, 20) == "XTGEDKVornameNameDokZ")
+ {
+ 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
+ }
+ catch { }
+ }
+ if (dv.TMBeginn.ToString() != "" && dv.TMEnd.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());
+ }
+ catch { }
+ }
+ if (dv.FieldName.ToString() != "")
+ {
+ try
+ {
+ worddoc.FormFields[dv.FieldName.ToString()].Result = dv.Value;
+ }
+ catch { }
+ }
+ }
+
+ if (docdata.Barcode == true) { Generate_Barcodes(ref docdata); }
+
+ if (is_protected)
+ {
+ worddoc.Protect(Type: Microsoft.Office.Interop.Word.WdProtectionType.wdAllowOnlyFormFields, NoReset: true, Password: "Australia");
+ }
+ worddoc.Save();
+
+ worddoc.Close();
+ word.Quit(SaveChanges: false);
+ worddoc = null;
+ word = null;
+ return fh.Base64FromFile(filename);
+ }
+
+ private void Kopfzeile_generieren()
+ {
+ word.Selection.HomeKey(Unit: Microsoft.Office.Interop.Word.WdUnits.wdStory);
+ if (word.ActiveWindow.View.SplitSpecial != Microsoft.Office.Interop.Word.WdSpecialPane.wdPaneNone)
+ {
+ word.ActiveWindow.Panes[2].Close();
+ }
+ if (word.ActiveWindow.ActivePane.View.Type == Microsoft.Office.Interop.Word.WdViewType.wdNormalView || word.ActiveWindow.ActivePane.View.Type == Microsoft.Office.Interop.Word.WdViewType.wdOutlineView)
+ {
+ word.ActiveWindow.ActivePane.View.Type = Microsoft.Office.Interop.Word.WdViewType.wdPrintView;
+ }
+ word.ActiveWindow.ActivePane.View.SeekView = Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageHeader;
+ set_headerbookmark();
+ word.ActiveWindow.ActivePane.View.SeekView = Microsoft.Office.Interop.Word.WdSeekView.wdSeekMainDocument;
+ }
+
+ private void set_headerbookmark()
+ {
+ try
+ {
+ worddoc.Bookmarks["TGEDKCompanyBBEB99"].Select();
+ }
+ catch
+ {
+ word.Selection.MoveDown(Unit: Microsoft.Office.Interop.Word.WdUnits.wdLine, Count: 1);
+ {
+ var withBlock = word.ActiveDocument.Bookmarks;
+ withBlock.Add(Range: word.Selection.Range, Name: "TGEDKCompanyBBEB99");
+ withBlock.DefaultSorting = Microsoft.Office.Interop.Word.WdBookmarkSortBy.wdSortByName;
+ withBlock.ShowHidden = false;
+ }
+ }
+ }
+ private void HeaderFooterAnzeigen()
+ {
+
+ if (word.ActiveWindow.View.SplitSpecial != Microsoft.Office.Interop.Word.WdSpecialPane.wdPaneNone)
+ {
+ word.ActiveWindow.Panes[2].Close();
+ }
+ if (word.ActiveWindow.ActivePane.View.Type == Microsoft.Office.Interop.Word.WdViewType.wdNormalView || word.ActiveWindow.ActivePane.View.Type == Microsoft.Office.Interop.Word.WdViewType.wdOutlineView)
+ {
+ word.ActiveWindow.ActivePane.View.Type = Microsoft.Office.Interop.Word.WdViewType.wdPrintView;
+ }
+ word.ActiveWindow.ActivePane.View.SeekView = Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageHeader;
+ if (word.Selection.HeaderFooter.IsHeader == true)
+ {
+ word.ActiveWindow.ActivePane.View.SeekView = Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageFooter;
+ }
+ else
+ {
+ word.ActiveWindow.ActivePane.View.SeekView = Microsoft.Office.Interop.Word.WdSeekView.wdSeekCurrentPageHeader;
+ }
+ }
+ private void Generate_Barcodes(ref clsDocData docdata)
+ {
+ float left = 360;
+ float top = 793;
+ float width = 200;
+ float height = 33;
+ word.Selection.HomeKey(Unit: Microsoft.Office.Interop.Word.WdUnits.wdStory);
+ Microsoft.Office.Interop.Word.WdStatistic stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages;
+ int pages = worddoc.ComputeStatistics(stat, null);
+ for (int i = 1; i < pages; i++)
+ {
+
+ string xname = i.ToString().Trim();
+ word.Selection.GoTo(What:Microsoft.Office.Interop.Word.WdGoToItem.wdGoToPage,xname);
+ HeaderFooterAnzeigen();
+ word.Selection.HeaderFooter.Shapes.AddTextbox(Microsoft.Office.Core.MsoTextOrientation.msoTextOrientationHorizontal, docdata.barcode_left, docdata.barcode_top, docdata.barcode_width, docdata.barcode_height).Select();
+
+ word.Selection.ShapeRange.Line.Visible = Microsoft.Office.Core.MsoTriState.msoFalse;
+ word.Selection.ShapeRange.TextFrame.MarginLeft = 0;
+ word.Selection.ShapeRange.TextFrame.MarginTop = 0;
+ word.Selection.ShapeRange.TextFrame.MarginRight = 0;
+ word.Selection.ShapeRange.TextFrame.MarginBottom = 0;
+
+ word.ActiveDocument.Tables.Add(Range:word.Selection.Range, NumRows:1, NumColumns:1);
+
+ if (docdata.barcode_horizontal == 0)
+ {
+ word.Selection.Tables[1].Borders[Microsoft.Office.Interop.Word.WdBorderType.wdBorderLeft].LineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
+ word.Selection.Tables[1].Borders[Microsoft.Office.Interop.Word.WdBorderType.wdBorderRight].LineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
+ word.Selection.Tables[1].Borders[Microsoft.Office.Interop.Word.WdBorderType.wdBorderTop].LineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
+ word.Selection.Tables[1].Borders[Microsoft.Office.Interop.Word.WdBorderType.wdBorderBottom].LineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
+ word.Selection.Tables[1].Borders[Microsoft.Office.Interop.Word.WdBorderType.wdBorderDiagonalDown].LineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
+ word.Selection.Tables[1].Borders[Microsoft.Office.Interop.Word.WdBorderType.wdBorderDiagonalUp].LineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleNone;
+ word.Selection.Orientation = Microsoft.Office.Interop.Word.WdTextOrientation.wdTextOrientationUpward;
+ word.Selection.Tables[1].Rows.HeightRule = Microsoft.Office.Interop.Word.WdRowHeightRule.wdRowHeightAtLeast;
+ word.Selection.Tables[1].Rows.Height = 150;
+ }
+
+ word.Selection.TypeText(Bar25I(dokumentid.Substring(6,16)));
+ word.Selection.HomeKey(Unit: Microsoft.Office.Interop.Word.WdUnits.wdLine, Extend: Microsoft.Office.Interop.Word.WdMovementType.wdExtend);
+ word.Selection.Font.Name = docdata.barcode_font;
+ word.Selection.Font.Size = docdata.barcode_fontsize;
+
+ word.Selection.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphRight;
+ word.Selection.EndKey(Unit: Microsoft.Office.Interop.Word.WdUnits.wdLine);
+ word.Selection.Font.Name = docdata.Zusatz_Font;
+ word.Selection.Font.Size = docdata.Zusatz_FontSize;
+ word.Selection.TypeText(docdata.barcode_zusatz);
+ }
+
+ }
+ public bool IsNumeric(string value)
+ {
+ return value.All(char.IsNumber);
+ }
+ public string Bar25I(string BarTextIn)
+ {
+ string Bar25IRet = default;
+ string BarTextOut = "";
+ string TempString = "";
+ long CharValue = 0;
+ string barcodeout = "";
+ // Initialize input and output strings
+ BarTextOut = "";
+ BarTextIn = BarTextIn.Trim();
+
+ // Throw away non-numeric data
+ TempString = "";
+ for (int II = 1, loopTo = BarTextIn.Length; II <= loopTo; II++)
+ {
+ if (IsNumeric(BarTextIn.Substring(II-1,1)))
+ {
+ TempString = TempString + BarTextIn.Substring(II - 1 ,1);
+ }
+ }
+
+ // If not an even number of digits, add a leading 0
+ if (TempString.Length % 2 == 1)
+ {
+ TempString = "0" + TempString;
+ }
+
+ // Break digit pairs up and convert to characters- build output string
+ for (int II = 1, loopTo1 = TempString.Length; II <= loopTo1; II += 2)
+ {
+ // Break string into pairs of digits and get value
+ CharValue = Convert.ToInt32(TempString.Substring(II-1,2));
+ // translate value to ASCII and save in BarTextOut
+ if (CharValue < 90)
+ {
+ BarTextOut = BarTextOut + (char)(CharValue+33);
+ }
+ else
+ {
+ BarTextOut = BarTextOut + (char)(CharValue + 71);
+ }
+ }
+
+ // Build ouput string, trailing space for Windows rasterization bug
+ barcodeout = "{" + BarTextOut + "} ";
+
+ // Return the string
+ Bar25IRet = barcodeout;
+ return Bar25IRet;
+
+ }
}
}
diff --git a/OnDocOffice/OnDocOffice.csproj b/OnDocOffice/OnDocOffice.csproj
index d0b08dad..c53fd5f0 100644
--- a/OnDocOffice/OnDocOffice.csproj
+++ b/OnDocOffice/OnDocOffice.csproj
@@ -44,6 +44,11 @@
True
..\..\..\EDOKA\Cleint_Erneuerung_DMS_Framwork48 - Kopie\EDOKA\bin\Microsoft.Office.Interop.Word.dll
+
+ False
+ True
+ ..\..\..\EDOKA\Cleint_Erneuerung_DMS_Framwork48\EDOKA\bin\Office.dll
+
@@ -57,5 +62,15 @@
+
+
+ {216c1660-5ad5-4a5e-80e4-150ccf673cbc}
+ Helper
+
+
+ {a1fd0973-89a7-4588-877d-373835d6e00c}
+ Model
+
+
\ No newline at end of file
diff --git a/OnDocOffice/bin/Debug/Database.dll b/OnDocOffice/bin/Debug/Database.dll
index 617df48a..86794518 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 e8918837..f17aee3e 100644
Binary files a/OnDocOffice/bin/Debug/Database.pdb and b/OnDocOffice/bin/Debug/Database.pdb differ
diff --git a/OnDocOffice/bin/Debug/Helper.dll b/OnDocOffice/bin/Debug/Helper.dll
index 26b96769..dbcb116c 100644
Binary files a/OnDocOffice/bin/Debug/Helper.dll and b/OnDocOffice/bin/Debug/Helper.dll differ
diff --git a/OnDocOffice/bin/Debug/Helper.pdb b/OnDocOffice/bin/Debug/Helper.pdb
index c67ed204..c6793127 100644
Binary files a/OnDocOffice/bin/Debug/Helper.pdb and b/OnDocOffice/bin/Debug/Helper.pdb differ
diff --git a/OnDocOffice/bin/Debug/Model.dll b/OnDocOffice/bin/Debug/Model.dll
index 82ff892d..cc68675e 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 4d2db873..adeafe3d 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 b4077973..b1b5be8c 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 9e928f28..55235846 100644
Binary files a/OnDocOffice/bin/Debug/OnDocOffice.pdb and b/OnDocOffice/bin/Debug/OnDocOffice.pdb differ
diff --git a/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferences.cache
new file mode 100644
index 00000000..4bae2a2e
Binary files /dev/null and b/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index d0692ac7..3940799c 100644
Binary files a/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/OnDocOffice/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache b/OnDocOffice/obj/Debug/OnDocOffice.csproj.AssemblyReference.cache
index 118d0347..345f23cf 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.csproj.CoreCompileInputs.cache b/OnDocOffice/obj/Debug/OnDocOffice.csproj.CoreCompileInputs.cache
index 69518831..69d96f37 100644
--- a/OnDocOffice/obj/Debug/OnDocOffice.csproj.CoreCompileInputs.cache
+++ b/OnDocOffice/obj/Debug/OnDocOffice.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-534cb9f9eb736773911e11df7d43aef46ba5cd45c1563474a33f08d0a375e179
+965fd7818a4fbf445c4e84fc30d9b03b23e7b2a5316a7be82fa6d22dc71f07d2
diff --git a/OnDocOffice/obj/Debug/OnDocOffice.dll b/OnDocOffice/obj/Debug/OnDocOffice.dll
index b4077973..b1b5be8c 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 9e928f28..55235846 100644
Binary files a/OnDocOffice/obj/Debug/OnDocOffice.pdb and b/OnDocOffice/obj/Debug/OnDocOffice.pdb differ