update 20250119

master
Stefan Hutter 11 months ago
parent bc996921a1
commit 578525cfc4

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>E:\Software-Projekte\OnDoc\PubServices\OnDoc</_PublishTargetUrl>
<History>True|2025-01-12T13:24:46.2550852Z||;True|2025-01-12T14:00:23.9205001+01:00||;True|2025-01-07T15:08:24.2722613+01:00||;True|2025-01-06T09:25:16.5522864+01:00||;True|2024-12-22T16:49:54.0855447+01:00||;True|2024-12-08T09:59:39.7127943+01:00||;True|2024-12-08T09:26:52.1924006+01:00||;True|2024-12-02T09:50:13.5426444+01:00||;True|2024-12-01T18:53:55.8128003+01:00||;True|2024-11-26T19:32:44.7379810+01:00||;True|2024-11-25T16:02:25.7013060+01:00||;True|2024-11-24T18:56:32.4321643+01:00||;True|2024-11-24T18:48:11.3494435+01:00||;True|2024-11-24T17:50:10.7679996+01:00||;True|2024-11-22T08:35:58.1296657+01:00||;True|2024-11-13T17:47:13.0183160+01:00||;True|2024-11-13T17:46:36.5183689+01:00||;True|2024-11-11T13:42:23.6578245+01:00||;True|2024-11-09T12:11:00.0777236+01:00||;True|2024-11-09T11:54:51.8503924+01:00||;</History>
<History>True|2025-01-19T15:20:16.1036874Z||;True|2025-01-19T16:19:11.5720999+01:00||;True|2025-01-12T14:24:46.2550852+01:00||;True|2025-01-12T14:00:23.9205001+01:00||;True|2025-01-07T15:08:24.2722613+01:00||;True|2025-01-06T09:25:16.5522864+01:00||;True|2024-12-22T16:49:54.0855447+01:00||;True|2024-12-08T09:59:39.7127943+01:00||;True|2024-12-08T09:26:52.1924006+01:00||;True|2024-12-02T09:50:13.5426444+01:00||;True|2024-12-01T18:53:55.8128003+01:00||;True|2024-11-26T19:32:44.7379810+01:00||;True|2024-11-25T16:02:25.7013060+01:00||;True|2024-11-24T18:56:32.4321643+01:00||;True|2024-11-24T18:48:11.3494435+01:00||;True|2024-11-24T17:50:10.7679996+01:00||;True|2024-11-22T08:35:58.1296657+01:00||;True|2024-11-13T17:47:13.0183160+01:00||;True|2024-11-13T17:46:36.5183689+01:00||;True|2024-11-11T13:42:23.6578245+01:00||;True|2024-11-09T12:11:00.0777236+01:00||;True|2024-11-09T11:54:51.8503924+01:00||;</History>
<LastFailureDetails />
</PropertyGroup>
<ItemGroup>
@ -82,10 +82,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>04/09/2024 19:25:14</publishTime>
</File>
<File Include="bin/BarcodeLib.dll">
<publishTime>01/12/2025 11:24:11</publishTime>
<publishTime>01/18/2025 13:55:56</publishTime>
</File>
<File Include="bin/BarcodeLib.pdb">
<publishTime>01/12/2025 11:24:11</publishTime>
<publishTime>01/18/2025 13:55:56</publishTime>
</File>
<File Include="bin/CSVNET.dll">
<publishTime>12/26/2024 14:12:09</publishTime>
@ -94,10 +94,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>12/26/2024 14:12:09</publishTime>
</File>
<File Include="bin/Database.dll">
<publishTime>01/12/2025 11:23:42</publishTime>
<publishTime>01/18/2025 12:45:41</publishTime>
</File>
<File Include="bin/Database.pdb">
<publishTime>01/12/2025 11:23:42</publishTime>
<publishTime>01/18/2025 12:45:41</publishTime>
</File>
<File Include="bin/de/System.Net.Http.Formatting.resources.dll">
<publishTime>10/20/2023 22:35:02</publishTime>
@ -130,13 +130,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>10/20/2023 22:35:04</publishTime>
</File>
<File Include="bin/DOCGEN.dll">
<publishTime>01/12/2025 14:00:10</publishTime>
<publishTime>01/19/2025 13:38:20</publishTime>
</File>
<File Include="bin/DOCGEN.dll.config">
<publishTime>12/23/2024 22:17:43</publishTime>
</File>
<File Include="bin/DOCGEN.pdb">
<publishTime>01/12/2025 14:00:10</publishTime>
<publishTime>01/19/2025 13:38:20</publishTime>
</File>
<File Include="bin/FastReport.Bars.dll">
<publishTime>11/27/2023 09:49:58</publishTime>
@ -214,10 +214,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>04/11/2022 19:09:46</publishTime>
</File>
<File Include="bin/Model.dll">
<publishTime>01/09/2025 11:12:24</publishTime>
<publishTime>01/14/2025 20:53:13</publishTime>
</File>
<File Include="bin/Model.pdb">
<publishTime>01/09/2025 11:12:24</publishTime>
<publishTime>01/14/2025 20:53:13</publishTime>
</File>
<File Include="bin/MW6.SDK.dll">
<publishTime>08/19/2014 21:33:57</publishTime>
@ -238,22 +238,22 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>04/30/2024 21:58:24</publishTime>
</File>
<File Include="bin/OfficePrinter.dll">
<publishTime>12/28/2024 10:07:41</publishTime>
<publishTime>01/19/2025 13:38:11</publishTime>
</File>
<File Include="bin/OfficePrinter.pdb">
<publishTime>12/28/2024 10:07:41</publishTime>
<publishTime>01/19/2025 13:38:11</publishTime>
</File>
<File Include="bin/OnDocOffice.dll">
<publishTime>01/12/2025 11:24:11</publishTime>
<publishTime>01/19/2025 11:29:23</publishTime>
</File>
<File Include="bin/OnDocOffice.pdb">
<publishTime>01/12/2025 11:24:11</publishTime>
<publishTime>01/19/2025 11:29:23</publishTime>
</File>
<File Include="bin/OnDoc_NetFramework.dll">
<publishTime>01/12/2025 14:24:23</publishTime>
<publishTime>01/19/2025 13:38:20</publishTime>
</File>
<File Include="bin/OnDoc_NetFramework.pdb">
<publishTime>01/12/2025 14:24:23</publishTime>
<publishTime>01/19/2025 13:38:20</publishTime>
</File>
<File Include="bin/Owin.dll">
<publishTime>11/13/2012 13:19:34</publishTime>
@ -442,10 +442,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>10/20/2023 22:33:58</publishTime>
</File>
<File Include="bin/vbBarcodes.dll">
<publishTime>01/10/2025 12:26:43</publishTime>
<publishTime>01/13/2025 19:24:21</publishTime>
</File>
<File Include="bin/vbBarcodes.pdb">
<publishTime>01/10/2025 12:26:43</publishTime>
<publishTime>01/13/2025 19:24:21</publishTime>
</File>
<File Include="bin/VBFileManagement.dll">
<publishTime>12/28/2024 10:07:41</publishTime>

