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

@@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -43,6 +44,10 @@ namespace OnDoc.Klassen
public static int OfficeSpleep1 { get; set; } = 500;
public static int OfficeSpleep2 { get; set; } = 1000;
public static string pathNativVorlagen { get; set; } = "";
public static int Office_Fill_DocIO { get; set; } = 0;
static AppParams()
{
@@ -57,24 +62,69 @@ namespace OnDoc.Klassen
logconnectionstring = System.IO.File.ReadAllText(startuppath + @"\logconn.cfg");
logconnectionstring = StringCipher.Decrypt(logconnectionstring, "i%!k!7pab%bNLdA5hE4pkR4XaB%E^jB3d9tHuQ4pbF&BZjF7SB#WBWit5#HrbJiLrLVm");
DB db = new DB(connectionstring);
db.Get_Tabledata("Select * from applikation where applikationsnr = 1", false, true);
tempdir = db.dsdaten.Tables[0].Rows[0]["pfad_temporaer_dokumente"].ToString();
db = null;
StaticValues.UserID = "Stefan Hutter";
db.Get_Tabledata("Select * from ondoc_appParams where usedbparams=1", false, true);
if (db.dsdaten.Tables[0].Rows.Count > 0)
{
tempdir = db.dsdaten.Tables[0].Rows[0][0].ToString();
Version = db.dsdaten.Tables[0].Rows[0][1].ToString();
UseAPI = db.dsdaten.Tables[0].Rows[0][2].ToString();
RESTURI = db.dsdaten.Tables[0].Rows[0][3].ToString();
wordprintmacro = db.dsdaten.Tables[0].Rows[0][5].ToString();
vbvorlagenmanagement = db.dsdaten.Tables[0].Rows[0][6].ToString();
barcodefont = db.dsdaten.Tables[0].Rows[0][7].ToString();
barcodefontsize = db.dsdaten.Tables[0].Rows[0][8].ToString();
barcodetextposition = db.dsdaten.Tables[0].Rows[0][9].ToString();
ZusatzFont = db.dsdaten.Tables[0].Rows[0][10].ToString();
ZusatzFontSize = db.dsdaten.Tables[0].Rows[0][11].ToString();
EDOKAPath = db.dsdaten.Tables[0].Rows[0][12].ToString();
OfficeSpleep1 = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][13]);
OfficeSpleep2 = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][14]);
pathNativVorlagen = db.dsdaten.Tables[0].Rows[0][15].ToString();
Office_Fill_DocIO= Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][15]);
}
else
{
db.Get_Tabledata("Select * from applikation where applikationsnr = 1", false, true);
tempdir = db.dsdaten.Tables[0].Rows[0]["pfad_temporaer_dokumente"].ToString();
StaticValues.UserID = "Stefan Hutter";
UseAPI = Properties.Settings.Default.UseAPI;
RESTURI = Properties.Settings.Default.RESTURI;
//apikey = Properties.Settings.Default.apikey;
wordprintmacro = Properties.Settings.Default.StandardWordDruckMakro;
vbvorlagenmanagement = Properties.Settings.Default.VBVorlagenmanagement;
barcodefont = Properties.Settings.Default.BarcodeFont;
barcodefontsize = Properties.Settings.Default.BarcodeFontSize;
barcodetextposition = Properties.Settings.Default.BarodeTextPosition;
ZusatzFont = Properties.Settings.Default.ZusatzFont;
ZusatzFontSize = Properties.Settings.Default.ZusatzFontSize;
EDOKAPath = Properties.Settings.Default.edokapath;
pathNativVorlagen = Properties.Settings.Default.NativVorlagen;
}
apikey = System.IO.File.ReadAllText(startuppath + @"\apikey.cfg");
apikey = StringCipher.Decrypt(apikey, "PBod8b%s@c9ib7Lws#na5sGM2trugrx3h!oyB^y!Bc%fHEYUT3QvTVr6sAaAr9FoQWzb");
UseAPI = Properties.Settings.Default.UseAPI;
RESTURI = Properties.Settings.Default.RESTURI;
//apikey = Properties.Settings.Default.apikey;
wordprintmacro = Properties.Settings.Default.StandardWordDruckMakro;
vbvorlagenmanagement = Properties.Settings.Default.VBVorlagenmanagement;
barcodefont = Properties.Settings.Default.BarcodeFont;
barcodefontsize=Properties.Settings.Default.BarcodeFontSize;
barcodetextposition = Properties.Settings.Default.BarodeTextPosition;
ZusatzFont = Properties.Settings.Default.ZusatzFont;
ZusatzFontSize = Properties.Settings.Default.ZusatzFontSize;
EDOKAPath=Properties.Settings.Default.edokapath;
db = null;
EvaluatePath(AppParams.tempdir);
}
private static String EvaluatePath(String path)
{
try
{
String folder = Path.GetDirectoryName(path);
if (!Directory.Exists(folder))
{
// Try to create the directory.
DirectoryInfo di = Directory.CreateDirectory(folder);
}
}
catch (IOException ioex)
{
Console.WriteLine(ioex.Message);
return "";
}
return path;
}
}

View File

@@ -102,7 +102,7 @@ namespace OnDoc.Klassen
private static void Remove_Dok_in_Bearbeitung(string dokumentid)
{
DB db = new DB(AppParams.connectionstring);
db.Dok_in_Bearbeietung(2, dokumentid, AppParams.CurrentMitarbieter);
db.Dok_in_Bearbeitung(2, dokumentid, AppParams.CurrentMitarbieter);
db = null;
}
private static void Remove_Dokumentbearbeitung_Zwingend(string dokumentid)