update 20250226

master
Stefan Hutter 10 months ago
parent d745bb8ead
commit a964746492

@ -85,12 +85,18 @@ namespace API_NetFramework.Controllers
try
{
APILogging.Log((HttpRequestMessage)Request, "Start Adresse GetByID ID:"+ID, LogLevelType.Debug);
Database.DB db = new Database.DB(connectionstring);
string SQL = "Select * from Antwortadresse where id=" + ID;
if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
db.Get_Tabledata(SQL, false, true);
//if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
//if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
//db.Get_Tabledata(SQL, false, true);
SQL = "Select * from Antowrtadresse where id=@id for @format path";
db.clear_parameter();
db.add_parameter("@id", ID);
db.add_parameter("@format", OutFormat.ToLower());
db.Get_Tabledata_Addvar(SQL, false, true);
if (db.dsdaten.Tables[0].Rows.Count == 0) {
APILogging.Log((HttpRequestMessage)Request, "Ende Adresse GetByID ID:" + ID, LogLevelType.Debug);
@ -130,9 +136,17 @@ namespace API_NetFramework.Controllers
Database.DB db = new Database.DB(connectionstring);
string SQL = "Select * from AntwortAdresse_Mitarbeiter where aktiv=1 and tgnummer='" + tgnummer + "' order by bezeichnung ";
if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
db.Get_Tabledata(SQL, false, true);
//if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
//if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
//db.Get_Tabledata(SQL, false, true);
SQL = "Select * from AntwortAdresse_Mitarbeiter where aktiv=1 and tgnummer=@tgnummer order by bezeichnung ";
db.clear_parameter();
db.add_parameter("@tgnummer", tgnummer);
db.add_parameter("@format", OutFormat.ToLower());
db.Get_Tabledata_Addvar(SQL, false, true);
if (db.dsdaten.Tables[0].Rows.Count == 0) {
APILogging.Log((HttpRequestMessage)Request, "Ende Adresse GetAllMitarbeiterByTGNummer", LogLevelType.Debug);
@ -171,9 +185,17 @@ namespace API_NetFramework.Controllers
Database.DB db = new Database.DB(connectionstring);
string SQL = "Select * from AntwortAdresse_Mitarbeiter where aktiv=1 and Mitarbeiternr='" + Mitarbeiternr + "' ";
if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
db.Get_Tabledata(SQL, false, true);
//if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
//if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
//db.Get_Tabledata(SQL, false, true);
SQL = "Select * from AntwortAdresse_Mitarbeiter where aktiv=1 and and Mitarbeiternr=@mitarbeiternr order by bezeichnung ";
db.clear_parameter();
db.add_parameter("@mitarbeiternr", Mitarbeiternr);
db.add_parameter("@format", OutFormat.ToLower());
db.Get_Tabledata_Addvar(SQL, false, true);
if (db.dsdaten.Tables[0].Rows.Count == 0) {
APILogging.Log((HttpRequestMessage)Request, "Ende Adresse GetAllMitarbeiterByMitarbeiterNr Ma-Nr:" + Mitarbeiternr, LogLevelType.Debug);
return Ok();
@ -213,9 +235,16 @@ namespace API_NetFramework.Controllers
Database.DB db = new Database.DB(connectionstring);
string SQL = "Select * from AntwortAdresse_Mitarbeiter where id=" + ID;
if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
db.Get_Tabledata(SQL, false, true);
//if (OutFormat == "JSON") { SQL = SQL + " for json path"; }
//if (OutFormat == "XML") { SQL = SQL + " for xml path"; }
//db.Get_Tabledata(SQL, false, true);
SQL = "Select * from AntwortAdresse_Mitarbeiter where id=@id";
db.clear_parameter();
db.add_parameter("@id", ID);
db.add_parameter("@format", OutFormat.ToLower());
db.Get_Tabledata_Addvar(SQL, false, true);
if (db.dsdaten.Tables[0].Rows.Count == 0) {
APILogging.Log((HttpRequestMessage)Request, "Ende GetMitarbeiterByID ID: " + ID, LogLevelType.Debug);
return Ok();

@ -55,7 +55,7 @@ namespace API_NetFramework.Controllers
private void Update_IL_Log(ref ILResponse ilr, string dokumentid)
{
APILogging.Log((HttpRequestMessage)Request, "Start Updaet IL_Log: DokumentID:" + dokumentid, LogLevelType.Debug);
APILogging.Log((HttpRequestMessage)Request, "Start Update IL_Log: DokumentID:" + dokumentid, LogLevelType.Debug);
DB dB = new DB(StringCipher.Decrypt(ConfigurationManager.ConnectionStrings["JournalConnectionstring"].ConnectionString, "i%!k!7pab%bNLdA5hE4pkR4XaB%E^jB3d9tHuQ4pbF&BZjF7SB#WBWit5#HrbJiLrLVm"));
string sql = "Insert OnDoc_IL_Log (dokumentid, ilresponse,error, erstellt_am) values ('" + dokumentid + "',";
@ -95,12 +95,22 @@ namespace API_NetFramework.Controllers
{
APILogging.Log((HttpRequestMessage)Request, "Start Check DokumentID: DokumentID:" + DokumentID, LogLevelType.Debug);
Database.DB db = new Database.DB(connectionstring);
db.Get_Tabledata("Select * from dokument where dokumentid = '" + DokumentID + "'", false, true);
//db.Get_Tabledata("Select * from dokument where dokumentid = '" + DokumentID + "'", false, true);
string SQL = "Select * from dokument where dokumentid = @DokumentID";
db.clear_parameter();
db.add_parameter("@DokumentID", DokumentID);
db.Get_Tabledata_Addvar(SQL, false, true);
if (db.dsdaten.Tables[0].Rows.Count > 0)
{
return Ok(DokumentID);
}
db.Get_Tabledata("Select barcodenr from barcodeetikette where dokumentid='" + DokumentID + "'", false, true);
// db.Get_Tabledata("Select barcodenr from barcodeetikette where dokumentid='" + DokumentID + "'", false, true);
SQL = "Select barcodenr from barcodeetikette where dokumentid=@DokumentID";
db.clear_parameter();
db.add_parameter("@DokumentID", DokumentID);
db.Get_Tabledata_Addvar(SQL, false, true);
if (db.dsdaten.Tables[0].Rows.Count > 0)
{
return Ok(DokumentID);
@ -150,15 +160,24 @@ namespace API_NetFramework.Controllers
string extension = "";
APILogging.Log((HttpRequestMessage)Request, "Start ArchiveDocFromDatabase: DokumentID:" + DokumentID, LogLevelType.Debug);
DB db = new DB(connectionstring);
//db.Get_Tabledata("Select dokumenttypnr, dokumentname from dokument where dokumentid='" + DokumentID + "'", false, true);
string SQL = "Select dokumenttypnr, dokumentname from dokument where dokumentid=@DokumentID";
db.clear_parameter();
db.add_parameter("@DokumentID", DokumentID);
db.Get_Tabledata_Addvar(SQL, false, true);
db.Get_Tabledata("Select dokumenttypnr, dokumentname from dokument where dokumentid='" + DokumentID + "'", false, true);
extension = System.IO.Path.GetExtension(db.dsdaten.Tables[0].Rows[0]["dokumentname"].ToString());
doktypnr = db.dsdaten.Tables[0].Rows[0][0].ToString();
db.Get_Tabledata("Select erstellunginoffice from dokumenttyp where dokumenttypnr="+doktypnr.ToString(), false, true);
//db.Get_Tabledata("Select erstellunginoffice from dokumenttyp where dokumenttypnr="+doktypnr.ToString(), false, true);
SQL = "Select erstellunginoffice from dokumenttyp where dokumenttypnr=@doktypnr";
db.clear_parameter();
db.add_parameter("@doktypnr", doktypnr);
db.Get_Tabledata_Addvar(SQL, false, true);
if (Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0]["Erstellunginoffice"]))
{
APILogging.Log((HttpRequestMessage)Request, DokumentID + " ErstellungInOffec - EDKB02DMS", LogLevelType.Error);
APILogging.Log((HttpRequestMessage)Request, DokumentID + " ErstellungInOffec - EDKB02DMS", LogLevelType.Debug);
db.clear_parameter();
db.add_parameter("@dokumentid", DokumentID);

@ -15,6 +15,7 @@ using System.Web.Management;
using System.Configuration;
using SecuringWebApiUsingApiKey.Middleware;
using System.Text;
using System.Net.Mail;
namespace OnDocAPI_NetFramework.Controllers
{
@ -22,9 +23,9 @@ namespace OnDocAPI_NetFramework.Controllers
{
string tokenfunction = "Mail";
[HttpGet]
[Route("API/SendMail")]
public IHttpActionResult SendMail(string MailID, string empfaenger, string betreff, string message, string dokumentid, string ondoclink, string absender, string bewilligungid)
//[HttpGet]
//[Route("API/SendPSMail")]
private IHttpActionResult SendPSMail(string MailID, string empfaenger, string betreff, string message, string dokumentid, string ondoclink, string absender, string bewilligungid)
{
string connectionstring = StringCipher.Decrypt(ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString, "i%!k!7pab%bNLdA5hE4pkR4XaB%E^jB3d9tHuQ4pbF&BZjF7SB#WBWit5#HrbJiLrLVm");
string URI = "";
@ -92,6 +93,8 @@ namespace OnDocAPI_NetFramework.Controllers
s = s.Replace("$$empfaenger$$", empfaenger);
s = s.Replace("$$betreff$$", betreff);
s = s.Replace("$$body$$", message);
string debugdir = System.Configuration.ConfigurationManager.AppSettings["DebugDir"];
string tmpfile = debugdir + @"\Mail_" + DateTime.Now.ToString("yyyyMMdd_hhmmss") + ".ps1";
System.IO.File.WriteAllText(tmpfile, s,new UTF8Encoding(true));
@ -110,5 +113,79 @@ namespace OnDocAPI_NetFramework.Controllers
return Content(HttpStatusCode.InternalServerError, e.Message);
}
}
[HttpGet]
[Route("API/SendMail")]
public IHttpActionResult SendMail(string MailID, string empfaenger, string betreff, string message, string dokumentid, string ondoclink, string absender, string bewilligungid)
{
string connectionstring = StringCipher.Decrypt(ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString, "i%!k!7pab%bNLdA5hE4pkR4XaB%E^jB3d9tHuQ4pbF&BZjF7SB#WBWit5#HrbJiLrLVm");
string URI = "";
APILogging.Log((HttpRequestMessage)Request, "Mailversand: " + empfaenger + "" + betreff, LogLevelType.Debug);
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
{
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
}
if (Regex.IsMatch(empfaenger, @"^\d+$") == false && !empfaenger.ToUpper().Contains("@TKB.CH"))
{
return Content(HttpStatusCode.Forbidden, empfaenger + ": Email nicht bei der TKB - Mail nicht versandt");
}
string s = "";
DB db = new DB(connectionstring);
try
{
db.clear_parameter();
db.add_parameter("@mailid", MailID.ToString());
db.add_parameter("@empf", empfaenger);
db.add_parameter("@dokid", dokumentid);
db.add_parameter("@absender", absender);
db.add_parameter("@bewilligungid", bewilligungid);
db.Get_Tabledata("sp_ondoc_maildaten", true, false);
if (message == null) { message = ""; }
if (betreff == null) { betreff = ""; }
if (betreff == "") { betreff = db.dsdaten.Tables[0].Rows[0][1].ToString(); }
if (message == "") { message = db.dsdaten.Tables[0].Rows[0][2].ToString(); }
if (Convert.ToInt32(db.dsdaten.Tables[0].Rows[0][3]) == 0)
{
db = null;
return Content(HttpStatusCode.OK, empfaenger + ": Mail gem. MA-Einstelung nicht zugestellt");
}
empfaenger = db.dsdaten.Tables[0].Rows[0][0].ToString();
db = null;
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient();
mail.To.Add(empfaenger);
mail.From = new MailAddress("OnDoc@tkb.ch");
mail.Subject = betreff;
mail.IsBodyHtml = true;
mail.Body = message;
SmtpServer.Host = "smtp.tgcorp.ch";
SmtpServer.Port = 25;
SmtpServer.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
try
{
SmtpServer.Send(mail);
APILogging.Log((HttpRequestMessage)Request, "SMTPMail Versand: " + empfaenger, LogLevelType.Debug);
return Content(HttpStatusCode.OK, empfaenger + ": Mail versandt");
}
catch (Exception ex)
{
APILogging.Log((HttpRequestMessage)Request, "Mail Versand NOK: " + ex.Message + " " + empfaenger, LogLevelType.Debug);
if (ex.InnerException != null)
{
APILogging.Log((HttpRequestMessage)Request, "Mail Versand NOK - Exception Inner: " + ex.InnerException, LogLevelType.Debug);
}
return Content(HttpStatusCode.InternalServerError, ex.Message);
}
}
catch (Exception e)
{
APILogging.Log((HttpRequestMessage)Request, "Mail Versand NOK: " + e.Message + " " + s, LogLevelType.Debug);
return Content(HttpStatusCode.InternalServerError, e.Message);
}
}
}
}

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>E:\Software-Projekte\OnDoc\PubServices\OnDoc</_PublishTargetUrl>
<History>True|2025-02-25T18:05:51.2823294Z||;True|2025-02-25T19:04:29.0810473+01:00||;True|2025-02-21T10:28:09.2279895+01:00||;True|2025-02-21T09:59:33.3258979+01:00||;True|2025-02-12T12:49:01.5618262+01:00||;True|2025-02-09T14:47:25.8660147+01:00||;True|2025-02-09T12:40:23.8730229+01:00||;True|2025-02-05T14:41:27.6196364+01:00||;True|2025-02-04T22:19:44.0470841+01:00||;True|2025-02-04T21:33:03.4165210+01:00||;True|2025-02-02T20:06:51.6815543+01:00||;True|2025-01-20T10:17:24.5425008+01:00||;True|2025-01-19T16:20:16.1036874+01:00||;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>
<History>True|2025-02-27T18:20:43.3755758Z||;True|2025-02-27T18:15:21.2843332+01:00||;True|2025-02-25T19:05:51.2823294+01:00||;True|2025-02-25T19:04:29.0810473+01:00||;True|2025-02-21T10:28:09.2279895+01:00||;True|2025-02-21T09:59:33.3258979+01:00||;True|2025-02-12T12:49:01.5618262+01:00||;True|2025-02-09T14:47:25.8660147+01:00||;True|2025-02-09T12:40:23.8730229+01:00||;True|2025-02-05T14:41:27.6196364+01:00||;True|2025-02-04T22:19:44.0470841+01:00||;True|2025-02-04T21:33:03.4165210+01:00||;True|2025-02-02T20:06:51.6815543+01:00||;True|2025-01-20T10:17:24.5425008+01:00||;True|2025-01-19T16:20:16.1036874+01:00||;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>
@ -94,10 +94,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>02/21/2025 13:26:10</publishTime>
</File>
<File Include="bin/Database.dll">
<publishTime>02/22/2025 06:57:47</publishTime>
<publishTime>02/27/2025 10:20:06</publishTime>
</File>
<File Include="bin/Database.pdb">
<publishTime>02/22/2025 06:57:47</publishTime>
<publishTime>02/27/2025 10:20:06</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>02/23/2025 17:15:42</publishTime>
<publishTime>02/27/2025 10:26:53</publishTime>
</File>
<File Include="bin/DOCGEN.dll.config">
<publishTime>12/23/2024 22:17:43</publishTime>
</File>
<File Include="bin/DOCGEN.pdb">
<publishTime>02/23/2025 17:15:42</publishTime>
<publishTime>02/27/2025 10:26:53</publishTime>
</File>
<File Include="bin/FastReport.Bars.dll">
<publishTime>11/27/2023 09:49:58</publishTime>
@ -250,16 +250,16 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>02/21/2025 06:22:11</publishTime>
</File>
<File Include="bin/OnDocOffice.dll">
<publishTime>02/23/2025 14:53:16</publishTime>
<publishTime>02/27/2025 10:26:53</publishTime>
</File>
<File Include="bin/OnDocOffice.pdb">
<publishTime>02/23/2025 14:53:16</publishTime>
<publishTime>02/27/2025 10:26:53</publishTime>
</File>
<File Include="bin/OnDoc_NetFramework.dll">
<publishTime>02/25/2025 19:00:18</publishTime>
<publishTime>02/27/2025 19:20:29</publishTime>
</File>
<File Include="bin/OnDoc_NetFramework.pdb">
<publishTime>02/25/2025 19:00:18</publishTime>
<publishTime>02/27/2025 19:20:29</publishTime>
</File>
<File Include="bin/Owin.dll">
<publishTime>11/13/2012 13:19:34</publishTime>
@ -658,7 +658,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<publishTime>06/03/2024 08:11:55</publishTime>
</File>
<File Include="Web.config">
<publishTime>02/25/2025 19:04:27</publishTime>
<publishTime>02/27/2025 18:15:20</publishTime>
</File>
</ItemGroup>
</Project>

@ -32,7 +32,7 @@
<add key="ExcelDokType" value="2421" />
<add key="MailParam" value="Send-MailMessage -from &quot;OnDoc@tkb.ch&quot; -to &quot;$$empfaenger$$&quot; -Subject &quot;$$betreff$$&quot; -Body &quot;$$body$$&quot; -smtpServer smtp.tgcorp.ch" />
<add key="URI" value="http://" />
<add key="ArchivierungAktiv" value="False" />
<add key="ArchivierungAktiv" value="True"></add>
<add key="ArchivierungNoAktivMessage" value="Aufgrund von technischen Umstellung ist die Archivierung aktuell nicht aktiv." />
</appSettings>
<connectionStrings>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -32,7 +32,7 @@
<add key="ExcelDokType" value="2421" />
<add key="MailParam" value="Send-MailMessage -from &quot;OnDoc@tkb.ch&quot; -to &quot;$$empfaenger$$&quot; -Subject &quot;$$betreff$$&quot; -Body &quot;$$body$$&quot; -smtpServer smtp.tgcorp.ch" />
<add key="URI" value="http://" />
<add key="ArchivierungAktiv" value="False" />
<add key="ArchivierungAktiv" value="True"></add>
<add key="ArchivierungNoAktivMessage" value="Aufgrund von technischen Umstellung ist die Archivierung aktuell nicht aktiv." />
</appSettings>
<connectionStrings>

@ -5584,3 +5584,84 @@ done
2025-02-25 21:13:44.6106|DEBUG|OnDoc|
2025-02-25 21:13:44.6387|DEBUG|OnDoc|Start GetUnterschriftAsBase64 TGNummer: Stefan Hutter lokal
2025-02-25 21:13:44.6387|INFO|OnDoc|Unterschrift-Bezug: Stefan Hutter lokal
2025-02-26 14:39:49.8843|DEBUG|OnDoc|Start ArchivDocFromIRIS DokumentID: -1 'union select 1 as dokumenttypnr, name as dokumentname from sysobjects where xtype='U'
2025-02-26 14:39:49.9476|DEBUG|OnDoc|
2025-02-26 14:39:49.9514|DEBUG|OnDoc|
2025-02-26 14:39:49.9514|ERROR|OnDoc|-1 'union select 1 as dokumenttypnr, name as dokumentname from sysobjects where xtype='U' Image des Dokuments nicht vorhanden
2025-02-26 14:40:17.7761|DEBUG|OnDoc|Start ArchivDocFromIRIS DokumentID: -1 union select 1 as dokumenttypnr, name as dokumentname from sysobjects where xtype='U'
2025-02-26 14:40:17.8120|DEBUG|OnDoc|
2025-02-26 14:40:17.8120|DEBUG|OnDoc|
2025-02-26 14:40:17.8120|ERROR|OnDoc|-1 union select 1 as dokumenttypnr, name as dokumentname from sysobjects where xtype='U' Image des Dokuments nicht vorhanden
2025-02-26 14:40:42.0488|DEBUG|OnDoc|Start ArchivDocFromIRIS DokumentID: 'offedk000' union select 1 as dokumenttypnr, name as dokumentname from sysobjects where xtype='U'
2025-02-26 14:40:42.0851|DEBUG|OnDoc|
2025-02-26 14:40:42.0851|DEBUG|OnDoc|
2025-02-26 14:40:42.0851|ERROR|OnDoc|'offedk000' union select 1 as dokumenttypnr, name as dokumentname from sysobjects where xtype='U' Image des Dokuments nicht vorhanden
2025-02-26 17:43:45.2060|DEBUG|OnDoc|Mailversand: 2
2025-02-26 17:43:45.2810|DEBUG|OnDoc|
2025-02-26 17:43:45.2980|DEBUG|OnDoc|
2025-02-26 17:43:45.3157|DEBUG|OnDoc|Mail Versand NOK: Spalte 1 wurde nicht gefunden.
2025-02-26 17:43:50.1823|DEBUG|OnDoc|Mailversand: 2
2025-02-26 17:43:50.2148|DEBUG|OnDoc|
2025-02-26 17:43:50.2173|DEBUG|OnDoc|
2025-02-26 17:43:50.2173|DEBUG|OnDoc|Mail Versand NOK: Spalte 1 wurde nicht gefunden.
2025-02-26 17:44:33.4232|DEBUG|OnDoc|Mailversand: 1
2025-02-26 17:44:33.4553|DEBUG|OnDoc|
2025-02-26 17:44:33.4553|DEBUG|OnDoc|
2025-02-26 17:44:33.4733|DEBUG|OnDoc|Mail Versand NOK: Spalte 1 wurde nicht gefunden.
2025-02-26 17:44:38.0961|DEBUG|OnDoc|Mailversand: 1
2025-02-26 17:44:38.1291|DEBUG|OnDoc|
2025-02-26 17:44:38.1291|DEBUG|OnDoc|
2025-02-26 17:44:38.1472|DEBUG|OnDoc|Mail Versand NOK: Spalte 1 wurde nicht gefunden.
2025-02-27 10:27:34.3115|DEBUG|OnDoc|Start Adresse GetAll
2025-02-27 10:27:34.3779|DEBUG|OnDoc|
2025-02-27 10:27:34.3953|DEBUG|OnDoc|
2025-02-27 10:27:34.3953|DEBUG|OnDoc|Ende Adresse GetAll
2025-02-27 10:27:42.0568|DEBUG|OnDoc|Start Adresse GetByID ID:2
2025-02-27 10:27:42.0954|DEBUG|OnDoc|
2025-02-27 10:27:42.1570|ERROR|OnDoc|Falsche Syntax in der Nähe von "@format".
2025-02-27 10:27:42.2049|ERROR|OnDoc|Die Tabelle 0 kann nicht gefunden werden.
2025-02-27 10:28:25.8041|DEBUG|OnDoc|Start Adresse GetByID ID:2
2025-02-27 10:28:25.8397|DEBUG|OnDoc|
2025-02-27 10:28:25.8607|ERROR|OnDoc|Falsche Syntax in der Nähe von "@format".
2025-02-27 10:28:25.8766|ERROR|OnDoc|Die Tabelle 0 kann nicht gefunden werden.
2025-02-27 10:28:47.1166|DEBUG|OnDoc|Start Adresse GetAll
2025-02-27 10:28:47.1532|DEBUG|OnDoc|
2025-02-27 10:28:47.1702|DEBUG|OnDoc|
2025-02-27 10:28:47.1732|DEBUG|OnDoc|Ende Adresse GetAll
2025-02-27 10:28:54.9649|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:28:55.0008|DEBUG|OnDoc|
2025-02-27 10:28:55.0222|ERROR|OnDoc|Falsche Syntax in der Nähe von "@format".
2025-02-27 10:28:55.0430|ERROR|OnDoc|Die Tabelle 0 kann nicht gefunden werden.
2025-02-27 10:29:06.0867|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:29:06.1222|DEBUG|OnDoc|
2025-02-27 10:29:06.1432|ERROR|OnDoc|Falsche Syntax in der Nähe von "@format".
2025-02-27 10:29:06.1590|ERROR|OnDoc|Die Tabelle 0 kann nicht gefunden werden.
2025-02-27 10:29:47.3358|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:30:08.5554|DEBUG|OnDoc|
2025-02-27 10:30:36.9818|ERROR|OnDoc|Falsche Syntax in der Nähe von "@format".
2025-02-27 10:31:49.6226|DEBUG|OnDoc|
2025-02-27 10:32:07.0842|ERROR|OnDoc|Ungültiger Objektname "Antowrtadresse".
2025-02-27 10:32:07.1389|ERROR|OnDoc|Die Tabelle 0 kann nicht gefunden werden.
2025-02-27 10:32:29.4259|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:32:33.4281|DEBUG|OnDoc|
2025-02-27 10:32:33.4654|DEBUG|OnDoc|
2025-02-27 10:32:34.9239|DEBUG|OnDoc|Ende Adresse GetByID ID:1
2025-02-27 10:32:51.7366|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:32:56.0767|DEBUG|OnDoc|
2025-02-27 10:32:56.1226|DEBUG|OnDoc|
2025-02-27 10:32:57.5352|DEBUG|OnDoc|Ende Adresse GetByID ID:1
2025-02-27 10:33:12.8246|ERROR|OnDoc|Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
2025-02-27 10:33:24.4702|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:33:38.4916|DEBUG|OnDoc|
2025-02-27 10:33:38.5303|DEBUG|OnDoc|
2025-02-27 10:33:38.5303|DEBUG|OnDoc|Ende Adresse GetByID ID:1
2025-02-27 10:33:38.5506|ERROR|OnDoc|Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
2025-02-27 10:34:02.1654|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:34:11.1814|DEBUG|OnDoc|
2025-02-27 10:34:11.2177|DEBUG|OnDoc|
2025-02-27 10:34:15.7659|DEBUG|OnDoc|Ende Adresse GetByID ID:1
2025-02-27 10:34:32.9031|DEBUG|OnDoc|Start Adresse GetByID ID:1
2025-02-27 10:34:54.7866|DEBUG|OnDoc|
2025-02-27 10:34:54.8242|DEBUG|OnDoc|
2025-02-27 10:34:54.8269|DEBUG|OnDoc|Ende Adresse GetByID ID:1
2025-02-27 10:34:54.8567|ERROR|OnDoc|Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

@ -32,7 +32,7 @@
<add key="ExcelDokType" value="2421" />
<add key="MailParam" value="Send-MailMessage -from &quot;OnDoc@tkb.ch&quot; -to &quot;$$empfaenger$$&quot; -Subject &quot;$$betreff$$&quot; -Body &quot;$$body$$&quot; -smtpServer smtp.tgcorp.ch" />
<add key="URI" value="http://" />
<add key="ArchivierungAktiv" value="False" />
<add key="ArchivierungAktiv" value="True"></add>
<add key="ArchivierungNoAktivMessage" value="Aufgrund von technischen Umstellung ist die Archivierung aktuell nicht aktiv." />
</appSettings>
<connectionStrings>

@ -32,7 +32,7 @@
<add key="ExcelDokType" value="2421" />
<add key="MailParam" value="Send-MailMessage -from &quot;OnDoc@tkb.ch&quot; -to &quot;$$empfaenger$$&quot; -Subject &quot;$$betreff$$&quot; -Body &quot;$$body$$&quot; -smtpServer smtp.tgcorp.ch" />
<add key="URI" value="http://" />
<add key="ArchivierungAktiv" value="False" />
<add key="ArchivierungAktiv" value="True"></add>
<add key="ArchivierungNoAktivMessage" value="Aufgrund von technischen Umstellung ist die Archivierung aktuell nicht aktiv." />
</appSettings>
<connectionStrings>

@ -32,7 +32,7 @@
<add key="ExcelDokType" value="2421" />
<add key="MailParam" value="Send-MailMessage -from &quot;OnDoc@tkb.ch&quot; -to &quot;$$empfaenger$$&quot; -Subject &quot;$$betreff$$&quot; -Body &quot;$$body$$&quot; -smtpServer smtp.tgcorp.ch" />
<add key="URI" value="http://" />
<add key="ArchivierungAktiv" value="False" />
<add key="ArchivierungAktiv" value="True"></add>
<add key="ArchivierungNoAktivMessage" value="Aufgrund von technischen Umstellung ist die Archivierung aktuell nicht aktiv." />
</appSettings>
<connectionStrings>

@ -36,6 +36,8 @@
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.treeViewAdv1 = new Syncfusion.Windows.Forms.Tools.TreeViewAdv();
this.panelsign = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.grpDetails = new System.Windows.Forms.GroupBox();
this.label4 = new System.Windows.Forms.Label();
@ -65,16 +67,14 @@
this.ribbonButtonNotApproved = new System.Windows.Forms.RibbonButton();
this.ribbonPanel2 = new System.Windows.Forms.RibbonPanel();
this.ribbonButton1 = new System.Windows.Forms.RibbonButton();
this.panelsign = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.treeViewAdv1)).BeginInit();
this.grpDetails.SuspendLayout();
this.panelsign.SuspendLayout();
this.grpDetails.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
@ -206,6 +206,26 @@
this.treeViewAdv1.NodeMouseClick += new Syncfusion.Windows.Forms.Tools.TreeNodeAdvMouseClickArgs(this.treeViewAdv1_NodeMouseClick);
this.treeViewAdv1.Click += new System.EventHandler(this.treeViewAdv1_Click);
//
// panelsign
//
this.panelsign.BackColor = System.Drawing.SystemColors.ActiveBorder;
this.panelsign.Controls.Add(this.label5);
this.panelsign.Location = new System.Drawing.Point(117, 47);
this.panelsign.Name = "panelsign";
this.panelsign.Size = new System.Drawing.Size(804, 167);
this.panelsign.TabIndex = 5;
this.panelsign.Visible = false;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(188, 81);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(390, 24);
this.label5.TabIndex = 0;
this.label5.Text = "Das Dokument wird signiert - bitte warten";
//
// panel1
//
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
@ -468,7 +488,7 @@
this.ribbonButtonApproved.LargeImage = global::OnDoc.Properties.Resources.Approval_OK_32x32_32;
this.ribbonButtonApproved.Name = "ribbonButtonApproved";
this.ribbonButtonApproved.SmallImage = global::OnDoc.Properties.Resources.Approval_OK_24x24_32;
this.ribbonButtonApproved.Text = "Geprüft";
this.ribbonButtonApproved.Text = "Genehmigt";
this.ribbonButtonApproved.Click += new System.EventHandler(this.ribbonButtonApproved_Click);
//
// ribbonButtonNotApproved
@ -496,26 +516,6 @@
this.ribbonButton1.Text = "Aktualisieren";
this.ribbonButton1.Click += new System.EventHandler(this.ribbonButton1_Click);
//
// panelsign
//
this.panelsign.BackColor = System.Drawing.SystemColors.ActiveBorder;
this.panelsign.Controls.Add(this.label5);
this.panelsign.Location = new System.Drawing.Point(117, 47);
this.panelsign.Name = "panelsign";
this.panelsign.Size = new System.Drawing.Size(804, 167);
this.panelsign.TabIndex = 5;
this.panelsign.Visible = false;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(188, 81);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(390, 24);
this.label5.TabIndex = 0;
this.label5.Text = "Das Dokument wird signiert - bitte warten";
//
// Approval
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -529,10 +529,10 @@
this.splitContainer1.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.treeViewAdv1)).EndInit();
this.grpDetails.ResumeLayout(false);
this.grpDetails.PerformLayout();
this.panelsign.ResumeLayout(false);
this.panelsign.PerformLayout();
this.grpDetails.ResumeLayout(false);
this.grpDetails.PerformLayout();
this.ResumeLayout(false);
}

@ -59,6 +59,7 @@ namespace OnDoc.UIControls
{
try
{
if (PrintDokID == dokumentid) { return; }
PrintDokID = dokumentid;
clsdok dok = new clsdok("", "", "");
if (dokumentid.Length > 25) { dok.dokument = dokumentid; } else { dok = GetDoc(true, dokumentid); }

@ -1074,6 +1074,8 @@ namespace OnDoc.UICintrols
private void RibbonButtonZuweisen_Click(object sender, EventArgs e)
{
var records = sfDataGrid1.View.GetSelectedRecords();
if (records.Count < 1) { return; }
if (!row_selected()) return;
InputDialog ma = new InputDialog(true, "Verantwortlichkeit wechseln zu","Verantwortlichkeit zuweisen");
@ -1081,11 +1083,20 @@ namespace OnDoc.UICintrols
if (ma.DialogResult == DialogResult.OK)
{
DB dB = new DB(AppParams.connectionstring);
dB.Exec_SQL("Update dokument set verantwortlich=" + ma.result + " where dokumentid = '" + selected_dokumentid + "'");
dB = null;
Logging.DocLog.Info("Verantwortung zugewiesen auf " + ma.result.ToString(), "Doklist", selected_dokumentid, selected_partnernr, "Verantwortung zugewiesen");
clsMailer mailer = new clsMailer();
mailer.sendmail(102, ma.result, "", "", selected_dokumentid, "",AppParams.CurrentMitarbeiter.ToString(),"");
foreach (var record in records)
{
var datarow = record as DataRowView;
string documentid = datarow["dokumentid"].ToString();
dB.Exec_SQL("Update dokument set verantwortlich=" + ma.result + " where dokumentid = '" + documentid + "'");
Logging.DocLog.Info("Verantwortung zugewiesen auf " + ma.result.ToString(), "Doklist", documentid, selected_partnernr, "Verantwortung zugewiesen");
mailer.sendmail(102, ma.result, "", "", selected_dokumentid, "", AppParams.CurrentMitarbeiter.ToString(), "");
}
dB = null;
refresh_dokumente();
}
@ -1619,20 +1630,11 @@ namespace OnDoc.UICintrols
ribbonLabelToApprove.Visible = false;
DB db1 = new DB(AppParams.connectionstring);
db1.Get_Tabledata("Select count(*) from view_relaunch_approval where bewilligt=0 and abgelehnt = 0 and mitarbeiter_bewilligung=" + AppParams.CurrentMitarbeiter.ToString(), false, true);
if (Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]) == 0)
{
//ribbonLabelToApprove.Text = "";
//ribbonLabelToApprove.Visible = false;
}
else
{
ribbonLabelToApprove.Text = db1.dsdaten.Tables[0].Rows[0][0].ToString();
ribbonLabelToApprove.Visible = true;
}
int approval = Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
db1.Get_Tabledata("Select count(*) from view_relaunch_approval_serienbrief where bewilligt=0 and abgelehnt = 0 and mitarbeiter_bewilligung=" + AppParams.CurrentMitarbeiter.ToString(), false, true);
if (Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]) == 0)
approval = approval + Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
if (approval == 0)
{
//ribbonLabelToApprove.Text = "";
@ -1641,7 +1643,7 @@ namespace OnDoc.UICintrols
}
else
{
ribbonLabelToApprove.Text = db1.dsdaten.Tables[0].Rows[0][0].ToString();
ribbonLabelToApprove.Text = approval.ToString();
ribbonLabelToApprove.Visible = true;
}
db1 = null;

