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

@@ -63,6 +63,19 @@ namespace OnDoc.DocMgmt
this.dokumentpaketnr = dokumentpaketnr;
this.partnernr = partnernr;
}
public Dokumentpaket(int dokumentpaketnr, int partnernr, int profilnr)
{
InitializeComponent();
this.Style.TitleBar.BackColor = Theaming.Titelbar();
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
Broadcaster().AddListener(this);
Closing += Form_Closing;
this.dokumentpaketnr = dokumentpaketnr;
this.partnernr = partnernr;
this.profilnr = profilnr;
}
public Dokumentpaket(int profilnr)
{
@@ -232,6 +245,7 @@ namespace OnDoc.DocMgmt
private void add_uc(System.Data.DataRow r)
{
UCAllgemeineDokumentParam newdoc = new UCAllgemeineDokumentParam();
Logging.Logging.Debug("Dokumentpaket - Profilnr", "Dokumentpaket", this.profilnr.ToString());
newdoc.profilnr = profilnr;
newdoc.Dock= DockStyle.Fill;
newdoc.checkpartner = false;
@@ -483,6 +497,42 @@ namespace OnDoc.DocMgmt
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,AppParams.Office_Fill_DocIO);
clsdok dok = new clsdok("", "", "");
if (dokdata.barcode_type == "1")
{
DB dB = new DB(AppParams.connectionstring);
dB.clear_parameter();
dB.add_parameter("@dokumentid", dokumentid);
dB.add_parameter("@DokumentidBR", "");
dB.add_parameter("@BARCODEFONTNAME", "");
dB.add_parameter("@BARCODEFONTSIZE", "");
dB.add_parameter("@BarcodeKantenlaenge", "");
dB.Get_Tabledata("sp_get_OnDoc_barcodetype_and_value", true, false);
dokdata.barcode_content = dB.dsdaten.Tables[0].Rows[0][1].ToString();
dokdata.barcode_formatn = dB.dsdaten.Tables[0].Rows[0][3].ToString();
dokdata.barcode_text = dB.dsdaten.Tables[0].Rows[0][4].ToString();
dokdata.barcode_kantenlaenge = dB.dsdaten.Tables[0].Rows[0][5].ToString();
dokdata.Zusatz_Font = dB.dsdaten.Tables[0].Rows[0][6].ToString();
dokdata.Zusatz_FontSize = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][7]);
dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][8]);
dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0][9]);
//dokdata.barcode_type= dB.dsdaten.Tables[0].Rows[0][3].ToString();
string sql = "";
sql = "select bcpt, bcpl, bcw, bch, bchorizontal from OnDocBarcodeMpping ";
sql = sql + "where orig_bcpt = " + dokdata.barcode_top.ToString() + " and orig_bcpl=" + dokdata.barcode_left.ToString() + " ";
sql = sql + "and orig_bcw=" + dokdata.barcode_width.ToString() + " and orig_bch=" + dokdata.barcode_height.ToString();
dB.Get_Tabledata(sql, false, true);
if (dB.dsdaten.Tables[0].Rows.Count > 0)
{
Logging.Logging.Debug("Barcode-Übersteuerung" + dokdata.DokumenttypNr.ToString(), "Dokumenterstellung", "");
dokdata.barcode_left = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpl"]);
dokdata.barcode_top = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcpt"]);
dokdata.barcode_width = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bcw"]);
dokdata.barcode_height = Convert.ToInt32(dB.dsdaten.Tables[0].Rows[0]["bch"]);
}
dB = null;
}
if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
{
//panelword.Visible = true;
@@ -520,9 +570,22 @@ namespace OnDoc.DocMgmt
db.Save_To_DB(dokdata.Dokumentid, filename);
db = null;
System.Diagnostics.Process.Start("winword.exe", filename);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
switch (dok.doktype)
{
case "W":
System.Diagnostics.Process.Start("winword.exe", filename);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
break;
case "X":
System.Diagnostics.Process.Start("excel.exe", " " + filename);
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Excel");
break;
case "P":
System.Diagnostics.Process.Start(filename);
break;
default:
break;
}
}
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF)
{