update 20251210
@@ -114,6 +114,7 @@
|
|||||||
<HintPath>..\packages\System.ComponentModel.Annotations.4.5.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
<HintPath>..\packages\System.ComponentModel.Annotations.4.5.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Diagnostics.Tracing" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Pipelines, Version=9.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.IO.Pipelines, Version=9.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.IO.Pipelines.9.0.3\lib\net462\System.IO.Pipelines.dll</HintPath>
|
<HintPath>..\packages\System.IO.Pipelines.9.0.3\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||||
@@ -260,6 +261,7 @@
|
|||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Helper\Helper.cs" />
|
||||||
<Compile Include="Models\StaticParams.cs" />
|
<Compile Include="Models\StaticParams.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Startup.cs" />
|
<Compile Include="Startup.cs" />
|
||||||
|
|||||||
1435
API_NetFramework/Controllers/20251127_Documentcontroller_save.txt
Normal file
@@ -63,29 +63,7 @@ namespace OnDocAPI_NetFramework.Controllers
|
|||||||
}
|
}
|
||||||
empfaenger = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
empfaenger = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||||
|
|
||||||
//if (Regex.IsMatch(empfaenger, @"^\d+$") == true)
|
|
||||||
//{
|
|
||||||
|
|
||||||
// db.Get_Tabledata("select email from mitarbeiter where mitarbeiternr=" + empfaenger, false, true);
|
|
||||||
// if (db.dsdaten.Tables[0].Rows.Count > 0)
|
|
||||||
// {
|
|
||||||
// empfaenger = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// return Content(HttpStatusCode.InternalServerError, "Empfäger " + empfaenger + " konnte nicht ermittelt werden");
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//if (message == null) { message = ""; }
|
|
||||||
//if (betreff == null) { betreff = ""; }
|
|
||||||
//URI = System.Configuration.ConfigurationManager.AppSettings["URI"];
|
|
||||||
//db.Get_Tabledata("Select * from ondoc_mail where id=" + MailID, false, true);
|
|
||||||
//if (betreff == "") { betreff = db.dsdaten.Tables[0].Rows[0][1].ToString(); }
|
|
||||||
//if (message == "") {message= db.dsdaten.Tables[0].Rows[0][2].ToString(); }
|
|
||||||
//betreff = betreff.Replace("&&dokumentid&&", dokumentid);
|
|
||||||
//message = message.Replace("&&dokumentid&&", dokumentid);
|
|
||||||
//message = message.Replace("&&OnDocLink&&", URI);
|
|
||||||
db = null;
|
db = null;
|
||||||
|
|
||||||
s = System.Configuration.ConfigurationManager.AppSettings["MailParam"];
|
s = System.Configuration.ConfigurationManager.AppSettings["MailParam"];
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ using System.Drawing.Drawing2D;
|
|||||||
using Helper;
|
using Helper;
|
||||||
using System.Web.WebPages;
|
using System.Web.WebPages;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Microsoft.Ajax.Utilities;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -137,19 +138,174 @@ namespace API_NetFramework.Controllers
|
|||||||
return oBitmap;
|
return oBitmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpGet]
|
||||||
|
[Route("API/GetUnterschriftAsBase64New")]
|
||||||
|
public IHttpActionResult GetUnterschriftAsBase64New(string TGNummer, int ImageWidth = 0, int ImageHeight = 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
|
{
|
||||||
|
//return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
|
APIErrorSimple apireturn = new APIErrorSimple();
|
||||||
|
apireturn.code = "ONDOC-ERR-GetUnterschrift-01";
|
||||||
|
apireturn.status = "401";
|
||||||
|
apireturn.message = "Invalid Token or API-Key";
|
||||||
|
apireturn.traceid = "";
|
||||||
|
apireturn.field = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return BadRequest(Newtonsoft.Json.JsonConvert.SerializeObject(apireturn));
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
|
}
|
||||||
|
finally { apireturn = null; };
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, "Start GetUnterschriftAsBase64 TGNummer: " + TGNummer, LogLevelType.Debug);
|
||||||
|
string path = System.Configuration.ConfigurationManager.AppSettings["UnterschriftPath"];
|
||||||
|
string filename = "";
|
||||||
|
if (System.Configuration.ConfigurationManager.AppSettings["DemoUnterschrift"] == "YES")
|
||||||
|
{
|
||||||
|
filename = path + "1.jpg";
|
||||||
|
}
|
||||||
|
else { filename = path + TGNummer + ".jpg"; }
|
||||||
|
if (!File.Exists(filename))
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, "Unterschrift-Bezug - nicht vorhanden: " + TGNummer + " DEMO-Unterschrfit verwendet", LogLevelType.Info);
|
||||||
|
APIErrorSimple apireturn = new APIErrorSimple();
|
||||||
|
apireturn.code = "ONDOC-ERR-GetUnterschrift-02";
|
||||||
|
apireturn.status = "401";
|
||||||
|
apireturn.message = "Unterschfit für TGNumemr "+TGNummer+" nicht vorhanden";
|
||||||
|
apireturn.traceid = "";
|
||||||
|
apireturn.field = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return BadRequest(Newtonsoft.Json.JsonConvert.SerializeObject(apireturn));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return Content(HttpStatusCode.InternalServerError, "Unterschfit für TGNumemr " + TGNummer + " nicht vorhanden");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
apireturn = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, "Unterschrift-Bezug: " + TGNummer, LogLevelType.Info);
|
||||||
|
System.Drawing.Image iimg = System.Drawing.Image.FromFile(filename);
|
||||||
|
System.Drawing.Image imgnew = null;
|
||||||
|
switch (ImageWidth)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
ImageWidth = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["DefaultImageWidth"]);
|
||||||
|
ImageHeight = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["DefaultImageHeight"]);
|
||||||
|
imgnew = iimg;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case -1:
|
||||||
|
imgnew = iimg;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
|
||||||
|
imgnew = iimg;
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
using (MemoryStream m = new MemoryStream())
|
||||||
|
{
|
||||||
|
string newfilename = path + Guid.NewGuid().ToString() + ".jpg";
|
||||||
|
imgnew.Save(newfilename);
|
||||||
|
imgnew = System.Drawing.Image.FromFile(newfilename);
|
||||||
|
imgnew.Save(m, imgnew.RawFormat);
|
||||||
|
byte[] imageBytes = m.ToArray();
|
||||||
|
imgnew.Dispose();
|
||||||
|
m.Dispose();
|
||||||
|
System.IO.File.Delete(newfilename);
|
||||||
|
iimg.Dispose();
|
||||||
|
iimg = null;
|
||||||
|
imgnew = null;
|
||||||
|
APIOK apiok = new APIOK();
|
||||||
|
apiok.code = "200";
|
||||||
|
apiok.status = "200";
|
||||||
|
apiok.message = "";
|
||||||
|
apiok.documentid = "";
|
||||||
|
apiok.file=Convert.ToBase64String(imageBytes);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Ok(Newtonsoft.Json.JsonConvert.SerializeObject(apiok));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
apiok = null;
|
||||||
|
}
|
||||||
|
return Ok(Convert.ToBase64String(imageBytes));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
APIErrorSimple apireturn = new APIErrorSimple();
|
||||||
|
apireturn.code = "ONDOC-ERR-GetUnterschrift-02";
|
||||||
|
apireturn.status = "401";
|
||||||
|
apireturn.message = e.Message;
|
||||||
|
apireturn.traceid = "";
|
||||||
|
apireturn.field = "";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return BadRequest(Newtonsoft.Json.JsonConvert.SerializeObject(apireturn));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
apireturn = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
APIErrorSimple apireturn = new APIErrorSimple();
|
||||||
|
apireturn.code = "ONDOC-ERR-GetUnterschrift-03";
|
||||||
|
apireturn.status = "500";
|
||||||
|
apireturn.message = e.Message;
|
||||||
|
apireturn.traceid = "";
|
||||||
|
apireturn.field = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return BadRequest(Newtonsoft.Json.JsonConvert.SerializeObject(apireturn));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
apireturn = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="TGNummer">Required. </param>
|
|
||||||
/// <param name="ImageWidth">Optional. The default value is 0.</param>
|
|
||||||
/// <param name="ImageHeight">Optional. The default value is 0.</param>
|
|
||||||
/// <returns>Unterschriften-Image für die gelieferte TGNummer als Base64</returns>
|
|
||||||
/// <remarks>Parameter ImageWidth<br></br>
|
|
||||||
/// 0: Verwendung der Standardgrösse 140x70<br></br>
|
|
||||||
/// -1: Verwendung der Originalgrösse<br></br>
|
|
||||||
/// Anderer Wert Grössenänderung ImageWidth / ImageHeight
|
|
||||||
/// </remarks>
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("API/GetUnterschriftAsBase64")]
|
[Route("API/GetUnterschriftAsBase64")]
|
||||||
public IHttpActionResult GetUnterschriftAsBase64(string TGNummer, int ImageWidth = 0, int ImageHeight = 0)
|
public IHttpActionResult GetUnterschriftAsBase64(string TGNummer, int ImageWidth = 0, int ImageHeight = 0)
|
||||||
@@ -222,8 +378,6 @@ namespace API_NetFramework.Controllers
|
|||||||
return Ok(Convert.ToBase64String(imageBytes));
|
return Ok(Convert.ToBase64String(imageBytes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
44
API_NetFramework/Helper/Helper.cs
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
|
|
||||||
|
namespace OnDocAPI_NetFramework.Helper
|
||||||
|
{
|
||||||
|
public static class Helper
|
||||||
|
{
|
||||||
|
public static void CopyProperties(object source, object target)
|
||||||
|
{
|
||||||
|
var sourceProps = source.GetType().GetProperties();
|
||||||
|
var targetProps = target.GetType().GetProperties();
|
||||||
|
|
||||||
|
foreach (var prop in sourceProps)
|
||||||
|
{
|
||||||
|
var targetProp = targetProps.FirstOrDefault(p => p.Name == prop.Name && p.PropertyType == prop.PropertyType);
|
||||||
|
if (targetProp != null && targetProp.CanWrite)
|
||||||
|
{
|
||||||
|
targetProp.SetValue(target, prop.GetValue(source));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static readonly Random _random = new Random();
|
||||||
|
|
||||||
|
public static string RandomString(int size, bool lowerCase = false)
|
||||||
|
{
|
||||||
|
var builder = new StringBuilder(size);
|
||||||
|
|
||||||
|
char offset = lowerCase ? 'a' : 'A';
|
||||||
|
const int lettersOffset = 26; // A...Z or a..z: length=26
|
||||||
|
|
||||||
|
for (var i = 0; i < size; i++)
|
||||||
|
{
|
||||||
|
var @char = (char)_random.Next(offset, offset + lettersOffset);
|
||||||
|
builder.Append(@char);
|
||||||
|
}
|
||||||
|
|
||||||
|
return lowerCase ? builder.ToString().ToLower() : builder.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,6 +33,12 @@ namespace API_NetFramework.Models
|
|||||||
Logging.DocLog.IntUserID = db.dsdaten.Tables[0].Rows[0]["LogUserID"].ToString();
|
Logging.DocLog.IntUserID = db.dsdaten.Tables[0].Rows[0]["LogUserID"].ToString();
|
||||||
Logging.DocLog.connectionstring= journalconnectionstring;
|
Logging.DocLog.connectionstring= journalconnectionstring;
|
||||||
Logging.DocLog.init_logger();
|
Logging.DocLog.init_logger();
|
||||||
|
|
||||||
|
db.Get_Tabledata("Select * from nlog_parameter WHERE ID=2", false, true);
|
||||||
|
Logging.APIDocLog.IntLogLevel = db.dsdaten.Tables[0].Rows[0]["LogLevel"].ToString();
|
||||||
|
Logging.APIDocLog.IntUserID = db.dsdaten.Tables[0].Rows[0]["LogUserID"].ToString();
|
||||||
|
Logging.APIDocLog.connectionstring = journalconnectionstring;
|
||||||
|
Logging.APIDocLog.init_logger();
|
||||||
// Logging.DocLog.init_logger();
|
// Logging.DocLog.init_logger();
|
||||||
//Logging.DocLog.connectionstring = connectionstring;
|
//Logging.DocLog.connectionstring = connectionstring;
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,17 @@
|
|||||||
<parameter name="@partnernr" layout="${gdc:Partnernr}"/>
|
<parameter name="@partnernr" layout="${gdc:Partnernr}"/>
|
||||||
<parameter name="@aktion" layout="${gdc:Aktion}"/>
|
<parameter name="@aktion" layout="${gdc:Aktion}"/>
|
||||||
</target>
|
</target>
|
||||||
|
<target type="Database" name="APIDocLog" connectionstring="Server=SHU01\SHU00;Database=edoka_journale;User ID=sa;Password=*shu29">
|
||||||
|
<commandText>
|
||||||
|
sp_insert_nlog_APIDocLog @Origin,@Message,@LogLevel,@UserID, @zusatz, @guid
|
||||||
|
</commandText>
|
||||||
|
<parameter name="@Origin" layout="${gdc:Herkunft}"/>
|
||||||
|
<parameter name="@LogLevel" layout="${level}"/>
|
||||||
|
<parameter name="@message" layout="${message}"/>
|
||||||
|
<parameter name="@UserID" layout="${environment-user}"/>
|
||||||
|
<parameter name="@guid" layout="${gdc:GUID}"/>
|
||||||
|
<parameter name="@zusatz" layout="${gdc:zusatz}"/>
|
||||||
|
</target>
|
||||||
</targets>
|
</targets>
|
||||||
<rules>
|
<rules>
|
||||||
<!--<logger name="*" levels="Info,Error,Debug,Warn,Trace,Fail" writeTo="console" />-->
|
<!--<logger name="*" levels="Info,Error,Debug,Warn,Trace,Fail" writeTo="console" />-->
|
||||||
@@ -43,6 +54,7 @@
|
|||||||
<logger name="*" levels="Info,Debug,Error" writeTo="file" />
|
<logger name="*" levels="Info,Debug,Error" writeTo="file" />
|
||||||
<logger name="*" levels="Info,Debug,Error" writeTo="Database" />
|
<logger name="*" levels="Info,Debug,Error" writeTo="Database" />
|
||||||
<logger name="DocLog" levels="Info,Debug,Error,Warning,Trace" writeTo="DocLog" />
|
<logger name="DocLog" levels="Info,Debug,Error,Warning,Trace" writeTo="DocLog" />
|
||||||
|
<logger name="APIDocLog" levels="Info,Debug,Error,Warning,Trace" writeTo="APIDocLog" />
|
||||||
<!-- <logger name="*" levels="Error" writeTo="email" /> -->
|
<!-- <logger name="*" levels="Error" writeTo="email" /> -->
|
||||||
</rules>
|
</rules>
|
||||||
</nlog>
|
</nlog>
|
||||||
@@ -1 +1 @@
|
|||||||
0b546d3bbc077b6ec0c5327406ca9ea50b932fac31e916c5372589b1bdf6d542
|
f4edd25b59965f3aba1dd0fe3be0134c23fa88f0d01526b0e52d3378a785bf89
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
// indem Sie "*" wie unten gezeigt eingeben:
|
// indem Sie "*" wie unten gezeigt eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.7.10.02")]
|
[assembly: AssemblyVersion("1.7.11.01")]
|
||||||
[assembly: AssemblyFileVersion("1.7.10.02")]
|
[assembly: AssemblyFileVersion("1.7.11.01")]
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using Database;
|
using Database;
|
||||||
using DOCGEN;
|
using DOCGEN;
|
||||||
using Microsoft.Office.Interop.Word;
|
using Microsoft.Office.Interop.Word;
|
||||||
|
using Model;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using NLog.LayoutRenderers;
|
using NLog.LayoutRenderers;
|
||||||
using OnDoc.DocMgmt;
|
using OnDoc.DocMgmt;
|
||||||
using OnDoc.Klassen;
|
using OnDoc.Klassen;
|
||||||
@@ -55,8 +57,23 @@ namespace OnDoc.UIControls
|
|||||||
{
|
{
|
||||||
update_details(e.Node.Tag as string);
|
update_details(e.Node.Tag as string);
|
||||||
}
|
}
|
||||||
private void update_details(string nodetag){
|
private void update_details(string nodetag)
|
||||||
try {
|
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (nodetag.Contains("(Paket)"))
|
||||||
|
{
|
||||||
|
string pid = nodetag.Substring(0, nodetag.Length - 7);
|
||||||
|
grpDetails.Visible = false;
|
||||||
|
DB dB = new DB(AppParams.connectionstring);
|
||||||
|
dB.Get_Tabledata("Select paket from ondoc_versandstrasse_paket where id = " + pid.ToString(), false, true);
|
||||||
|
Versandpaket vp = JsonConvert.DeserializeObject<Versandpaket>(dB.dsdaten.Tables[0].Rows[0]["paket"].ToString());
|
||||||
|
this.docPreview1.Show_Doc(vp.finaldoc);
|
||||||
|
// vp = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
grpDetails.Visible = true;
|
||||||
notes.Rows.Clear(); ;
|
notes.Rows.Clear(); ;
|
||||||
notes.Columns.Clear();
|
notes.Columns.Clear();
|
||||||
notes.AcceptChanges();
|
notes.AcceptChanges();
|
||||||
@@ -90,6 +107,7 @@ namespace OnDoc.UIControls
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sfListView1.DataSource = notes;
|
sfListView1.DataSource = notes;
|
||||||
sfListView1.DisplayMember = "Betreff";
|
sfListView1.DisplayMember = "Betreff";
|
||||||
sfListView1.ValueMember = "note";
|
sfListView1.ValueMember = "note";
|
||||||
@@ -128,8 +146,11 @@ namespace OnDoc.UIControls
|
|||||||
tmppartner = Convert.ToInt32(dr["nrpar00"]);
|
tmppartner = Convert.ToInt32(dr["nrpar00"]);
|
||||||
tnpartner = new TreeNodeAdv();
|
tnpartner = new TreeNodeAdv();
|
||||||
tnpartner.Text = dr["nrpar00"].ToString() + " " + dr["bkpar00"].ToString();
|
tnpartner.Text = dr["nrpar00"].ToString() + " " + dr["bkpar00"].ToString();
|
||||||
if (dr["bewilligungstyp"].ToString() == "1") {
|
if (dr["bewilligungstyp"].ToString() == "1")
|
||||||
treeViewAdv1.Nodes.Add(tnpartner); } else { treeViewAdv1.Nodes.Add(tnpartner); }
|
{
|
||||||
|
treeViewAdv1.Nodes.Add(tnpartner);
|
||||||
|
}
|
||||||
|
else { treeViewAdv1.Nodes.Add(tnpartner); }
|
||||||
}
|
}
|
||||||
TreeNodeAdv tndok = new TreeNodeAdv();
|
TreeNodeAdv tndok = new TreeNodeAdv();
|
||||||
tndok.Text = dr["bezeichnung"].ToString();
|
tndok.Text = dr["bezeichnung"].ToString();
|
||||||
@@ -145,7 +166,27 @@ namespace OnDoc.UIControls
|
|||||||
treeViewAdv1.SelectedNode = treeViewAdv1.Nodes[0].Nodes[0];
|
treeViewAdv1.SelectedNode = treeViewAdv1.Nodes[0].Nodes[0];
|
||||||
update_details(treeViewAdv1.SelectedNode.Tag as string);
|
update_details(treeViewAdv1.SelectedNode.Tag as string);
|
||||||
}
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
db.Get_Tabledata("Select * from ondoc_view_prov_pakete where (aktiv=1 and (signedleft=0 and signleft='" + AppParams.currenttgnummer.ToString() + "') or (signedright=0 and signright='" + AppParams.currenttgnummer.ToString() + "'))", false, true);
|
||||||
|
foreach (DataRow dr in db.dsdaten.Tables[0].Rows)
|
||||||
|
{
|
||||||
|
if (tmppartner != Convert.ToInt32(dr["partnernr"]))
|
||||||
|
{
|
||||||
|
tmppartner = Convert.ToInt32(dr["partnernr"]);
|
||||||
|
tnpartner = new TreeNodeAdv();
|
||||||
|
tnpartner.Text = dr["partnernr"].ToString() + " " + dr["bkpar00"].ToString();
|
||||||
|
|
||||||
|
treeViewAdv1.Nodes.Add(tnpartner);
|
||||||
|
|
||||||
|
}
|
||||||
|
TreeNodeAdv tndok = new TreeNodeAdv();
|
||||||
|
tndok.Text = "Dokumentpaket - " + dr["Bezeichnung"].ToString();
|
||||||
|
tndok.Tag = dr["paketid"].ToString() + "(Paket)";
|
||||||
|
tndok.TagObject = dr;
|
||||||
|
tnpartner.Nodes.Add(tndok);
|
||||||
|
}
|
||||||
|
}catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
public int anzahl_dokument()
|
public int anzahl_dokument()
|
||||||
@@ -154,13 +195,13 @@ namespace OnDoc.UIControls
|
|||||||
}
|
}
|
||||||
private void ribbonButtonNotApproved_Click(object sender, EventArgs e)
|
private void ribbonButtonNotApproved_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
frmNote note = new frmNote(treeViewAdv1.SelectedNode.Tag.ToString(),"Ablehnen");
|
frmNote note = new frmNote(treeViewAdv1.SelectedNode.Tag.ToString(), "Ablehnen");
|
||||||
DataRow dr = treeViewAdv1.SelectedNode.TagObject as DataRow;
|
DataRow dr = treeViewAdv1.SelectedNode.TagObject as DataRow;
|
||||||
|
|
||||||
if (note.ShowDialog() == DialogResult.OK)
|
if (note.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
DB db = new DB(AppParams.connectionstring);
|
DB db = new DB(AppParams.connectionstring);
|
||||||
string sql = "update dokument_bewilligung set abgelehnt=1, abgelehnt_am = '" + DateTime.Now.ToString() + "', betreff='"+note.betreff+"', notizgrund='"+note.notiz+"' where id=" + dr["id"].ToString();
|
string sql = "update dokument_bewilligung set abgelehnt=1, abgelehnt_am = '" + DateTime.Now.ToString() + "', betreff='" + note.betreff + "', notizgrund='" + note.notiz + "' where id=" + dr["id"].ToString();
|
||||||
db.Exec_SQL(sql);
|
db.Exec_SQL(sql);
|
||||||
clsMailer mailer = new clsMailer();
|
clsMailer mailer = new clsMailer();
|
||||||
string empfaengerid = "";
|
string empfaengerid = "";
|
||||||
@@ -172,11 +213,11 @@ namespace OnDoc.UIControls
|
|||||||
// treeViewAdv1.SelectedNode.Parent.Nodes.Remove(treeViewAdv1.SelectedNode);
|
// treeViewAdv1.SelectedNode.Parent.Nodes.Remove(treeViewAdv1.SelectedNode);
|
||||||
if (dr["Bewilligungstyp"].ToString() == "2")
|
if (dr["Bewilligungstyp"].ToString() == "2")
|
||||||
{
|
{
|
||||||
db.Exec_SQL("Update dokument set approved=0, approval2=0 where dokumentid='" + dr["dokumentid"].ToString()+"'");
|
db.Exec_SQL("Update dokument set approved=0, approval2=0 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
db.Exec_SQL("Update dokument set approved=0, approval1=0 where dokumentid='" + dr["dokumentid"].ToString()+"'");
|
db.Exec_SQL("Update dokument set approved=0, approval1=0 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
}
|
}
|
||||||
mailer.sendmail(5, empfaengerid, "", "", dr["dokumentid"].ToString(), "", AppParams.CurrentMitarbeiter.ToString(), dr["id"].ToString());
|
mailer.sendmail(5, empfaengerid, "", "", dr["dokumentid"].ToString(), "", AppParams.CurrentMitarbeiter.ToString(), dr["id"].ToString());
|
||||||
mailer = null;
|
mailer = null;
|
||||||
@@ -187,57 +228,72 @@ namespace OnDoc.UIControls
|
|||||||
// tp.Parent.Nodes.Remove(tp);
|
// tp.Parent.Nodes.Remove(tp);
|
||||||
//}
|
//}
|
||||||
db = null;
|
db = null;
|
||||||
Logging.DocLog.Info("Dokument geprüft - abgelehnt", "Dokumentprüfung", dr["dokumentid"].ToString(),"","");
|
Logging.DocLog.Info("Dokument geprüft - abgelehnt", "Dokumentprüfung", dr["dokumentid"].ToString(), "", "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<string>threaddoks = new List<string>();
|
public List<string> threaddoks = new List<string>();
|
||||||
string threaddocid = "";
|
|
||||||
string threadempfaenger = "";
|
|
||||||
string threadid = "";
|
|
||||||
|
|
||||||
private void signdoc()
|
|
||||||
|
private void signdoc(TreeNodeAdv tn, ref TreeViewAdv tv)
|
||||||
{
|
{
|
||||||
string intDokid = threaddocid;
|
int approvaltype = 0;
|
||||||
string intempfaenger = threadempfaenger;
|
int error = 0;
|
||||||
string intid = threadid;
|
|
||||||
threaddoks.Add(intDokid);
|
DataRow dr = tn.TagObject as DataRow;
|
||||||
|
threaddoks.Add(dr["dokumentid"].ToString());
|
||||||
DB db = new DB(AppParams.connectionstring);
|
DB db = new DB(AppParams.connectionstring);
|
||||||
string empfaengerid = intempfaenger ;
|
string empfaengerid = "";
|
||||||
db.Get_Tabledata("Select * from dokument where dokumentid='" + intDokid + "'", false, true);
|
|
||||||
if (db.dsdaten.Tables[0].Rows[0]["approved"].ToString() == "True")
|
db.Get_Tabledata("Select mutierer from dokument_Bewilligung where id=" + dr["id"].ToString(), false, true);
|
||||||
|
empfaengerid = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||||
|
if (dr["Bewilligungstyp"].ToString() == "2")
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval2=1 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
approvaltype = 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval1=1 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
approvaltype = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
db.Get_Tabledata("Select * from dokument where dokumentid='" + dr["dokumentid"].ToString() + "'", false, true);
|
||||||
|
if (Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0]["approved"] )== true)
|
||||||
{
|
{
|
||||||
//panelsign.Visible = true;
|
//panelsign.Visible = true;
|
||||||
//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);
|
||||||
|
db.Get_Tabledata("select * from OnDoc_GetSignType where dokumentid='" + dr["dokumentid"].ToString() + "'", false, true);
|
||||||
if (dg.signdoc(threaddocid, AppParams.tempdir,pages))
|
//error = 1;
|
||||||
|
if (db.dsdaten.Tables[0].Rows[0][0].ToString() == "True")
|
||||||
{
|
{
|
||||||
db.Exec_SQL("Update Dokument set signiert=1, mutierer=" + AppParams.CurrentMitarbeiter.ToString() + ", mutiertam=getdate() where dokumentid='" + intDokid + "'");
|
if (dg.signdocsf(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() + "'");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
error = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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() + "'");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ error = 1; }
|
||||||
}
|
}
|
||||||
dg = null;
|
dg = null;
|
||||||
//panelsign.Visible = false;
|
|
||||||
//Application.DoEvents();
|
|
||||||
//Cursor = Cursors.Default;
|
|
||||||
}
|
|
||||||
clsMailer mailer = new clsMailer();
|
|
||||||
mailer.sendmail(3, intempfaenger, "", "", intDokid, "", AppParams.CurrentMitarbeiter.ToString(), intid);
|
|
||||||
mailer = null;
|
|
||||||
Logging.DocLog.Info("Dokument geprüft", "Dokumentprüfung", intDokid, "", "");
|
|
||||||
db = null;
|
|
||||||
threaddoks.Remove(intDokid);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (error == 0)
|
||||||
private void ribbonButtonApproved_Click(object sender, EventArgs e)
|
|
||||||
{
|
{
|
||||||
DB db = new DB(AppParams.connectionstring);
|
|
||||||
DataRow dr = treeViewAdv1.SelectedNode.TagObject as DataRow;
|
|
||||||
clsMailer mailer = new clsMailer();
|
|
||||||
string empfaengerid = "";
|
|
||||||
db.Get_Tabledata("Select mutierer from dokument_Bewilligung where id=" + dr["id"].ToString(), false, true);
|
db.Get_Tabledata("Select mutierer from dokument_Bewilligung where id=" + dr["id"].ToString(), false, true);
|
||||||
empfaengerid = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
empfaengerid = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||||
string sql = "update dokument_bewilligung set bewilligt=1, bewilligt_am = '" + DateTime.Now.ToString() + "' where id=" + dr["id"].ToString();
|
string sql = "update dokument_bewilligung set bewilligt=1, bewilligt_am = '" + DateTime.Now.ToString() + "' where id=" + dr["id"].ToString();
|
||||||
@@ -248,34 +304,129 @@ namespace OnDoc.UIControls
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval1=1 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
}
|
||||||
|
clsMailer mailer = new clsMailer();
|
||||||
|
mailer.sendmail(3, empfaengerid, "", "", dr["dokumentid"].ToString(), "", AppParams.CurrentMitarbeiter.ToString(), dr["id"].ToString());
|
||||||
|
mailer = null;
|
||||||
|
Logging.DocLog.Info("Dokument geprüft", "Dokumentprüfung", dr["dokumentid"].ToString(), "", "");
|
||||||
|
db = null;
|
||||||
|
threaddoks.Remove(dr["dokumentid"].ToString());
|
||||||
|
treeViewAdv1.SelectedNode = tn;
|
||||||
|
//remove_node();
|
||||||
|
|
||||||
db.Exec_SQL("Update dokument set approval1=1 where dokumentid='" + dr["dokumentid"].ToString()+"'");
|
TreeNodeAdv tparent = tn.Parent;
|
||||||
|
tparent.Nodes.Remove(tv.SelectedNode);
|
||||||
|
tv.Nodes.Remove(tv.SelectedNode);
|
||||||
|
if (tparent.Nodes.Count < 1)
|
||||||
|
{
|
||||||
|
tv.Nodes.Remove(tparent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tv.SelectedNode = tparent.Nodes[0];
|
||||||
|
}
|
||||||
|
if (tv.Nodes.Count < 1)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
update_details(tv.SelectedNode.Tag as string);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
if (approvaltype == 2)
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval2=0 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval1=0 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
}
|
||||||
|
threaddoks.Remove(dr["dokumentid"].ToString());
|
||||||
|
db.Get_Tabledata("Select bezeichnung from dokument where dokumentid='" + dr["dokumentid"].ToString() + "'",false,true);
|
||||||
|
MessageBox.Show("Das Dokument '" + db.dsdaten.Tables[0].Rows[0][0].ToString() + "' konnte aufgrund eines technischen Problems nicht signiert werden. Bitte Vorganng wiederholsen", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
db = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ribbonButtonApproved_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int error = 0;
|
||||||
|
int approvaltype = 0;
|
||||||
|
if (treeViewAdv1.SelectedNode.Tag.ToString().Contains("(Paket)"))
|
||||||
|
{
|
||||||
|
string pid = treeViewAdv1.SelectedNode.Tag.ToString();
|
||||||
|
pid = pid.Substring(0,pid.Length - 7);
|
||||||
|
DB db1 = new DB(AppParams.connectionstring);
|
||||||
|
db1.clear_parameter();
|
||||||
|
db1.add_parameter("@paketid", pid);
|
||||||
|
db1.add_parameter("@unterzeichner", AppParams.currenttgnummer.ToString());
|
||||||
|
db1.add_parameter("@genehmigt", "1");
|
||||||
|
|
||||||
|
db1.Get_Tabledata("sp_ondoc_prov_versandpaket_genehmigt", true, false);
|
||||||
|
remove_node();
|
||||||
|
db1 = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (AppParams.MultiThreadingSign)
|
if (AppParams.MultiThreadingSign)
|
||||||
{
|
{
|
||||||
approval_startet = true;
|
approval_startet = true;
|
||||||
Thread signthread = new Thread(signdoc);
|
//Thread signthread = new Thread(signdoc);
|
||||||
threaddocid = dr["dokumentid"].ToString();
|
Thread signthread = new Thread(() => signdoc(treeViewAdv1.SelectedNode, ref treeViewAdv1));
|
||||||
threadempfaenger = empfaengerid;
|
|
||||||
threadid = dr["id"].ToString();
|
|
||||||
signthread.Start();
|
signthread.Start();
|
||||||
remove_node();
|
//remove_node();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DB db = new DB(AppParams.connectionstring);
|
||||||
|
DataRow dr = treeViewAdv1.SelectedNode.TagObject as DataRow;
|
||||||
|
clsMailer mailer = new clsMailer();
|
||||||
|
string empfaengerid = "";
|
||||||
|
db.Get_Tabledata("Select mutierer from dokument_Bewilligung where id=" + dr["id"].ToString(), false, true);
|
||||||
|
empfaengerid = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||||
|
|
||||||
|
if (dr["Bewilligungstyp"].ToString() == "2")
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval2=1 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
approvaltype = 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval1=1 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
approvaltype = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------
|
//--------------------------
|
||||||
//--------------------
|
//--------------------
|
||||||
db.Get_Tabledata("Select * from dokument where dokumentid='" + dr["dokumentid"].ToString() + "'", false, true);
|
db.Get_Tabledata("Select * from dokument where dokumentid='" + dr["dokumentid"].ToString() + "'", false, true);
|
||||||
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;
|
||||||
System.Windows.Forms.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, pages)) ;
|
if (dg.signdocsf(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() + "'");
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
error = 1;
|
||||||
}
|
}
|
||||||
dg = null;
|
dg = null;
|
||||||
panelsign.Visible = false;
|
panelsign.Visible = false;
|
||||||
@@ -283,15 +434,32 @@ namespace OnDoc.UIControls
|
|||||||
Cursor = Cursors.Default;
|
Cursor = Cursors.Default;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (error == 0)
|
||||||
|
{
|
||||||
mailer.sendmail(3, empfaengerid, "", "", dr["dokumentid"].ToString(), "", AppParams.CurrentMitarbeiter.ToString(), dr["id"].ToString());
|
mailer.sendmail(3, empfaengerid, "", "", dr["dokumentid"].ToString(), "", AppParams.CurrentMitarbeiter.ToString(), dr["id"].ToString());
|
||||||
mailer = null;
|
mailer = null;
|
||||||
Logging.DocLog.Info("Dokument geprüft", "Dokumentprüfung", dr["dokumentid"].ToString(), "", "");
|
Logging.DocLog.Info("Dokument geprüft", "Dokumentprüfung", dr["dokumentid"].ToString(), "", "");
|
||||||
|
string sql = "update dokument_bewilligung set bewilligt=1, bewilligt_am = '" + DateTime.Now.ToString() + "' where id=" + dr["id"].ToString();
|
||||||
|
db.Exec_SQL(sql);
|
||||||
db = null;
|
db = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
remove_node();
|
remove_node();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Aufgrund eines technischen Problems konnte das Dokument nicht signiert werden. Bitte Vorgang wiederholen", "Signieren",MessageBoxButtons.OK,MessageBoxIcon.Error);
|
||||||
|
mailer = null;
|
||||||
|
if (approvaltype == 2)
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval2=0 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set approval1=0 where dokumentid='" + dr["dokumentid"].ToString() + "'");
|
||||||
|
}
|
||||||
|
|
||||||
|
db = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void remove_node()
|
private void remove_node()
|
||||||
{
|
{
|
||||||
@@ -351,12 +519,13 @@ namespace OnDoc.UIControls
|
|||||||
|
|
||||||
public int setcounter()
|
public int setcounter()
|
||||||
{
|
{
|
||||||
this.label8.Text=threaddoks.Count.ToString();
|
this.label8.Text = threaddoks.Count.ToString();
|
||||||
if (threaddoks.Count > 0)
|
if (threaddoks.Count > 0)
|
||||||
{
|
{
|
||||||
if (this.treeViewAdv1.Nodes.Count == 0) { label7.Text = "Dokument(e) werden signiert - nach Abschluss wird das Fenster geschlossen:";} else { label7.Text = "Dokument(e) werden signiert:"; }
|
if (this.treeViewAdv1.Nodes.Count == 0) { label7.Text = "Dokument(e) werden signiert - nach Abschluss wird das Fenster geschlossen:"; } else { label7.Text = "Dokument(e) werden signiert:"; }
|
||||||
this.pnlMultiThreading.Visible = true;
|
this.pnlMultiThreading.Visible = true;
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.pnlMultiThreading.Visible = false;
|
this.pnlMultiThreading.Visible = false;
|
||||||
}
|
}
|
||||||
|
|||||||
26
Client/UIControls/DokList.Designer.cs
generated
@@ -69,6 +69,7 @@ namespace OnDoc.UICintrols
|
|||||||
this.tsbtnpreviewright = new System.Windows.Forms.ToolStripButton();
|
this.tsbtnpreviewright = new System.Windows.Forms.ToolStripButton();
|
||||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||||
this.sfDataGrid1 = new Syncfusion.WinForms.DataGrid.SfDataGrid();
|
this.sfDataGrid1 = new Syncfusion.WinForms.DataGrid.SfDataGrid();
|
||||||
|
this.docPreview1 = new OnDoc.UIControls.DocPreview();
|
||||||
this.panel2 = new System.Windows.Forms.Panel();
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
this.lblTitel = new System.Windows.Forms.Label();
|
this.lblTitel = new System.Windows.Forms.Label();
|
||||||
this.ribbonPanel2 = new System.Windows.Forms.RibbonPanel();
|
this.ribbonPanel2 = new System.Windows.Forms.RibbonPanel();
|
||||||
@@ -187,7 +188,6 @@ namespace OnDoc.UICintrols
|
|||||||
this.gruppenSchliessenToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.gruppenSchliessenToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.RibbonButtonCreateNewDoc = new System.Windows.Forms.RibbonButton();
|
this.RibbonButtonCreateNewDoc = new System.Windows.Forms.RibbonButton();
|
||||||
this.ribbonButton5 = new System.Windows.Forms.RibbonButton();
|
this.ribbonButton5 = new System.Windows.Forms.RibbonButton();
|
||||||
this.docPreview1 = new OnDoc.UIControls.DocPreview();
|
|
||||||
this.dokwerte1 = new OnDoc.UIControls.Dokwerte();
|
this.dokwerte1 = new OnDoc.UIControls.Dokwerte();
|
||||||
this.ctxMenuDokList.SuspendLayout();
|
this.ctxMenuDokList.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
@@ -233,7 +233,7 @@ namespace OnDoc.UICintrols
|
|||||||
this.zumVersandpaketHinzufügenToolStripMenuItem,
|
this.zumVersandpaketHinzufügenToolStripMenuItem,
|
||||||
this.unterschriftTestsToolStripMenuItem});
|
this.unterschriftTestsToolStripMenuItem});
|
||||||
this.ctxMenuDokList.Name = "ctxMenuDokList";
|
this.ctxMenuDokList.Name = "ctxMenuDokList";
|
||||||
this.ctxMenuDokList.Size = new System.Drawing.Size(342, 680);
|
this.ctxMenuDokList.Size = new System.Drawing.Size(342, 652);
|
||||||
this.ctxMenuDokList.Opening += new System.ComponentModel.CancelEventHandler(this.ctxMenuDokList_Opening);
|
this.ctxMenuDokList.Opening += new System.ComponentModel.CancelEventHandler(this.ctxMenuDokList_Opening);
|
||||||
//
|
//
|
||||||
// dokumentAnzeigenToolStripMenuItem
|
// dokumentAnzeigenToolStripMenuItem
|
||||||
@@ -559,6 +559,17 @@ namespace OnDoc.UICintrols
|
|||||||
this.sfDataGrid1.ColumnResizing += new Syncfusion.WinForms.DataGrid.Events.ColumnResizingEventHandler(this.sfDataGrid1_ColumnResizing);
|
this.sfDataGrid1.ColumnResizing += new Syncfusion.WinForms.DataGrid.Events.ColumnResizingEventHandler(this.sfDataGrid1_ColumnResizing);
|
||||||
this.sfDataGrid1.CopyContent += new Syncfusion.WinForms.DataGrid.Events.CutCopyPasteEventHandler(this.sfDataGrid1_CopyContent);
|
this.sfDataGrid1.CopyContent += new Syncfusion.WinForms.DataGrid.Events.CutCopyPasteEventHandler(this.sfDataGrid1_CopyContent);
|
||||||
//
|
//
|
||||||
|
// docPreview1
|
||||||
|
//
|
||||||
|
this.docPreview1.BackColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.docPreview1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.docPreview1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.docPreview1.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.docPreview1.Name = "docPreview1";
|
||||||
|
this.docPreview1.Size = new System.Drawing.Size(1709, 349);
|
||||||
|
this.docPreview1.TabIndex = 0;
|
||||||
|
this.docPreview1.ZoomPercentage = 0;
|
||||||
|
//
|
||||||
// panel2
|
// panel2
|
||||||
//
|
//
|
||||||
this.panel2.BackColor = System.Drawing.Color.WhiteSmoke;
|
this.panel2.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||||
@@ -1608,17 +1619,6 @@ namespace OnDoc.UICintrols
|
|||||||
this.ribbonButton5.SmallImage = ((System.Drawing.Image)(resources.GetObject("ribbonButton5.SmallImage")));
|
this.ribbonButton5.SmallImage = ((System.Drawing.Image)(resources.GetObject("ribbonButton5.SmallImage")));
|
||||||
this.ribbonButton5.Text = "Load";
|
this.ribbonButton5.Text = "Load";
|
||||||
//
|
//
|
||||||
// docPreview1
|
|
||||||
//
|
|
||||||
this.docPreview1.BackColor = System.Drawing.SystemColors.Control;
|
|
||||||
this.docPreview1.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
||||||
this.docPreview1.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.docPreview1.Margin = new System.Windows.Forms.Padding(4);
|
|
||||||
this.docPreview1.Name = "docPreview1";
|
|
||||||
this.docPreview1.Size = new System.Drawing.Size(1709, 349);
|
|
||||||
this.docPreview1.TabIndex = 0;
|
|
||||||
this.docPreview1.ZoomPercentage = 0;
|
|
||||||
//
|
|
||||||
// dokwerte1
|
// dokwerte1
|
||||||
//
|
//
|
||||||
this.dokwerte1.Dock = System.Windows.Forms.DockStyle.Right;
|
this.dokwerte1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
|
|||||||
@@ -2131,6 +2131,12 @@ namespace OnDoc.UICintrols
|
|||||||
int approval = Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
|
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);
|
db1.Get_Tabledata("Select count(*) from view_relaunch_approval_serienbrief where bewilligt=0 and abgelehnt = 0 and mitarbeiter_bewilligung=" + AppParams.CurrentMitarbeiter.ToString(), false, true);
|
||||||
approval = approval + Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
|
approval = approval + Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
db1.Get_Tabledata("Select count(*) from ondoc_view_prov_pakete where (aktiv=1 and (signedleft=0 and signleft='" + AppParams.currenttgnummer.ToString() + "') or (signedright=0 and signright='" + AppParams.currenttgnummer.ToString() + "'))", false, true);
|
||||||
|
approval = approval + Convert.ToInt32(db1.dsdaten.Tables[0].Rows[0][0]);
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
if (approval == 0)
|
if (approval == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1697,7 +1697,11 @@ namespace OnDoc.UIControls
|
|||||||
if (vorschauid == -1 || Convert.ToInt32(vorlagendaten.Rows[i]["IntEintragnr"]) == vorschauid)
|
if (vorschauid == -1 || Convert.ToInt32(vorlagendaten.Rows[i]["IntEintragnr"]) == vorschauid)
|
||||||
{
|
{
|
||||||
if (!isbackground) add_progress();
|
if (!isbackground) add_progress();
|
||||||
if (isbackground) { counter = counter + 1; bw.ReportProgress((100/ vorlagendaten.Rows.Count)*counter); }
|
try
|
||||||
|
{
|
||||||
|
if (isbackground) { counter = counter + 1; bw.ReportProgress((100 / vorlagendaten.Rows.Count) * counter); }
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
System.Windows.Forms.Application.DoEvents();
|
System.Windows.Forms.Application.DoEvents();
|
||||||
|
|
||||||
string sp1 = "";
|
string sp1 = "";
|
||||||
|
|||||||
@@ -1437,7 +1437,7 @@ namespace OnDoc.Versandstrasse
|
|||||||
DB db = new DB(AppParams.connectionstring);
|
DB db = new DB(AppParams.connectionstring);
|
||||||
DB db2 = new DB(AppParams.connectionstring);
|
DB db2 = new DB(AppParams.connectionstring);
|
||||||
|
|
||||||
db.Get_Tabledata("Select * from ondoc_versandstrasse_paket where aktiv=1 and ersteller=" + AppParams.CurrentMitarbeiter + " and versendet=0", false, true);
|
db.Get_Tabledata("Select * from ondoc_versandstrasse_paket where isnull(signed,1)=1 and aktiv=1 and ersteller=" + AppParams.CurrentMitarbeiter + " and versendet=0", false, true);
|
||||||
treeViewAdvCouverts.Nodes.Clear();
|
treeViewAdvCouverts.Nodes.Clear();
|
||||||
foreach (DataRow dr in db.dsdaten.Tables[0].Rows)
|
foreach (DataRow dr in db.dsdaten.Tables[0].Rows)
|
||||||
{
|
{
|
||||||
|
|||||||
BIN
Client/bin/Debug/Images/Exemplar_für_die_Bank.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
Client/bin/Debug/Images/Exemplar_für_die_Bank1.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
Client/bin/Debug/Images/Search.png
Normal file
|
After Width: | Height: | Size: 382 B |
BIN
Client/bin/Debug/Images/calendar.png
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
Client/bin/Debug/Images/partner.png
Normal file
|
After Width: | Height: | Size: 282 B |
BIN
Client/bin/Debug/Images/tkb_logo_ohne_claim_4c_c.jpg
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
BIN
Client/bin/Debug/Images/tkb_logo_ohne_claim_4c_c1.jpg
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
Client/bin/Debug/Images/tkb_logo_ohne_claim_sw.jpg
Normal file
|
After Width: | Height: | Size: 116 KiB |
@@ -191,7 +191,6 @@ E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Helper.dll
|
|||||||
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Logging.dll
|
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Logging.dll
|
||||||
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Model.dll
|
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Model.dll
|
||||||
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\OfficePrinter.dll
|
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\OfficePrinter.dll
|
||||||
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\OnDocOffice.dll
|
|
||||||
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\QRCoder.dll
|
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\QRCoder.dll
|
||||||
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Syncfusion.BulletGraph.Windows.dll
|
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Syncfusion.BulletGraph.Windows.dll
|
||||||
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Syncfusion.Calculate.Base.dll
|
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\Syncfusion.Calculate.Base.dll
|
||||||
@@ -469,3 +468,4 @@ E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\tr\Microsoft.CodeAnalysis.CSha
|
|||||||
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
|
E:\Software-Projekte\OnDoc\OnDoc\Client\obj\Debug\OnDoc.UIControls.UCAllgemeinDokumentParamExtern.resources
|
||||||
|
E:\Software-Projekte\OnDoc\OnDoc\Client\bin\Debug\OnDocOffice.dll
|
||||||
|
|||||||
@@ -568,10 +568,60 @@ namespace DOCGEN.Klassen
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (apivalue.Type == "Checkbox")
|
||||||
|
{
|
||||||
|
CheckboxCount = 0;
|
||||||
|
CheckboxNr = Convert.ToInt32(apivalue.Value);
|
||||||
|
|
||||||
|
foreach (WSection section in document.Sections)
|
||||||
|
{
|
||||||
|
//Accesses the Body of section where all the contents in document are apart
|
||||||
|
WTextBody sectionBody = section.Body;
|
||||||
|
IterateTextBody(sectionBody);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (apivalue.Type == "Absatz")
|
||||||
|
{
|
||||||
|
if (apivalue.Value != "Ja")
|
||||||
|
{
|
||||||
|
apivalue.Value = "";
|
||||||
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
|
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
|
||||||
bookmarkNavigator.MoveToBookmark(apivalue.Tag);
|
bookmarkNavigator.MoveToBookmark(apivalue.Tag);
|
||||||
//bookmarkNavigator.InsertText(dv.Value.ToString());
|
|
||||||
bookmarkNavigator.ReplaceBookmarkContent(apivalue.Value, true);
|
bookmarkNavigator.ReplaceBookmarkContent(apivalue.Value, true);
|
||||||
|
Bookmark bookmark = document.Bookmarks.FindByName(apivalue.Tag + "Inhalt");
|
||||||
|
document.Bookmarks.Remove(bookmark);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (apivalue.Value.Contains("</i>"))
|
||||||
|
{
|
||||||
|
string leftpart = apivalue.Value.Substring(0, apivalue.Value.IndexOf("<i>"));
|
||||||
|
string rightparr = apivalue.Value.Substring(apivalue.Value.IndexOf("</i>"), apivalue.Value.Length - apivalue.Value.IndexOf("</i>") - 4);
|
||||||
|
string middle = apivalue.Value.Substring(apivalue.Value.IndexOf("<i>") + 3, apivalue.Value.IndexOf("</i>") - apivalue.Value.IndexOf("<i>") - 3);
|
||||||
|
BookmarksNavigator bn = new BookmarksNavigator(document);
|
||||||
|
bn.MoveToBookmark(apivalue.Tag);
|
||||||
|
apivalue.Value = apivalue.Value.Replace("<i>", "");
|
||||||
|
apivalue.Value = apivalue.Value.Replace("</i>", "");
|
||||||
|
bn.ReplaceBookmarkContent(apivalue.Value, true);
|
||||||
|
TextSelection textSelection = document.Find(middle, false, true);
|
||||||
|
WTextRange text = textSelection.GetAsOneRange();
|
||||||
|
text.CharacterFormat.Italic = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// WTextRange text = textSelection.GetAsOneRange();
|
||||||
|
//apivalue.Value = apivalue.Value & char(11) & "Hallo";
|
||||||
|
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
|
||||||
|
bookmarkNavigator.MoveToBookmark(apivalue.Tag);
|
||||||
|
bookmarkNavigator.ReplaceBookmarkContent(apivalue.Value, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
@@ -774,7 +824,77 @@ namespace DOCGEN.Klassen
|
|||||||
|
|
||||||
return Convert.ToBase64String(imageArray);
|
return Convert.ToBase64String(imageArray);
|
||||||
}
|
}
|
||||||
|
private static int CheckboxNr = 0;
|
||||||
|
private static int CheckboxCount = 0;
|
||||||
|
private static void IterateTextBody(WTextBody textBody)
|
||||||
|
{
|
||||||
|
//Iterates through each of the child items of WTextBody
|
||||||
|
for (int i = 0; i < textBody.ChildEntities.Count; i++)
|
||||||
|
{
|
||||||
|
//IEntity is the basic unit in DocIO DOM.
|
||||||
|
//Accesses the body items (should be either paragraph, table or block content control) as IEntity
|
||||||
|
IEntity bodyItemEntity = textBody.ChildEntities[i];
|
||||||
|
//A Text body has 3 types of elements - Paragraph, Table and Block Content Control
|
||||||
|
//Decides the element type by using EntityType
|
||||||
|
switch (bodyItemEntity.EntityType)
|
||||||
|
{
|
||||||
|
case EntityType.Paragraph:
|
||||||
|
WParagraph paragraph = bodyItemEntity as WParagraph;
|
||||||
|
//Processes the paragraph contents
|
||||||
|
//Iterates through the paragraph's DOM
|
||||||
|
IterateParagraph(paragraph.Items);
|
||||||
|
break;
|
||||||
|
case EntityType.Table:
|
||||||
|
//Table is a collection of rows and cells
|
||||||
|
//Iterates through table's DOM
|
||||||
|
IterateTable(bodyItemEntity as WTable);
|
||||||
|
break;
|
||||||
|
case EntityType.BlockContentControl:
|
||||||
|
BlockContentControl blockContentControl = bodyItemEntity as BlockContentControl;
|
||||||
|
//Iterates to the body items of Block Content Control.
|
||||||
|
IterateTextBody(blockContentControl.TextBody);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static void IterateTable(WTable table)
|
||||||
|
{
|
||||||
|
//Iterates the row collection in a table
|
||||||
|
foreach (WTableRow row in table.Rows)
|
||||||
|
{
|
||||||
|
//Iterates the cell collection in a table row
|
||||||
|
foreach (WTableCell cell in row.Cells)
|
||||||
|
{
|
||||||
|
//Table cell is derived from (also a) TextBody
|
||||||
|
//Reusing the code meant for iterating TextBody
|
||||||
|
IterateTextBody(cell);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static void IterateParagraph(ParagraphItemCollection paraItems)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < paraItems.Count; i++)
|
||||||
|
{
|
||||||
|
Entity entity = paraItems[i];
|
||||||
|
//A paragraph can have child elements such as text, image, hyperlink, symbols, etc.,
|
||||||
|
//Decides the element type by using EntityType
|
||||||
|
if (entity is WCheckBox)
|
||||||
|
{
|
||||||
|
WCheckBox checkbox = entity as WCheckBox;
|
||||||
|
//Modifies check box properties
|
||||||
|
CheckboxCount = CheckboxCount + 1;
|
||||||
|
if (CheckboxCount == CheckboxNr)
|
||||||
|
{
|
||||||
|
checkbox.Checked = true;
|
||||||
|
//checkbox.SizeType = CheckBoxSizeType.Exactly;
|
||||||
|
|
||||||
|
}
|
||||||
|
//if (!checkbox.Checked)
|
||||||
|
// checkbox.Checked = true;
|
||||||
|
//checkbox.SizeType = CheckBoxSizeType.Exactly;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public static void set_list(ref WordDocument document)
|
public static void set_list(ref WordDocument document)
|
||||||
{
|
{
|
||||||
Regex regex = new Regex("<ul>(.*?)</ul>");
|
Regex regex = new Regex("<ul>(.*?)</ul>");
|
||||||
|
|||||||
@@ -193,6 +193,37 @@ namespace DOCGEN
|
|||||||
return dok.dokument;
|
return dok.dokument;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool signdocsf (string dokumentid, string tempdir, int pages = 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
DB db1 = new DB(connectionstring);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
db1.Get_Tabledata("Select * from dokument where dokumentid = '" + dokumentid + "'", false, true);
|
||||||
|
string unterschriftlinks = db1.dsdaten.Tables[0].Rows[0]["unterschriftlinks"].ToString();
|
||||||
|
string unterschriftrechts = db1.dsdaten.Tables[0].Rows[0]["unterschriftrechts"].ToString();
|
||||||
|
string dokumenttypnr = db1.dsdaten.Tables[0].Rows[0]["dokumenttypnr"].ToString();
|
||||||
|
OnDocOffice.clsWordEdit we = new OnDocOffice.clsWordEdit(connectionstring, "", "", resturi, apikey);
|
||||||
|
|
||||||
|
if (we.insert_signaturesf(dokumentid, unterschriftlinks, unterschriftrechts, tempdir, dokumenttypnr, pages))
|
||||||
|
{
|
||||||
|
we = null;
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
we = null;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
db1 = null; }
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
public bool signdoc(string dokumentid, string tempdir, int pages=0)
|
public bool signdoc(string dokumentid, string tempdir, int pages=0)
|
||||||
{
|
{
|
||||||
DB db1 = new DB(connectionstring);
|
DB db1 = new DB(connectionstring);
|
||||||
@@ -210,6 +241,10 @@ namespace DOCGEN
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
<assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral" />
|
<assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral" />
|
||||||
<bindingRedirect oldVersion="0.0.0.0-26.2462.7.0" newVersion="26.2462.7.0" />
|
<bindingRedirect oldVersion="0.0.0.0-26.2462.7.0" newVersion="26.2462.7.0" />
|
||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.DocIO.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-26.2462.7.0" newVersion="26.2462.7.0" />
|
||||||
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -35,6 +35,12 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Database">
|
||||||
|
<HintPath>..\Database\bin\Debug\Database.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="OnDocOffice">
|
<Reference Include="OnDocOffice">
|
||||||
<HintPath>..\OnDocOffice\bin\Debug\OnDocOffice.dll</HintPath>
|
<HintPath>..\OnDocOffice\bin\Debug\OnDocOffice.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
117
DocIO_Demo_SHU/Form1.Designer.cs
generated
@@ -43,6 +43,14 @@
|
|||||||
this.label3 = new System.Windows.Forms.Label();
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||||
this.button2 = new System.Windows.Forms.Button();
|
this.button2 = new System.Windows.Forms.Button();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||||
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
|
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||||
|
this.button3 = new System.Windows.Forms.Button();
|
||||||
|
this.textBox6 = new System.Windows.Forms.TextBox();
|
||||||
|
this.label6 = new System.Windows.Forms.Label();
|
||||||
|
this.button4 = new System.Windows.Forms.Button();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.treeViewAdv1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.treeViewAdv1)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
@@ -51,7 +59,7 @@
|
|||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(60, 39);
|
this.label1.Location = new System.Drawing.Point(60, 39);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(49, 13);
|
this.label1.Size = new System.Drawing.Size(59, 15);
|
||||||
this.label1.TabIndex = 0;
|
this.label1.TabIndex = 0;
|
||||||
this.label1.Text = "Filename";
|
this.label1.Text = "Filename";
|
||||||
//
|
//
|
||||||
@@ -65,7 +73,7 @@
|
|||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
this.button1.Location = new System.Drawing.Point(63, 130);
|
this.button1.Location = new System.Drawing.Point(58, 66);
|
||||||
this.button1.Name = "button1";
|
this.button1.Name = "button1";
|
||||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||||
this.button1.TabIndex = 2;
|
this.button1.TabIndex = 2;
|
||||||
@@ -183,7 +191,7 @@
|
|||||||
//
|
//
|
||||||
// textBox2
|
// textBox2
|
||||||
//
|
//
|
||||||
this.textBox2.Location = new System.Drawing.Point(115, 214);
|
this.textBox2.Location = new System.Drawing.Point(114, 120);
|
||||||
this.textBox2.Name = "textBox2";
|
this.textBox2.Name = "textBox2";
|
||||||
this.textBox2.Size = new System.Drawing.Size(461, 20);
|
this.textBox2.Size = new System.Drawing.Size(461, 20);
|
||||||
this.textBox2.TabIndex = 5;
|
this.textBox2.TabIndex = 5;
|
||||||
@@ -192,24 +200,24 @@
|
|||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
this.label2.AutoSize = true;
|
||||||
this.label2.Location = new System.Drawing.Point(60, 214);
|
this.label2.Location = new System.Drawing.Point(59, 120);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(49, 13);
|
this.label2.Size = new System.Drawing.Size(59, 15);
|
||||||
this.label2.TabIndex = 6;
|
this.label2.TabIndex = 6;
|
||||||
this.label2.Text = "Filename";
|
this.label2.Text = "Filename";
|
||||||
//
|
//
|
||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
this.label3.AutoSize = true;
|
this.label3.AutoSize = true;
|
||||||
this.label3.Location = new System.Drawing.Point(60, 248);
|
this.label3.Location = new System.Drawing.Point(59, 154);
|
||||||
this.label3.Name = "label3";
|
this.label3.Name = "label3";
|
||||||
this.label3.Size = new System.Drawing.Size(45, 13);
|
this.label3.Size = new System.Drawing.Size(48, 15);
|
||||||
this.label3.TabIndex = 7;
|
this.label3.TabIndex = 7;
|
||||||
this.label3.Text = "DokTyp";
|
this.label3.Text = "DokTyp";
|
||||||
//
|
//
|
||||||
// textBox3
|
// textBox3
|
||||||
//
|
//
|
||||||
this.textBox3.Location = new System.Drawing.Point(115, 248);
|
this.textBox3.Location = new System.Drawing.Point(114, 154);
|
||||||
this.textBox3.Name = "textBox3";
|
this.textBox3.Name = "textBox3";
|
||||||
this.textBox3.Size = new System.Drawing.Size(461, 20);
|
this.textBox3.Size = new System.Drawing.Size(461, 20);
|
||||||
this.textBox3.TabIndex = 8;
|
this.textBox3.TabIndex = 8;
|
||||||
@@ -217,7 +225,7 @@
|
|||||||
//
|
//
|
||||||
// button2
|
// button2
|
||||||
//
|
//
|
||||||
this.button2.Location = new System.Drawing.Point(63, 289);
|
this.button2.Location = new System.Drawing.Point(62, 195);
|
||||||
this.button2.Name = "button2";
|
this.button2.Name = "button2";
|
||||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||||
this.button2.TabIndex = 9;
|
this.button2.TabIndex = 9;
|
||||||
@@ -225,11 +233,94 @@
|
|||||||
this.button2.UseVisualStyleBackColor = true;
|
this.button2.UseVisualStyleBackColor = true;
|
||||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||||
//
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(60, 257);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(39, 15);
|
||||||
|
this.label4.TabIndex = 11;
|
||||||
|
this.label4.Text = "JSON";
|
||||||
|
//
|
||||||
|
// textBox4
|
||||||
|
//
|
||||||
|
this.textBox4.Location = new System.Drawing.Point(135, 257);
|
||||||
|
this.textBox4.Name = "textBox4";
|
||||||
|
this.textBox4.Size = new System.Drawing.Size(461, 20);
|
||||||
|
this.textBox4.TabIndex = 10;
|
||||||
|
this.textBox4.Text = "E:\\Software-Projekte\\OnDoc\\Office_Vorlagen\\essdemo.json";
|
||||||
|
//
|
||||||
|
// label5
|
||||||
|
//
|
||||||
|
this.label5.AutoSize = true;
|
||||||
|
this.label5.Location = new System.Drawing.Point(60, 283);
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.Size = new System.Drawing.Size(49, 15);
|
||||||
|
this.label5.TabIndex = 13;
|
||||||
|
this.label5.Text = "Vorlage";
|
||||||
|
//
|
||||||
|
// textBox5
|
||||||
|
//
|
||||||
|
this.textBox5.Location = new System.Drawing.Point(135, 280);
|
||||||
|
this.textBox5.Name = "textBox5";
|
||||||
|
this.textBox5.Size = new System.Drawing.Size(461, 20);
|
||||||
|
this.textBox5.TabIndex = 12;
|
||||||
|
this.textBox5.Text = "E:\\Software-Projekte\\OnDoc\\Office_Vorlagen\\1472_Compliance_Profile_Mit_Table.docx" +
|
||||||
|
"";
|
||||||
|
this.textBox5.TextChanged += new System.EventHandler(this.textBox5_TextChanged);
|
||||||
|
//
|
||||||
|
// button3
|
||||||
|
//
|
||||||
|
this.button3.Location = new System.Drawing.Point(63, 306);
|
||||||
|
this.button3.Name = "button3";
|
||||||
|
this.button3.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button3.TabIndex = 14;
|
||||||
|
this.button3.Text = "Test";
|
||||||
|
this.button3.UseVisualStyleBackColor = true;
|
||||||
|
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||||
|
//
|
||||||
|
// textBox6
|
||||||
|
//
|
||||||
|
this.textBox6.Location = new System.Drawing.Point(135, 234);
|
||||||
|
this.textBox6.Name = "textBox6";
|
||||||
|
this.textBox6.Size = new System.Drawing.Size(461, 20);
|
||||||
|
this.textBox6.TabIndex = 16;
|
||||||
|
this.textBox6.Text = "data source=shu01\\shu00;initial catalog=edoka_dms;packet size=4096;user id=sa;pas" +
|
||||||
|
"sword=*shu29";
|
||||||
|
this.textBox6.TextChanged += new System.EventHandler(this.textBox6_TextChanged);
|
||||||
|
//
|
||||||
|
// label6
|
||||||
|
//
|
||||||
|
this.label6.AutoSize = true;
|
||||||
|
this.label6.Location = new System.Drawing.Point(61, 234);
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.Size = new System.Drawing.Size(68, 15);
|
||||||
|
this.label6.TabIndex = 15;
|
||||||
|
this.label6.Text = "ConnString";
|
||||||
|
//
|
||||||
|
// button4
|
||||||
|
//
|
||||||
|
this.button4.Location = new System.Drawing.Point(58, 344);
|
||||||
|
this.button4.Name = "button4";
|
||||||
|
this.button4.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button4.TabIndex = 17;
|
||||||
|
this.button4.Text = "Test";
|
||||||
|
this.button4.UseVisualStyleBackColor = true;
|
||||||
|
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||||
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1256, 450);
|
this.ClientSize = new System.Drawing.Size(1256, 450);
|
||||||
|
this.Controls.Add(this.button4);
|
||||||
|
this.Controls.Add(this.textBox6);
|
||||||
|
this.Controls.Add(this.label6);
|
||||||
|
this.Controls.Add(this.button3);
|
||||||
|
this.Controls.Add(this.label5);
|
||||||
|
this.Controls.Add(this.textBox5);
|
||||||
|
this.Controls.Add(this.label4);
|
||||||
|
this.Controls.Add(this.textBox4);
|
||||||
this.Controls.Add(this.button2);
|
this.Controls.Add(this.button2);
|
||||||
this.Controls.Add(this.textBox3);
|
this.Controls.Add(this.textBox3);
|
||||||
this.Controls.Add(this.label3);
|
this.Controls.Add(this.label3);
|
||||||
@@ -259,6 +350,14 @@
|
|||||||
private System.Windows.Forms.Label label3;
|
private System.Windows.Forms.Label label3;
|
||||||
private System.Windows.Forms.TextBox textBox3;
|
private System.Windows.Forms.TextBox textBox3;
|
||||||
private System.Windows.Forms.Button button2;
|
private System.Windows.Forms.Button button2;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.TextBox textBox4;
|
||||||
|
private System.Windows.Forms.Label label5;
|
||||||
|
private System.Windows.Forms.TextBox textBox5;
|
||||||
|
private System.Windows.Forms.Button button3;
|
||||||
|
private System.Windows.Forms.TextBox textBox6;
|
||||||
|
private System.Windows.Forms.Label label6;
|
||||||
|
private System.Windows.Forms.Button button4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
|||||||
using Syncfusion.WinForms.ListView;
|
using Syncfusion.WinForms.ListView;
|
||||||
|
|
||||||
using Syncfusion.Windows.Forms.Tools;
|
using Syncfusion.Windows.Forms.Tools;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using Database;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace DocIO_Demo_SHU
|
namespace DocIO_Demo_SHU
|
||||||
{
|
{
|
||||||
@@ -210,8 +214,8 @@ namespace DocIO_Demo_SHU
|
|||||||
private void button2_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
OnDocOffice.clsWordEdit wh = new OnDocOffice.clsWordEdit("Data Source=shu01\\shu00;Initial Catalog=edoka_dms;Persist Security Info=True;User ID=sa;Password=*shu29", textBox2.Text, "");
|
//OnDocOffice.clsWordEdit wh = new OnDocOffice.clsWordEdit("Data Source=shu01\\shu00;Initial Catalog=edoka_dms;Persist Security Info=True;User ID=sa;Password=*shu29", textBox2.Text, "");
|
||||||
wh.Edit_Document();
|
//wh.Edit_Document();
|
||||||
//wh.exec_macros(textBox2.Text, Convert.ToInt32(textBox3.Text), "Data Source=shu01\\shu00;Initial Catalog=edoka_dms;Persist Security Info=True;User ID=sa;Password=*shu29");
|
//wh.exec_macros(textBox2.Text, Convert.ToInt32(textBox3.Text), "Data Source=shu01\\shu00;Initial Catalog=edoka_dms;Persist Security Info=True;User ID=sa;Password=*shu29");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -221,6 +225,190 @@ namespace DocIO_Demo_SHU
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void textBox5_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public class docitem
|
||||||
|
{
|
||||||
|
public string itemname;
|
||||||
|
public string itemtag;
|
||||||
|
public string itemvalue;
|
||||||
|
public string doclinkname;
|
||||||
|
}
|
||||||
|
private IEnumerable<(string path, string key, string value)> GetNodes(JToken token)
|
||||||
|
{
|
||||||
|
foreach (var jt in token.Children())
|
||||||
|
{
|
||||||
|
if (!jt.Children().Any())
|
||||||
|
{
|
||||||
|
yield return (
|
||||||
|
path: jt.Path,
|
||||||
|
key: jt.Path.Split('.').Last(),
|
||||||
|
value: jt.ToString()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var (path, key, value) in GetNodes(jt))
|
||||||
|
{
|
||||||
|
yield return (path, key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string jsonstring = System.IO.File.ReadAllText(textBox4.Text);
|
||||||
|
dynamic data = JsonConvert.DeserializeObject(jsonstring);
|
||||||
|
List<docitem> docitemlist = new List<docitem>();
|
||||||
|
var jo = JObject.Parse(jsonstring);
|
||||||
|
var valueTuples = GetNodes(jo).ToList();
|
||||||
|
foreach (var valueTuple in valueTuples)
|
||||||
|
{
|
||||||
|
docitem d = new docitem();
|
||||||
|
d.itemname = valueTuple.Item1;
|
||||||
|
d.itemtag = valueTuple.Item2;
|
||||||
|
d.itemvalue = valueTuple.Item3;
|
||||||
|
d.doclinkname = "";
|
||||||
|
docitemlist.Add(d);
|
||||||
|
}
|
||||||
|
DB db = new DB(this.textBox6.Text);
|
||||||
|
if (VerifyInput(data.Dokumenttyp.ToString(), "Dokumenttypnr", ref db) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Dokumenttypnr ist ungültigt:" + data.Dokumenttypnr.ToString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (VerifyInput(data.Bp.Partnernummer.ToString(), "Partner", ref db) == false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Partnernummer ist ungültigt:" + data.Bp.Partnernummer.ToString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Console.WriteLine("Verify OK");
|
||||||
|
|
||||||
|
|
||||||
|
WordDocument document = new WordDocument();
|
||||||
|
document.Open(textBox5.Text, FormatType.Docx); // Or create a new document
|
||||||
|
BookmarksNavigator bk = new BookmarksNavigator(document);
|
||||||
|
bk.MoveToBookmark("Tabelle");
|
||||||
|
int maxcol = 0;
|
||||||
|
int maxrow = 0;
|
||||||
|
foreach (docitem di in docitemlist)
|
||||||
|
{
|
||||||
|
if (di.itemname.Contains("].th"))
|
||||||
|
{
|
||||||
|
string s = di.itemname.Substring(0, di.itemname.Length - 1);
|
||||||
|
s = s.Substring(s.Length-1, 1);
|
||||||
|
maxcol = Convert.ToInt32(s);
|
||||||
|
}
|
||||||
|
if (di.itemname.Contains(".tr[")){
|
||||||
|
string s = di.itemname.Substring(9, 1);
|
||||||
|
|
||||||
|
maxrow = Convert.ToInt32(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
IWTable table = new WTable(document);
|
||||||
|
int irow = 0;
|
||||||
|
int icol = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Set the number of rows and columns
|
||||||
|
table.ResetCells(maxrow + 1, maxcol + 1);
|
||||||
|
|
||||||
|
for (int i = 0; i<maxcol+1; i++)
|
||||||
|
{
|
||||||
|
foreach (docitem di in docitemlist)
|
||||||
|
{
|
||||||
|
if (di.itemname == "table.tr[0].th[" + i.ToString() + "]")
|
||||||
|
{
|
||||||
|
table.Rows[0].Cells[i].AddParagraph().AppendText(di.itemvalue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 1; i < maxrow + 1; i++)
|
||||||
|
for (int j = 0; j< maxcol + 1; j++) {
|
||||||
|
foreach (docitem di in docitemlist)
|
||||||
|
{
|
||||||
|
if (di.itemname == "table.tr[" + i.ToString() + "].td[" + (j).ToString() + "]")
|
||||||
|
{
|
||||||
|
table.Rows[i].Cells[j].AddParagraph().AppendText(di.itemvalue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Add content to the table cells
|
||||||
|
//table.Rows[0].Cells[0].AddParagraph().AppendText("Header 1");
|
||||||
|
//table.Rows[0].Cells[1].AddParagraph().AppendText("Header 2");
|
||||||
|
//table.Rows[0].IsHeader = true;
|
||||||
|
//table.Rows[1].Cells[0].AddParagraph().AppendText("Data 1");
|
||||||
|
//table.Rows[1].Cells[1].AddParagraph().AppendText("Data 2");
|
||||||
|
|
||||||
|
// Insert the table at the bookmark's location
|
||||||
|
bk.InsertTable(table);
|
||||||
|
|
||||||
|
string fontname = "";
|
||||||
|
string fontsize = "";
|
||||||
|
foreach (docitem di in docitemlist)
|
||||||
|
{
|
||||||
|
if (di.itemname == "table.Font") { fontname = di.itemvalue; }
|
||||||
|
if (di.itemname =="table.FontSize") { fontsize = di.itemvalue; }
|
||||||
|
}
|
||||||
|
foreach (WTableRow row in table.Rows)
|
||||||
|
{
|
||||||
|
// Iterate through each cell in the row.
|
||||||
|
foreach (WTableCell cell in row.Cells)
|
||||||
|
{
|
||||||
|
// Iterate through each paragraph in the cell.
|
||||||
|
foreach (WParagraph paragraph in cell.Paragraphs)
|
||||||
|
{
|
||||||
|
// Iterate through the child entities of the paragraph.
|
||||||
|
foreach (Entity entity in paragraph.ChildEntities)
|
||||||
|
{
|
||||||
|
// Check if the child entity is a text range.
|
||||||
|
if (entity is WTextRange)
|
||||||
|
{
|
||||||
|
// Change the font to Algerian for the text range.
|
||||||
|
(entity as WTextRange).CharacterFormat.FontName =fontname;
|
||||||
|
(entity as WTextRange).CharacterFormat.FontSize = Convert.ToInt32(fontsize); ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bk.MoveToBookmark("bmlist");
|
||||||
|
string value = bk.CurrentBookmark.BookmarkStart.OwnerParagraph.Text;
|
||||||
|
bk.InsertText("Hallo ich bin der Text"+Environment.NewLine+"Ich bin die Zeile 2");
|
||||||
|
|
||||||
|
document.Save(textBox5.Text+".docx", FormatType.Docx);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean VerifyInput(string inputstring, string vtyp, ref DB db)
|
||||||
|
{
|
||||||
|
switch(vtyp) {
|
||||||
|
case "Dokumenttypnr":
|
||||||
|
db.Get_Tabledata("Select count(*) from dokumenttyp where aktiv = 1 and dokumenttypnr=" + inputstring, false, true);
|
||||||
|
if (db.dsdaten.Tables[0].Rows.Count > 0) { return true; } else { return false; }
|
||||||
|
break;
|
||||||
|
case "Partner":
|
||||||
|
db.Get_Tabledata("Select count (*) from partner where nrpar00=" + inputstring, false, true);
|
||||||
|
if (db.dsdaten.Tables[0].Rows.Count > 0) { return true; } else { return false; }
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void textBox6_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void button4_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//private void button1_Click(object sender, EventArgs e)
|
//private void button1_Click(object sender, EventArgs e)
|
||||||
//{
|
//{
|
||||||
|
|||||||
BIN
DocIO_Demo_SHU/bin/Debug/BarcodeLib.dll
Normal file
BIN
DocIO_Demo_SHU/bin/Debug/BarcodeLib.pdb
Normal file
BIN
DocIO_Demo_SHU/bin/Debug/DOCGEN.dll
Normal file
51
DocIO_Demo_SHU/bin/Debug/DOCGEN.dll.config
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.DocIO.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-28.1462.35.0" newVersion="28.1462.35.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.Compression.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-28.1462.35.0" newVersion="28.1462.35.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.OfficeChart.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-28.1462.35.0" newVersion="28.1462.35.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-28.1462.33.0" newVersion="28.1462.33.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.Pdf.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-28.1462.35.0" newVersion="28.1462.35.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.XlsIO.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-28.1462.35.0" newVersion="28.1462.35.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="NLog.Database" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
||||||
BIN
DocIO_Demo_SHU/bin/Debug/DOCGEN.pdb
Normal file
13
DocIO_Demo_SHU/bin/Debug/DOCGEN.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>DOCGEN</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="M:DOCGEN.Klassen.SyncFWord.DocToPDF(System.String)">
|
||||||
|
<summary>Word to PDF-Konverter</summary>
|
||||||
|
<remarks>Das sind die Remarks</remarks>
|
||||||
|
<param name="dokument">Base64-Dokument</param>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
DocIO_Demo_SHU/bin/Debug/Database.dll
Normal file
15
DocIO_Demo_SHU/bin/Debug/Database.dll.config
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="NLog.Database" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
BIN
DocIO_Demo_SHU/bin/Debug/Database.pdb
Normal file
BIN
DocIO_Demo_SHU/bin/Debug/DocIO_Demo_SHU.exe
Normal file
38
DocIO_Demo_SHU/bin/Debug/DocIO_Demo_SHU.exe.config
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
|
||||||
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-26.2462.7.0" newVersion="26.2462.7.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Syncfusion.DocIO.Base" publicKeyToken="3d67ed1f87d44c89" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-26.2462.7.0" newVersion="26.2462.7.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="NLog.Database" publicKeyToken="5120e14c03d0593c" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||