Update 20241229

This commit is contained in:
Stefan Hutter
2024-12-29 23:03:57 +01:00
parent 4455cca85a
commit 2feaf6cc29
140 changed files with 12447 additions and 556552 deletions

View File

@@ -434,7 +434,7 @@ namespace OnDoc.DocMgmt
if (idokumentid == "" || uc.genertated_dokumentid == idokumentid)
{
uc.Set_Edit_later();
//uc.Set_Edit_later();
uc.Update_DocGenData();
clsDocData dokdata = new clsDocData();
uc.update_dokdata(ref dokdata);
@@ -446,13 +446,41 @@ namespace OnDoc.DocMgmt
uc.Show_Neugenerieren();
filter = filter + dokumentid + "','";
dokumentid = dokdata.Dokumentid;
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentPreview) { uc.docgendata.erstellungsart = Erstellungsart.DokumentSpäterBearbeiten; }
if (dokumentid != "")
{
Logging.DocLog.Info("Dokument erstellt", "Dokumentpaket", dokumentid, uc.partnernr.ToString(), "Dokument erstellt");
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir, AppParams.RESTURI,AppParams.apikey);
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir, AppParams.RESTURI,AppParams.apikey,AppParams.Office_Fill_DocIO);
clsdok dok = new clsdok("", "", "");
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
{
panelword.Visible = true;
lbldokumentname.Text = tab.Text;
Application.DoEvents();
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata,true,AppParams.OfficeSpleep1);
panelword.Visible = false;
Application.DoEvents();
}
else
{
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
}
if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
{
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
string filename_temp = filename + ".tmp";
System.IO.File.WriteAllBytes(filename_temp, Convert.FromBase64String(dok.dokument));
DB db = new DB(AppParams.connectionstring);
db.Save_To_DB(dokdata.Dokumentid, filename_temp);
db.Dok_in_Bearbeitung(1,dokdata.Dokumentid, AppParams.CurrentMitarbieter);
db = null;
System.IO.File.Delete(filename_temp);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
}
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
{
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;