Binary file not shown.

Binary file not shown.

@ -54,7 +54,7 @@
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(134, 26);
this.label1.TabIndex = 1;
this.label1.Text = "Version 0.90";
this.label1.Text = "Version 0.95";
//
// label2
//
@ -64,7 +64,7 @@
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(168, 26);
this.label2.TabIndex = 2;
this.label2.Text = "16. Januar 2025";
this.label2.Text = "19. Januar 2025";
//
// SplashScreen
//

@ -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);

@ -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)
{

@ -62,7 +62,7 @@ namespace OnDoc
}
string destfile = AppParams.tempdir + DateTime.Now.ToString("yyyyMMddHHmmss") + "_tmpfile.edk";
System.IO.File.Copy(args[0],destfile);
//System.IO.File.Delete(args[0]);
System.IO.File.Delete(args[0]);
//EDK_Data.Load_EDK_File(args[0]);
}

@ -188,7 +188,7 @@ namespace OnDoc
private void timer1_Tick(object sender, EventArgs e)
{
string[] files = Directory.GetFiles(AppParams.tempdir);
for (int i = 0; i < files.Length; i++)
{
@ -206,13 +206,18 @@ namespace OnDoc
private void EDK_Call(string filename)
{
this.TopMost = true;
System.Windows.Forms.Application.DoEvents();
this.BringToFront();
this.TopMost = false;
System.Windows.Forms.Application.DoEvents();
if (dokList1.profilnr == 0) return;
DB dB = new DB(AppParams.connectionstring);
EDK_Data.Load_EDK_File(filename);
dB.save_edk(filename, AppParams.CurrentMitarbeiter);
//System.IO.File.Delete(filename);
System.IO.File.Delete(filename);
if (EDK_Data.toexecute == true)
{
exec_edk(filename);
@ -220,6 +225,7 @@ namespace OnDoc
}
private void URI_Call(string filename)
{
this.BringToFront();
if (dokList1.profilnr == 0) return;
if (System.IO.File.Exists(filename))
{

@ -36,6 +36,8 @@ namespace OnDoc.UICintrols
this.dokumentAnzeigenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dokumentBearbeitenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dokumentLöschenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.zurUnterschriftenPrüfungToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.archivierenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.druckenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.dokumentKopierenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -154,8 +156,6 @@ namespace OnDoc.UICintrols
this.RibbonButtonCreateNewDoc = new System.Windows.Forms.RibbonButton();
this.ribbonButton5 = new System.Windows.Forms.RibbonButton();
this.dokwerte1 = new OnDoc.UIControls.Dokwerte();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.zurUnterschriftenPrüfungToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ctxMenuDokList.SuspendLayout();
this.toolStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@ -188,7 +188,7 @@ namespace OnDoc.UICintrols
this.historyToolStripMenuItem,
this.dokumentFürPartnerErstellenToolStripMenuItem});
this.ctxMenuDokList.Name = "ctxMenuDokList";
this.ctxMenuDokList.Size = new System.Drawing.Size(280, 390);
this.ctxMenuDokList.Size = new System.Drawing.Size(280, 368);
//
// dokumentAnzeigenToolStripMenuItem
//
@ -213,6 +213,19 @@ namespace OnDoc.UICintrols
this.dokumentLöschenToolStripMenuItem.Text = "Dokument löschen";
this.dokumentLöschenToolStripMenuItem.Click += new System.EventHandler(this.dokumentLöschenToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(276, 6);
//
// zurUnterschriftenPrüfungToolStripMenuItem
//
this.zurUnterschriftenPrüfungToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Approval_16x16_32;
this.zurUnterschriftenPrüfungToolStripMenuItem.Name = "zurUnterschriftenPrüfungToolStripMenuItem";
this.zurUnterschriftenPrüfungToolStripMenuItem.Size = new System.Drawing.Size(279, 22);
this.zurUnterschriftenPrüfungToolStripMenuItem.Text = "Zur Unterschriften-Prüfung";
this.zurUnterschriftenPrüfungToolStripMenuItem.Click += new System.EventHandler(this.zurUnterschriftenPrüfungToolStripMenuItem_Click);
//
// archivierenToolStripMenuItem
//
this.archivierenToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("archivierenToolStripMenuItem.Image")));
@ -1050,6 +1063,8 @@ namespace OnDoc.UICintrols
this.RibbonCBProfil.Name = "RibbonCBProfil";
this.RibbonCBProfil.SelectedIndex = -1;
this.RibbonCBProfil.TextBoxText = "";
this.RibbonCBProfil.DropDownItemClicked += new System.Windows.Forms.RibbonComboBox.RibbonItemEventHandler(this.RibbonCBProfil_DropDownItemClicked);
this.RibbonCBProfil.Click += new System.EventHandler(this.RibbonCBProfil_Click);
//
// ribbonButton1
//
@ -1270,19 +1285,6 @@ namespace OnDoc.UICintrols
this.dokwerte1.Size = new System.Drawing.Size(0, 694);
this.dokwerte1.TabIndex = 7;
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(276, 6);
//
// zurUnterschriftenPrüfungToolStripMenuItem
//
this.zurUnterschriftenPrüfungToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Approval_16x16_32;
this.zurUnterschriftenPrüfungToolStripMenuItem.Name = "zurUnterschriftenPrüfungToolStripMenuItem";
this.zurUnterschriftenPrüfungToolStripMenuItem.Size = new System.Drawing.Size(279, 22);
this.zurUnterschriftenPrüfungToolStripMenuItem.Text = "Zur Unterschriften-Prüfung";
this.zurUnterschriftenPrüfungToolStripMenuItem.Click += new System.EventHandler(this.zurUnterschriftenPrüfungToolStripMenuItem_Click);
//
// DokList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

@ -50,6 +50,7 @@ using Syncfusion.Data;
using Syncfusion.WinForms.Input;
using Syncfusion.Windows.Forms.CellGrid.ScrollAxis;
using Syncfusion.Windows.Forms.Edit.Utils;
using Syncfusion.WinForms.DataGrid.Serialization;
@ -163,9 +164,11 @@ namespace OnDoc.UICintrols
Ansichten = db.dsdaten.Tables[0].Copy();
//string standardview = "";
System.Data.DataRow standardview = null;
int index = 0;
int selindex = 0;
foreach (System.Data.DataRow dr in Ansichten.Rows)
{
RibbonLabel rl = new RibbonLabel();
rl.Text = dr["bezeichnung"].ToString();
rl.Tag = Convert.ToInt32(dr["id"]);
@ -190,16 +193,19 @@ namespace OnDoc.UICintrols
if (Convert.ToBoolean(dr["standard"]) == true && Bezeichnung == "")
{
ribbonCBAnsicht.SelectedItem = rl;
selindex = index;
standardview = dr;
//standardview = dr["gridsettings"].ToString();
}
if (rl.Text == Bezeichnung)
{
ribbonCBAnsicht.SelectedItem = rl;
//ribbonCBAnsicht.SelectedItem = rl;
//standardview = dr["gridsettings"].ToString();
standardview = dr;
}
index = index + 1;
}
if (selindex>0) { ribbonCBAnsicht.SelectedIndex=selindex; }
db = null;
// if (standardview != "") { refresh_view(standardview); }
if (standardview != null) { refresh_view(standardview); }
@ -481,6 +487,7 @@ namespace OnDoc.UICintrols
Logging.DocLog.Info("Verantwortung für Bearbeitung übernommen", "Doklist", selected_dokumentid, selected_partnernr, "Verantwortung übernommen");
}
}
Logging.Logging.Debug("Vor Dok In Bearbeitung", "ondoc client", "");
db.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter);
}
@ -759,7 +766,7 @@ namespace OnDoc.UICintrols
public void createdocumentpaket(int partnernr, int dokumentpaketnr)
{
Dokumentpaket dp = new Dokumentpaket(dokumentpaketnr, partnernr);
Dokumentpaket dp = new Dokumentpaket(dokumentpaketnr, partnernr, this.profilnr);
dp.Show();
}
public void createnewdoc(int partnernr, int dokumenttypnr, bool Favoriten = false, string interaktion = "Yes", string showdoc = "Yes")
@ -845,7 +852,7 @@ namespace OnDoc.UICintrols
db = null;
return;
}
Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", "");
db.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter);
db = null;
clsProcessWatch.AddToList(selected_dokumentid, filename, "Word");
@ -1137,18 +1144,24 @@ namespace OnDoc.UICintrols
OfficePrinter.OnDocOffice op = new OfficePrinter.OnDocOffice();
Filename = AppParams.tempdir + dokumentid + "." + dok.extension;
fh.SaveBase64ToFile(dok.dokument, Filename);
op.PrintInWord(Filename, AppParams.wordprintmacro, AppParams.OfficeSpleep1);
string error = op.PrintInWord(Filename, AppParams.wordprintmacro, AppParams.OfficeSpleep1);
if (error != "")
{
Logging.Logging.Debug("Print Error: " + error, "OnDoc", dokumentid);
}
System.IO.File.Delete(Filename);
op = null;
break;
case "X":
System.Diagnostics.Process.Start("winword.exe", "/w " + Filename);
Filename = AppParams.tempdir + dokumentid + "." + dok.extension;
fh.SaveBase64ToFile(dok.dokument, Filename);
System.Diagnostics.Process.Start("excel.exe", "/w " + Filename);
break;
case "P":
DocPreview docPreview = new DocPreview();
docPreview.Show_Doc(dokumentid);
docPreview.printpdf();
docPreview.Dispose();
Filename = AppParams.tempdir + dokumentid + "." + dok.extension;
fh.SaveBase64ToFile(dok.dokument, Filename);
System.Diagnostics.Process.Start(Filename);
break;
default:
break;
@ -1681,16 +1694,10 @@ return;
}
return Encoding.UTF8.GetString(Convert.FromBase64String(text));
}
//private void ribbonButton4_Click(object sender, EventArgs e)
//{
// if (System.IO.File.Exists(@"x:\gridsettings.xml"))
// {
// using (var file = File.Open(@"x:\gridsettings.xml", FileMode.Open))
// {
// this.sfDataGrid1.Deserialize(file);
// }
// }
//}
private void ribbonButton4_Click(object sender, EventArgs e)
{
}
private void ribbonCBAnsicht_DropDownItemClicked(object sender, System.Windows.Forms.RibbonItemEventArgs e)
@ -1739,6 +1746,7 @@ return;
{
MemoryStream ms = new MemoryStream();
this.sfDataGrid1.Serialize(ms);
string inputAsString = Convert.ToBase64String(ms.ToArray());
DB db = new DB(AppParams.connectionstring);
@ -1805,6 +1813,11 @@ return;
private void ribbonButton4_Click_1(object sender, EventArgs e)
{
//using (var file = File.Open(@"x:\DataGrid.xml", FileMode.Open))
//{
// this.sfDataGrid1.Deserialize(file);
//}
string bez = ribbonCBAnsicht.SelectedItem.Text.Trim();
string id = ribbonCBAnsicht.SelectedItem.Tag.ToString();
@ -1819,7 +1832,12 @@ return;
db.Exec_SQL("Update mitarbeiter_gridsettings set gridsettings='" + inputAsString + "' where id=" + id.ToString());
db = null;
//using (var file = File.Create(@"x:\DataGrid.xml"))
//{
// SerializationOptions options = new SerializationOptions();
// options.SerializeSorting = false;
// this.sfDataGrid1.Serialize(file, options);
//}
}
@ -2184,6 +2202,16 @@ return;
{
ribbonButtonToApproval_Click(sender, e);
}
private void RibbonCBProfil_Click(object sender, EventArgs e)
{
// this.profilnr = Convert.ToInt32(this.RibbonCBProfil.SelectedValue);
}
private void RibbonCBProfil_DropDownItemClicked(object sender, System.Windows.Forms.RibbonItemEventArgs e)
{
this.profilnr = Convert.ToInt32(RibbonCBProfil.SelectedItem.Tag);
}
}

