update 20250119

This commit is contained in:
Stefan Hutter
2025-01-19 21:13:37 +01:00
parent bc996921a1
commit 578525cfc4
73 changed files with 271 additions and 134 deletions

View File

@@ -21,6 +21,7 @@ using static BroadcastListener.Classes.Factory;
using OnDoc.Helper;
using DOCGEN;
using System.Globalization;
using System.Threading;
namespace OnDoc.DocMgmt
{
@@ -183,12 +184,17 @@ namespace OnDoc.DocMgmt
//Erstellung Office
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
{
Logging.Logging.Debug("Dokumentbearbeitung Erstellungsart.ErstellungInOffice", "OnDocClient", "");
string filename = AppParams.tempdir + dokumentid + "_Erstellt_." + dok.extension;
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
DB db = new DB(AppParams.connectionstring);
db.Save_To_DB(dokdata.Dokumentid, filename);
db = null;
Logging.Logging.Debug("Dokumentbearbtung Saved", "OnDocClient", "");
System.IO.File.Delete(filename);
Logging.Logging.Debug("Dokumentbearbtung Deleted", "OnDocClient", "");
filename = AppParams.tempdir + dokumentid +"." + dok.extension;
this.filename = filename;
DocFunction = 6;
@@ -198,10 +204,11 @@ namespace OnDoc.DocMgmt
//Bearbeiten
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
{
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentBearbeiten", "OnDocClient", "");
//string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
string filename = AppParams.tempdir + dokumentid + "_Erstellt_." + dok.extension;
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
DB db = new DB(AppParams.connectionstring);
db.Save_To_DB(dokdata.Dokumentid, filename);
db.Get_Tabledata("Select count(*) from idvmakro_office_vorlage where office_vorlagenr=" + ucAllgemeineDokumentParam1.vorlagenr.ToString(), false, true);
if (Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][0]) > 0)
@@ -210,13 +217,17 @@ namespace OnDoc.DocMgmt
runmacros = true;
}
db = null;
Logging.Logging.Debug("Dokumentbearbeitung DocFunction1", "OnDocClient", "");
DocFunction = 1;
System.IO.File.Delete(filename);
filename = AppParams.tempdir + dokumentid + "." + dok.extension;
this.filename = filename;
this.Close();
return;
}
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentPreview)
{
Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentBearbeiten", "DokumentPreview", "");
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
DB db = new DB(AppParams.connectionstring);
@@ -225,6 +236,7 @@ namespace OnDoc.DocMgmt
}
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF)
{
Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentAlsPDF", "DokumentPreview", "");
//Generator.DocToPDF(dokumentid, ref dok);
dok.extension = "pdf";
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
@@ -235,6 +247,7 @@ namespace OnDoc.DocMgmt
if (ucAllgemeineDokumentParam1.docgendata.erstellungsart == Erstellungsart.DokumentSpäterBearbeiten)
{
Logging.Logging.Debug("Dokumentbearbietung Erstellungsart.DokumentSpäterBearbeiten", "DokumentPreview", "");
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
DB db = new DB(AppParams.connectionstring);