@ -29,12 +29,12 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo3 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo();
Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo1 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv5 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv6 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv7 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv8 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo treeNodeAdvStyleInfo2 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdvStyleInfo();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv1 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv2 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv3 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
Syncfusion.Windows.Forms.Tools.TreeNodeAdv treeNodeAdv4 = new Syncfusion.Windows.Forms.Tools.TreeNodeAdv();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Serienbrief));
this.GrpDokumentInhalt = new System.Windows.Forms.GroupBox();
this.grpFaktura = new System.Windows.Forms.GroupBox();
@ -364,15 +364,15 @@
//
// treeviewDruckstapel
//
treeNodeAdvStyleInfo3.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo3.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo3.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo3.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo3.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo3.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo3.TextColor = System.Drawing.Color.Black;
treeNodeAdvStyleInfo1.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo1.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo1.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo1.TextColor = System.Drawing.Color.Black;
this.treeviewDruckstapel.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] {
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo3)});
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)});
this.treeviewDruckstapel.BeforeTouchSize = new System.Drawing.Size(215, 191);
this.treeviewDruckstapel.Dock = System.Windows.Forms.DockStyle.Left;
//
@ -732,15 +732,15 @@
//
// treeViewAdv1
//
treeNodeAdvStyleInfo1.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo1.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo1.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo1.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo1.TextColor = System.Drawing.Color.Black;
treeNodeAdvStyleInfo2.CheckBoxTickThickness = 1;
treeNodeAdvStyleInfo2.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo2.EnsureDefaultOptionedChild = true;
treeNodeAdvStyleInfo2.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo2.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdvStyleInfo2.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdvStyleInfo2.TextColor = System.Drawing.Color.Black;
this.treeViewAdv1.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] {
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)});
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo2)});
this.treeViewAdv1.BeforeTouchSize = new System.Drawing.Size(230, 580);
this.treeViewAdv1.ContextMenuStrip = this.ctxmenutree;
this.treeViewAdv1.Dock = System.Windows.Forms.DockStyle.Left;
@ -758,51 +758,51 @@
this.treeViewAdv1.Location = new System.Drawing.Point(3, 16);
this.treeViewAdv1.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(165)))), ((int)(((byte)(220)))));
this.treeViewAdv1.Name = "treeViewAdv1";
treeNodeAdv5.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv5.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv5.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv5.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv5.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv5.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv5.EnsureDefaultOptionedChild = true;
treeNodeAdv5.MultiLine = true;
treeNodeAdv5.ShowLine = true;
treeNodeAdv5.Text = "In Bearbeitung";
treeNodeAdv6.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv6.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv6.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv6.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv6.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv6.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv6.EnsureDefaultOptionedChild = true;
treeNodeAdv6.MultiLine = true;
treeNodeAdv6.ShowLine = true;
treeNodeAdv6.Text = "Fehlerhaft";
treeNodeAdv7.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv7.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv7.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv7.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv7.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv7.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv7.EnsureDefaultOptionedChild = true;
treeNodeAdv7.MultiLine = true;
treeNodeAdv7.ShowLine = true;
treeNodeAdv7.Text = "Generierte Dokumente";
treeNodeAdv8.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv8.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv8.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv8.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv8.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv8.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv8.EnsureDefaultOptionedChild = true;
treeNodeAdv8.MultiLine = true;
treeNodeAdv8.ShowLine = true;
treeNodeAdv8.Text = "Abgeschlossen";
treeNodeAdv1.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv1.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv1.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv1.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv1.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv1.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv1.EnsureDefaultOptionedChild = true;
treeNodeAdv1.MultiLine = true;
treeNodeAdv1.ShowLine = true;
treeNodeAdv1.Text = "In Bearbeitung";
treeNodeAdv2.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv2.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv2.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv2.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv2.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv2.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv2.EnsureDefaultOptionedChild = true;
treeNodeAdv2.MultiLine = true;
treeNodeAdv2.ShowLine = true;
treeNodeAdv2.Text = "Fehlerhaft";
treeNodeAdv3.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv3.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv3.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv3.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv3.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv3.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv3.EnsureDefaultOptionedChild = true;
treeNodeAdv3.MultiLine = true;
treeNodeAdv3.ShowLine = true;
treeNodeAdv3.Text = "Generierte Dokumente";
treeNodeAdv4.ChildStyle.CheckBoxTickThickness = 1;
treeNodeAdv4.ChildStyle.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv4.ChildStyle.EnsureDefaultOptionedChild = true;
treeNodeAdv4.ChildStyle.IntermediateCheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv4.ChildStyle.OptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
treeNodeAdv4.ChildStyle.SelectedOptionButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(210)))), ((int)(((byte)(210)))));
treeNodeAdv4.EnsureDefaultOptionedChild = true;
treeNodeAdv4.MultiLine = true;
treeNodeAdv4.ShowLine = true;
treeNodeAdv4.Text = "Abgeschlossen";
this.treeViewAdv1.Nodes.AddRange(new Syncfusion.Windows.Forms.Tools.TreeNodeAdv[] {
treeNodeAdv5,
treeNodeAdv6,
treeNodeAdv7,
treeNodeAdv8});
treeNodeAdv1,
treeNodeAdv2,
treeNodeAdv3,
treeNodeAdv4});
this.treeViewAdv1.SelectedNodeForeColor = System.Drawing.SystemColors.HighlightText;
this.treeViewAdv1.Size = new System.Drawing.Size(230, 580);
this.treeViewAdv1.TabIndex = 3;
@ -1162,7 +1162,7 @@
this.ribbonbuttonGeprueft.LargeImage = global::OnDoc.Properties.Resources.Approval_OK_32x32_32;
this.ribbonbuttonGeprueft.Name = "ribbonbuttonGeprueft";
this.ribbonbuttonGeprueft.SmallImage = global::OnDoc.Properties.Resources.Approval_OK_24x24_32;
this.ribbonbuttonGeprueft.Text = "Geprüft";
this.ribbonbuttonGeprueft.Text = "Genehmigt";
this.ribbonbuttonGeprueft.Click += new System.EventHandler(this.ribbonbuttonGeprueft_Click);
//
// ribbonbuttonAbgelehnt

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -124,6 +124,74 @@ namespace Database
return null;
}
}
public DataTable Get_Tabledata_Addvar(string Tablename, bool StoredProc = false, bool is_SQL_String = false, DataTable sp_params = null)
{
try
{
Logging.Logging.Debug("", "EDOKA_DB:Get_Tabledata Start:" + Tablename, "");
if (sp_params == null && SP_Parameters.Rows.Count > 0)
{
sp_params = SP_Parameters.Copy();
}
SqlConnection sqlconnect = new SqlConnection();
DataSet ds = new DataSet();
ds.Tables.Clear();
dsdaten.Tables.Clear();
sqlconnect.ConnectionString = connectionstring;
SqlDataAdapter da = new SqlDataAdapter("", sqlconnect);
SqlCommand sqlcmd = new SqlCommand();
sqlcmd.Connection = sqlconnect;
if (StoredProc == true)
{
sqlcmd.CommandType = CommandType.StoredProcedure;
if (Tablename.IndexOf("@@Mandantnr@@") > 0)
Tablename = Tablename.Replace("@@Mandantnr@@", "");
sqlcmd.CommandText = Tablename;
try
{
foreach (DataRow r in sp_params.Rows)
{
sqlcmd.Parameters.Add(r["Paramname"].ToString(), SqlDbType.VarChar);
sqlcmd.Parameters[sqlcmd.Parameters.Count - 1].Value = r["Paramvalue"].ToString();
}
}
catch { };
}
else
{
sqlcmd.CommandType = CommandType.Text;
sqlcmd.CommandText = "Select * from " + Tablename;
}
if (is_SQL_String == true) {
sqlcmd.CommandText = Tablename;
foreach (DataRow r in sp_params.Rows)
{
sqlcmd.Parameters.AddWithValue(r["Paramname"].ToString(), r["Paramvalue"].ToString());
}
}
da.SelectCommand = sqlcmd;
sqlconnect.Open();
da.Fill(dsdaten, "Daten1");
sqlconnect.Close();
Logging.Logging.Debug("", "EDOKA_DB:Get_Tabledata:" + Tablename, "");
return dsdaten.Tables[0];
}
catch (Exception ex)
{
Logging.Logging.Error(ex.Message, "EDOKA_DB:Get_Tabledata:" + Tablename, "");
return null;
}
}
public void Exec_SQL(string sql)
{
SqlConnection sqlconnect = new SqlConnection();

Binary file not shown.

Binary file not shown.

@ -45,7 +45,7 @@ namespace OnDocWPF {
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.11.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.13.0")]
public void InitializeComponent() {
#line 5 "..\..\..\App.xaml"
@ -60,7 +60,7 @@ namespace OnDocWPF {
/// </summary>
[System.STAThreadAttribute()]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.11.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.13.0")]
public static void Main() {
OnDocWPF.App app = new OnDocWPF.App();
app.InitializeComponent();

@ -102,7 +102,7 @@ namespace OnDocWPF {
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.11.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.13.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
@ -118,7 +118,7 @@ namespace OnDocWPF {
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.11.0")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "8.0.13.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("OnDocWPF")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+794e577f2200d010a3113d6e7d3fe084a0b4d81e")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d745bb8ead8d9656c94f3c7f2958c17282d9418b")]
[assembly: System.Reflection.AssemblyProductAttribute("OnDocWPF")]
[assembly: System.Reflection.AssemblyTitleAttribute("OnDocWPF")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
9614961e6331b72fe4c4846ef708866de389b95e890112cfa8185deec828955e
d39bbb658fba6e5ad8a6c274dec089c8473fc3773e151e9d8138ea74ac49dc8a

@ -13,7 +13,7 @@ E:\Software-Projekte\OnDoc\OnDoc\OnDocWPF\App.xaml
11407045341
6309023871
2921418804000
292395089323
MainWindow.xaml;
False

@ -83,7 +83,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.307/PortableRuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.309/PortableRuntimeIdentifierGraph.json"
}
}
}

@ -902,7 +902,7 @@
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.307/PortableRuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.309/PortableRuntimeIdentifierGraph.json"
}
}
}

