Update 20251107

master
Stefan Hutter 1 month ago
parent e6d233b36d
commit ec5c61cc57

Binary file not shown.

Binary file not shown.

@ -33950,3 +33950,159 @@ Die Anweisung wurde beendet.
2025-10-17 11:14:04.8642|DEBUG|OnDoc| 2025-10-17 11:14:04.8642|DEBUG|OnDoc|
2025-10-17 11:14:04.9059|DEBUG|OnDoc|TGNummer für Mitarbeiter nicht vorhanden Mitarbeiternr: -1 2025-10-17 11:14:04.9059|DEBUG|OnDoc|TGNummer für Mitarbeiter nicht vorhanden Mitarbeiternr: -1
2025-10-17 11:14:06.8746|DEBUG|OnDoc|Generate_Word 2025-10-17 11:14:06.8746|DEBUG|OnDoc|Generate_Word
2025-11-06 13:30:30.2803|DEBUG|OnDoc|
2025-11-06 13:30:30.3554|DEBUG|OnDoc|
2025-11-06 13:31:28.6761|DEBUG|OnDoc|Mailversand: 2
2025-11-06 13:31:28.7113|DEBUG|OnDoc|
2025-11-06 13:31:28.7113|DEBUG|OnDoc|
2025-11-06 13:31:40.8358|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:31:40.8736|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 13:31:40.9096|DEBUG|OnDoc|Mailversand: -1
2025-11-06 13:32:13.5841|DEBUG|OnDoc|
2025-11-06 13:32:13.5946|DEBUG|OnDoc|
2025-11-06 13:32:13.6243|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234
2025-11-06 13:32:13.6243|INFO|OnDoc|Unterschrift-Bezug: 1234
2025-11-06 13:32:19.6986|DEBUG|OnDoc|Mailversand: 1
2025-11-06 13:32:19.7266|DEBUG|OnDoc|
2025-11-06 13:32:19.7291|DEBUG|OnDoc|
2025-11-06 13:33:11.3162|DEBUG|OnDoc|
2025-11-06 13:33:11.3561|DEBUG|OnDoc|
2025-11-06 13:33:39.3597|DEBUG|OnDoc|Mailversand: 2
2025-11-06 13:33:39.3898|DEBUG|OnDoc|
2025-11-06 13:33:39.3898|DEBUG|OnDoc|
2025-11-06 13:33:51.4703|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:33:51.5101|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 13:39:47.2984|DEBUG|OnDoc|
2025-11-06 13:39:47.3311|DEBUG|OnDoc|
2025-11-06 13:40:06.5572|DEBUG|OnDoc|Mailversand: 2
2025-11-06 13:40:06.6060|DEBUG|OnDoc|
2025-11-06 13:40:06.6060|DEBUG|OnDoc|
2025-11-06 13:40:18.7207|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:40:18.7616|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 13:43:25.5042|DEBUG|OnDoc|
2025-11-06 13:43:25.5147|DEBUG|OnDoc|
2025-11-06 13:43:25.5422|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234
2025-11-06 13:43:25.5422|INFO|OnDoc|Unterschrift-Bezug: 1234
2025-11-06 13:43:29.3249|DEBUG|OnDoc|Mailversand: 1
2025-11-06 13:43:29.3526|DEBUG|OnDoc|
2025-11-06 13:43:29.3526|DEBUG|OnDoc|
2025-11-06 13:43:41.4053|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:43:41.4400|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 13:44:09.1214|DEBUG|OnDoc|Mailversand: 2
2025-11-06 13:44:09.1602|DEBUG|OnDoc|
2025-11-06 13:44:09.1602|DEBUG|OnDoc|
2025-11-06 13:44:21.2284|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:44:21.2634|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 13:45:08.4248|DEBUG|OnDoc|
2025-11-06 13:45:08.4350|DEBUG|OnDoc|
2025-11-06 13:45:08.4610|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234
2025-11-06 13:45:08.4625|INFO|OnDoc|Unterschrift-Bezug: 1234
2025-11-06 13:46:23.2502|DEBUG|OnDoc|
2025-11-06 13:46:23.2823|DEBUG|OnDoc|
2025-11-06 13:47:27.9253|DEBUG|OnDoc|Mailversand: 2
2025-11-06 13:47:27.9821|DEBUG|OnDoc|
2025-11-06 13:47:27.9821|DEBUG|OnDoc|
2025-11-06 13:47:39.1114|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:47:39.1492|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 13:52:40.1174|DEBUG|OnDoc|Mailversand: 2
2025-11-06 13:52:40.1651|DEBUG|OnDoc|
2025-11-06 13:52:40.1651|DEBUG|OnDoc|
2025-11-06 13:52:52.2417|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:52:52.2766|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 13:54:36.9784|DEBUG|OnDoc|
2025-11-06 13:54:36.9784|DEBUG|OnDoc|
2025-11-06 13:54:37.0315|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: 1234
2025-11-06 13:54:37.0315|INFO|OnDoc|Unterschrift-Bezug: 1234
2025-11-06 13:54:55.8865|DEBUG|OnDoc|Mailversand: 1
2025-11-06 13:54:55.9467|DEBUG|OnDoc|
2025-11-06 13:54:55.9467|DEBUG|OnDoc|
2025-11-06 13:55:08.0312|DEBUG|OnDoc|Mail Versand NOK: Fehler beim Senden von Mail. stefan.hutter@tkb.ch
2025-11-06 13:55:08.0665|DEBUG|OnDoc|Mail Versand NOK - Exception Inner: System.Net.WebException: Der Remotename konnte nicht aufgelöst werden: 'smtp.tgcorp.ch'
bei System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
bei System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
bei System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
bei System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
bei System.Net.Mail.SmtpClient.GetConnection()
bei System.Net.Mail.SmtpClient.Send(MailMessage message)
2025-11-06 16:47:43.2018|DEBUG|OnDoc|
2025-11-06 16:47:43.2596|DEBUG|OnDoc|
2025-11-06 16:48:06.0654|DEBUG|OnDoc|
2025-11-06 16:48:06.1239|DEBUG|OnDoc|
2025-11-07 06:56:26.1556|DEBUG|OnDoc|
2025-11-07 06:56:26.1890|DEBUG|OnDoc|
2025-11-07 07:09:17.2137|DEBUG|OnDoc|
2025-11-07 07:09:17.2425|DEBUG|OnDoc|
2025-11-07 07:19:29.8530|DEBUG|OnDoc|
2025-11-07 07:19:29.9073|DEBUG|OnDoc|
2025-11-07 07:19:47.7776|DEBUG|OnDoc|
2025-11-07 07:19:47.8013|DEBUG|OnDoc|
2025-11-07 07:22:49.4565|DEBUG|OnDoc|
2025-11-07 07:22:49.4886|DEBUG|OnDoc|
2025-11-07 07:25:33.7747|DEBUG|OnDoc|
2025-11-07 07:25:33.8056|DEBUG|OnDoc|
2025-11-07 07:28:08.0187|DEBUG|OnDoc|
2025-11-07 07:28:08.0736|DEBUG|OnDoc|
2025-11-07 07:45:28.4552|DEBUG|OnDoc|
2025-11-07 07:45:28.4855|DEBUG|OnDoc|
2025-11-07 07:54:46.1349|DEBUG|OnDoc|
2025-11-07 07:54:46.1669|DEBUG|OnDoc|
2025-11-07 07:56:35.3306|DEBUG|OnDoc|
2025-11-07 07:56:35.3673|DEBUG|OnDoc|
2025-11-07 08:09:19.4802|DEBUG|OnDoc|
2025-11-07 08:09:19.5157|DEBUG|OnDoc|
2025-11-07 08:10:14.0622|DEBUG|OnDoc|
2025-11-07 08:10:14.0984|DEBUG|OnDoc|
2025-11-07 08:13:24.7447|DEBUG|OnDoc|
2025-11-07 08:13:24.7763|DEBUG|OnDoc|
2025-11-07 08:18:07.5913|DEBUG|OnDoc|
2025-11-07 08:18:07.6336|DEBUG|OnDoc|
2025-11-07 08:44:52.3892|DEBUG|OnDoc|
2025-11-07 08:44:52.4225|DEBUG|OnDoc|
2025-11-07 08:46:21.6325|DEBUG|OnDoc|
2025-11-07 08:46:21.6882|DEBUG|OnDoc|
2025-11-07 10:47:22.5913|DEBUG|OnDoc|
2025-11-07 10:47:22.6204|DEBUG|OnDoc|
2025-11-07 11:00:45.7724|DEBUG|OnDoc|
2025-11-07 11:00:45.8048|DEBUG|OnDoc|