@ -152,7 +152,7 @@
this.sfButton2.Name = "sfButton2";
this.sfButton2.Size = new System.Drawing.Size(108, 28);
this.sfButton2.TabIndex = 7;
this.sfButton2.Text = "Abbruch";
this.sfButton2.Text = "Abbrechen";
this.sfButton2.Click += new System.EventHandler(this.sfButton2_Click);
//
// chksaldiert

@ -262,23 +262,31 @@ namespace OnDoc.UIControls
{
}
Logging.Logging.Debug("Profilnr", "OnDOc", profilnr.ToString());
if (profilnr != 0)
{
db.Get_Tabledata("Select * from profil where profilnr=" + profilnr, false, true);
int ulinks = 0;
int urechts = 0;
try
{
ulinks = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftlinks"].ToString());
ulinks = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftlinks"]);
cbboxunterschriftlinks.SelectedValue = ulinks;
}
catch { ulinks = 0; }
catch {
ulinks = 0;
Logging.Logging.Debug("Unterschrift links nicht zugewiesen","DokPaket",ulinks.ToString()+" / "+ profilnr.ToString());
}
try
{
urechts = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftrechts"].ToString());
urechts = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["unterschriftrechts"]);
cbboxunterschriftrechts.SelectedValue = urechts;
}
catch { urechts = 0; }
catch {
urechts = 0;
Logging.Logging.Debug("Unterschrift rechts nicht zugewiesen", "DokPaket", urechts.ToString() + " / " + profilnr.ToString());
}
}
System.Data.DataTable dokwertlist = new System.Data.DataTable();

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -131,6 +131,8 @@ namespace DOCGEN.Generator
case "PDF": case "ACROBAT": case "FORMULAR": case "DOKUMENT":
clsdok dokpdf = new clsdok("", "", "");
dokpdf.dokument= dt.Rows[0][0].ToString();
dokpdf.extension = Extension;
dokpdf.doktype = "P";
return dokpdf;
//break ;
default:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -6,6 +6,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Office.Interop.Word;
namespace OfficePrinter
@ -32,8 +33,9 @@ namespace OfficePrinter
return;
}
public void PrintInWord(string Filename, string printmacro, int OfficeSleep)
public string PrintInWord(string Filename, string printmacro, int OfficeSleep)
{
string error = "";
Application appWord = new Application();
appWord.NormalTemplate.Saved = true;
Microsoft.Office.Interop.Word.Document wordDocument = new Microsoft.Office.Interop.Word.Document();
@ -41,20 +43,20 @@ namespace OfficePrinter
Thread.Sleep(OfficeSleep);
appWord.Visible = true;
if (printmacro == "") return;
if (printmacro == "") return "";
try
{
appWord.Run(printmacro);
}
catch
{
catch (Exception e) {
error = e.Message.ToString()+" / "+printmacro;
}
Thread.Sleep(OfficeSleep);
wordDocument.Close();
wordDocument = null;
appWord.Quit(SaveChanges: false);
appWord = null;
return;
return error;
}

@ -314,15 +314,19 @@ namespace OnDocOffice
if (runmacros == true)
{
Logging.Logging.Debug("Makros auslesen", "Edit_Document",dokumentid);
Database.DB db = new Database.DB(connectstring);
db.Get_Tabledata("Select * from ondoc_macros where dokumentid='" + dokumentid + "' order by reihenfolge", false, true);
foreach (DataRow dr in db.dsdaten.Tables[0].Rows)
{
try
{
Logging.Logging.Debug("Makro ", "Edit_Document", dr[0].ToString());
word.Run(dr[0].ToString());
}
catch (Exception e) { string a = e.Message; }
catch (Exception e) {
Logging.Logging.Debug("MakroError ", "Edit_Document", e.Message);
string a = e.Message; }
}
}
//clsProcessWatch.AddToList(dokumentid, filename, "Word");
@ -619,19 +623,22 @@ namespace OnDocOffice
cursortm = "";
foreach (clsDocValue dv in docdata.DocValues)
{
if (dv.TMBeginn.ToString().Contains("Tagesdatum")){
if (dv.TMBeginn.ToString().Contains("Tagesdatum"))
{
int a = 1;
}
try
{
if (dv.TMBeginn.ToString().Contains("TGEDKCursor")) {
//if (dv.TMBeginn.ToString() == "TGEDKCursor" || dv.TMBeginn.ToString() == "TGEDKCursorB" ||
// dv.FieldName.ToString() == "TGEDKCursor" || dv.FieldName.ToString() == "TGEDKCursorB") {
if (dv.TMBeginn.ToString().Contains("TGEDKCursor"))
{
//if (dv.TMBeginn.ToString() == "TGEDKCursor" || dv.TMBeginn.ToString() == "TGEDKCursorB" ||
// dv.FieldName.ToString() == "TGEDKCursor" || dv.FieldName.ToString() == "TGEDKCursorB") {
cursorpositionieren = true;
cursortm = dv.TMBeginn.ToString();
//break;
}
if (dv.FieldName.ToString().Contains("TGEDKCursor")){
if (dv.FieldName.ToString().Contains("TGEDKCursor"))
{
cursorpositionieren = true;
cursorfeld = dv.FieldName.ToString();
//break;
@ -640,47 +647,33 @@ namespace OnDocOffice
catch { }
// Logging.Logging.Debug(dv.TMBeginn.ToString() + " / " + dv.TMEnd.ToString(), dv.Value.ToString(), dokumentid);
dialogGenerate.add_progress((int)progressstep);
if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() == "" && !dv.TMBeginn.ToString().Contains("TGEDKCurosr"))
{
try
//20250119 - nur befüllte werte übermitteln'
if (dv.Value.ToString().Trim() != "")
{
if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() == "" && !dv.TMBeginn.ToString().Contains("TGEDKCurosr"))
{
Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select", dokumentid);
worddoc.Bookmarks[dv.TMBeginn.ToString()].Select();
//Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select-End", dokumentid);
word.Selection.Text = dv.Value.ToString();
//Logging.Logging.Debug(dv.TMBeginn.ToString(), "Text-End", dokumentid);
//pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start;
//pos2 = word.Selection.End;
// Logging.Logging.Debug(dv.TMBeginn.ToString(), "Selection-End", dokumentid);
//------------------------------
if (dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonB" ||
dv.TMBeginn.ToString().Substring(0, 23) == "XTGEDKVornameNameBetreue" ||
dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonZ")
{
pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start;
pos2 = word.Selection.End;
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
try
{
if (dv.TMBeginn.ToString().Substring(0, 22) == "XTGEDKDirektTelefonDokZ" ||
dv.TMBeginn.ToString().Substring(0, 20) == "XTGEDKVornameNameDokZ")
Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select", dokumentid);
worddoc.Bookmarks[dv.TMBeginn.ToString()].Select();
//Logging.Logging.Debug(dv.TMBeginn.ToString(), "Select-End", dokumentid);
word.Selection.Text = dv.Value.ToString();
//Logging.Logging.Debug(dv.TMBeginn.ToString(), "Text-End", dokumentid);
//pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start;
//pos2 = word.Selection.End;
// Logging.Logging.Debug(dv.TMBeginn.ToString(), "Selection-End", dokumentid);
//------------------------------
if (dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonB" ||
dv.TMBeginn.ToString().Substring(0, 23) == "XTGEDKVornameNameBetreue" ||
dv.TMBeginn.ToString().Substring(0, 19) == "XTGEDKDirektTelefonZ")
{
pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start;
pos2 = word.Selection.End;
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);
@ -692,28 +685,46 @@ namespace OnDocOffice
}
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
if (dv.TMBeginn.ToString().Substring(0, 22) == "XTGEDKDirektTelefonDokZ" ||
dv.TMBeginn.ToString().Substring(0, 20) == "XTGEDKVornameNameDokZ")
{
pos = worddoc.Bookmarks[dv.TMBeginn.ToString()].Start;
pos2 = word.Selection.End;
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
//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 { }
}
catch { }
}
if (dv.TMBeginn.ToString() != "" && dv.TMEnd.ToString() != "" && !dv.TMBeginn.ToString().Contains("TGEDKCursor"))
{
try
@ -737,6 +748,7 @@ namespace OnDocOffice
catch { }
}
}
}
}
//word.ScreenUpdating = true;
Logging.Logging.Debug("Word Befüllen Ende", "clsOffice", dokumentid);
@ -1182,6 +1194,7 @@ namespace OnDocOffice
//}
foreach (clsDocValue dv in docdata.DocValues)
{
Logging.Logging.Debug("Fill_Bookmarks_from_Word " + dv.TMBeginn.ToString(), "OfficeLib", "");
if (docdata.Form_ohne_Unterschrift == "True")
{
@ -1296,7 +1309,7 @@ namespace OnDocOffice
if (bookmark != null)
{
bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString(), true, false);
bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString());
//bookmarkNavigator.MoveToBookmark(dv.TMBeginn.ToString());
bookmarkNavigator.InsertText(dv.Value.ToString());
bookmarkNavigator.ReplaceBookmarkContent(dv.Value.ToString(), true);
//TextBodyPart bookmarkContent = bookmarkNavigator.GetBookmarkContent();

Loading…
Cancel
Save