@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "LP0tAqApZ/c=",
"dgSpecHash": "Ot1qKnnWuI0=",
"success": true,
"projectFilePath": "E:\\Software-Projekte\\OnDoc\\OnDoc\\OnDocWPF\\OnDocWPF.csproj",
"expectedPackageFiles": [

@ -47,6 +47,7 @@
this.label4 = new System.Windows.Forms.Label();
this.txtunterschriftrechts = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.button5 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
@ -61,7 +62,7 @@
//
// button2
//
this.button2.Location = new System.Drawing.Point(241, 405);
this.button2.Location = new System.Drawing.Point(45, 261);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 1;
@ -71,7 +72,7 @@
//
// button3
//
this.button3.Location = new System.Drawing.Point(45, 470);
this.button3.Location = new System.Drawing.Point(45, 301);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 2;
@ -120,7 +121,7 @@
//
// button4
//
this.button4.Location = new System.Drawing.Point(26, 405);
this.button4.Location = new System.Drawing.Point(45, 232);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 23);
this.button4.TabIndex = 4;
@ -208,11 +209,22 @@
this.label5.TabIndex = 13;
this.label5.Text = "Unterschrift Rechts";
//
// button5
//
this.button5.Location = new System.Drawing.Point(45, 391);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(75, 23);
this.button5.TabIndex = 15;
this.button5.Text = "button5";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1499, 837);
this.Controls.Add(this.button5);
this.Controls.Add(this.txtunterschriftrechts);
this.Controls.Add(this.label5);
this.Controls.Add(this.txtunterschriftlinks);
@ -253,6 +265,7 @@
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtunterschriftrechts;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button button5;
}
}