@ -776,6 +776,12 @@
<Compile Include="UIControls\PendDok.Designer.cs"> <Compile Include="UIControls\PendDok.Designer.cs">
<DependentUpon>PendDok.cs</DependentUpon> <DependentUpon>PendDok.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UIControls\UCAllgemeinDokumentParamExtern.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UIControls\UCAllgemeinDokumentParamExtern.Designer.cs">
<DependentUpon>UCAllgemeinDokumentParamExtern.cs</DependentUpon>
</Compile>
<Compile Include="UIControls\UCAllgemeineDokumentParam.cs"> <Compile Include="UIControls\UCAllgemeineDokumentParam.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
@ -964,6 +970,9 @@
<EmbeddedResource Include="UIControls\PendDok.resx"> <EmbeddedResource Include="UIControls\PendDok.resx">
<DependentUpon>PendDok.cs</DependentUpon> <DependentUpon>PendDok.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UIControls\UCAllgemeinDokumentParamExtern.resx">
<DependentUpon>UCAllgemeinDokumentParamExtern.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UIControls\UCAllgemeineDokumentParam.resx"> <EmbeddedResource Include="UIControls\UCAllgemeineDokumentParam.resx">
<DependentUpon>UCAllgemeineDokumentParam.cs</DependentUpon> <DependentUpon>UCAllgemeineDokumentParam.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

@ -65,7 +65,7 @@
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(472, 26); this.label2.Size = new System.Drawing.Size(472, 26);
this.label2.TabIndex = 2; this.label2.TabIndex = 2;
this.label2.Text = "4. November 2025"; this.label2.Text = "7. November 2025";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label2.Click += new System.EventHandler(this.label2_Click); this.label2.Click += new System.EventHandler(this.label2_Click);
// //