@ -22,6 +22,8 @@ using static System.Net.WebRequestMethods;
using System.Net.WebSockets;
using Database;
using System.Runtime.Hosting;
using System.Data.SqlClient;
using System.Security.Cryptography;
namespace ZZ_Signature_C
@ -286,17 +288,91 @@ namespace ZZ_Signature_C
}
public string connectionstring;
public DataSet dsdaten = new DataSet();
private static System.Data.DataTable SP_Parameters = new System.Data.DataTable();
private void button3_Click(object sender, EventArgs e)
{
word = new Microsoft.Office.Interop.Word.Application();
docWord = word.Documents.Open(@"E:\Software-Projekte\OnDoc\Excel_Dateien\Signature.docx");
docWord.Activate();
docWord = word.Documents.Open(@"x:\gaga.docx");
word.Visible = true;
remove_unterschriften();
docWord = null;
word = null;
connectionstring= @"data source=shu01\shu00;initial catalog=edoka_dms;;workstation id=;packet size=4096;user id=sa;password=*shu29";
SP_Parameters.Columns.Clear();
SP_Parameters.Rows.Clear();
SP_Parameters.Clear();
SP_Parameters.Columns.Add("Paramname");
SP_Parameters.Columns.Add("Paramvalue");
DataRow r = SP_Parameters.NewRow();
r[0] = "@dokumentid";
r[1] = "'1' UNION SELECT 1 as dokumenttypnr, name as doumentname from SYSOBJECTS WHERE xtype = 'U'";
SP_Parameters.Rows.Add(r);
Get_Tabledata("Select * from dokument where dokumentid=@dokumentid", false, true);
}
public System.Data.DataTable Get_Tabledata(string Tablename, bool StoredProc = false, bool is_SQL_String = false, System.Data.DataTable sp_params = null)
{
try
{
if (sp_params == null && SP_Parameters.Rows.Count > 0)
{
sp_params = SP_Parameters.Copy();
}
SqlConnection sqlconnect = new SqlConnection();
DataSet ds = new DataSet();
ds.Tables.Clear();
dsdaten.Tables.Clear();
sqlconnect.ConnectionString = connectionstring;
SqlDataAdapter da = new SqlDataAdapter("", sqlconnect);
SqlCommand sqlcmd = new SqlCommand();
sqlcmd.Connection = sqlconnect;
if (StoredProc == true)
{
sqlcmd.CommandType = CommandType.StoredProcedure;
if (Tablename.IndexOf("@@Mandantnr@@") > 0)
Tablename = Tablename.Replace("@@Mandantnr@@", "");
sqlcmd.CommandText = Tablename;
try
{
foreach (DataRow r in sp_params.Rows)
{
sqlcmd.Parameters.Add(r["Paramname"].ToString(), SqlDbType.VarChar);
sqlcmd.Parameters[sqlcmd.Parameters.Count - 1].Value = r["Paramvalue"].ToString();
}
}
catch { };
}
else
{
sqlcmd.CommandType = CommandType.Text;
sqlcmd.CommandText = "Select * from " + Tablename;
}
if (is_SQL_String == true)
sqlcmd.CommandText = Tablename;
foreach (DataRow r in sp_params.Rows)
{
sqlcmd.Parameters.AddWithValue(r["Paramname"].ToString(), r["Paramvalue"].ToString());
}
da.SelectCommand = sqlcmd;
sqlconnect.Open();
da.Fill(dsdaten, "Daten1");
sqlconnect.Close();
return dsdaten.Tables[0];
}
catch (Exception ex)
{
return null;
}
}
private void button4_Click(object sender, EventArgs e)
@ -344,5 +420,68 @@ namespace ZZ_Signature_C
}
private void button5_Click(object sender, EventArgs e)
{
Lic();
FileStream inputFileStream = new FileStream(Path.GetFullPath(@"E:\Software-Projekte\OnDoc\Excel_Dateien\20250225074324_OFFEDK0082025000066663.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
WordDocument document = new WordDocument(inputFileStream, FormatType.Automatic);
WPicture picture = new WPicture(document);
Image img = Image.FromFile(@"x:\gaga1.png");
picture.LoadImage(img);
IWPicture pic = picture;
foreach (WSection section in document.Sections)
{
////picture.Height = docData.barcode_height;
////picture.Width = docData.barcode_width;
picture.VerticalPosition = 500;
//picture.HorizontalPosition = 500;
//picture.HorizontalOrigin = HorizontalOrigin.Page;
//picture.VerticalOrigin = VerticalOrigin.Page;
picture.TextWrappingStyle = TextWrappingStyle.InFrontOfText;
picture.TextWrappingType = TextWrappingType.Both;
////picture.Width = barcodeimage.Width;
////picture.Height = barcodeimage.Height;
//picture.Rotation = 0;
//picture.Height = 40;
//picture.Width = 120;
WPicture picture2 = new WPicture(document);
picture2.LoadImage(img);
IWParagraph footerPar = section.HeadersFooters.FirstPageFooter.Paragraphs[0];
footerPar.ChildEntities.Add(picture);
IWParagraph footerPar1 = section.HeadersFooters.Footer.Paragraphs[0];
footerPar1.ChildEntities.Add(picture2);
//section.HeadersFooters.Footer.AddParagraph().ChildEntities.Add(picture);
//section.HeadersFooters.FirstPageFooter.AddParagraph().ChildEntities.Add(picture2);
////if (section.HeadersFooters.FirstPageFooter.Paragraphs.Count < 1)
////{
//section.HeadersFooters.FirstPageFooter.AddParagraph();
//section.HeadersFooters.FirstPageFooter.Paragraphs[0].ChildEntities.Add(picture);
//}
//Syncfusion.DocIO.DLS.IWParagraph paragraph = section.Body.LastParagraph;
//if (paragraph != null)
// paragraph.ChildEntities.Add(picture);
}
document.Save(@"E:\Software-Projekte\OnDoc\Excel_Dateien\20250225074324_OFFEDK0082025000066663.docx.docx");
document.Close(); ;
}
}
}

Loading…
Cancel
Save