@ -29,6 +29,7 @@ using static BroadcastListener.Classes.Factory;
using Windows.Graphics.Display; using Windows.Graphics.Display;
using Windows.Foundation.Metadata; using Windows.Foundation.Metadata;
using System.Threading; using System.Threading;
using OnDoc.Diverses;
namespace OnDoc.DocMgmt namespace OnDoc.DocMgmt
{ {
@ -38,7 +39,7 @@ namespace OnDoc.DocMgmt
private DataTable dokumentpaket = new DataTable(); private DataTable dokumentpaket = new DataTable();
private DataTable dokumentpaketvorlagen = new DataTable(); private DataTable dokumentpaketvorlagen = new DataTable();
private DataTable dokumentpaketvorlagen_Original = new DataTable(); private DataTable dokumentpaketvorlagen_Original = new DataTable();
private int profilnr {get;set;} private int profilnr { get; set; }
public int dokumentpaketnr { get; set; } = 0; public int dokumentpaketnr { get; set; } = 0;
public int partnernr { get; set; } = 0; public int partnernr { get; set; } = 0;
private bool EinzelGenerierung { get; set; } = false; private bool EinzelGenerierung { get; set; } = false;
@ -125,7 +126,7 @@ namespace OnDoc.DocMgmt
this.BeginUpdate(); this.BeginUpdate();
if (dokumentpaketnr == 0) if (dokumentpaketnr == 0)
{ {
if (!NeuesDokumentpaket()){ this.Close(); return; }; if (!NeuesDokumentpaket()) { this.Close(); return; };
} }
Update_PaketDetails(); Update_PaketDetails();
dokList1.set_vorschau_aus_dp(); dokList1.set_vorschau_aus_dp();
@ -133,16 +134,17 @@ namespace OnDoc.DocMgmt
this.EndUpdate(); this.EndUpdate();
} }
private void Update_PaketDetails() { private void Update_PaketDetails()
{
Cursor = Cursors.WaitCursor; Cursor = Cursors.WaitCursor;
DB db = new DB(AppParams.connectionstring); DB db = new DB(AppParams.connectionstring);
db.Get_Tabledata("Select * from edex_dokumentpaket where dokumentpaketnr="+dokumentpaketnr.ToString(), false, true); db.Get_Tabledata("Select * from edex_dokumentpaket where dokumentpaketnr=" + dokumentpaketnr.ToString(), false, true);
dokumentpaket = db.dsdaten.Tables[0].Copy(); dokumentpaket = db.dsdaten.Tables[0].Copy();
db.clear_parameter(); db.clear_parameter();
db.add_parameter("@dpnr", dokumentpaketnr.ToString()); db.add_parameter("@dpnr", dokumentpaketnr.ToString());
string sql = "sp_ondoc_dpdetails"; string sql = "sp_ondoc_dpdetails";
db.Get_Tabledata(sql,true,false); db.Get_Tabledata(sql, true, false);
//string sql = "SELECT dbo.edex_dokumentpaket.dokumentpaketnr, dbo.edex_dokumentpaket.bezeichnung, dbo.dokumenttyp.dokumenttypnr, "; //string sql = "SELECT dbo.edex_dokumentpaket.dokumentpaketnr, dbo.edex_dokumentpaket.bezeichnung, dbo.dokumenttyp.dokumenttypnr, ";
//sql = sql + "dbo.dokumenttyp.bezeichnung AS dokumenttypbezeichnung, dbo.edex_dokumentpaketvorlage.zwingend, "; //sql = sql + "dbo.dokumenttyp.bezeichnung AS dokumenttypbezeichnung, dbo.edex_dokumentpaketvorlage.zwingend, ";
//sql = sql + "dbo.edex_dokumentpaketvorlage.sort FROM dbo.edex_dokumentpaket INNER JOIN dbo.edex_dokumentpaketvorlage ON "; //sql = sql + "dbo.edex_dokumentpaketvorlage.sort FROM dbo.edex_dokumentpaket INNER JOIN dbo.edex_dokumentpaketvorlage ON ";
@ -160,7 +162,7 @@ namespace OnDoc.DocMgmt
sfListView1.AllowTriStateMode = false; sfListView1.AllowTriStateMode = false;
sfListView1.CheckedMember = "zwingend"; sfListView1.CheckedMember = "zwingend";
TabControlDokuments.TabPages.Clear(); TabControlDokuments.TabPages.Clear();
foreach(System.Data.DataRow r in dokumentpaketvorlagen.Rows) foreach (System.Data.DataRow r in dokumentpaketvorlagen.Rows)
{ {
if (Convert.ToInt32(r[4]) == 1) { add_uc(r); } if (Convert.ToInt32(r[4]) == 1) { add_uc(r); }
} }
@ -175,8 +177,8 @@ namespace OnDoc.DocMgmt
{ {
this.RibbonButtonGenerieren.Enabled = false; this.RibbonButtonGenerieren.Enabled = false;
this.groupBox1.Enabled = false; this.groupBox1.Enabled = false;
this.groupBox2.Enabled=false; this.groupBox2.Enabled = false;
this.groupBox3.Enabled=false; this.groupBox3.Enabled = false;
} }
this.EndUpdate(); this.EndUpdate();
} }
@ -201,7 +203,8 @@ namespace OnDoc.DocMgmt
private void btnSearchBP_Click(object sender, EventArgs e) private void btnSearchBP_Click(object sender, EventArgs e)
{ {
if (this.partnernr == 0) { if (this.partnernr == 0)
{
Partnersuche ps = new Partnersuche(); Partnersuche ps = new Partnersuche();
ps.ShowDialog(); ps.ShowDialog();
if (ps.DialogResult == DialogResult.OK) if (ps.DialogResult == DialogResult.OK)
@ -217,7 +220,7 @@ namespace OnDoc.DocMgmt
} }
} }
set_bp_person(ps.partnernr,0); set_bp_person(ps.partnernr, 0);
} }
else else
{ {
@ -235,21 +238,44 @@ namespace OnDoc.DocMgmt
{ {
this.txtpersonnummer.Text = ps.partnernr.ToString(); this.txtpersonnummer.Text = ps.partnernr.ToString();
this.lblKurznamePerson.Text = ps.partnerkurzname.ToString(); this.lblKurznamePerson.Text = ps.partnerkurzname.ToString();
if (this.txtpersonnummer.Text.Length < 9) { if (this.txtpersonnummer.Text.Length < 9)
{
MessageBox.Show("Beim gewählten Partner handelt es ich nicht um eine Person.", "Partnerselektion", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Beim gewählten Partner handelt es ich nicht um eine Person.", "Partnerselektion", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.txtpersonnummer.Text = ""; this.txtpersonnummer.Text = "";
this.lblKurznamePerson.Text = ""; this.lblKurznamePerson.Text = "";
return; return;
} }
set_bp_person(0,ps.partnernr); set_bp_person(0, ps.partnernr);
} }
} }
private void add_uc(System.Data.DataRow r) private void add_uc(System.Data.DataRow r)
{ {
DB db = new DB(AppParams.connectionstring);
db.Get_Tabledata("Select isnull(uri,'') as uri, isnull(uribeschreibung,'') as descr from dokumenttyp where dokumenttypnr = " + r[2].ToString(), false, true);
if (db.dsdaten.Tables[0].Rows[0][0].ToString() != "")
{
UCAllgemeinDokumentParamExtern extdoc = new UCAllgemeinDokumentParamExtern();
extdoc.Dock = DockStyle.Fill;
extdoc.dokumenttypnr = Convert.ToInt32(r[2]);
if (extdoc.set_personendokument() == true)
{
if (txtpersonnummer.Text != "") { extdoc.partnernr = Convert.ToInt32(txtpersonnummer.Text); }
}
else
{
if (txtbpnummer.Text != "") { extdoc.partnernr = Convert.ToInt32(txtbpnummer.Text); }
}
extdoc.Refresh_Details(db.dsdaten.Tables[0].Rows[0][0].ToString(), db.dsdaten.Tables[0].Rows[0][1].ToString());
TabPageAdv tabPage1 = new TabPageAdv(r[3].ToString());
tabPage1.Controls.Add(extdoc);
TabControlDokuments.TabPages.Add(tabPage1);
return;
}
UCAllgemeineDokumentParam newdoc = new UCAllgemeineDokumentParam(); UCAllgemeineDokumentParam newdoc = new UCAllgemeineDokumentParam();
Logging.Logging.Debug("Dokumentpaket - Profilnr", "Dokumentpaket", this.profilnr.ToString()); Logging.Logging.Debug("Dokumentpaket - Profilnr", "Dokumentpaket", this.profilnr.ToString());
newdoc.profilnr = profilnr; newdoc.profilnr = profilnr;
newdoc.Dock= DockStyle.Fill; newdoc.Dock = DockStyle.Fill;
newdoc.checkpartner = false; newdoc.checkpartner = false;
newdoc.dokumenttypnr = Convert.ToInt32(r[2]); newdoc.dokumenttypnr = Convert.ToInt32(r[2]);
if (newdoc.set_personendokument() == true) if (newdoc.set_personendokument() == true)
@ -331,22 +357,22 @@ namespace OnDoc.DocMgmt
{ {
Database.DB db = new Database.DB(AppParams.connectionstring); Database.DB db = new Database.DB(AppParams.connectionstring);
db.clear_parameter(); db.clear_parameter();
if (bpnummer !=0) db.add_parameter("@partnernr", bpnummer.ToString()); if (bpnummer != 0) db.add_parameter("@partnernr", bpnummer.ToString());
if (personnummer !=0) db.add_parameter("@partnernr", personnummer.ToString()); if (personnummer != 0) db.add_parameter("@partnernr", personnummer.ToString());
db.Get_Tabledata("sp_ondoc_bp_person", true, false); db.Get_Tabledata("sp_ondoc_bp_person", true, false);
if (bpnummer!=0 && db.dsdaten.Tables[0].Rows.Count ==1) if (bpnummer != 0 && db.dsdaten.Tables[0].Rows.Count == 1)
{ {
txtbpnummer.Text = db.dsdaten.Tables[0].Rows[0]["bp_nr"].ToString(); txtbpnummer.Text = db.dsdaten.Tables[0].Rows[0]["bp_nr"].ToString();
lblKurznameBP.Text = db.dsdaten.Tables[0].Rows[0]["bp_kurzname"].ToString(); lblKurznameBP.Text = db.dsdaten.Tables[0].Rows[0]["bp_kurzname"].ToString();
txtpersonnummer.Text = ""; txtpersonnummer.Text = "";
if (txtpersonnummer.Text=="") if (txtpersonnummer.Text == "")
{ {
txtpersonnummer.Text = db.dsdaten.Tables[0].Rows[0]["pers_nr"].ToString(); txtpersonnummer.Text = db.dsdaten.Tables[0].Rows[0]["pers_nr"].ToString();
lblKurznamePerson.Text = db.dsdaten.Tables[0].Rows[0]["person_kurzname"].ToString(); lblKurznamePerson.Text = db.dsdaten.Tables[0].Rows[0]["person_kurzname"].ToString();
} }
update_dokumente_bp_person(bpnummer, true); update_dokumente_bp_person(bpnummer, true);
if (txtpersonnummer.Text!="") { update_dokumente_bp_person(Convert.ToInt32(txtpersonnummer.Text), false); } if (txtpersonnummer.Text != "") { update_dokumente_bp_person(Convert.ToInt32(txtpersonnummer.Text), false); }
} }
} }
@ -356,6 +382,9 @@ namespace OnDoc.DocMgmt
try try
{ {
foreach (TabPageAdv tab in TabControlDokuments.TabPages) foreach (TabPageAdv tab in TabControlDokuments.TabPages)
{
string ty = tab.Controls[0].GetType().Name;
if (ty == "UCAllgemeineDokumentParam")
{ {
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0]; UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
uc.ausDokumentpaket = true; uc.ausDokumentpaket = true;
@ -371,6 +400,22 @@ namespace OnDoc.DocMgmt
} }
uc.ausDokumentpaket = false; uc.ausDokumentpaket = false;
} }
if (ty == "UCAllgemeinDokumentParamExtern")
{
UCAllgemeinDokumentParamExtern uce = (UCAllgemeinDokumentParamExtern)tab.Controls[0];
if (bp && !uce.personendokument)
{
uce.partnernr = partnernr;
uce.update_partner();
}
if (!bp && uce.personendokument)
{
uce.partnernr = partnernr;
uce.update_partner();
}
}
}
} }
catch { } catch { }
@ -404,10 +449,13 @@ namespace OnDoc.DocMgmt
string dokumenterror = ""; string dokumenterror = "";
foreach (TabPageAdv tab in TabControlDokuments.TabPages) foreach (TabPageAdv tab in TabControlDokuments.TabPages)
{
string ty = tab.Controls[0].GetType().Name;
if (ty == "UCAllgemeineDokumentParam")
{ {
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0]; UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
uc.ausDokumentpaket = true; uc.ausDokumentpaket = true;
uc.genertated_dokumentid=uc.genertated_dokumentid; uc.genertated_dokumentid = uc.genertated_dokumentid;
dokumenterror = ""; dokumenterror = "";
if (uc.partnernr == 0) { dokumenterror = dokumenterror + "- Kein Partner gewählt" + Environment.NewLine; } if (uc.partnernr == 0) { dokumenterror = dokumenterror + "- Kein Partner gewählt" + Environment.NewLine; }
@ -423,10 +471,25 @@ namespace OnDoc.DocMgmt
} }
uc.ausDokumentpaket = false; uc.ausDokumentpaket = false;
if (dokumenterror!="") { errormessage = errormessage + Environment.NewLine+ tab.Text +":"+ Environment.NewLine + dokumenterror; } if (dokumenterror != "") { errormessage = errormessage + Environment.NewLine + tab.Text + ":" + Environment.NewLine + dokumenterror; }
}
if (ty == "UCAllgemeinDokumentParamExtern")
{
UCAllgemeinDokumentParamExtern uce = (UCAllgemeinDokumentParamExtern)tab.Controls[0];
dokumenterror = "";
if (uce.partnernr == 0) { dokumenterror = dokumenterror + "- Kein Partner gewählt" + Environment.NewLine; }
else
{
uce.check_bp_person();
if (uce.bpperson_error_type == 1) { dokumenterror = dokumenterror + "- Dokument muss für eine Person erstellt werden" + Environment.NewLine; }
if (uce.bpperson_error_type == 2) { dokumenterror = dokumenterror + "- Dokument muss für einen BP erstellt werden" + Environment.NewLine; }
}
} }
}
if (errormessage != "") if (errormessage != "")
{ {
@ -445,9 +508,9 @@ namespace OnDoc.DocMgmt
} }
if (!dokList1.grid_empty() && dokList1.get_selected_records() != 0) if (!dokList1.grid_empty() && dokList1.get_selected_records() != 0)
{ {
if (MessageBox.Show("Alle Dokumente neu genererieren?"+Environment.NewLine+"(Bestehende Dokumente werden gelöscht)", "Generierung", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) if (MessageBox.Show("Alle Dokumente neu genererieren?" + Environment.NewLine + "(Bestehende Dokumente werden gelöscht)", "Generierung", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{ {
if (MessageBox.Show("Neu hinzugefügte Dokumente generieren?","Generierung",MessageBoxButtons.YesNo, MessageBoxIcon.Question)== DialogResult.No) { return; } if (MessageBox.Show("Neu hinzugefügte Dokumente generieren?", "Generierung", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; }
foreach (TabPageAdv tab in TabControlDokuments.TabPages) foreach (TabPageAdv tab in TabControlDokuments.TabPages)
{ {
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0]; UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
@ -477,13 +540,18 @@ namespace OnDoc.DocMgmt
string filter = "dokumentid in ('"; string filter = "dokumentid in ('";
foreach (TabPageAdv tab in TabControlDokuments.TabPages) foreach (TabPageAdv tab in TabControlDokuments.TabPages)
{ {
try { try
{
tab.Select(); tab.Select();
TabControlDokuments.SelectedTab = tab; TabControlDokuments.SelectedTab = tab;
progressBarAdv1.Value = progressBarAdv1.Value + 1; progressBarAdv1.Value = progressBarAdv1.Value + 1;
Application.DoEvents(); Application.DoEvents();
//Thread.Sleep(1000); //Thread.Sleep(1000);
string ty = tab.Controls[0].GetType().Name;
if (ty == "UCAllgemeineDokumentParam")
{
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0]; UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
if (((idokumentid == "" || uc.genertated_dokumentid == idokumentid) && iuc == null) || uc == iuc) if (((idokumentid == "" || uc.genertated_dokumentid == idokumentid) && iuc == null) || uc == iuc)
{ {
@ -624,6 +692,13 @@ namespace OnDoc.DocMgmt
filter = filter + uc.genertated_dokumentid + "','"; filter = filter + uc.genertated_dokumentid + "','";
} }
}
if (ty == "UCAllgemeinDokumentParamExtern" && idokumentid=="")
{
UCAllgemeinDokumentParamExtern uce = (UCAllgemeinDokumentParamExtern)tab.Controls[0];
uce.Show_Neugenerieren();
uce.gendoc();
}
counter = counter + 1; counter = counter + 1;
if (this.EinzelGenerierung) if (this.EinzelGenerierung)
{ {
@ -671,7 +746,7 @@ namespace OnDoc.DocMgmt
{ {
if (p.Text == dr[3].ToString()) if (p.Text == dr[3].ToString())
{ {
TabControlDokuments.SelectedTab=p; TabControlDokuments.SelectedTab = p;
return; return;
} }
} }

@ -42,6 +42,9 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Dokumenttyp)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Dokumenttyp));
this.tabControlAdv1 = new Syncfusion.Windows.Forms.Tools.TabControlAdv(); this.tabControlAdv1 = new Syncfusion.Windows.Forms.Tools.TabControlAdv();
this.tabPageAdv1 = new Syncfusion.Windows.Forms.Tools.TabPageAdv(); this.tabPageAdv1 = new Syncfusion.Windows.Forms.Tools.TabPageAdv();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.txtOnBaseFormular = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chkversandstrassefirstdok = new System.Windows.Forms.CheckBox(); this.chkversandstrassefirstdok = new System.Windows.Forms.CheckBox();
this.cbebanking_moeglich = new System.Windows.Forms.CheckBox(); this.cbebanking_moeglich = new System.Windows.Forms.CheckBox();
@ -149,12 +152,12 @@
this.label16 = new System.Windows.Forms.Label(); this.label16 = new System.Windows.Forms.Label();
this.rbNr = new System.Windows.Forms.RadioButton(); this.rbNr = new System.Windows.Forms.RadioButton();
this.label15 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label();
this.groupBox8 = new System.Windows.Forms.GroupBox(); this.txturibeschreibung = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label(); this.label20 = new System.Windows.Forms.Label();
this.txtOnBaseFormular = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).BeginInit();
this.tabControlAdv1.SuspendLayout(); this.tabControlAdv1.SuspendLayout();
this.tabPageAdv1.SuspendLayout(); this.tabPageAdv1.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.toolStrip2.SuspendLayout(); this.toolStrip2.SuspendLayout();
this.GrpUnterschrifte.SuspendLayout(); this.GrpUnterschrifte.SuspendLayout();
@ -181,7 +184,6 @@
this.groupBox7.SuspendLayout(); this.groupBox7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.TreeDokumenttyp)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.TreeDokumenttyp)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.groupBox8.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// tabControlAdv1 // tabControlAdv1
@ -217,6 +219,35 @@
this.tabPageAdv1.Text = "Allgemein"; this.tabPageAdv1.Text = "Allgemein";
this.tabPageAdv1.ThemesEnabled = false; this.tabPageAdv1.ThemesEnabled = false;
// //
// groupBox8
//
this.groupBox8.Controls.Add(this.label20);
this.groupBox8.Controls.Add(this.txturibeschreibung);
this.groupBox8.Controls.Add(this.txtOnBaseFormular);
this.groupBox8.Controls.Add(this.label19);
this.groupBox8.Location = new System.Drawing.Point(521, 606);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(488, 124);
this.groupBox8.TabIndex = 28;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "OnBase Formular";
//
// txtOnBaseFormular
//
this.txtOnBaseFormular.Location = new System.Drawing.Point(43, 21);
this.txtOnBaseFormular.Name = "txtOnBaseFormular";
this.txtOnBaseFormular.Size = new System.Drawing.Size(439, 20);
this.txtOnBaseFormular.TabIndex = 1;
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(7, 21);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(29, 13);
this.label19.TabIndex = 0;
this.label19.Text = "URI:";
//
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.chkversandstrassefirstdok); this.groupBox1.Controls.Add(this.chkversandstrassefirstdok);
@ -1511,32 +1542,22 @@
this.label15.TabIndex = 7; this.label15.TabIndex = 7;
this.label15.Text = "Sort"; this.label15.Text = "Sort";
// //
// groupBox8 // txturibeschreibung
//
this.groupBox8.Controls.Add(this.txtOnBaseFormular);
this.groupBox8.Controls.Add(this.label19);
this.groupBox8.Location = new System.Drawing.Point(521, 606);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(488, 75);
this.groupBox8.TabIndex = 28;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "OnBase Formular";
//
// label19
// //
this.label19.AutoSize = true; this.txturibeschreibung.Location = new System.Drawing.Point(43, 48);
this.label19.Location = new System.Drawing.Point(7, 21); this.txturibeschreibung.Multiline = true;
this.label19.Name = "label19"; this.txturibeschreibung.Name = "txturibeschreibung";
this.label19.Size = new System.Drawing.Size(29, 13); this.txturibeschreibung.Size = new System.Drawing.Size(439, 70);
this.label19.TabIndex = 0; this.txturibeschreibung.TabIndex = 2;
this.label19.Text = "URI:";
// //
// txtOnBaseFormular // label20
// //
this.txtOnBaseFormular.Location = new System.Drawing.Point(43, 21); this.label20.AutoSize = true;
this.txtOnBaseFormular.Name = "txtOnBaseFormular"; this.label20.Location = new System.Drawing.Point(8, 51);
this.txtOnBaseFormular.Size = new System.Drawing.Size(439, 20); this.label20.Name = "label20";
this.txtOnBaseFormular.TabIndex = 1; this.label20.Size = new System.Drawing.Size(28, 13);
this.label20.TabIndex = 3;
this.label20.Text = "Bes.";
// //
// Dokumenttyp // Dokumenttyp
// //
@ -1554,6 +1575,8 @@
((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).EndInit();
this.tabControlAdv1.ResumeLayout(false); this.tabControlAdv1.ResumeLayout(false);
this.tabPageAdv1.ResumeLayout(false); this.tabPageAdv1.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.groupBox8.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.toolStrip2.ResumeLayout(false); this.toolStrip2.ResumeLayout(false);
@ -1590,8 +1613,6 @@
((System.ComponentModel.ISupportInitialize)(this.TreeDokumenttyp)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.TreeDokumenttyp)).EndInit();
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
this.groupBox8.ResumeLayout(false);
this.groupBox8.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@ -1710,5 +1731,7 @@
private System.Windows.Forms.GroupBox groupBox8; private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.Label label19; private System.Windows.Forms.Label label19;
private System.Windows.Forms.TextBox txtOnBaseFormular; private System.Windows.Forms.TextBox txtOnBaseFormular;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox txturibeschreibung;
} }
} }

@ -205,6 +205,7 @@ namespace OnDoc.UIControls.Administrator
//catch //catch
//{ chkboxInOffice.Checked = false; } //{ chkboxInOffice.Checked = false; }
this.txtOnBaseFormular.Text = r["URI"].ToString().Trim(); this.txtOnBaseFormular.Text = r["URI"].ToString().Trim();
this.txturibeschreibung.Text = r["URIBeschreibung"].ToString().Trim();
Update_Vorlagenfelder(); Update_Vorlagenfelder();
} }
private void Update_Vorlagenfelder() { private void Update_Vorlagenfelder() {
@ -362,6 +363,7 @@ namespace OnDoc.UIControls.Administrator
//if (cbPDFDirekteArchivierung.Checked) { r["genresultat_type"] = 3; } //if (cbPDFDirekteArchivierung.Checked) { r["genresultat_type"] = 3; }
r["bearbeitung_zwingend"] = this.cbbearbeitungzwingend.Checked == true; r["bearbeitung_zwingend"] = this.cbbearbeitungzwingend.Checked == true;
r["uri"]=this.txtOnBaseFormular.Text; r["uri"]=this.txtOnBaseFormular.Text;
r["uriBeschreibung"]=this.txturibeschreibung.Text;

@ -1,5 +1,6 @@
using Database; using Database;
using DOCGEN; using DOCGEN;
using Microsoft.Office.Interop.Word;
using NLog.LayoutRenderers; using NLog.LayoutRenderers;
using OnDoc.DocMgmt; using OnDoc.DocMgmt;
using OnDoc.Klassen; using OnDoc.Klassen;
@ -40,6 +41,7 @@ namespace OnDoc.UIControls
} }
private System.Data.DataTable notes = new System.Data.DataTable(); private System.Data.DataTable notes = new System.Data.DataTable();
public int pages = 0;
private void AddNote(string datum, string betreff, string note, string ersteller) private void AddNote(string datum, string betreff, string note, string ersteller)
{ {
@ -62,6 +64,7 @@ namespace OnDoc.UIControls
notes.Columns.Add("Note"); notes.Columns.Add("Note");
notes.Columns.Add("Notewriter"); notes.Columns.Add("Notewriter");
this.docPreview1.Show_Doc(nodetag); this.docPreview1.Show_Doc(nodetag);
this.pages = docPreview1.Get_Page_Count();
Database.DB db = new Database.DB(AppParams.connectionstring); Database.DB db = new Database.DB(AppParams.connectionstring);
db.Get_Tabledata("Select * from View_Relaunach_Approval_Doc where dokumentid='" + nodetag + "'", false, true); db.Get_Tabledata("Select * from View_Relaunach_Approval_Doc where dokumentid='" + nodetag + "'", false, true);
@ -194,6 +197,7 @@ namespace OnDoc.UIControls
string threaddocid = ""; string threaddocid = "";
string threadempfaenger = ""; string threadempfaenger = "";
string threadid = ""; string threadid = "";
private void signdoc() private void signdoc()
{ {
string intDokid = threaddocid; string intDokid = threaddocid;
@ -209,7 +213,8 @@ namespace OnDoc.UIControls
//Application.DoEvents(); //Application.DoEvents();
//Cursor = Cursors.WaitCursor; //Cursor = Cursors.WaitCursor;
DOCGEN.DocGen dg = new DocGen(AppParams.connectionstring, AppParams.RESTURI, AppParams.apikey); DOCGEN.DocGen dg = new DocGen(AppParams.connectionstring, AppParams.RESTURI, AppParams.apikey);
if (dg.signdoc(threaddocid, AppParams.tempdir))
if (dg.signdoc(threaddocid, AppParams.tempdir,pages))
{ {
db.Exec_SQL("Update Dokument set signiert=1, mutierer=" + AppParams.CurrentMitarbeiter.ToString() + ", mutiertam=getdate() where dokumentid='" + intDokid + "'"); db.Exec_SQL("Update Dokument set signiert=1, mutierer=" + AppParams.CurrentMitarbeiter.ToString() + ", mutiertam=getdate() where dokumentid='" + intDokid + "'");
} }
@ -264,16 +269,17 @@ namespace OnDoc.UIControls
if (db.dsdaten.Tables[0].Rows[0]["approved"].ToString()=="True") if (db.dsdaten.Tables[0].Rows[0]["approved"].ToString()=="True")
{ {
panelsign.Visible = true; panelsign.Visible = true;
Application.DoEvents(); System.Windows.Forms.Application.DoEvents();
Cursor = Cursors.WaitCursor; Cursor = Cursors.WaitCursor;
DOCGEN.DocGen dg = new DocGen(AppParams.connectionstring, AppParams.RESTURI, AppParams.apikey); DOCGEN.DocGen dg = new DocGen(AppParams.connectionstring, AppParams.RESTURI, AppParams.apikey);
if (dg.signdoc(dr["dokumentid"].ToString(), AppParams.tempdir)) if (dg.signdoc(dr["dokumentid"].ToString(), AppParams.tempdir, pages)) ;
{ {
db.Exec_SQL("Update Dokument set signiert=1, mutierer=" + AppParams.CurrentMitarbeiter.ToString() + ", mutiertam=getdate() where dokumentid='" + dr["dokumentid"].ToString() + "'"); db.Exec_SQL("Update Dokument set signiert=1, mutierer=" + AppParams.CurrentMitarbeiter.ToString() + ", mutiertam=getdate() where dokumentid='" + dr["dokumentid"].ToString() + "'");
} }
dg = null; dg = null;
panelsign.Visible = false; panelsign.Visible = false;
Application.DoEvents(); System.Windows.Forms.Application.DoEvents();
Cursor = Cursors.Default; Cursor = Cursors.Default;
} }

@ -51,6 +51,10 @@ namespace OnDoc.UIControls
this.pnlEdit.Visible = false; this.pnlEdit.Visible = false;
} }
public int Get_Page_Count()
{
return pdfViewerControl1.PageCount;
}
public void set_zoom() public void set_zoom()
{ {
this.pdfViewerControl1.ZoomMode = ZoomMode.FitWidth; this.pdfViewerControl1.ZoomMode = ZoomMode.FitWidth;

@ -384,6 +384,8 @@ namespace OnDoc.UICintrols
} }
public void refresh_dokumente_filtered(string layout = "") public void refresh_dokumente_filtered(string layout = "")
{
try
{ {
DB db = new DB(AppParams.connectionstring); DB db = new DB(AppParams.connectionstring);
int selectedIndex = RibbonCBProfil.SelectedIndex; int selectedIndex = RibbonCBProfil.SelectedIndex;
@ -404,7 +406,8 @@ namespace OnDoc.UICintrols
// TableHelper.SetColumnsOrder(dokumente, "trefferliste"); // TableHelper.SetColumnsOrder(dokumente, "trefferliste");
TableHelper.FormatTable(ref dokumente, layout, ref this.sfDataGrid1); TableHelper.FormatTable(ref dokumente, layout, ref this.sfDataGrid1);
//this.sfDataGrid1.DataSource = dokumente; //this.sfDataGrid1.DataSource = dokumente;
}
catch { }
} }

@ -0,0 +1,182 @@
namespace OnDoc.UIControls
{
partial class UCAllgemeinDokumentParamExtern
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Komponenten-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.txtPartnerZusteller = new System.Windows.Forms.TextBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.txtPartnerInhaber = new System.Windows.Forms.TextBox();
this.sfButton1 = new Syncfusion.WinForms.Controls.SfButton();
this.lblPartner = new System.Windows.Forms.Label();
this.lblPartnerInhaber = new System.Windows.Forms.Label();
this.btnErneutGenerierung = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.lbluridescription = new System.Windows.Forms.Label();
this.groupBox5.SuspendLayout();
this.groupBox6.SuspendLayout();
this.SuspendLayout();
//
// groupBox5
//
this.groupBox5.Controls.Add(this.txtPartnerZusteller);
this.groupBox5.Location = new System.Drawing.Point(288, 40);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(200, 100);
this.groupBox5.TabIndex = 30;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Zustell-Adresse";
//
// txtPartnerZusteller
//
this.txtPartnerZusteller.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtPartnerZusteller.Location = new System.Drawing.Point(3, 16);
this.txtPartnerZusteller.Multiline = true;
this.txtPartnerZusteller.Name = "txtPartnerZusteller";
this.txtPartnerZusteller.ReadOnly = true;
this.txtPartnerZusteller.Size = new System.Drawing.Size(194, 81);
this.txtPartnerZusteller.TabIndex = 1;
//
// groupBox6
//
this.groupBox6.Controls.Add(this.txtPartnerInhaber);
this.groupBox6.Location = new System.Drawing.Point(73, 40);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(200, 100);
this.groupBox6.TabIndex = 29;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Inhaber-Adresse";
//
// txtPartnerInhaber
//
this.txtPartnerInhaber.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtPartnerInhaber.Location = new System.Drawing.Point(3, 16);
this.txtPartnerInhaber.Multiline = true;
this.txtPartnerInhaber.Name = "txtPartnerInhaber";
this.txtPartnerInhaber.ReadOnly = true;
this.txtPartnerInhaber.Size = new System.Drawing.Size(194, 81);
this.txtPartnerInhaber.TabIndex = 0;
//
// sfButton1
//
this.sfButton1.Font = new System.Drawing.Font("Segoe UI Semibold", 9F);
this.sfButton1.Location = new System.Drawing.Point(5, 12);
this.sfButton1.Name = "sfButton1";
this.sfButton1.Size = new System.Drawing.Size(47, 28);
this.sfButton1.Style.Image = global::OnDoc.Properties.Resources.Search_24x24_32;
this.sfButton1.TabIndex = 28;
this.sfButton1.Tag = "Partner suchen";
this.sfButton1.Click += new System.EventHandler(this.sfButton1_Click);
//
// lblPartner
//
this.lblPartner.AutoSize = true;
this.lblPartner.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblPartner.Location = new System.Drawing.Point(184, 16);
this.lblPartner.Name = "lblPartner";
this.lblPartner.Size = new System.Drawing.Size(107, 13);
this.lblPartner.TabIndex = 27;
this.lblPartner.Text = "Partner-Kurzname";
//
// lblPartnerInhaber
//
this.lblPartnerInhaber.AutoSize = true;
this.lblPartnerInhaber.Location = new System.Drawing.Point(70, 16);
this.lblPartnerInhaber.Name = "lblPartnerInhaber";
this.lblPartnerInhaber.Size = new System.Drawing.Size(43, 13);
this.lblPartnerInhaber.TabIndex = 26;
this.lblPartnerInhaber.Text = "Inhaber";
//
// btnErneutGenerierung
//
this.btnErneutGenerierung.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.btnErneutGenerierung.Location = new System.Drawing.Point(890, 55);
this.btnErneutGenerierung.Name = "btnErneutGenerierung";
this.btnErneutGenerierung.Size = new System.Drawing.Size(138, 23);
this.btnErneutGenerierung.TabIndex = 31;
this.btnErneutGenerierung.Text = "Erneut erstellen";
this.btnErneutGenerierung.UseVisualStyleBackColor = false;
this.btnErneutGenerierung.Visible = false;
this.btnErneutGenerierung.Click += new System.EventHandler(this.btnErneutGenerierung_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(69, 213);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(349, 24);
this.label1.TabIndex = 32;
this.label1.Text = "Dokumenterstellung in externem System";
//
// lbluridescription
//
this.lbluridescription.AutoSize = true;
this.lbluridescription.Location = new System.Drawing.Point(73, 251);
this.lbluridescription.Name = "lbluridescription";
this.lbluridescription.Size = new System.Drawing.Size(0, 13);
this.lbluridescription.TabIndex = 33;
//
// UCAllgemeinDokumentParamExtern
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lbluridescription);
this.Controls.Add(this.label1);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox6);
this.Controls.Add(this.sfButton1);
this.Controls.Add(this.lblPartner);
this.Controls.Add(this.lblPartnerInhaber);
this.Controls.Add(this.btnErneutGenerierung);
this.Name = "UCAllgemeinDokumentParamExtern";
this.Size = new System.Drawing.Size(1032, 519);
this.Load += new System.EventHandler(this.UCAllgemeinDokumentParamExtern_Load);
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.TextBox txtPartnerZusteller;
private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.TextBox txtPartnerInhaber;
private Syncfusion.WinForms.Controls.SfButton sfButton1;
private System.Windows.Forms.Label lblPartner;
private System.Windows.Forms.Label lblPartnerInhaber;
private System.Windows.Forms.Button btnErneutGenerierung;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lbluridescription;
}
}

@ -0,0 +1,169 @@
using BroadcastListener.Classes;
using Database;
using OnDoc.Klassen;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml;
namespace OnDoc.UIControls
{
public partial class UCAllgemeinDokumentParamExtern : UserControl
{
public bool personendokument { get; set; } = false;
public bool bpdokument { get; set; } = false;
public int dokumenttypnr { get; set; } = 0;
public string uri { get; set; } = "";
public int partnernr { get; set; } = 0;
public int bpperson_error_type { get; set; } = 0;
private bool bpperson_error { get; set; } = false;
public UCAllgemeinDokumentParamExtern()
{
InitializeComponent();
}
private void sfButton1_Click(object sender, EventArgs e)
{
set_personendokument();
show_partnerdialog();
}
public bool set_personendokument()
{
DB db1 = new DB(AppParams.connectionstring);
db1.Get_Tabledata("select * from Dokumenttyp_BP_Person_Erstellung where dokumenttypnr=" + this.dokumenttypnr.ToString(), false, true);
if (db1.dsdaten.Tables[0].Rows.Count == 0)
{
personendokument = false;
bpdokument = true;
}
else
{
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "2") personendokument = true;
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "1") personendokument = false;
if (personendokument) { bpdokument = false; }
}
return personendokument;
}
private void show_partnerdialog()
{
Partnersuche ps = new Partnersuche(personendokument, true, bpdokument, dokumenttypnr);
ps.ShowDialog();
if (ps.DialogResult == DialogResult.OK)
{
this.partnernr = ps.partnernr;
if (ps.bpperson_changed) { lblPartner.ForeColor = System.Drawing.Color.Blue; } else { lblPartner.ForeColor = System.Drawing.Color.Black; }
update_partner();
}
}
public void update_partner()
{
DB db = new DB(AppParams.connectionstring);
db.Get_Tabledata("Select * from partner where nrpar00=" + partnernr, false, true);
this.lblPartner.Text = db.dsdaten.Tables[0].Rows[0]["nrpar00"].ToString() + " " + db.dsdaten.Tables[0].Rows[0]["bkpar00"].ToString();
db.clear_parameter();
db.add_parameter("@nrpar00", this.partnernr.ToString());
db.Get_Tabledata("OnDoc_sp_partner_detail", true, false);
txtPartnerInhaber.Text = "";
txtPartnerZusteller.Text = "";
string s = "";
for (int i = 1; i < 8; i++)
{
txtPartnerInhaber.Text = txtPartnerInhaber.Text + db.dsdaten.Tables[0].Rows[0]["d" + i.ToString()].ToString() + "\r\n";
txtPartnerZusteller.Text = txtPartnerZusteller.Text + db.dsdaten.Tables[0].Rows[0]["h" + i.ToString()].ToString() + "\r\n";
s = s + db.dsdaten.Tables[0].Rows[0]["h" + i.ToString()].ToString();
}
if (s == "") { txtPartnerZusteller.Text = txtPartnerInhaber.Text; }
//db.clear_parameter();
//db.add_parameter("@partnernr", this.partnernr.ToString());
//db.Get_Tabledata("sp_dokumentbearbeitung_kube", true, false);
db = null;
}
public void Refresh_Details(string uri, string description)
{
this.uri = uri;
this.lbluridescription.Text = description;
if (dokumenttypnr != 0)
{
set_personendokument();
}
if (partnernr != 0)
{
update_partner();
}
}
public void gendoc()
{
try
{
string uri1 = "";
uri1 = uri.Replace("&partnernr&", this.partnernr.ToString());
Process.Start(uri1);
return;
}
catch (Exception ex)
{
string error = "Die Erstellung im externen System konnte nicht gestartet werden ('" + uri + "')" + Environment.NewLine + ex.Message;
MessageBox.Show(error,"Externe Dokumenterstellung",MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
public bool check_bp_person()
{
DB db1 = new DB(AppParams.connectionstring);
db1.Get_Tabledata("select * from Dokumenttyp_BP_Person_Erstellung where dokumenttypnr=" + this.dokumenttypnr.ToString(), false, true);
bpperson_error_type = 0;
if (db1.dsdaten.Tables[0].Rows.Count > 0)
{
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "2" && this.partnernr.ToString().Length < 9)
{
bpperson_error = true;
bpperson_error_type = 1;
return false;
}
if (db1.dsdaten.Tables[0].Rows[0][1].ToString() == "1" && this.partnernr.ToString().Length > 8)
{
bpperson_error = true;
bpperson_error_type = 2;
return false;
}
}
return true;
}
public void Show_Neugenerieren()
{
btnErneutGenerierung.Visible = true;
}
private void btnErneutGenerierung_Click(object sender, EventArgs e)
{
gendoc();
}
private void UCAllgemeinDokumentParamExtern_Load(object sender, EventArgs e)
{
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -306,6 +306,7 @@
this.gridDokwertlist.Dock = System.Windows.Forms.DockStyle.Fill; this.gridDokwertlist.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridDokwertlist.Location = new System.Drawing.Point(3, 16); this.gridDokwertlist.Location = new System.Drawing.Point(3, 16);
this.gridDokwertlist.Name = "gridDokwertlist"; this.gridDokwertlist.Name = "gridDokwertlist";
this.gridDokwertlist.PreviewRowHeight = 35;
this.gridDokwertlist.SelectionUnit = Syncfusion.WinForms.DataGrid.Enums.SelectionUnit.Cell; this.gridDokwertlist.SelectionUnit = Syncfusion.WinForms.DataGrid.Enums.SelectionUnit.Cell;
this.gridDokwertlist.Size = new System.Drawing.Size(456, 376); this.gridDokwertlist.Size = new System.Drawing.Size(456, 376);
this.gridDokwertlist.TabIndex = 0; this.gridDokwertlist.TabIndex = 0;
@ -664,6 +665,7 @@
// //
// contextMenuStrip1 // contextMenuStrip1
// //
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4); this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
// //

@ -33,6 +33,7 @@ using System.Globalization;
using System.Threading; using System.Threading;
using System.ComponentModel.Design; using System.ComponentModel.Design;
using Syncfusion.Windows.Forms.Tools.Win32API; using Syncfusion.Windows.Forms.Tools.Win32API;
using Windows.Storage.Provider;
namespace OnDoc.UIControls namespace OnDoc.UIControls
@ -80,6 +81,8 @@ namespace OnDoc.UIControls
public string dokumentid { get; set; } = ""; public string dokumentid { get; set; } = "";
public bool isuri { get; set; } = false;
public string uri { get; set; } = "";
public UCAllgemeineDokumentParam() public UCAllgemeineDokumentParam()
@ -147,6 +150,14 @@ namespace OnDoc.UIControls
{ {
//set_personendokument(); //set_personendokument();
db.Get_Tabledata("Select * from dokumenttyp where dokumenttypnr=" + dokumenttypnr, false, true); db.Get_Tabledata("Select * from dokumenttyp where dokumenttypnr=" + dokumenttypnr, false, true);
//if (db.dsdaten.Tables[0].Rows[0]["URI"].ToString()!="")
//{
// isuri = true;
// pnluri1.Visible = true;
// pnluri2.Visible = true;
// pnluri3.Visible = true;
// pnluri4.Visible = true;
//}
System.Data.DataRow dr = db.dsdaten.Tables[0].Rows[0]; System.Data.DataRow dr = db.dsdaten.Tables[0].Rows[0];
this.txtbezeichnung.Text = dr["Bezeichnung"].ToString(); this.txtbezeichnung.Text = dr["Bezeichnung"].ToString();
this.txtbezeichnung.Enabled = Convert.ToBoolean(dr["bezeichnungmut"]); this.txtbezeichnung.Enabled = Convert.ToBoolean(dr["bezeichnungmut"]);

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.

@ -1 +1 @@
b5b40de487345304ba70eb16f349e0707687fe0185b09583c77801db01245e1e 84d81ea8d2d590860675274b5713746c8237611a0eb4cfd92e1703956b0caaf0

@ -468,3 +468,4 @@ E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\ru\Microsoft.CodeAnalysis.CSha
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\tr\Microsoft.CodeAnalysis.CSharp.resources.dll E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\tr\Microsoft.CodeAnalysis.CSharp.resources.dll
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\zh-Hans\Microsoft.CodeAnalysis.CSharp.resources.dll E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\zh-Hans\Microsoft.CodeAnalysis.CSharp.resources.dll
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\zh-Hant\Microsoft.CodeAnalysis.CSharp.resources.dll E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\zh-Hant\Microsoft.CodeAnalysis.CSharp.resources.dll
E:\Software-Projekte\OnDoc\OnDoc\Client\obj\Debug\OnDoc.UIControls.UCAllgemeinDokumentParamExtern.resources

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -193,7 +193,7 @@ namespace DOCGEN
return dok.dokument; return dok.dokument;
} }
public bool signdoc(string dokumentid, string tempdir) public bool signdoc(string dokumentid, string tempdir, int pages=0)
{ {
DB db1 = new DB(connectionstring); DB db1 = new DB(connectionstring);
try try
@ -205,7 +205,7 @@ namespace DOCGEN
string dokumenttypnr = db1.dsdaten.Tables[0].Rows[0]["dokumenttypnr"].ToString(); string dokumenttypnr = db1.dsdaten.Tables[0].Rows[0]["dokumenttypnr"].ToString();
OnDocOffice.clsWordEdit we = new OnDocOffice.clsWordEdit(connectionstring, "", "", resturi, apikey); OnDocOffice.clsWordEdit we = new OnDocOffice.clsWordEdit(connectionstring, "", "", resturi, apikey);
if (we.insert_signature(dokumentid, unterschriftlinks, unterschriftrechts, tempdir,dokumenttypnr)) if (we.insert_signature(dokumentid, unterschriftlinks, unterschriftrechts, tempdir,dokumenttypnr,pages))
{ {
return true; return true;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1632,7 +1632,7 @@ namespace OnDocOffice
return; return;
} }
public bool insert_signature(string dokumentid, string unterschriftlinks, string unterschriftrechts, string tempdir, string dokumenttypnr ) public bool insert_signature(string dokumentid, string unterschriftlinks, string unterschriftrechts, string tempdir, string dokumenttypnr , int pages)
{ {
DB db = new DB(this.connectstring); DB db = new DB(this.connectstring);
System.Data.DataTable dt = new System.Data.DataTable(); System.Data.DataTable dt = new System.Data.DataTable();
@ -1678,7 +1678,7 @@ namespace OnDocOffice
clsFileHelper.SaveBase64ToFile(unterschriftrechts, path_unterschriftrechts); clsFileHelper.SaveBase64ToFile(unterschriftrechts, path_unterschriftrechts);
} }
word_signature word_Signature = new word_signature(this.connectstring); word_signature word_Signature = new word_signature(this.connectstring);
word_Signature.sign_doc(ref word, path_unterschriftlinks, path_unterschriftrechts, dokumentid,dokumenttypnr); word_Signature.sign_doc(ref word, path_unterschriftlinks, path_unterschriftrechts, dokumentid,dokumenttypnr,pages);
if (System.IO.File.Exists(path_unterschriftlinks)) { System.IO.File.Delete(tempdir + dokumentid + "UL.png"); }; if (System.IO.File.Exists(path_unterschriftlinks)) { System.IO.File.Delete(tempdir + dokumentid + "UL.png"); };
if (System.IO.File.Exists(path_unterschriftrechts)) { System.IO.File.Delete(tempdir + dokumentid + "UR.png"); } if (System.IO.File.Exists(path_unterschriftrechts)) { System.IO.File.Delete(tempdir + dokumentid + "UR.png"); }
@ -1719,7 +1719,7 @@ namespace OnDocOffice
public bool sign_doc(ref Microsoft.Office.Interop.Word.Application word, string imagepath_ul, string imagepath_ur, string dokumentid, string dokumenttypnr) public bool sign_doc(ref Microsoft.Office.Interop.Word.Application word, string imagepath_ul, string imagepath_ur, string dokumentid, string dokumenttypnr, int pages=0)
{ {
Logging.Logging.Debug("Sign_Doc", "OnDoc", dokumentid); Logging.Logging.Debug("Sign_Doc", "OnDoc", dokumentid);
docWord = word.ActiveDocument; docWord = word.ActiveDocument;
@ -1727,18 +1727,18 @@ namespace OnDocOffice
DB db = new DB(this.ConnectionString); DB db = new DB(this.ConnectionString);
int pages = 0; //int pages = 0;
try //try
{ //{
object miss = System.Reflection.Missing.Value; // object miss = System.Reflection.Missing.Value;
//pages = word.ActiveDocument.Words.Last.Information[WdInformation.wdActiveEndPageNumber]; // //pages = word.ActiveDocument.Words.Last.Information[WdInformation.wdActiveEndPageNumber];
Microsoft.Office.Interop.Word.WdStatistic stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages; // Microsoft.Office.Interop.Word.WdStatistic stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages;
pages = word.ActiveDocument.ComputeStatistics(stat, ref miss); // pages = word.ActiveDocument.ComputeStatistics(stat, ref miss);
} //}
catch (Exception e) //catch (Exception e)
{ //{
Logging.Logging.Debug("Sign_Doc - Pages not found "+e.Message, "OnDoc", dokumentid); // Logging.Logging.Debug("Sign_Doc - Pages not found "+e.Message, "OnDoc", dokumentid);
} //}
db.clear_parameter(); db.clear_parameter();
db.add_parameter("@dokumenttypnr",dokumenttypnr.ToString()); db.add_parameter("@dokumenttypnr",dokumenttypnr.ToString());

Loading…
Cancel
Save