update 20250324
This commit is contained in:
@@ -24,6 +24,8 @@ using DOCGEN.Klassen;
|
||||
using CSVNET;
|
||||
using System.Data;
|
||||
using Helper;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
|
||||
namespace API_NetFramework.Controllers
|
||||
@@ -140,7 +142,7 @@ namespace API_NetFramework.Controllers
|
||||
[HttpGet]
|
||||
[Route("API/ArchiveDocFromDatabase")]
|
||||
|
||||
public IHttpActionResult ArchivDocFromDatabase(string DokumentID)
|
||||
public IHttpActionResult ArchivDocFromDatabase(string DokumentID, string pdfdoc = "")
|
||||
{
|
||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||
{
|
||||
@@ -305,6 +307,10 @@ namespace API_NetFramework.Controllers
|
||||
onbasedoc.attributes.Add(na);
|
||||
}
|
||||
onbasedoc.dokumentDatei = dok.dokument;
|
||||
|
||||
if(pdfdoc != ""){
|
||||
onbasedoc.dokumentDatum=pdfdoc;
|
||||
}
|
||||
db = null;
|
||||
ILResponse ilr = new ILResponse();
|
||||
string debugfilename = System.Configuration.ConfigurationManager.AppSettings["JSONDebugPath"];
|
||||
@@ -539,5 +545,125 @@ namespace API_NetFramework.Controllers
|
||||
return Content(HttpStatusCode.InternalServerError, ilr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("API/Send_Versandstrasse")]
|
||||
|
||||
public IHttpActionResult Send_Versandstrasse()
|
||||
{
|
||||
|
||||
string json_versandpaket = Request.Content.ReadAsStringAsync().Result;
|
||||
|
||||
Versandpaket versandpaket = new Versandpaket();
|
||||
versandpaket.Dokument = new List<Versanddokument>();
|
||||
versandpaket = JsonConvert.DeserializeObject<Versandpaket>(json_versandpaket);
|
||||
string inthandle = "";
|
||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||
{
|
||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||
}
|
||||
string ArchivAktiv;
|
||||
ArchivAktiv = System.Configuration.ConfigurationManager.AppSettings["ArchivierungAktiv"].ToString();
|
||||
if (ArchivAktiv != "True")
|
||||
{
|
||||
string message = "Hinweismeldung: " + System.Configuration.ConfigurationManager.AppSettings["ArchivierungNoAktivMessage"].ToString();
|
||||
return Content(HttpStatusCode.OK, message);
|
||||
}
|
||||
try
|
||||
{
|
||||
OnBase_Attributes oba = new OnBase_Attributes();
|
||||
if (!versandpaket.send_onbase_doc)
|
||||
{
|
||||
oba.BPNummer = versandpaket.partnernr.ToString();
|
||||
oba.DocumentHandle = "";
|
||||
oba.DistributionOption = versandpaket.Versandoption.ToString();
|
||||
oba.GASCouvert = versandpaket.GAS;
|
||||
oba.Returnaddress = versandpaket.GASAdresse;
|
||||
oba.O2ODochandle = "";
|
||||
oba.Status = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (Versanddokument vd in versandpaket.Dokument)
|
||||
{
|
||||
IHttpActionResult res = ArchivDocFromDatabase(vd.DokumentID, vd.dokument);
|
||||
DB db = new DB(connectionstring);
|
||||
db.clear_parameter();
|
||||
db.add_parameter("@dokumentid", vd.DokumentID);
|
||||
db.Get_Tabledata("sp_get_handle", true, false);
|
||||
if (db.dsdaten.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
inthandle = db.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||
oba.DocumentHandle = inthandle;
|
||||
versandpaket.finaldoc = "";
|
||||
}
|
||||
db = null;
|
||||
}
|
||||
}
|
||||
|
||||
OnBaseDocUpload.OnBaseDokument onbasedoc = new OnBaseDocUpload.OnBaseDokument();
|
||||
onbasedoc.bpNummer = oba.BPNummer;
|
||||
onbasedoc.personNummer = "";
|
||||
onbasedoc.dokumentDatum = DateTime.Now.ToString("dd.MM.yyyy");
|
||||
onbasedoc.dokumentDatei = versandpaket.finaldoc;
|
||||
onbasedoc.dateiTyp = "PDF";
|
||||
onbasedoc.attributes = new List<OnBaseDocUpload.attribute>();
|
||||
|
||||
|
||||
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("Document Handle",oba.DocumentHandle.ToString()));
|
||||
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O DistributionOption",oba.DistributionOption.ToString()));
|
||||
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O GasCouvert", oba.GASCouvert.ToString()));
|
||||
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O Returnaddress", oba.Returnaddress.ToString()));
|
||||
|
||||
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O Dochandle", oba.O2ODochandle.ToString()));
|
||||
onbasedoc.attributes.Add(new OnBaseDocUpload.attribute("O2O Status", oba.Status.ToString()));
|
||||
|
||||
ILResponse ilr = new ILResponse();
|
||||
string debugfilename = System.Configuration.ConfigurationManager.AppSettings["JSONDebugPath"];
|
||||
string SendToOnBase = System.Configuration.ConfigurationManager.AppSettings["SendToOnBase"];
|
||||
string SendToFile = System.Configuration.ConfigurationManager.AppSettings["SendToFile"];
|
||||
string debugdir = System.Configuration.ConfigurationManager.AppSettings["DebugDir"];
|
||||
string jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(onbasedoc);
|
||||
IHttpActionResult transferResult = null;
|
||||
if (SendToOnBase != "Yes")
|
||||
{
|
||||
transferResult = Transfer_OnBase(uploadtype.fast, ref jsonstring, ref ilr);
|
||||
if (SendToFile == "Yes")
|
||||
{
|
||||
if (debugfilename != "")
|
||||
{
|
||||
debugfilename = debugfilename + "VS_"+oba.BPNummer+"_"+DateTime.Now.ToString("yyyyMMddhhmmss")+".json";
|
||||
System.IO.File.WriteAllText(debugfilename, jsonstring);
|
||||
debugfilename = debugfilename + ".pdf";
|
||||
Helper.clsFileHelper fh = new Helper.clsFileHelper();
|
||||
fh.SaveBase64ToFile(onbasedoc.dokumentDatei, debugfilename);
|
||||
fh = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
APILogging.Log((HttpRequestMessage)Request, "Opload Versandstrasse:" + debugfilename, LogLevelType.Debug);
|
||||
|
||||
//Log nachführen
|
||||
// Update_IL_Log(ref ilr, DokumentID);
|
||||
if (ilr.senderror == 1)
|
||||
{
|
||||
return Content(HttpStatusCode.InternalServerError, ilr.response);
|
||||
}
|
||||
else
|
||||
{
|
||||
update_dokumentstatus(debugfilename);
|
||||
return Content(HttpStatusCode.OK, oba.BPNummer.ToString() + " *archiviert*");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@
|
||||
</connectionStrings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.8.1" />
|
||||
<httpRuntime targetFramework="4.8.1" />
|
||||
<httpRuntime targetFramework="4.8.1" maxRequestLength="102400" />
|
||||
</system.web>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
@@ -148,6 +148,11 @@
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<requestLimits maxAllowedContentLength="104857600" />
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -41,7 +41,7 @@
|
||||
</connectionStrings>
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.8.1" />
|
||||
<httpRuntime targetFramework="4.8.1" />
|
||||
<httpRuntime targetFramework="4.8.1" maxRequestLength="102400" />
|
||||
</system.web>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
@@ -148,6 +148,11 @@
|
||||
<remove name="TRACEVerbHandler" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<requestLimits maxAllowedContentLength="104857600" />
|
||||
</requestFiltering>
|
||||
</security>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
|
||||
|
||||
Binary file not shown.
@@ -5852,3 +5852,108 @@ done
|
||||
2025-03-19 17:34:30.3949|DEBUG|OnDoc|
|
||||
2025-03-19 17:34:30.4079|DEBUG|OnDoc|
|
||||
2025-03-19 17:34:30.4244|DEBUG|OnDoc|Mail Versand NOK: Spalte 1 wurde nicht gefunden.
|
||||
2025-03-23 20:30:22.2820|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
|
||||
2025-03-23 20:30:36.2531|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
|
||||
2025-03-23 20:31:25.3946|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
|
||||
2025-03-23 20:31:43.2455|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
|
||||
2025-03-23 20:33:13.7869|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
|
||||
2025-03-23 20:33:49.0744|ERROR|OnDoc|Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
|
||||
2025-03-23 20:38:19.4570|DEBUG|OnDoc|Start Transfer to OnBase
|
||||
2025-03-23 20:38:19.6060|DEBUG|OnDoc|Ende Transfer to OnBase
|
||||
2025-03-23 20:38:27.3017|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS_1000208_20250323083822.json.pdf
|
||||
2025-03-23 20:39:17.1137|DEBUG|OnDoc|Start Transfer to OnBase
|
||||
2025-03-23 20:39:17.1271|DEBUG|OnDoc|Ende Transfer to OnBase
|
||||
2025-03-23 20:39:17.1271|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS_1000208_20250323083917.json.pdf
|
||||
2025-03-23 20:39:17.1271|DEBUG|OnDoc|
|
||||
2025-03-23 20:39:17.1271|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.1828|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:43:19.2478|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.2781|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.2811|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.2811|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.2811|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.5365|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.5365|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:19.5365|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:20.7732|DEBUG|OnDoc|Start Transfer to OnBase
|
||||
2025-03-23 20:43:20.9579|DEBUG|OnDoc|Ende Transfer to OnBase
|
||||
2025-03-23 20:43:20.9579|DEBUG|OnDoc|Ende ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:43:20.9579|DEBUG|OnDoc|Start Update IL_Log: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:43:20.9754|DEBUG|OnDoc|Ende Update IL_Log: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:43:20.9754|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:20.9754|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:20.9754|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:21.0277|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:21.0277|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:21.0322|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:30.0448|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:30.1080|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:46.9277|DEBUG|OnDoc|
|
||||
2025-03-23 20:43:46.9632|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:00.7693|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:44:02.6271|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:02.6609|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:10.0466|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:10.0820|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:16.5448|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:16.5862|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:22.1131|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:22.1502|DEBUG|OnDoc|
|
||||
2025-03-23 20:44:42.8538|DEBUG|OnDoc|Start Transfer to OnBase
|
||||
2025-03-23 20:44:42.9284|DEBUG|OnDoc|Ende Transfer to OnBase
|
||||
2025-03-23 20:44:48.6483|DEBUG|OnDoc|Ende ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:44:49.9665|DEBUG|OnDoc|Start Update IL_Log: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:44:49.9823|DEBUG|OnDoc|Ende Update IL_Log: DokumentID:OFFEDK0082025002491700
|
||||
2025-03-23 20:45:29.7115|DEBUG|OnDoc|
|
||||
2025-03-23 20:45:29.7467|DEBUG|OnDoc|
|
||||
2025-03-23 20:45:29.7467|DEBUG|OnDoc|
|
||||
2025-03-23 20:45:29.7517|DEBUG|OnDoc|
|
||||
2025-03-23 20:45:29.7517|DEBUG|OnDoc|
|
||||
2025-03-23 20:45:29.7517|DEBUG|OnDoc|
|
||||
2025-03-23 20:45:34.9513|DEBUG|OnDoc|
|
||||
2025-03-23 20:45:34.9875|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:10.9616|DEBUG|OnDoc|Start Transfer to OnBase
|
||||
2025-03-23 20:47:11.0159|DEBUG|OnDoc|Ende Transfer to OnBase
|
||||
2025-03-23 20:47:11.0159|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS__20250323084711.json.pdf
|
||||
2025-03-23 20:47:11.0159|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:11.0159|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:57.9891|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491692
|
||||
2025-03-23 20:47:58.0220|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:58.0496|DEBUG|OnDoc|OFFEDK0082025002491692 ErstellungInOffec - EDKB02DMS
|
||||
2025-03-23 20:47:58.0496|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:58.0673|DEBUG|OnDoc|
|
||||
2025-03-23 20:47:58.0673|INFO|OnDoc|Dokumentarchivierung via EDKB02_DMS ausgelöstOFFEDK0082025002491692
|
||||
2025-03-23 20:48:18.6242|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491692
|
||||
2025-03-23 20:48:21.0110|DEBUG|OnDoc|
|
||||
2025-03-23 20:48:21.0445|DEBUG|OnDoc|
|
||||
2025-03-23 20:48:37.6183|DEBUG|OnDoc|
|
||||
2025-03-23 20:48:50.3467|DEBUG|OnDoc|
|
||||
2025-03-23 20:49:00.0544|DEBUG|OnDoc|OFFEDK0082025002491692 ErstellungInOffec - EDKB02DMS
|
||||
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
|
||||
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
|
||||
2025-03-23 20:49:00.1124|DEBUG|OnDoc|Dokument nicht im Status in Bearbeitung - Bereits archiviert: OFFEDK0082025002491692OFFEDK0082025002491692
|
||||
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
|
||||
2025-03-23 20:49:00.1124|DEBUG|OnDoc|
|
||||
2025-03-23 20:49:00.1124|DEBUG|OnDoc|Start Transfer to OnBase
|
||||
2025-03-23 20:49:00.2337|DEBUG|OnDoc|Ende Transfer to OnBase
|
||||
2025-03-23 20:49:00.2337|DEBUG|OnDoc|Opload Versandstrasse:X:\\jsontemp\VS__20250323084900.json.pdf
|
||||
2025-03-23 20:49:00.2498|DEBUG|OnDoc|
|
||||
2025-03-23 20:49:00.2498|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.3756|DEBUG|OnDoc|Start ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491726
|
||||
2025-03-23 20:50:41.4116|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.4366|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.4396|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:41.4526|DEBUG|OnDoc|
|
||||
2025-03-23 20:50:49.4205|DEBUG|OnDoc|Start Transfer to OnBase
|
||||
2025-03-23 20:50:57.4507|DEBUG|OnDoc|Ende ArchiveDocFromDatabase: DokumentID:OFFEDK0082025002491726
|
||||
2025-03-23 20:50:57.9901|DEBUG|OnDoc|Start Update IL_Log: DokumentID:OFFEDK0082025002491726
|
||||
2025-03-23 20:50:58.0061|DEBUG|OnDoc|Ende Update IL_Log: DokumentID:OFFEDK0082025002491726
|
||||
2025-03-23 20:51:12.6050|DEBUG|OnDoc|
|
||||
2025-03-23 20:51:12.6140|DEBUG|OnDoc|
|
||||
|
||||
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.
6
Client/Diverses/SplashScreen.Designer.cs
generated
6
Client/Diverses/SplashScreen.Designer.cs
generated
@@ -52,7 +52,7 @@
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(164, 304);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(122, 26);
|
||||
this.label1.Size = new System.Drawing.Size(151, 31);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Version 1.0";
|
||||
//
|
||||
@@ -62,9 +62,9 @@
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(147, 330);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(150, 26);
|
||||
this.label2.Size = new System.Drawing.Size(186, 31);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "19. März 2025";
|
||||
this.label2.Text = "24. März 2025";
|
||||
//
|
||||
// SplashScreen
|
||||
//
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACo
|
||||
DQAAAk1TRnQBSQFMAgEBBwEAAVABAQFQAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
DQAAAk1TRnQBSQFMAgEBBwEAAVgBAQFYAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
||||
@@ -27,6 +27,8 @@ using BroadcastListener.Classes;
|
||||
using BroadcastListener.Interfaces;
|
||||
using static BroadcastListener.Classes.Factory;
|
||||
using Windows.Graphics.Display;
|
||||
using Windows.Foundation.Metadata;
|
||||
using System.Threading;
|
||||
|
||||
namespace OnDoc.DocMgmt
|
||||
{
|
||||
@@ -475,6 +477,7 @@ namespace OnDoc.DocMgmt
|
||||
{
|
||||
progressBarAdv1.Value = progressBarAdv1.Value + 1;
|
||||
Application.DoEvents();
|
||||
//Thread.Sleep(1000);
|
||||
|
||||
UCAllgemeineDokumentParam uc = (UCAllgemeineDokumentParam)tab.Controls[0];
|
||||
if (((idokumentid == "" || uc.genertated_dokumentid == idokumentid) && iuc==null) || uc==iuc)
|
||||
@@ -552,6 +555,7 @@ namespace OnDoc.DocMgmt
|
||||
if (uc.docgendata.erstellungsart == Erstellungsart.ErstellungInOffice)
|
||||
{
|
||||
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
||||
filename = AppParams.tempdir + dok.dokumentname;
|
||||
string filename_temp = filename + ".tmp";
|
||||
System.IO.File.WriteAllBytes(filename_temp, Convert.FromBase64String(dok.dokument));
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
@@ -559,12 +563,14 @@ namespace OnDoc.DocMgmt
|
||||
db.Dok_in_Bearbeitung(1,dokdata.Dokumentid, AppParams.CurrentMitarbeiter);
|
||||
db = null;
|
||||
System.IO.File.Delete(filename_temp);
|
||||
Logging.Logging.Debug("Before Processwatch","DonDoc",dokumentid);
|
||||
clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
|
||||
|
||||
}
|
||||
if (uc.docgendata.erstellungsart == Erstellungsart.DokumentBearbeiten)
|
||||
{
|
||||
string filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
||||
//filename = AppParams.tempdir + dok.dokumentname;
|
||||
System.IO.File.WriteAllBytes(filename, Convert.FromBase64String(dok.dokument));
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Save_To_DB(dokdata.Dokumentid, filename);
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
this.sfButton2.Name = "sfButton2";
|
||||
this.sfButton2.Size = new System.Drawing.Size(96, 28);
|
||||
this.sfButton2.TabIndex = 2;
|
||||
this.sfButton2.Text = "Abbruch";
|
||||
this.sfButton2.Text = "Abbrechen";
|
||||
this.sfButton2.Click += new System.EventHandler(this.sfButton2_Click);
|
||||
//
|
||||
// sfButton3
|
||||
|
||||
@@ -78,115 +78,124 @@ namespace OnDoc.Klassen
|
||||
bool excel = false;
|
||||
bool pdf = false;
|
||||
bool found = false;
|
||||
//watchtimer.Enabled = false;
|
||||
watchtimer.Enabled = false;
|
||||
found = false;
|
||||
Logging.Logging.Debug("Start Watch_Process:"+ DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch","" );
|
||||
|
||||
foreach (FileToCheck fc in FilestoCheck)
|
||||
try
|
||||
{
|
||||
if (fc.filedatetime < DateTime.Now.AddSeconds(-5))
|
||||
foreach (FileToCheck fc in FilestoCheck)
|
||||
{
|
||||
found = false;
|
||||
word = false;
|
||||
excel = false;
|
||||
pdf = false;
|
||||
|
||||
Logging.Logging.Debug(fc.application + " / FileChek " + fc.filename + " / " + fc.filedatetime.ToString("yyyy-MM-dd hh:mm:ss") + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
if (fc.application == "Word") { word = true; }
|
||||
if (fc.application == "Excel") { excel = true; }
|
||||
if (fc.application == "PDF") { pdf = true; }
|
||||
|
||||
if (word)
|
||||
if (fc.filedatetime < DateTime.Now.AddSeconds(-5))
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
Process[] localByName = Process.GetProcessesByName("WINWORD");
|
||||
found = false;
|
||||
word = false;
|
||||
excel = false;
|
||||
pdf = false;
|
||||
|
||||
foreach (Process p in localByName)
|
||||
Logging.Logging.Debug(fc.application + " / FileChek " + fc.filename + " / " + fc.filedatetime.ToString("yyyy-MM-dd hh:mm:ss") + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
if (fc.application == "Word") { word = true; }
|
||||
if (fc.application == "Excel") { excel = true; }
|
||||
if (fc.application == "PDF") { pdf = true; }
|
||||
|
||||
if (word)
|
||||
{
|
||||
string owner = GetProcessOwner(p.Id);
|
||||
owner = owner.ToUpper();
|
||||
Logging.Logging.Debug(AppParams.systemtgnummer+"/"+AppParams.currenttgnummer+"/"+owner+"/"+fc.dokumentid + "/" + p.MainWindowTitle, "", "");
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 ||
|
||||
(p.MainWindowTitle.Trim() == "" && owner.Contains(AppParams.systemtgnummer.ToUpper())))
|
||||
Thread.Sleep(200);
|
||||
Process[] localByName = Process.GetProcessesByName("WINWORD");
|
||||
|
||||
foreach (Process p in localByName)
|
||||
{
|
||||
if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
found = true;
|
||||
save_to_db(fc);
|
||||
|
||||
string owner = GetProcessOwner(p.Id);
|
||||
owner = owner.ToUpper();
|
||||
Logging.Logging.Debug(AppParams.systemtgnummer + "/" + AppParams.currenttgnummer + "/" + owner + "/" + fc.dokumentid + "/" + p.MainWindowTitle, "", "");
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 ||
|
||||
(p.MainWindowTitle.Trim() == "" && owner.Contains(AppParams.systemtgnummer.ToUpper())))
|
||||
{
|
||||
if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
found = true;
|
||||
save_to_db(fc);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//foreach (Process p in localByName)
|
||||
//{
|
||||
// Logging.Logging.Debug(fc.dokumentid + "/" + p.MainWindowTitle, "", "");
|
||||
// if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 || p.MainWindowTitle.Trim() == "")
|
||||
|
||||
// {
|
||||
// if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
// found = true;
|
||||
// save_to_db(fc);
|
||||
|
||||
// break;
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
//foreach (Process p in localByName)
|
||||
//{
|
||||
// Logging.Logging.Debug(fc.dokumentid + "/" + p.MainWindowTitle, "", "");
|
||||
// if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 || p.MainWindowTitle.Trim() == "")
|
||||
|
||||
// {
|
||||
// if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
// found = true;
|
||||
// save_to_db(fc);
|
||||
|
||||
// break;
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
if (excel)
|
||||
{
|
||||
Process[] localByName = Process.GetProcessesByName("EXCEL");
|
||||
foreach (Process p in localByName)
|
||||
if (excel)
|
||||
{
|
||||
string owner = GetProcessOwner(p.Id);
|
||||
owner = owner.ToUpper();
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 ||
|
||||
(p.MainWindowTitle.Trim() == "" && owner.Contains(AppParams.systemtgnummer.ToUpper())))
|
||||
Process[] localByName = Process.GetProcessesByName("EXCEL");
|
||||
foreach (Process p in localByName)
|
||||
{
|
||||
if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
found = true;
|
||||
save_to_db(fc);
|
||||
string owner = GetProcessOwner(p.Id);
|
||||
owner = owner.ToUpper();
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 ||
|
||||
(p.MainWindowTitle.Trim() == "" && owner.Contains(AppParams.systemtgnummer.ToUpper())))
|
||||
{
|
||||
if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
found = true;
|
||||
save_to_db(fc);
|
||||
}
|
||||
|
||||
}
|
||||
//Process[] localByName = Process.GetProcessesByName("EXCEL");
|
||||
//foreach (Process p in localByName)
|
||||
//{
|
||||
// if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 || p.MainWindowTitle.Trim() == "")
|
||||
// {
|
||||
// if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
// found = true;
|
||||
// save_to_db(fc);
|
||||
// }
|
||||
|
||||
//}
|
||||
}
|
||||
//Process[] localByName = Process.GetProcessesByName("EXCEL");
|
||||
//foreach (Process p in localByName)
|
||||
//{
|
||||
// if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 || p.MainWindowTitle.Trim() == "")
|
||||
// {
|
||||
// if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
// found = true;
|
||||
// save_to_db(fc);
|
||||
// }
|
||||
if (!found)
|
||||
{
|
||||
Logging.Logging.Debug("Not Found " + fc.filename + " / " + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
if (Check_Modified(fc) == true)
|
||||
{
|
||||
Save_File(fc.dokumentid, fc.filename);
|
||||
Logging.DocLog.Info("Dokument gespeichert und geschlossen", "Processwatch", fc.dokumentid, "", fc.filename);
|
||||
RemoveFromList(fc.dokumentid);
|
||||
Remove_Dok_in_Bearbeitung(fc.dokumentid);
|
||||
Remove_Dokumentbearbeitung_Zwingend(fc.dokumentid);
|
||||
Remove_Approvals(fc.dokumentid);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Logging.DocLog.Info("Dokument ohne speichern geschlossen", "Processwatch", fc.dokumentid, "", fc.filename);
|
||||
RemoveFromList(fc.dokumentid);
|
||||
Remove_Dok_in_Bearbeitung(fc.dokumentid);
|
||||
return;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
//}
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
Logging.Logging.Debug("Not Found " + fc.filename + " / " + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
if (Check_Modified(fc) == true)
|
||||
{
|
||||
Save_File(fc.dokumentid, fc.filename);
|
||||
Logging.DocLog.Info("Dokument gespeichert und geschlossen", "Processwatch", fc.dokumentid, "", fc.filename);
|
||||
RemoveFromList(fc.dokumentid);
|
||||
Remove_Dok_in_Bearbeitung(fc.dokumentid);
|
||||
Remove_Dokumentbearbeitung_Zwingend(fc.dokumentid);
|
||||
Remove_Approvals(fc.dokumentid);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Logging.DocLog.Info("Dokument ohne speichern geschlossen", "Processwatch", fc.dokumentid, "", fc.filename);
|
||||
RemoveFromList(fc.dokumentid);
|
||||
Remove_Dok_in_Bearbeitung(fc.dokumentid);
|
||||
return;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
watchtimer.Enabled = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logging.Logging.Debug("Error Processwatch", "OnDoc", ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
watchtimer.Enabled = true ;
|
||||
}
|
||||
//watchtimer.Enabled = true;
|
||||
|
||||
}
|
||||
private static void Remove_Dok_in_Bearbeitung(string dokumentid)
|
||||
{
|
||||
@@ -245,7 +254,13 @@ namespace OnDoc.Klassen
|
||||
private static bool Check_Modified(FileToCheck fc)
|
||||
{
|
||||
DateTime lwt = System.IO.File.GetLastWriteTime(fc.filename);
|
||||
if (lwt.Year < DateTime.Now.Year)
|
||||
{
|
||||
lwt = fc.filedatetime;
|
||||
lwt = fc.filedatetime.AddSeconds(+5);
|
||||
}
|
||||
int secdiff = (int)((lwt - fc.filedatetime).TotalSeconds);
|
||||
|
||||
Logging.Logging.Debug("Prozesswatch - Check Modified: " + lwt.ToString() + "," + fc.filedatetime.ToString(), "OnDoc", fc.dokumentid);
|
||||
//Logging.DocLog.Debug("Prozesswatch - Check Modified: " + lwt.ToString() + "," + fc.filedatetime.ToString(), "Processwatch", fc.dokumentid, "", fc.filename);
|
||||
//if ((lwt- fc.filedatetime).Seconds > 2)
|
||||
|
||||
@@ -16,6 +16,7 @@ using OnDoc.UIControls;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
|
||||
|
||||
namespace OnDoc
|
||||
{
|
||||
internal static class Program
|
||||
@@ -28,8 +29,7 @@ namespace OnDoc
|
||||
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||
/// </summary>
|
||||
private static Mutex mutex = null;
|
||||
const string AppId = "OnDoc5094533C-A613-4889-A0E3-8C28C130C6AA)";
|
||||
|
||||
const string AppId = "OnDoc5094533C-A613-4889-A0E3-8C28C130C6AA)";
|
||||
//static Start MyForm = new Start();
|
||||
///
|
||||
[STAThread]
|
||||
@@ -47,9 +47,9 @@ namespace OnDoc
|
||||
{
|
||||
|
||||
string debugstring;
|
||||
|
||||
if (args[0].ToString().ToUpper().Substring(args[0].ToString().Length - 4, 4) == ".EDK")
|
||||
{
|
||||
|
||||
AppParams.init();
|
||||
Database.DB db = new Database.DB(AppParams.connectionstring);
|
||||
string mitarbeiter = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
|
||||
@@ -67,11 +67,14 @@ namespace OnDoc
|
||||
System.Environment.Exit(0);
|
||||
return;
|
||||
}
|
||||
string destfile = AppParams.tempdir + DateTime.Now.ToString("yyyyMMddHHmmss") + "_tmpfile.edk";
|
||||
string destfile = AppParams.tempdir + RandomString(8)+ "_"+DateTime.Now.ToString("yyyyMMddHHmmss") + "_tmpfile.edk";
|
||||
|
||||
System.IO.File.Copy(args[0],destfile);
|
||||
Application.DoEvents();
|
||||
System.IO.File.Delete(args[0]);
|
||||
|
||||
//EDK_Data.Load_EDK_File(args[0]);
|
||||
Application.DoEvents();
|
||||
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -129,6 +132,14 @@ namespace OnDoc
|
||||
|
||||
|
||||
|
||||
}
|
||||
private static Random random = new Random();
|
||||
|
||||
public static string RandomString(int length)
|
||||
{
|
||||
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
return new string(Enumerable.Repeat(chars, length)
|
||||
.Select(s => s[random.Next(s.Length)]).ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,30 +154,7 @@ namespace OnDoc
|
||||
|
||||
private void Start_Load(object sender, EventArgs e)
|
||||
{
|
||||
//if (ExternalCall.sourceparam.Trim().ToString() !="" && ExternalCall.executed == false)
|
||||
//{
|
||||
// External_Call();
|
||||
//}
|
||||
//if (EDK_Data.toexecute == true)
|
||||
//{
|
||||
// exec_edk();
|
||||
//}
|
||||
//partnerTree1.mitarbeiternr = AppParams.CurrentMitarbeiter;
|
||||
|
||||
//DataSet ds = new DataSet();
|
||||
//System.Data.DataTable dataTable = new System.Data.DataTable();
|
||||
//dataTable.Columns.Add("ID");
|
||||
//dataTable.Columns.Add("ImageName");
|
||||
//System.Data.DataRow dr = dataTable.NewRow();
|
||||
//dr[0] = "1";
|
||||
//dr[1] = "Bildname";
|
||||
//dataTable.Rows.Add(dr);
|
||||
//ds.Tables.Add(dataTable);
|
||||
//ds.WriteXml(@"E:\Software-Projekte\OnDoc\Images\imageids.xml");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
62
Client/UIControls/DokList.Designer.cs
generated
62
Client/UIControls/DokList.Designer.cs
generated
@@ -209,14 +209,14 @@ namespace OnDoc.UICintrols
|
||||
this.gruppenÖffnenToolStripMenuItem,
|
||||
this.gruppenSchliessenToolStripMenuItem});
|
||||
this.ctxMenuDokList.Name = "ctxMenuDokList";
|
||||
this.ctxMenuDokList.Size = new System.Drawing.Size(342, 522);
|
||||
this.ctxMenuDokList.Size = new System.Drawing.Size(284, 522);
|
||||
this.ctxMenuDokList.Opening += new System.ComponentModel.CancelEventHandler(this.ctxMenuDokList_Opening);
|
||||
//
|
||||
// dokumentAnzeigenToolStripMenuItem
|
||||
//
|
||||
this.dokumentAnzeigenToolStripMenuItem.Image = global::OnDoc.Properties.Resources.ShowDoc_16x16_32;
|
||||
this.dokumentAnzeigenToolStripMenuItem.Name = "dokumentAnzeigenToolStripMenuItem";
|
||||
this.dokumentAnzeigenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.dokumentAnzeigenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.dokumentAnzeigenToolStripMenuItem.Text = "Dokument anzeigen";
|
||||
this.dokumentAnzeigenToolStripMenuItem.Click += new System.EventHandler(this.dokumentAnzeigenToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -224,7 +224,7 @@ namespace OnDoc.UICintrols
|
||||
//
|
||||
this.dokumentBearbeitenToolStripMenuItem.Image = global::OnDoc.Properties.Resources.EditDoc_16x16_32;
|
||||
this.dokumentBearbeitenToolStripMenuItem.Name = "dokumentBearbeitenToolStripMenuItem";
|
||||
this.dokumentBearbeitenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.dokumentBearbeitenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.dokumentBearbeitenToolStripMenuItem.Text = "Dokument bearbeiten";
|
||||
this.dokumentBearbeitenToolStripMenuItem.Click += new System.EventHandler(this.dokumentBearbeitenToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -232,27 +232,27 @@ namespace OnDoc.UICintrols
|
||||
//
|
||||
this.dokumentLöschenToolStripMenuItem.Image = global::OnDoc.Properties.Resources.DeleteDoc_16x16_32;
|
||||
this.dokumentLöschenToolStripMenuItem.Name = "dokumentLöschenToolStripMenuItem";
|
||||
this.dokumentLöschenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.dokumentLöschenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.dokumentLöschenToolStripMenuItem.Text = "Dokument löschen";
|
||||
this.dokumentLöschenToolStripMenuItem.Click += new System.EventHandler(this.dokumentLöschenToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem2
|
||||
//
|
||||
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(338, 6);
|
||||
this.toolStripMenuItem2.Size = new System.Drawing.Size(280, 6);
|
||||
//
|
||||
// zurUnterschriftenPrüfungToolStripMenuItem
|
||||
//
|
||||
this.zurUnterschriftenPrüfungToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Approval_16x16_32;
|
||||
this.zurUnterschriftenPrüfungToolStripMenuItem.Name = "zurUnterschriftenPrüfungToolStripMenuItem";
|
||||
this.zurUnterschriftenPrüfungToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.zurUnterschriftenPrüfungToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.zurUnterschriftenPrüfungToolStripMenuItem.Text = "Zur Unterschriften-Prüfung";
|
||||
this.zurUnterschriftenPrüfungToolStripMenuItem.Click += new System.EventHandler(this.zurUnterschriftenPrüfungToolStripMenuItem_Click);
|
||||
//
|
||||
// dokumentUnterzeichnenToolStripMenuItem
|
||||
//
|
||||
this.dokumentUnterzeichnenToolStripMenuItem.Name = "dokumentUnterzeichnenToolStripMenuItem";
|
||||
this.dokumentUnterzeichnenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.dokumentUnterzeichnenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.dokumentUnterzeichnenToolStripMenuItem.Text = "Dokument unterzeichnen";
|
||||
this.dokumentUnterzeichnenToolStripMenuItem.Visible = false;
|
||||
this.dokumentUnterzeichnenToolStripMenuItem.Click += new System.EventHandler(this.dokumentUnterzeichnenToolStripMenuItem_Click);
|
||||
@@ -261,7 +261,7 @@ namespace OnDoc.UICintrols
|
||||
//
|
||||
this.archivierenToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("archivierenToolStripMenuItem.Image")));
|
||||
this.archivierenToolStripMenuItem.Name = "archivierenToolStripMenuItem";
|
||||
this.archivierenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.archivierenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.archivierenToolStripMenuItem.Text = "Archivieren";
|
||||
this.archivierenToolStripMenuItem.Click += new System.EventHandler(this.archivierenToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -269,7 +269,7 @@ namespace OnDoc.UICintrols
|
||||
//
|
||||
this.druckenToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Printer_16x16_32;
|
||||
this.druckenToolStripMenuItem.Name = "druckenToolStripMenuItem";
|
||||
this.druckenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.druckenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.druckenToolStripMenuItem.Text = "Drucken";
|
||||
this.druckenToolStripMenuItem.Visible = false;
|
||||
this.druckenToolStripMenuItem.Click += new System.EventHandler(this.druckenToolStripMenuItem_Click);
|
||||
@@ -277,13 +277,13 @@ namespace OnDoc.UICintrols
|
||||
// toolStripMenuItem4
|
||||
//
|
||||
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(338, 6);
|
||||
this.toolStripMenuItem4.Size = new System.Drawing.Size(280, 6);
|
||||
//
|
||||
// dokumentFürPartnerErstellenToolStripMenuItem
|
||||
//
|
||||
this.dokumentFürPartnerErstellenToolStripMenuItem.Image = global::OnDoc.Properties.Resources.NewDoc_16x16_32;
|
||||
this.dokumentFürPartnerErstellenToolStripMenuItem.Name = "dokumentFürPartnerErstellenToolStripMenuItem";
|
||||
this.dokumentFürPartnerErstellenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.dokumentFürPartnerErstellenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.dokumentFürPartnerErstellenToolStripMenuItem.Text = "Dokument für Kunde erstellen";
|
||||
this.dokumentFürPartnerErstellenToolStripMenuItem.Click += new System.EventHandler(this.dokumentFürPartnerErstellenToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -291,19 +291,19 @@ namespace OnDoc.UICintrols
|
||||
//
|
||||
this.dokumentKopierenToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Copy_16x16_32;
|
||||
this.dokumentKopierenToolStripMenuItem.Name = "dokumentKopierenToolStripMenuItem";
|
||||
this.dokumentKopierenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.dokumentKopierenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.dokumentKopierenToolStripMenuItem.Text = "Dokument kopieren";
|
||||
this.dokumentKopierenToolStripMenuItem.Click += new System.EventHandler(this.dokumentKopierenToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(338, 6);
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(280, 6);
|
||||
//
|
||||
// barcodeDemoToolStripMenuItem
|
||||
//
|
||||
this.barcodeDemoToolStripMenuItem.Name = "barcodeDemoToolStripMenuItem";
|
||||
this.barcodeDemoToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.barcodeDemoToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.barcodeDemoToolStripMenuItem.Text = "Barcode-Demo";
|
||||
this.barcodeDemoToolStripMenuItem.Visible = false;
|
||||
this.barcodeDemoToolStripMenuItem.Click += new System.EventHandler(this.barcodeDemoToolStripMenuItem_Click);
|
||||
@@ -311,7 +311,7 @@ namespace OnDoc.UICintrols
|
||||
// vertragPDFDEMOToolStripMenuItem
|
||||
//
|
||||
this.vertragPDFDEMOToolStripMenuItem.Name = "vertragPDFDEMOToolStripMenuItem";
|
||||
this.vertragPDFDEMOToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.vertragPDFDEMOToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.vertragPDFDEMOToolStripMenuItem.Text = "Vertrag_PDF_DEMO";
|
||||
this.vertragPDFDEMOToolStripMenuItem.Visible = false;
|
||||
this.vertragPDFDEMOToolStripMenuItem.Click += new System.EventHandler(this.vertragPDFDEMOToolStripMenuItem_Click);
|
||||
@@ -319,14 +319,14 @@ namespace OnDoc.UICintrols
|
||||
// zellenwertInZwischenablageKopierenToolStripMenuItem
|
||||
//
|
||||
this.zellenwertInZwischenablageKopierenToolStripMenuItem.Name = "zellenwertInZwischenablageKopierenToolStripMenuItem";
|
||||
this.zellenwertInZwischenablageKopierenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.zellenwertInZwischenablageKopierenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.zellenwertInZwischenablageKopierenToolStripMenuItem.Text = "Zellenwert in Zwischenablage kopieren";
|
||||
this.zellenwertInZwischenablageKopierenToolStripMenuItem.Click += new System.EventHandler(this.zellenwertInZwischenablageKopierenToolStripMenuItem_Click);
|
||||
//
|
||||
// pDFGenerierenToolStripMenuItem
|
||||
//
|
||||
this.pDFGenerierenToolStripMenuItem.Name = "pDFGenerierenToolStripMenuItem";
|
||||
this.pDFGenerierenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.pDFGenerierenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.pDFGenerierenToolStripMenuItem.Text = "PDF generieren";
|
||||
this.pDFGenerierenToolStripMenuItem.Visible = false;
|
||||
this.pDFGenerierenToolStripMenuItem.Click += new System.EventHandler(this.pDFGenerierenToolStripMenuItem_Click);
|
||||
@@ -334,14 +334,14 @@ namespace OnDoc.UICintrols
|
||||
// dokumentAnVersandstrasseToolStripMenuItem
|
||||
//
|
||||
this.dokumentAnVersandstrasseToolStripMenuItem.Name = "dokumentAnVersandstrasseToolStripMenuItem";
|
||||
this.dokumentAnVersandstrasseToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.dokumentAnVersandstrasseToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.dokumentAnVersandstrasseToolStripMenuItem.Text = "Dokument an Versandstrasse";
|
||||
this.dokumentAnVersandstrasseToolStripMenuItem.Visible = false;
|
||||
//
|
||||
// wordInterOPEditToolStripMenuItem
|
||||
//
|
||||
this.wordInterOPEditToolStripMenuItem.Name = "wordInterOPEditToolStripMenuItem";
|
||||
this.wordInterOPEditToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.wordInterOPEditToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.wordInterOPEditToolStripMenuItem.Text = "Word InterOP Edit";
|
||||
this.wordInterOPEditToolStripMenuItem.Visible = false;
|
||||
this.wordInterOPEditToolStripMenuItem.Click += new System.EventHandler(this.wordInterOPEditToolStripMenuItem_Click);
|
||||
@@ -350,33 +350,33 @@ namespace OnDoc.UICintrols
|
||||
//
|
||||
this.attributeAnzeigenVersteckenToolStripMenuItem.Image = global::OnDoc.Properties.Resources.Attribut_16x16_32;
|
||||
this.attributeAnzeigenVersteckenToolStripMenuItem.Name = "attributeAnzeigenVersteckenToolStripMenuItem";
|
||||
this.attributeAnzeigenVersteckenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.attributeAnzeigenVersteckenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.attributeAnzeigenVersteckenToolStripMenuItem.Text = "Attribute ein- / ausblenden";
|
||||
this.attributeAnzeigenVersteckenToolStripMenuItem.Click += new System.EventHandler(this.attributeAnzeigenVersteckenToolStripMenuItem_Click);
|
||||
//
|
||||
// historyToolStripMenuItem
|
||||
//
|
||||
this.historyToolStripMenuItem.Name = "historyToolStripMenuItem";
|
||||
this.historyToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.historyToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.historyToolStripMenuItem.Text = "History";
|
||||
this.historyToolStripMenuItem.Click += new System.EventHandler(this.historyToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripMenuItem3
|
||||
//
|
||||
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(338, 6);
|
||||
this.toolStripMenuItem3.Size = new System.Drawing.Size(280, 6);
|
||||
//
|
||||
// gruppenÖffnenToolStripMenuItem
|
||||
//
|
||||
this.gruppenÖffnenToolStripMenuItem.Name = "gruppenÖffnenToolStripMenuItem";
|
||||
this.gruppenÖffnenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.gruppenÖffnenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.gruppenÖffnenToolStripMenuItem.Text = "Alle Gruppen aufklappen";
|
||||
this.gruppenÖffnenToolStripMenuItem.Click += new System.EventHandler(this.gruppenÖffnenToolStripMenuItem_Click);
|
||||
//
|
||||
// gruppenSchliessenToolStripMenuItem
|
||||
//
|
||||
this.gruppenSchliessenToolStripMenuItem.Name = "gruppenSchliessenToolStripMenuItem";
|
||||
this.gruppenSchliessenToolStripMenuItem.Size = new System.Drawing.Size(341, 26);
|
||||
this.gruppenSchliessenToolStripMenuItem.Size = new System.Drawing.Size(283, 26);
|
||||
this.gruppenSchliessenToolStripMenuItem.Text = "Alle Gruppen einklappen";
|
||||
this.gruppenSchliessenToolStripMenuItem.Click += new System.EventHandler(this.gruppenSchliessenToolStripMenuItem_Click);
|
||||
//
|
||||
@@ -400,7 +400,7 @@ namespace OnDoc.UICintrols
|
||||
// toolStripLabel1
|
||||
//
|
||||
this.toolStripLabel1.Name = "toolStripLabel1";
|
||||
this.toolStripLabel1.Size = new System.Drawing.Size(143, 22);
|
||||
this.toolStripLabel1.Size = new System.Drawing.Size(116, 22);
|
||||
this.toolStripLabel1.Text = "Dokument-Vorschau";
|
||||
//
|
||||
// tsrbvorschau
|
||||
@@ -427,7 +427,7 @@ namespace OnDoc.UICintrols
|
||||
this.tsbtnpreviewno.Image = ((System.Drawing.Image)(resources.GetObject("tsbtnpreviewno.Image")));
|
||||
this.tsbtnpreviewno.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.tsbtnpreviewno.Name = "tsbtnpreviewno";
|
||||
this.tsbtnpreviewno.Size = new System.Drawing.Size(29, 22);
|
||||
this.tsbtnpreviewno.Size = new System.Drawing.Size(24, 22);
|
||||
this.tsbtnpreviewno.Text = "Keine Vorschau";
|
||||
//
|
||||
// tsbtnpreviewbottom
|
||||
@@ -436,7 +436,7 @@ namespace OnDoc.UICintrols
|
||||
this.tsbtnpreviewbottom.Image = ((System.Drawing.Image)(resources.GetObject("tsbtnpreviewbottom.Image")));
|
||||
this.tsbtnpreviewbottom.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.tsbtnpreviewbottom.Name = "tsbtnpreviewbottom";
|
||||
this.tsbtnpreviewbottom.Size = new System.Drawing.Size(29, 22);
|
||||
this.tsbtnpreviewbottom.Size = new System.Drawing.Size(24, 22);
|
||||
this.tsbtnpreviewbottom.Text = "Vorschau unten";
|
||||
//
|
||||
// tsbtnpreviewright
|
||||
@@ -445,7 +445,7 @@ namespace OnDoc.UICintrols
|
||||
this.tsbtnpreviewright.Image = ((System.Drawing.Image)(resources.GetObject("tsbtnpreviewright.Image")));
|
||||
this.tsbtnpreviewright.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.tsbtnpreviewright.Name = "tsbtnpreviewright";
|
||||
this.tsbtnpreviewright.Size = new System.Drawing.Size(29, 22);
|
||||
this.tsbtnpreviewright.Size = new System.Drawing.Size(24, 22);
|
||||
this.tsbtnpreviewright.Text = "Vorschau rechts";
|
||||
//
|
||||
// splitContainer1
|
||||
@@ -1384,19 +1384,19 @@ namespace OnDoc.UICintrols
|
||||
this.gruppenÖffnenToolStripMenuItem1,
|
||||
this.gruppenSchliessenToolStripMenuItem1});
|
||||
this.ctxMenuGroups.Name = "ctxMenuGroups";
|
||||
this.ctxMenuGroups.Size = new System.Drawing.Size(244, 52);
|
||||
this.ctxMenuGroups.Size = new System.Drawing.Size(206, 48);
|
||||
//
|
||||
// gruppenÖffnenToolStripMenuItem1
|
||||
//
|
||||
this.gruppenÖffnenToolStripMenuItem1.Name = "gruppenÖffnenToolStripMenuItem1";
|
||||
this.gruppenÖffnenToolStripMenuItem1.Size = new System.Drawing.Size(243, 24);
|
||||
this.gruppenÖffnenToolStripMenuItem1.Size = new System.Drawing.Size(205, 22);
|
||||
this.gruppenÖffnenToolStripMenuItem1.Text = "Alle Gruppen aufklappen";
|
||||
this.gruppenÖffnenToolStripMenuItem1.Click += new System.EventHandler(this.gruppenÖffnenToolStripMenuItem1_Click);
|
||||
//
|
||||
// gruppenSchliessenToolStripMenuItem1
|
||||
//
|
||||
this.gruppenSchliessenToolStripMenuItem1.Name = "gruppenSchliessenToolStripMenuItem1";
|
||||
this.gruppenSchliessenToolStripMenuItem1.Size = new System.Drawing.Size(243, 24);
|
||||
this.gruppenSchliessenToolStripMenuItem1.Size = new System.Drawing.Size(205, 22);
|
||||
this.gruppenSchliessenToolStripMenuItem1.Text = "Alle Gruppen einklappen";
|
||||
this.gruppenSchliessenToolStripMenuItem1.Click += new System.EventHandler(this.gruppenSchliessenToolStripMenuItem1_Click);
|
||||
//
|
||||
|
||||
@@ -59,6 +59,7 @@ using Syncfusion.Windows.Forms.Chart;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace OnDoc.UICintrols
|
||||
{
|
||||
public partial class DokList : UserControl, IMessageListener1
|
||||
@@ -113,7 +114,7 @@ namespace OnDoc.UICintrols
|
||||
{
|
||||
GridDateTimeColumn gdt = e.Column as GridDateTimeColumn;
|
||||
gdt.Pattern = (Syncfusion.WinForms.Input.Enums.DateTimePattern)Syncfusion.Windows.Shared.DateTimePattern.FullDateTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -286,10 +287,11 @@ namespace OnDoc.UICintrols
|
||||
catch { }
|
||||
finally { db = null; }
|
||||
}
|
||||
|
||||
|
||||
public void refresh_dokumente(string layout = "")
|
||||
{
|
||||
update_currentview();
|
||||
|
||||
if (datafilter != "")
|
||||
{
|
||||
refresh_dokumente_filtered(layout);
|
||||
@@ -299,6 +301,7 @@ namespace OnDoc.UICintrols
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
refresh_view(currentview);
|
||||
|
||||
}
|
||||
@@ -308,21 +311,24 @@ namespace OnDoc.UICintrols
|
||||
int selectedIndex = RibbonCBProfil.SelectedIndex;
|
||||
|
||||
profilnr = Convert.ToInt32(RibbonCBProfil.SelectedItem.Tag.ToString());
|
||||
|
||||
|
||||
|
||||
|
||||
// profilnr = Convert.ToInt32(RibbonCBProfil.SelectedItem.Tag.ToString());
|
||||
System.Data.DataTable dokumente = new System.Data.DataTable();
|
||||
|
||||
|
||||
dokumente = db.Get_Dokumente(partnernr, docartnr, profilnr, forMaNr, Search_Docid, false);
|
||||
Logging.Logging.Debug("Get_Dokumente", "", "");
|
||||
|
||||
dokumente = db.Get_Dokumente(partnernr, docartnr, profilnr, forMaNr, Search_Docid, false);
|
||||
|
||||
// TableHelper.SetColumnsOrder(dokumente, "trefferliste");
|
||||
if (layout == "") { layout = "trefferliste_relaunch"; }
|
||||
TableHelper.FormatTable(ref dokumente, layout, ref this.sfDataGrid1);
|
||||
|
||||
//this.sfDataGrid1.DataSource = dokumente;
|
||||
this.sfDataGrid1.DataSource = dokumente;
|
||||
sfDataGrid1.View.AutoExpandGroups = true;
|
||||
this.timer1.Enabled = true;
|
||||
Logging.Logging.Debug("refresh_view", "", "");
|
||||
|
||||
refresh_view(currentview);
|
||||
//foreach (GridColumn gd in sfDataGrid1.Columns)
|
||||
//{
|
||||
@@ -512,7 +518,7 @@ namespace OnDoc.UICintrols
|
||||
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
catch { }
|
||||
}
|
||||
public void dokument_bearbeiten(string dokid, bool newdok = false)
|
||||
{
|
||||
@@ -528,8 +534,8 @@ namespace OnDoc.UICintrols
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
if (MessageBox.Show("Das Dokument wird aktuell bearbeitet."+Environment.NewLine+ Environment.NewLine + "Sperrung aufheben?" +Environment.NewLine+Environment.NewLine+"Bitte vorgängig prüfen, ob das Dokument nicht mehr in Word/Excel geöffnet ist!","Dokumentsperrung aufheben",MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
if (MessageBox.Show("Das Dokument wird aktuell bearbeitet." + Environment.NewLine + Environment.NewLine + "Sperrung aufheben?" + Environment.NewLine + Environment.NewLine + "Bitte vorgängig prüfen, ob das Dokument nicht mehr in Word/Excel geöffnet ist!", "Dokumentsperrung aufheben", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
clsProcessWatch.RemoveFromList(dokid);
|
||||
}
|
||||
else
|
||||
@@ -587,16 +593,16 @@ namespace OnDoc.UICintrols
|
||||
db1 = null;
|
||||
break;
|
||||
case 1:
|
||||
Cursor = Cursors.WaitCursor;
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
selected_dokumentid = dokbearbeitung.dokumentid;
|
||||
selected_partnernr = dokbearbeitung.partnernr.ToString(); ;
|
||||
interop = dokbearbeitung.interop;
|
||||
runmacros = dokbearbeitung.runmacros;
|
||||
dok = GetDoc(false);
|
||||
OpenDoc(dok, true, interop, false);
|
||||
Cursor = Cursors.Default;
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
Cursor = Cursors.WaitCursor;
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
selected_dokumentid = dokbearbeitung.dokumentid;
|
||||
selected_partnernr = dokbearbeitung.partnernr.ToString(); ;
|
||||
interop = dokbearbeitung.interop;
|
||||
runmacros = dokbearbeitung.runmacros;
|
||||
dok = GetDoc(false);
|
||||
OpenDoc(dok, true, interop, false);
|
||||
Cursor = Cursors.Default;
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
break;
|
||||
case 6:
|
||||
//DB db1 = new DB(AppParams.connectionstring);
|
||||
@@ -605,7 +611,7 @@ namespace OnDoc.UICintrols
|
||||
interop = dokbearbeitung.interop;
|
||||
//runmacros = dokbearbeitung.runmacros;
|
||||
string filename = dokbearbeitung.filename;
|
||||
|
||||
|
||||
string ext = System.IO.Path.GetExtension(filename);
|
||||
string apptype = "";
|
||||
switch (ext.ToUpper())
|
||||
@@ -627,7 +633,7 @@ namespace OnDoc.UICintrols
|
||||
break;
|
||||
}
|
||||
|
||||
Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", "");
|
||||
Logging.Logging.Debug("Doklist Docfunction=6", "Doklist", "");
|
||||
//db1.Dok_in_Bearbeitung(1, selected_dokumentid, AppParams.CurrentMitarbeiter);
|
||||
//db1 = null;
|
||||
clsProcessWatch.AddToList(selected_dokumentid, filename, apptype);
|
||||
@@ -733,7 +739,7 @@ namespace OnDoc.UICintrols
|
||||
case "D":
|
||||
clsFileHelper fh = new clsFileHelper();
|
||||
string tempfilename = "";
|
||||
|
||||
|
||||
tempfilename = fh.save_temp_file(dok.dokument, selected_dokumentid, AppParams.tempdir, dok.extension, dok.dokumentname);
|
||||
//System.Diagnostics.Process.Start(tempfilename);
|
||||
interop = true;
|
||||
@@ -776,7 +782,7 @@ namespace OnDoc.UICintrols
|
||||
break;
|
||||
case "P":
|
||||
clsFileHelper fh3 = new clsFileHelper();
|
||||
tempfilename = fh3.save_temp_file(dok.dokument, selected_dokumentid, AppParams.tempdir, dok.extension,dok.dokumentname );
|
||||
tempfilename = fh3.save_temp_file(dok.dokument, selected_dokumentid, AppParams.tempdir, dok.extension, dok.dokumentname);
|
||||
System.Diagnostics.Process.Start(tempfilename);
|
||||
if (editdoc == true)
|
||||
{
|
||||
@@ -874,13 +880,18 @@ namespace OnDoc.UICintrols
|
||||
|
||||
private void update_currentview()
|
||||
{
|
||||
currentview["Preview"] = tsrbvorschau.SelectedIndex;
|
||||
if (RibbonButtonAttributeEinAusblenden.Checked) { currentview["Attributes"] = 1; } else { currentview["Attributes"] = 0; }
|
||||
currentview["Splitterdistance"] = splitContainer1.SplitterDistance;
|
||||
MemoryStream ms = new MemoryStream();
|
||||
//gaga
|
||||
this.sfDataGrid1.Serialize(ms);
|
||||
currentview["Gridsettings"] = Convert.ToBase64String(ms.ToArray());
|
||||
try
|
||||
{
|
||||
currentview["Preview"] = tsrbvorschau.SelectedIndex;
|
||||
if (RibbonButtonAttributeEinAusblenden.Checked) { currentview["Attributes"] = 1; } else { currentview["Attributes"] = 0; }
|
||||
currentview["Splitterdistance"] = splitContainer1.SplitterDistance;
|
||||
MemoryStream ms = new MemoryStream();
|
||||
|
||||
this.sfDataGrid1.Serialize(ms);
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
currentview["Gridsettings"] = Convert.ToBase64String(ms.ToArray());
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void RibbonBtnVorschauUnten_Click(object sender, EventArgs e)
|
||||
@@ -1116,7 +1127,7 @@ namespace OnDoc.UICintrols
|
||||
if (records.Count < 1) { return; }
|
||||
|
||||
if (!row_selected()) return;
|
||||
InputDialog ma = new InputDialog(true, "Verantwortlichkeit wechseln zu","Verantwortlichkeit zuweisen");
|
||||
InputDialog ma = new InputDialog(true, "Verantwortlichkeit wechseln zu", "Verantwortlichkeit zuweisen");
|
||||
ma.ShowDialog();
|
||||
if (ma.DialogResult == DialogResult.OK)
|
||||
{
|
||||
@@ -1135,7 +1146,7 @@ namespace OnDoc.UICintrols
|
||||
|
||||
}
|
||||
dB = null;
|
||||
|
||||
|
||||
refresh_dokumente();
|
||||
}
|
||||
}
|
||||
@@ -1162,6 +1173,7 @@ namespace OnDoc.UICintrols
|
||||
public void hide_panels()
|
||||
{
|
||||
refresh_ansichten("");
|
||||
set_functions();
|
||||
this.RibbonButtonFavoriten.Visible = false;
|
||||
this.RibbonPanelSuche.Visible = false;
|
||||
this.RibbonPannelAproval.Visible = false;
|
||||
@@ -1182,6 +1194,7 @@ namespace OnDoc.UICintrols
|
||||
this.RibbonButtonVorschauRechts.Visible = false;
|
||||
this.RibbonBtnVorschauUnten.Visible = false;
|
||||
this.ribbonTabDokpaket_Serienbrief.Visible = false;
|
||||
|
||||
//this.ribbonButtonVersandstrasse.Visible = false;
|
||||
this.ribbonTabDokpaket_Serienbrief.Visible = false;
|
||||
this.ribbonTabProfil.Visible = false;
|
||||
@@ -1200,7 +1213,8 @@ namespace OnDoc.UICintrols
|
||||
{
|
||||
var selectedItem = e.DataRow;
|
||||
var dataRow = (e.DataRow.RowData as DataRowView).Row;
|
||||
if (dataRow["Prüfung_Reghts"].ToString().Contains("Abgelehnt")){
|
||||
if (dataRow["Prüfung_Reghts"].ToString().Contains("Abgelehnt"))
|
||||
{
|
||||
e.Style.BackColor = Color.Red;
|
||||
}
|
||||
|
||||
@@ -1290,7 +1304,7 @@ namespace OnDoc.UICintrols
|
||||
}
|
||||
if (dataRow[0].ToString().Substring(0, 1).ToUpper() == "X")
|
||||
{
|
||||
if (Convert.ToBoolean(dataRow["Bearbeitung_Zwingend"]) == false )
|
||||
if (Convert.ToBoolean(dataRow["Bearbeitung_Zwingend"]) == false)
|
||||
if (Convert.ToBoolean(dataRow["toapprove"]) == true)
|
||||
{
|
||||
if (Convert.ToBoolean(dataRow["approved"]) == true)
|
||||
@@ -1438,11 +1452,11 @@ namespace OnDoc.UICintrols
|
||||
{
|
||||
DOCGEN.DocGet dg = new DocGet(AppParams.connectionstring);
|
||||
//dg.GetDocAsPDF(selected_dokumentid);
|
||||
clsdok dok = new clsdok("", "", "", "" );
|
||||
clsdok dok = new clsdok("", "", "", "");
|
||||
dok = dg.GetDocAsFinalPDF(selected_dokumentid);
|
||||
clsFileHelper fh = new clsFileHelper();
|
||||
string tempfilename = "";
|
||||
tempfilename = fh.save_temp_file(dok.dokument, selected_dokumentid, AppParams.tempdir, dok.extension,dok.dokumentname);
|
||||
tempfilename = fh.save_temp_file(dok.dokument, selected_dokumentid, AppParams.tempdir, dok.extension, dok.dokumentname);
|
||||
}
|
||||
|
||||
private void ribbonButtonNativ_Click(object sender, EventArgs e)
|
||||
@@ -1466,14 +1480,14 @@ namespace OnDoc.UICintrols
|
||||
{
|
||||
StreamReader reader = new StreamReader(response.GetResponseStream());
|
||||
string responseContent = reader.ReadToEnd();
|
||||
if (responseContent.Contains("Hinweismeldung:"))
|
||||
if (responseContent.Contains("Hinweismeldung:"))
|
||||
{
|
||||
MessageBox.Show("Die Archivierung des Dokumentes " + documentid + " wurde nicht durchgeführt:" + Environment.NewLine + responseContent);
|
||||
MessageBox.Show("Die Archivierung des Dokumentes " + documentid + " wurde nicht durchgeführt:" + Environment.NewLine + responseContent);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Logging.DocLog.Info("Dokument archiviert", "OnDoc", documentid, "", "Dokument archiviert und abgeschlossen");
|
||||
Logging.DocLog.Info("Dokument archiviert", "OnDoc", documentid, "", "Dokument archiviert und abgeschlossen");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1568,39 +1582,59 @@ namespace OnDoc.UICintrols
|
||||
//refresh_dokumente();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private Boolean check_versandpaket_bp(ref List<Versandpaket> pakete,int partnernr)
|
||||
{
|
||||
foreach (Versandpaket vp in pakete)
|
||||
{
|
||||
if (vp.partnernr == partnernr) { return true; break; }
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
private void ribbonButtonVersandstrasse_Click(object sender, EventArgs e)
|
||||
{
|
||||
Versandpakete versandpakete = new Versandpakete();
|
||||
Versandpaket paket = new Versandpaket();
|
||||
|
||||
|
||||
paket.Versandoption = "1";
|
||||
paket.Mitteilung = "";
|
||||
paket.GAS = "";
|
||||
paket.GASAdresse = "";
|
||||
paket.PaketNr = "1";
|
||||
|
||||
|
||||
|
||||
var records = sfDataGrid1.View.GetSelectedRecords();
|
||||
if (records.Count < 1) { return; }
|
||||
|
||||
// string[] selectedDokument = new string[records.Count];
|
||||
int i = 0;
|
||||
paket.Dokument = new List<Versanddokument>();
|
||||
|
||||
List<Versandpaket> versandpakete = new List <Versandpaket>();
|
||||
foreach (var record in records)
|
||||
{
|
||||
|
||||
var datarow = record as DataRowView;
|
||||
paket.Dokument.Add(new Versanddokument(datarow["dokumentid"].ToString(), datarow["doktyp"].ToString(), datarow["partner-nr"].ToString()));
|
||||
i++;
|
||||
}
|
||||
versandpakete.paket = new List<Versandpaket>();
|
||||
versandpakete.paket.Add(paket);
|
||||
OnDoc.Versandstrasse.Versandstrasse vs = new OnDoc.Versandstrasse.Versandstrasse(versandpakete);
|
||||
|
||||
if (check_versandpaket_bp(ref versandpakete, Convert.ToInt32(datarow["partner-nr"])))
|
||||
{
|
||||
foreach(Versandpaket versandpaket in versandpakete)
|
||||
{
|
||||
if (versandpaket.partnernr== Convert.ToInt32(datarow["partner-nr"]))
|
||||
{
|
||||
versandpaket.Dokument.Add(new Versanddokument(datarow["dokumentid"].ToString(), datarow["doktyp"].ToString(), datarow["partner-nr"].ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Versandpaket vp = new Versandpaket();
|
||||
vp.Dokument = new List <Versanddokument>();
|
||||
vp.partnernr = Convert.ToInt32(datarow["partner-nr"]);
|
||||
vp.Versandoption = "1";
|
||||
vp.Mitteilung = "";
|
||||
vp.GAS = "";
|
||||
vp.GASAdresse = "";
|
||||
vp.PaketNr = i.ToString();
|
||||
vp.Dokument.Add(new Versanddokument(datarow["dokumentid"].ToString(), datarow["doktyp"].ToString(), datarow["partner-nr"].ToString()));
|
||||
i++;
|
||||
versandpakete.Add(vp);
|
||||
|
||||
}
|
||||
}
|
||||
OnDoc.Versandstrasse.Versandstrasse vs = new OnDoc.Versandstrasse.Versandstrasse(versandpakete);
|
||||
vs.Show();
|
||||
dokumentAnVersandstrasseToolStripMenuItem.Visible = true;
|
||||
|
||||
}
|
||||
|
||||
private void RibbonButtonFavoriten_Click(object sender, EventArgs e)
|
||||
@@ -1797,7 +1831,7 @@ namespace OnDoc.UICintrols
|
||||
|
||||
private void ribbonGroupMitarbeiter_Click(object sender, EventArgs e)
|
||||
{
|
||||
InputDialog ma = new InputDialog(true, "Verantwortlicher Mitarbeiter wählen","Mitarbeiter wählen");
|
||||
InputDialog ma = new InputDialog(true, "Verantwortlicher Mitarbeiter wählen", "Mitarbeiter wählen");
|
||||
ma.ShowDialog();
|
||||
|
||||
if (ma.DialogResult == DialogResult.OK)
|
||||
@@ -1887,64 +1921,90 @@ namespace OnDoc.UICintrols
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//private void refresh_view(string base64string)
|
||||
private void refresh_view(System.Data.DataRow dataRow)
|
||||
{
|
||||
string base64string = dataRow["gridsettings"].ToString();
|
||||
|
||||
byte[] bytes = Convert.FromBase64String(base64string);
|
||||
string plaintext = Strings.Base64Decode(base64string);
|
||||
string tagesdatum = DateTime.Now.ToString("yyyy-MM-ddT00:00:00");
|
||||
//tagesdatum = "2024-11-29T00:00:00";
|
||||
plaintext = plaintext.Replace("@today@", tagesdatum);
|
||||
plaintext = Strings.Base64Encode(plaintext);
|
||||
bytes = Convert.FromBase64String(plaintext);
|
||||
if (plaintext == "")
|
||||
{
|
||||
if (AppParams.isSysadmin) { ribbonCBAnsicht.SelectedIndex = 1; } else { ribbonCBAnsicht.SelectedIndex = 0; }
|
||||
return;
|
||||
}
|
||||
//currentview = plaintext;
|
||||
|
||||
currentview = dataRow;
|
||||
|
||||
using (MemoryStream ms = new MemoryStream(bytes))
|
||||
{
|
||||
this.sfDataGrid1.Deserialize(ms);
|
||||
|
||||
}
|
||||
|
||||
sfDataGrid1.ShowToolTip = true;
|
||||
//sfDataGrid1.FilterRowPosition = RowPosition.Top;
|
||||
|
||||
tsrbvorschau.SelectedIndex = Convert.ToInt32(dataRow["Preview"]);
|
||||
RibbonButtonAttributeEinAusblenden.Checked = Convert.ToInt32(dataRow["Attributes"]) == 1;
|
||||
if (tsrbvorschau.SelectedIndex != 0 && Convert.ToInt32(dataRow["SplitterDistance"]) != 0)
|
||||
{
|
||||
this.splitContainer1.SplitterDistance = Convert.ToInt32(dataRow["SplitterDistance"]);
|
||||
this.docPreview1.set_zoom();
|
||||
}
|
||||
else
|
||||
{
|
||||
// docPreview1.clear_viewer();
|
||||
}
|
||||
show_hide_attribute();
|
||||
//List<string> clist = new List<string>();
|
||||
//clist.Clear();
|
||||
//int I = 0;
|
||||
//if (sfDataGrid1.GroupColumnDescriptions.Count > 0)
|
||||
//{
|
||||
// for (int i = 0; i < sfDataGrid1.GroupColumnDescriptions.Count; i++)
|
||||
// {
|
||||
// clist.Add(sfDataGrid1.GroupColumnDescriptions[i].ColumnName);
|
||||
// }
|
||||
// sfDataGrid1.GroupColumnDescriptions.Clear();
|
||||
|
||||
//}
|
||||
try
|
||||
{
|
||||
this.sfDataGrid1.SelectedItem = this.sfDataGrid1.View.Records[0];
|
||||
sfDataGrid1.SelectedIndex = 0;
|
||||
this.sfDataGrid1.TableControl.ScrollRows.ScrollInView(this.sfDataGrid1.TableControl.ResolveToRowIndex(0));
|
||||
this.sfDataGrid1.TableControl.UpdateScrollBars();
|
||||
string base64string = dataRow["gridsettings"].ToString();
|
||||
|
||||
byte[] bytes = Convert.FromBase64String(base64string);
|
||||
string plaintext = Strings.Base64Decode(base64string);
|
||||
string tagesdatum = DateTime.Now.ToString("yyyy-MM-ddT00:00:00");
|
||||
//tagesdatum = "2024-11-29T00:00:00";
|
||||
plaintext = plaintext.Replace("@today@", tagesdatum);
|
||||
plaintext = Strings.Base64Encode(plaintext);
|
||||
bytes = Convert.FromBase64String(plaintext);
|
||||
if (plaintext == "")
|
||||
{
|
||||
if (AppParams.isSysadmin) { ribbonCBAnsicht.SelectedIndex = 1; } else { ribbonCBAnsicht.SelectedIndex = 0; }
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
currentview = dataRow;
|
||||
|
||||
using (MemoryStream ms = new MemoryStream(bytes))
|
||||
{
|
||||
this.sfDataGrid1.Deserialize(ms);
|
||||
|
||||
}
|
||||
|
||||
sfDataGrid1.ShowToolTip = true;
|
||||
sfDataGrid1.FilterRowPosition = RowPosition.Top;
|
||||
|
||||
|
||||
tsrbvorschau.SelectedIndex = Convert.ToInt32(dataRow["Preview"]);
|
||||
RibbonButtonAttributeEinAusblenden.Checked = Convert.ToInt32(dataRow["Attributes"]) == 1;
|
||||
Logging.Logging.Debug("Vorschau selectedind", "", "");
|
||||
|
||||
if (tsrbvorschau.SelectedIndex != 0 && Convert.ToInt32(dataRow["SplitterDistance"]) != 0)
|
||||
{
|
||||
this.splitContainer1.SplitterDistance = Convert.ToInt32(dataRow["SplitterDistance"]);
|
||||
this.docPreview1.set_zoom();
|
||||
}
|
||||
else
|
||||
{
|
||||
// docPreview1.clear_viewer();
|
||||
}
|
||||
|
||||
show_hide_attribute();
|
||||
|
||||
try
|
||||
{
|
||||
this.sfDataGrid1.SelectedItem = this.sfDataGrid1.View.Records[0];
|
||||
sfDataGrid1.SelectedIndex = 0;
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.selected_dokumentid = "";
|
||||
}
|
||||
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
//if (clist.Count > 0) {
|
||||
// foreach (string s in clist)
|
||||
// {
|
||||
// sfDataGrid1.GroupColumnDescriptions.Add(new GroupColumnDescription() { ColumnName = s });
|
||||
// }
|
||||
//}
|
||||
}
|
||||
catch
|
||||
{
|
||||
this.selected_dokumentid = "";
|
||||
}
|
||||
|
||||
System.Windows.Forms.Application.DoEvents();
|
||||
|
||||
|
||||
catch { }
|
||||
|
||||
}
|
||||
public static string Decode(string text)
|
||||
@@ -2207,7 +2267,7 @@ namespace OnDoc.UICintrols
|
||||
case "prüfung_rechts":
|
||||
if (e.DisplayText.Contains("Abgelehnt"))
|
||||
{
|
||||
Syncfusion.Data.RecordEntry record = sfDataGrid1.View.GetRecordAt(e.RowIndex-1);
|
||||
Syncfusion.Data.RecordEntry record = sfDataGrid1.View.GetRecordAt(e.RowIndex - 1);
|
||||
var a = record.Data;
|
||||
var b = a as DataRowView;
|
||||
string x = b["dokumentid"].ToString();
|
||||
@@ -2219,10 +2279,10 @@ namespace OnDoc.UICintrols
|
||||
t.Text = db.dsdaten.Tables[0].Rows[0]["mutiert_am"].ToString() +
|
||||
//Environment.NewLine + Environment.NewLine + db.dsdaten.Tables[0].Rows[0]["betreff"].ToString() +
|
||||
Environment.NewLine + Environment.NewLine + db.dsdaten.Tables[0].Rows[0]["Notizgrund"].ToString();
|
||||
System.Drawing.Font tf = new System.Drawing.Font(t.Style.Font.FontFamily, 10,FontStyle.Bold);
|
||||
|
||||
System.Drawing.Font tf = new System.Drawing.Font(t.Style.Font.FontFamily, 10, FontStyle.Bold);
|
||||
|
||||
t.Style.TextAlignment = ContentAlignment.MiddleLeft;
|
||||
t.Style.BackColor = Color.FromArgb(255,102,0);
|
||||
t.Style.BackColor = Color.FromArgb(255, 102, 0);
|
||||
t.Style.Font = tf;
|
||||
e.ToolTipInfo.Items.Add(t);
|
||||
db = null;
|
||||
@@ -2266,7 +2326,7 @@ namespace OnDoc.UICintrols
|
||||
|
||||
}
|
||||
//System.Drawing.Point p = new System.Drawing.Point(Location.X, Location.Y);
|
||||
|
||||
|
||||
//var rowColIndex = sfDataGrid1.TableControl.PointToCellRowColumnIndex(p);
|
||||
//var mouseDownRecordIndex = this.sfDataGrid1.TableControl.ResolveToRecordIndex(rowColIndex.RowIndex);
|
||||
//if (!(mouseDownRecordIndex < 0))
|
||||
@@ -2344,7 +2404,12 @@ namespace OnDoc.UICintrols
|
||||
historyToolStripMenuItem.Enabled = true;
|
||||
|
||||
this.sfDataGrid1.SelectedItem = this.sfDataGrid1.View.Records[0];
|
||||
sfDataGrid1.SelectedIndex = 0;
|
||||
//gaga
|
||||
try
|
||||
{
|
||||
sfDataGrid1.SelectedIndex = 0;
|
||||
}
|
||||
catch { }
|
||||
var record = sfDataGrid1.View.Records.GetItemAt(sfDataGrid1.SelectedIndex);
|
||||
|
||||
// var changed = DrugGrid.View.GetPropertyAccessProvider().SetValue(record, "GPackSize", "Hello"); // returns true, suggesting
|
||||
@@ -2625,7 +2690,7 @@ namespace OnDoc.UICintrols
|
||||
string documentid = datarow["dokumentid"].ToString();
|
||||
string aktion = datarow["aktion"].ToString();
|
||||
if (aktion != "Geprüft/Unterzeichnen") { error = 1; }
|
||||
// dokument_bearbeiten(documentid, false);
|
||||
// dokument_bearbeiten(documentid, false);
|
||||
}
|
||||
if (error > 0)
|
||||
{
|
||||
@@ -2641,8 +2706,8 @@ namespace OnDoc.UICintrols
|
||||
{
|
||||
var datarow = record as DataRowView;
|
||||
string documentid = datarow["dokumentid"].ToString();
|
||||
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(selected_dokumentid, AppParams.tempdir))
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<data name="tsbtnpreviewno.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||
@@ -205,7 +205,7 @@
|
||||
<data name="tsbtnpreviewbottom.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||
@@ -220,7 +220,7 @@
|
||||
<data name="tsbtnpreviewright.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||
|
||||
@@ -2085,6 +2085,7 @@ namespace OnDoc.UIControls
|
||||
int blcount = 0;
|
||||
foreach (DataRowView rowView in dv)
|
||||
{
|
||||
|
||||
System.Data.DataRow dr = rowView.Row;
|
||||
if (dr["blkunde"].ToString()=="1") { blcount++; } else { normalcount++; }
|
||||
}
|
||||
@@ -2110,7 +2111,6 @@ namespace OnDoc.UIControls
|
||||
System.Data.DataRow dr = rowView.Row;
|
||||
if (dr["blkunde"].ToString() != "1")
|
||||
{
|
||||
|
||||
db.Get_Tabledata("Select dbo.BinaryToBase64(dokument) from edex_sb_serienbrief_dokument where dokumentid='" + dr["Dokumentid"].ToString() + "'", false, true);
|
||||
var stream = new MemoryStream(Convert.FromBase64String(db.dsdaten.Tables[0].Rows[0][0].ToString()));
|
||||
if (stream.Length > 0)
|
||||
|
||||
270
Client/Versandstrasse/Versandstrasse.Designer.cs
generated
270
Client/Versandstrasse/Versandstrasse.Designer.cs
generated
@@ -28,21 +28,25 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
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.PdfViewer.MessageBoxSettings messageBoxSettings1 = new Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings();
|
||||
Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings pdfViewerPrinterSettings1 = new Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings();
|
||||
Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings messageBoxSettings2 = new Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings();
|
||||
Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings pdfViewerPrinterSettings2 = new Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Versandstrasse));
|
||||
Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings textSearchSettings1 = new Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings();
|
||||
Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings textSearchSettings2 = new Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings();
|
||||
this.treeViewAdv1 = new Syncfusion.Windows.Forms.Tools.TreeViewAdv();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.tsbtnDruckPaketNew = new System.Windows.Forms.ToolStripButton();
|
||||
this.tsbtnVersenden = new System.Windows.Forms.ToolStripButton();
|
||||
this.tscheckboxpreview = new Syncfusion.Windows.Forms.Tools.ToolStripCheckBox();
|
||||
this.GrpPaketDetails = new System.Windows.Forms.GroupBox();
|
||||
this.btnPrepare = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.treeViewAdvAdresse = new Syncfusion.Windows.Forms.Tools.TreeViewAdv();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.lbgasadresse = new System.Windows.Forms.ListBox();
|
||||
this.chkGAS = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.radioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.rbversandoption3 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
@@ -53,17 +57,23 @@
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.radioButton3 = new System.Windows.Forms.RadioButton();
|
||||
this.tscheckboxpreview = new Syncfusion.Windows.Forms.Tools.ToolStripCheckBox();
|
||||
this.btnSend = new System.Windows.Forms.Button();
|
||||
this.panelPrepare = new System.Windows.Forms.Panel();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.btnSendFinal = new System.Windows.Forms.Button();
|
||||
this.panelVerify = new System.Windows.Forms.Panel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeViewAdv1)).BeginInit();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.GrpPaketDetails.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeViewAdvAdresse)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.panelPrepare.SuspendLayout();
|
||||
this.panelVerify.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeViewAdv1
|
||||
@@ -71,16 +81,16 @@
|
||||
this.treeViewAdv1.AllowDrop = true;
|
||||
this.treeViewAdv1.BackColor = System.Drawing.Color.White;
|
||||
this.treeViewAdv1.BackgroundColor = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))));
|
||||
treeNodeAdvStyleInfo1.CheckBoxTickThickness = 1;
|
||||
treeNodeAdvStyleInfo1.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
treeNodeAdvStyleInfo1.EnsureDefaultOptionedChild = true;
|
||||
treeNodeAdvStyleInfo1.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
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.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(43)))), ((int)(((byte)(43)))));
|
||||
treeNodeAdvStyleInfo3.CheckBoxTickThickness = 1;
|
||||
treeNodeAdvStyleInfo3.CheckColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
|
||||
treeNodeAdvStyleInfo3.EnsureDefaultOptionedChild = true;
|
||||
treeNodeAdvStyleInfo3.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
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.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(43)))), ((int)(((byte)(43)))));
|
||||
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", treeNodeAdvStyleInfo3)});
|
||||
this.treeViewAdv1.BeforeTouchSize = new System.Drawing.Size(438, 502);
|
||||
this.treeViewAdv1.Border3DStyle = System.Windows.Forms.Border3DStyle.Flat;
|
||||
this.treeViewAdv1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
@@ -170,9 +180,16 @@
|
||||
this.tsbtnVersenden.Size = new System.Drawing.Size(244, 34);
|
||||
this.tsbtnVersenden.Text = "Dokumente an Versandstrasse übergeben";
|
||||
//
|
||||
// tscheckboxpreview
|
||||
//
|
||||
this.tscheckboxpreview.Name = "tscheckboxpreview";
|
||||
this.tscheckboxpreview.Size = new System.Drawing.Size(205, 34);
|
||||
this.tscheckboxpreview.Text = "Vorschau aufbereitete Dokumente";
|
||||
//
|
||||
// GrpPaketDetails
|
||||
//
|
||||
this.GrpPaketDetails.Controls.Add(this.btnSend);
|
||||
this.GrpPaketDetails.Controls.Add(this.panelVerify);
|
||||
this.GrpPaketDetails.Controls.Add(this.btnPrepare);
|
||||
this.GrpPaketDetails.Controls.Add(this.groupBox3);
|
||||
this.GrpPaketDetails.Controls.Add(this.groupBox1);
|
||||
this.GrpPaketDetails.Controls.Add(this.button1);
|
||||
@@ -184,49 +201,90 @@
|
||||
this.GrpPaketDetails.TabStop = false;
|
||||
this.GrpPaketDetails.Text = "Details zum Druckpaket";
|
||||
//
|
||||
// btnPrepare
|
||||
//
|
||||
this.btnPrepare.Location = new System.Drawing.Point(325, 337);
|
||||
this.btnPrepare.Name = "btnPrepare";
|
||||
this.btnPrepare.Size = new System.Drawing.Size(112, 23);
|
||||
this.btnPrepare.TabIndex = 4;
|
||||
this.btnPrepare.Text = "Prüfen";
|
||||
this.btnPrepare.UseVisualStyleBackColor = true;
|
||||
this.btnPrepare.Click += new System.EventHandler(this.btnSend_Click);
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.treeViewAdvAdresse);
|
||||
this.groupBox3.Controls.Add(this.label1);
|
||||
this.groupBox3.Controls.Add(this.lbgasadresse);
|
||||
this.groupBox3.Controls.Add(this.chkGAS);
|
||||
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox3.Location = new System.Drawing.Point(3, 130);
|
||||
this.groupBox3.Location = new System.Drawing.Point(3, 77);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(447, 192);
|
||||
this.groupBox3.Size = new System.Drawing.Size(447, 254);
|
||||
this.groupBox3.TabIndex = 2;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Rückantwort";
|
||||
//
|
||||
// treeViewAdvAdresse
|
||||
//
|
||||
this.treeViewAdvAdresse.BackgroundColor = new Syncfusion.Drawing.BrushInfo(System.Drawing.SystemColors.Window);
|
||||
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.treeViewAdvAdresse.BaseStylePairs.AddRange(new Syncfusion.Windows.Forms.Tools.StyleNamePair[] {
|
||||
new Syncfusion.Windows.Forms.Tools.StyleNamePair("Standard", treeNodeAdvStyleInfo1)});
|
||||
this.treeViewAdvAdresse.BeforeTouchSize = new System.Drawing.Size(417, 193);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.treeViewAdvAdresse.HelpTextControl.BaseThemeName = null;
|
||||
this.treeViewAdvAdresse.HelpTextControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeViewAdvAdresse.HelpTextControl.Name = "";
|
||||
this.treeViewAdvAdresse.HelpTextControl.Size = new System.Drawing.Size(392, 112);
|
||||
this.treeViewAdvAdresse.HelpTextControl.TabIndex = 0;
|
||||
this.treeViewAdvAdresse.HelpTextControl.Visible = true;
|
||||
this.treeViewAdvAdresse.InactiveSelectedNodeForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.treeViewAdvAdresse.Location = new System.Drawing.Point(17, 55);
|
||||
this.treeViewAdvAdresse.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(165)))), ((int)(((byte)(220)))));
|
||||
this.treeViewAdvAdresse.Name = "treeViewAdvAdresse";
|
||||
this.treeViewAdvAdresse.SelectedNodeForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
this.treeViewAdvAdresse.Size = new System.Drawing.Size(417, 193);
|
||||
this.treeViewAdvAdresse.TabIndex = 3;
|
||||
this.treeViewAdvAdresse.Text = "treeViewAdv2";
|
||||
this.treeViewAdvAdresse.ThemeStyle.TreeNodeAdvStyle.CheckBoxTickThickness = 0;
|
||||
this.treeViewAdvAdresse.ThemeStyle.TreeNodeAdvStyle.EnsureDefaultOptionedChild = true;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.treeViewAdvAdresse.ToolTipControl.BaseThemeName = null;
|
||||
this.treeViewAdvAdresse.ToolTipControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeViewAdvAdresse.ToolTipControl.Name = "";
|
||||
this.treeViewAdvAdresse.ToolTipControl.Size = new System.Drawing.Size(392, 112);
|
||||
this.treeViewAdvAdresse.ToolTipControl.TabIndex = 0;
|
||||
this.treeViewAdvAdresse.ToolTipControl.Visible = true;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(24, 63);
|
||||
this.label1.Location = new System.Drawing.Point(14, 39);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(105, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
this.label1.Text = "Rückantwortadresse";
|
||||
//
|
||||
// lbgasadresse
|
||||
//
|
||||
this.lbgasadresse.FormattingEnabled = true;
|
||||
this.lbgasadresse.Items.AddRange(new object[] {
|
||||
"Adresse 1",
|
||||
"Adresse 2",
|
||||
"Adresse 3"});
|
||||
this.lbgasadresse.Location = new System.Drawing.Point(24, 82);
|
||||
this.lbgasadresse.Name = "lbgasadresse";
|
||||
this.lbgasadresse.Size = new System.Drawing.Size(332, 95);
|
||||
this.lbgasadresse.TabIndex = 1;
|
||||
//
|
||||
// chkGAS
|
||||
//
|
||||
this.chkGAS.AutoSize = true;
|
||||
this.chkGAS.Location = new System.Drawing.Point(24, 34);
|
||||
this.chkGAS.Location = new System.Drawing.Point(17, 19);
|
||||
this.chkGAS.Name = "chkGAS";
|
||||
this.chkGAS.Size = new System.Drawing.Size(112, 17);
|
||||
this.chkGAS.TabIndex = 0;
|
||||
this.chkGAS.Text = "GAS-Rückantwort";
|
||||
this.chkGAS.UseVisualStyleBackColor = true;
|
||||
this.chkGAS.CheckedChanged += new System.EventHandler(this.chkGAS_CheckedChanged);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
@@ -239,15 +297,27 @@
|
||||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox1.Location = new System.Drawing.Point(3, 16);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(447, 114);
|
||||
this.groupBox1.Size = new System.Drawing.Size(447, 61);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Versandoptionen";
|
||||
//
|
||||
// radioButton3
|
||||
//
|
||||
this.radioButton3.AutoSize = true;
|
||||
this.radioButton3.Checked = true;
|
||||
this.radioButton3.Location = new System.Drawing.Point(86, 19);
|
||||
this.radioButton3.Name = "radioButton3";
|
||||
this.radioButton3.Size = new System.Drawing.Size(62, 17);
|
||||
this.radioButton3.TabIndex = 5;
|
||||
this.radioButton3.TabStop = true;
|
||||
this.radioButton3.Text = "B1-Post";
|
||||
this.radioButton3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(332, 74);
|
||||
this.radioButton2.Location = new System.Drawing.Point(154, 19);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(62, 17);
|
||||
this.radioButton2.TabIndex = 4;
|
||||
@@ -257,17 +327,18 @@
|
||||
// rbversandoption3
|
||||
//
|
||||
this.rbversandoption3.AutoSize = true;
|
||||
this.rbversandoption3.Location = new System.Drawing.Point(24, 75);
|
||||
this.rbversandoption3.Location = new System.Drawing.Point(222, 19);
|
||||
this.rbversandoption3.Name = "rbversandoption3";
|
||||
this.rbversandoption3.Size = new System.Drawing.Size(207, 17);
|
||||
this.rbversandoption3.TabIndex = 2;
|
||||
this.rbversandoption3.Text = "Hauptadresse, Postversand erzwingen";
|
||||
this.rbversandoption3.UseVisualStyleBackColor = true;
|
||||
this.rbversandoption3.Visible = false;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(332, 29);
|
||||
this.radioButton1.Location = new System.Drawing.Point(24, 19);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(56, 17);
|
||||
this.radioButton1.TabIndex = 3;
|
||||
@@ -277,22 +348,24 @@
|
||||
// rbversandoption2
|
||||
//
|
||||
this.rbversandoption2.AutoSize = true;
|
||||
this.rbversandoption2.Location = new System.Drawing.Point(24, 52);
|
||||
this.rbversandoption2.Location = new System.Drawing.Point(222, 19);
|
||||
this.rbversandoption2.Name = "rbversandoption2";
|
||||
this.rbversandoption2.Size = new System.Drawing.Size(197, 17);
|
||||
this.rbversandoption2.TabIndex = 1;
|
||||
this.rbversandoption2.Text = "Hauptadresse, E-Banking erzwingen";
|
||||
this.rbversandoption2.UseVisualStyleBackColor = true;
|
||||
this.rbversandoption2.Visible = false;
|
||||
//
|
||||
// rbversandoption1
|
||||
//
|
||||
this.rbversandoption1.AutoSize = true;
|
||||
this.rbversandoption1.Location = new System.Drawing.Point(24, 29);
|
||||
this.rbversandoption1.Location = new System.Drawing.Point(222, 19);
|
||||
this.rbversandoption1.Name = "rbversandoption1";
|
||||
this.rbversandoption1.Size = new System.Drawing.Size(166, 17);
|
||||
this.rbversandoption1.TabIndex = 0;
|
||||
this.rbversandoption1.Text = "Hauptadresse und Versandart";
|
||||
this.rbversandoption1.UseVisualStyleBackColor = true;
|
||||
this.rbversandoption1.Visible = false;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
@@ -315,17 +388,17 @@
|
||||
this.pdfViewerControl1.IsTextSearchEnabled = true;
|
||||
this.pdfViewerControl1.IsTextSelectionEnabled = true;
|
||||
this.pdfViewerControl1.Location = new System.Drawing.Point(0, 0);
|
||||
messageBoxSettings1.EnableNotification = true;
|
||||
this.pdfViewerControl1.MessageBoxSettings = messageBoxSettings1;
|
||||
messageBoxSettings2.EnableNotification = true;
|
||||
this.pdfViewerControl1.MessageBoxSettings = messageBoxSettings2;
|
||||
this.pdfViewerControl1.MinimumZoomPercentage = 50;
|
||||
this.pdfViewerControl1.Name = "pdfViewerControl1";
|
||||
this.pdfViewerControl1.PageBorderThickness = 1;
|
||||
pdfViewerPrinterSettings1.Copies = 1;
|
||||
pdfViewerPrinterSettings1.PageOrientation = Syncfusion.Windows.PdfViewer.PdfViewerPrintOrientation.Auto;
|
||||
pdfViewerPrinterSettings1.PageSize = Syncfusion.Windows.PdfViewer.PdfViewerPrintSize.ActualSize;
|
||||
pdfViewerPrinterSettings1.PrintLocation = ((System.Drawing.PointF)(resources.GetObject("pdfViewerPrinterSettings1.PrintLocation")));
|
||||
pdfViewerPrinterSettings1.ShowPrintStatusDialog = true;
|
||||
this.pdfViewerControl1.PrinterSettings = pdfViewerPrinterSettings1;
|
||||
pdfViewerPrinterSettings2.Copies = 1;
|
||||
pdfViewerPrinterSettings2.PageOrientation = Syncfusion.Windows.PdfViewer.PdfViewerPrintOrientation.Auto;
|
||||
pdfViewerPrinterSettings2.PageSize = Syncfusion.Windows.PdfViewer.PdfViewerPrintSize.ActualSize;
|
||||
pdfViewerPrinterSettings2.PrintLocation = ((System.Drawing.PointF)(resources.GetObject("pdfViewerPrinterSettings2.PrintLocation")));
|
||||
pdfViewerPrinterSettings2.ShowPrintStatusDialog = true;
|
||||
this.pdfViewerControl1.PrinterSettings = pdfViewerPrinterSettings2;
|
||||
this.pdfViewerControl1.ReferencePath = null;
|
||||
this.pdfViewerControl1.ScrollDisplacementValue = 0;
|
||||
this.pdfViewerControl1.ShowHorizontalScrollBar = true;
|
||||
@@ -335,10 +408,11 @@
|
||||
this.pdfViewerControl1.SpaceBetweenPages = 8;
|
||||
this.pdfViewerControl1.TabIndex = 10;
|
||||
this.pdfViewerControl1.Text = "pdfViewerControl1";
|
||||
textSearchSettings1.CurrentInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(171)))), ((int)(((byte)(64)))));
|
||||
textSearchSettings1.HighlightAllInstance = true;
|
||||
textSearchSettings1.OtherInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))));
|
||||
this.pdfViewerControl1.TextSearchSettings = textSearchSettings1;
|
||||
textSearchSettings2.CurrentInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(171)))), ((int)(((byte)(64)))));
|
||||
textSearchSettings2.HighlightAllInstance = true;
|
||||
textSearchSettings2.OtherInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))));
|
||||
this.pdfViewerControl1.TextSearchSettings = textSearchSettings2;
|
||||
this.pdfViewerControl1.ThemeName = "Default";
|
||||
this.pdfViewerControl1.VerticalScrollOffset = 0;
|
||||
this.pdfViewerControl1.VisualStyle = Syncfusion.Windows.Forms.PdfViewer.VisualStyle.Default;
|
||||
this.pdfViewerControl1.ZoomMode = Syncfusion.Windows.Forms.PdfViewer.ZoomMode.Default;
|
||||
@@ -370,38 +444,73 @@
|
||||
this.panel3.Size = new System.Drawing.Size(660, 502);
|
||||
this.panel3.TabIndex = 13;
|
||||
//
|
||||
// radioButton3
|
||||
// panelPrepare
|
||||
//
|
||||
this.radioButton3.AutoSize = true;
|
||||
this.radioButton3.Checked = true;
|
||||
this.radioButton3.Location = new System.Drawing.Point(332, 52);
|
||||
this.radioButton3.Name = "radioButton3";
|
||||
this.radioButton3.Size = new System.Drawing.Size(62, 17);
|
||||
this.radioButton3.TabIndex = 5;
|
||||
this.radioButton3.Text = "B1-Post";
|
||||
this.radioButton3.UseVisualStyleBackColor = true;
|
||||
this.panelPrepare.BackColor = System.Drawing.Color.Silver;
|
||||
this.panelPrepare.Controls.Add(this.label4);
|
||||
this.panelPrepare.Location = new System.Drawing.Point(360, 155);
|
||||
this.panelPrepare.Name = "panelPrepare";
|
||||
this.panelPrepare.Size = new System.Drawing.Size(832, 94);
|
||||
this.panelPrepare.TabIndex = 14;
|
||||
this.panelPrepare.Visible = false;
|
||||
//
|
||||
// tscheckboxpreview
|
||||
// label4
|
||||
//
|
||||
this.tscheckboxpreview.Name = "tscheckboxpreview";
|
||||
this.tscheckboxpreview.Size = new System.Drawing.Size(205, 34);
|
||||
this.tscheckboxpreview.Text = "Vorschau aufbereitete Dokumente";
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label4.Location = new System.Drawing.Point(19, 34);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(437, 20);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "Versand wird vorbereit - bitte einen Moment warten....";
|
||||
//
|
||||
// btnSend
|
||||
// btnSendFinal
|
||||
//
|
||||
this.btnSend.Location = new System.Drawing.Point(284, 337);
|
||||
this.btnSend.Name = "btnSend";
|
||||
this.btnSend.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnSend.TabIndex = 4;
|
||||
this.btnSend.Text = "Versenden";
|
||||
this.btnSend.UseVisualStyleBackColor = true;
|
||||
this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
|
||||
this.btnSendFinal.BackColor = System.Drawing.Color.YellowGreen;
|
||||
this.btnSendFinal.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.btnSendFinal.Location = new System.Drawing.Point(106, 62);
|
||||
this.btnSendFinal.Name = "btnSendFinal";
|
||||
this.btnSendFinal.Size = new System.Drawing.Size(196, 35);
|
||||
this.btnSendFinal.TabIndex = 5;
|
||||
this.btnSendFinal.Text = " geprüft";
|
||||
this.btnSendFinal.UseVisualStyleBackColor = false;
|
||||
this.btnSendFinal.Click += new System.EventHandler(this.btnSendFinal_Click);
|
||||
//
|
||||
// panelVerify
|
||||
//
|
||||
this.panelVerify.Controls.Add(this.label3);
|
||||
this.panelVerify.Controls.Add(this.label2);
|
||||
this.panelVerify.Controls.Add(this.btnSendFinal);
|
||||
this.panelVerify.Location = new System.Drawing.Point(27, 386);
|
||||
this.panelVerify.Name = "panelVerify";
|
||||
this.panelVerify.Size = new System.Drawing.Size(405, 100);
|
||||
this.panelVerify.TabIndex = 6;
|
||||
this.panelVerify.Visible = false;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(4, 4);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(310, 13);
|
||||
this.label2.TabIndex = 6;
|
||||
this.label2.Text = "Das aufbereitete PDF prüfen. Sofern \"geprüft\" betätigt wird, wird";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(4, 17);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(141, 13);
|
||||
this.label3.TabIndex = 7;
|
||||
this.label3.Text = "der Druckaufgrag ausgelöst.";
|
||||
//
|
||||
// Versandstrasse
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1555, 543);
|
||||
this.Controls.Add(this.panelPrepare);
|
||||
this.Controls.Add(this.panel3);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
@@ -419,11 +528,16 @@
|
||||
this.GrpPaketDetails.ResumeLayout(false);
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeViewAdvAdresse)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panelPrepare.ResumeLayout(false);
|
||||
this.panelPrepare.PerformLayout();
|
||||
this.panelVerify.ResumeLayout(false);
|
||||
this.panelVerify.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -440,7 +554,6 @@
|
||||
private System.Windows.Forms.RadioButton rbversandoption1;
|
||||
private System.Windows.Forms.GroupBox groupBox3;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.ListBox lbgasadresse;
|
||||
private System.Windows.Forms.CheckBox chkGAS;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
@@ -451,6 +564,13 @@
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.RadioButton radioButton3;
|
||||
private Syncfusion.Windows.Forms.Tools.ToolStripCheckBox tscheckboxpreview;
|
||||
private System.Windows.Forms.Button btnSend;
|
||||
private System.Windows.Forms.Button btnPrepare;
|
||||
private Syncfusion.Windows.Forms.Tools.TreeViewAdv treeViewAdvAdresse;
|
||||
private System.Windows.Forms.Panel panelPrepare;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Button btnSendFinal;
|
||||
private System.Windows.Forms.Panel panelVerify;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
||||
@@ -19,16 +19,18 @@ using Versandstrasse;
|
||||
using System.IO;
|
||||
using Syncfusion.Pdf;
|
||||
using Database;
|
||||
using System.Net;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace OnDoc.Versandstrasse
|
||||
{
|
||||
public partial class Versandstrasse : SfForm
|
||||
{
|
||||
private Versandpakete pakete = new Versandpakete();
|
||||
private List<Versandpaket> pakete = new List<Versandpaket>();
|
||||
private TreeViewAdvDragHighlightTracker treeViewDragHighlightTracker = null;
|
||||
private TreeNodeAdv currentSourceNode;
|
||||
|
||||
public Versandstrasse(Versandpakete pakete)
|
||||
|
||||
public Versandstrasse(List<Versandpaket> pakete)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.treeViewAdv1.AutoScrolling = ScrollBars.Both;
|
||||
@@ -44,24 +46,43 @@ namespace OnDoc.Versandstrasse
|
||||
this.pakete = pakete;
|
||||
}
|
||||
|
||||
private void load_adressen()
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select * from Antwortadresse order by bezeichnung", false, true);
|
||||
foreach (System.Data.DataRow dr in db.dsdaten.Tables[0].Rows)
|
||||
{
|
||||
TreeNodeAdv node = new TreeNodeAdv();
|
||||
node.Text = dr["bezeichnung"].ToString();
|
||||
node.TagObject = dr;
|
||||
treeViewAdvAdresse.Nodes.Add(node);
|
||||
|
||||
}
|
||||
treeViewAdvAdresse.Enabled = false;
|
||||
treeViewAdvAdresse.SelectedNode = treeViewAdvAdresse.Nodes[0];
|
||||
}
|
||||
private void Versandstrasse_Load(object sender, EventArgs e)
|
||||
{
|
||||
load_adressen();
|
||||
Reload_Tree();
|
||||
}
|
||||
private void Reload_Tree() {
|
||||
treeViewAdv1.Nodes.Clear();
|
||||
|
||||
TreeNodeAdv DruckJob;
|
||||
for (int i = 0; i < pakete.paket.Count; i++)
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
for (int i = 0; i < pakete.Count; i++)
|
||||
{
|
||||
db.Get_Tabledata("Select bkpar00 from partner where nrpar00=" + pakete[i].partnernr.ToString(), false, true);
|
||||
DruckJob = new TreeNodeAdv();
|
||||
DruckJob.Text = "Druckpaket " + pakete.paket[i].PaketNr;
|
||||
DruckJob.Text = "Druckpaket " + pakete[i].PaketNr.ToString()+" - " + db.dsdaten.Tables[0].Rows[0][0].ToString();
|
||||
DruckJob.Tag = "Druckpaket";
|
||||
DruckJob.TagObject = pakete.paket[i];
|
||||
DruckJob.TagObject = pakete[i];
|
||||
treeViewAdv1.Nodes.Add(DruckJob);
|
||||
|
||||
PopulateDocs(pakete.paket[i], ref DruckJob);
|
||||
PopulateDocs(pakete[i], ref DruckJob);
|
||||
}
|
||||
db = null;
|
||||
treeViewAdv1.ExpandAll();
|
||||
}
|
||||
|
||||
@@ -241,10 +262,10 @@ namespace OnDoc.Versandstrasse
|
||||
break;
|
||||
}
|
||||
|
||||
if (paket.GAS.ToString() == "1"){
|
||||
chkGAS.Checked= true;
|
||||
lbgasadresse.SelectedIndex = Convert.ToInt32(paket.GASAdresse.ToString());
|
||||
} else { chkGAS.Checked= false; }
|
||||
//if (paket.GAS.ToString() == "1"){
|
||||
// chkGAS.Checked= true;
|
||||
// lbgasadresse.SelectedIndex = Convert.ToInt32(paket.GASAdresse.ToString());
|
||||
//} else { chkGAS.Checked= false; }
|
||||
}
|
||||
else {
|
||||
if (tscheckboxpreview.Checked)
|
||||
@@ -266,7 +287,7 @@ namespace OnDoc.Versandstrasse
|
||||
if (rbversandoption3.Checked) { paket.Versandoption = "3"; }
|
||||
|
||||
if (chkGAS.Checked) { paket.GAS = "1"; } else { paket.GAS = "0"; }
|
||||
try { paket.GASAdresse = lbgasadresse.SelectedIndex.ToString(); } catch { paket.GASAdresse= "0"; }
|
||||
//try { paket.GASAdresse = lbgasadresse.SelectedIndex.ToString(); } catch { paket.GASAdresse= "0"; }
|
||||
paket.verified = true;
|
||||
treeViewAdv1.SelectedNode.TagObject = paket;
|
||||
//pakete.paket.Add(paket);
|
||||
@@ -277,36 +298,50 @@ namespace OnDoc.Versandstrasse
|
||||
|
||||
private void btnSend_Click(object sender, EventArgs e)
|
||||
{
|
||||
Versandpaket paket = treeViewAdv1.SelectedNode.TagObject as Versandpaket;
|
||||
foreach (Versanddokument vsdok in paket.Dokument)
|
||||
panelPrepare.Visible = true;
|
||||
Application.DoEvents();
|
||||
Cursor = Cursors.WaitCursor;
|
||||
try
|
||||
{
|
||||
clsVersandstrasse vs = new clsVersandstrasse();
|
||||
vsdok.dokument = vs.Prepare_PDF(vsdok.DokumentID.ToString(), AppParams.tempdir, AppParams.connectionstring);
|
||||
//string dok = vs.Prepare_PDF(vsdok.DokumentID.ToString(), AppParams.tempdir, AppParams.connectionstring);
|
||||
}
|
||||
Stream[] streams = new Stream[paket.Dokument.Count];
|
||||
int i = 0;
|
||||
foreach (Versanddokument vsdok in paket.Dokument)
|
||||
{
|
||||
var stream = new MemoryStream(Convert.FromBase64String(vsdok.dokument));
|
||||
streams[i] = stream;
|
||||
i++;
|
||||
Versandpaket paket = treeViewAdv1.SelectedNode.TagObject as Versandpaket;
|
||||
foreach (Versanddokument vsdok in paket.Dokument)
|
||||
{
|
||||
clsVersandstrasse vs = new clsVersandstrasse();
|
||||
vsdok.dokument = vs.Prepare_PDF(vsdok.DokumentID.ToString(), AppParams.tempdir, AppParams.connectionstring);
|
||||
//string dok = vs.Prepare_PDF(vsdok.DokumentID.ToString(), AppParams.tempdir, AppParams.connectionstring);
|
||||
}
|
||||
Stream[] streams = new Stream[paket.Dokument.Count];
|
||||
int i = 0;
|
||||
foreach (Versanddokument vsdok in paket.Dokument)
|
||||
{
|
||||
var stream = new MemoryStream(Convert.FromBase64String(vsdok.dokument));
|
||||
streams[i] = stream;
|
||||
i++;
|
||||
}
|
||||
|
||||
string stapel = save_stapel(ref streams);
|
||||
var finalestream = new MemoryStream(Convert.FromBase64String(stapel));
|
||||
this.pdfViewerControl1.Load(finalestream);
|
||||
|
||||
|
||||
for (int i1 = 0; i1 < streams.Length; i1++)
|
||||
{
|
||||
streams[i1].Close();
|
||||
|
||||
streams[i1].Dispose();
|
||||
streams[i1] = null;
|
||||
}
|
||||
streams = null;
|
||||
treeViewAdv1.SelectedNode.TagObject = paket;
|
||||
panelVerify.Visible = true;
|
||||
}
|
||||
catch { }
|
||||
panelPrepare.Visible = false;
|
||||
Cursor = Cursors.Default;
|
||||
Application.DoEvents();
|
||||
|
||||
string stapel = save_stapel(ref streams);
|
||||
var finalestream = new MemoryStream(Convert.FromBase64String(stapel));
|
||||
this.pdfViewerControl1.Load(finalestream);
|
||||
|
||||
|
||||
for (int i1 = 0; i1 < streams.Length; i1++)
|
||||
{
|
||||
streams[i1].Close();
|
||||
|
||||
streams[i1].Dispose();
|
||||
streams[i1] = null;
|
||||
}
|
||||
streams = null;
|
||||
}
|
||||
|
||||
private string save_stapel(ref Stream[] streams)
|
||||
{
|
||||
try
|
||||
@@ -323,5 +358,88 @@ namespace OnDoc.Versandstrasse
|
||||
}
|
||||
catch { return ""; }
|
||||
}
|
||||
|
||||
private void chkGAS_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (chkGAS.Checked)
|
||||
{
|
||||
treeViewAdvAdresse.Enabled= true;
|
||||
}
|
||||
else
|
||||
{
|
||||
treeViewAdvAdresse.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSendFinal_Click(object sender, EventArgs e)
|
||||
{
|
||||
panelVerify.Visible = false;
|
||||
SendTo_Versandstrasse();
|
||||
|
||||
}
|
||||
private void SendTo_Versandstrasse()
|
||||
{
|
||||
Versandpaket versandpaket = new Versandpaket();
|
||||
versandpaket = (Versandpaket)treeViewAdv1.SelectedNode.TagObject;
|
||||
versandpaket.send_onbase_doc = true;
|
||||
string jsonstring = JsonConvert.SerializeObject(versandpaket);
|
||||
|
||||
|
||||
|
||||
string URL = AppParams.RESTURI + "api/Send_Versandstrasse";
|
||||
panelVerify.Visible = false;
|
||||
|
||||
WebRequest request;
|
||||
var data = Encoding.UTF8.GetBytes(jsonstring);
|
||||
request = WebRequest.Create(URL);
|
||||
request.ContentLength = data.Length;
|
||||
request.ContentType = "application/json";
|
||||
request.Method = "POST";
|
||||
request.Headers["Authorization"] = "Bearer " + AppParams.apikey;
|
||||
string response;
|
||||
try
|
||||
{
|
||||
|
||||
using (Stream requestStream = request.GetRequestStream())
|
||||
{
|
||||
requestStream.Write(data, 0, data.Length);
|
||||
requestStream.Close();
|
||||
|
||||
using (Stream responseStream = request.GetResponse().GetResponseStream())
|
||||
{
|
||||
using (var reader = new StreamReader(responseStream))
|
||||
{
|
||||
response = reader.ReadToEnd();
|
||||
}
|
||||
if (response.ToString().Contains("*archiviert"))
|
||||
{
|
||||
MessageBox.Show("Paket an Versandstrasse übergeben");
|
||||
}
|
||||
//if (response.StatusCode == HttpStatusCode.OK)
|
||||
//{
|
||||
// StreamReader reader = new StreamReader(response.GetResponseStream());
|
||||
// string responseContent = reader.ReadToEnd();
|
||||
// if (responseContent.Contains("Hinweismeldung:"))
|
||||
// {
|
||||
// MessageBox.Show("Das Paket wurde erfolgreich an die Versandstrasse übergeben:" + Environment.NewLine + responseContent);
|
||||
// treeViewAdv1.SelectedNode.Remove();
|
||||
// return;
|
||||
// }
|
||||
// Logging.DocLog.Info("Dokumentpaket an Versandstrasse übergeben", "OnDoc", versandpaket.partnernr.ToString(), "", "");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MessageBox.Show("Das Paket konnte nicht an die Versandstrasse übergeben werden." + Environment.NewLine + "Fehler: " + response.StatusDescription);
|
||||
// Logging.Logging.Error(URL + ": " + response.StatusCode.ToString() + " / " + response.StatusDescription, "Clinet - DokList GetDocument", "");
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
catch { }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="pdfViewerPrinterSettings1.PrintLocation" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<data name="pdfViewerPrinterSettings2.PrintLocation" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0
|
||||
dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABVTeXN0ZW0uRHJh
|
||||
|
||||
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.
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.
@@ -5,11 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class Versandpakete
|
||||
{
|
||||
public List<Versandpaket> paket { get; set; }
|
||||
}
|
||||
{
|
||||
public class Versandpaket
|
||||
{
|
||||
public string bezeichnung { get; set; }
|
||||
@@ -19,7 +15,14 @@ namespace Model
|
||||
public string GAS { get; set; }
|
||||
public string GASAdresse { get; set; }
|
||||
public bool verified { get; set; } = false;
|
||||
public int partnernr { get; set; } = 0;
|
||||
public bool send_onbase_doc { get; set; }
|
||||
public string handle { get; set; } = "";
|
||||
|
||||
public string finaldoc { get; set; } = "";
|
||||
|
||||
public List<Versanddokument> Dokument { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class Versanddokument
|
||||
@@ -38,5 +41,18 @@ namespace Model
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class OnBase_Attributes
|
||||
{
|
||||
public string Dokumenttyp { get; set; } = "TECH Versandstrasse SendDoc";
|
||||
public string BPNummer { get; set; } = "";
|
||||
public string DocumentHandle { get; set; } = "";
|
||||
public string DistributionOption { get; set; } = "";
|
||||
public string GASCouvert { get; set; } = "";
|
||||
public string Returnaddress { get; set; } = "";
|
||||
public string O2ODochandle { get; set; } = "";
|
||||
public string Status { get; set; } = "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
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.
@@ -1,13 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
using edoka_dms;
|
||||
using Model;
|
||||
using Syncfusion.Pdf;
|
||||
@@ -19,61 +22,166 @@ namespace Versandstrasse
|
||||
{
|
||||
public class clsVersandstrasse
|
||||
{
|
||||
private List<PdfLoadedDocument> loadedDocuments = new List<PdfLoadedDocument>();
|
||||
public void Lic()
|
||||
{
|
||||
string lickey = "MzYzODg2NkAzMjM4MmUzMDJlMzBTOWljRmxNelA1d1VGOHpGR0lxQzB6UTAwKzIxK2VBNEhBZFp5alcxb1NVPQ==";
|
||||
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(lickey);
|
||||
}
|
||||
public string Prepare_PDF(string dokumentid, string tempdir, string connectionstring)
|
||||
|
||||
bool logo = false;
|
||||
bool color = false;
|
||||
int left = 0;
|
||||
int top = 0;
|
||||
int height = 0;
|
||||
int width = 0;
|
||||
string pages = "";
|
||||
string xml = "";
|
||||
|
||||
public string Prepare_PDF(string dokumentid, string tempdir, string connectionstring, versandscript vs = null)
|
||||
{
|
||||
Lic();
|
||||
OnDocOffice.OfficeToPDF officeToPDF = new OnDocOffice.OfficeToPDF();
|
||||
clsdok dok = new clsdok("", "", "", "");
|
||||
dok.dokument = officeToPDF.word_to_pdf(dokumentid, connectionstring, tempdir);
|
||||
//var stream = new MemoryStream(Convert.FromBase64String(dok.dokument));
|
||||
|
||||
|
||||
var stream = new MemoryStream(Convert.FromBase64String(dok.dokument));
|
||||
|
||||
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(stream);
|
||||
////Originalfile laden
|
||||
//PdfLoadedDocument loadedDocument = new PdfLoadedDocument(stream);
|
||||
|
||||
Database.DB db = new Database.DB(connectionstring);
|
||||
db.clear_parameter();
|
||||
db.add_parameter("@dokumentid", dokumentid);
|
||||
db.Get_Tabledata("ondoc_get_versandstrasse_parameter", true, false);
|
||||
|
||||
int logo = 0;
|
||||
int color = 0;
|
||||
int left = 0;
|
||||
int top = 0;
|
||||
string pages = "";
|
||||
|
||||
logo = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["logo"]);
|
||||
color = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["logocolor"]);
|
||||
versandscript vscript = new versandscript();
|
||||
|
||||
|
||||
|
||||
logo = Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0]["logo"]);
|
||||
color = Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0]["logocolor"]);
|
||||
top = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["logotop"]);
|
||||
left = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["logoleft"]);
|
||||
top = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["logocolor"]);
|
||||
height = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["logoheight"]);
|
||||
width = Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["logowidth"]);
|
||||
|
||||
pages = db.dsdaten.Tables[0].Rows[0]["pages"].ToString();
|
||||
xml = db.dsdaten.Tables[0].Rows[0]["vscript"].ToString();
|
||||
|
||||
if (xml != "")
|
||||
{
|
||||
|
||||
if (logo == 1)
|
||||
{
|
||||
Add_Logo(ref loadedDocument, color, left, top, pages);
|
||||
}
|
||||
if (loadedDocument.Pages.Count % 2 == 0)
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(versandscript));
|
||||
using (StringReader reader = new StringReader(xml))
|
||||
{
|
||||
vscript = (versandscript)(serializer.Deserialize(reader));
|
||||
}
|
||||
if (vscript.PartCopies != "")
|
||||
{
|
||||
create_copies(ref vscript, dok.dokument);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Add_EmptyPage(ref loadedDocument);
|
||||
vsdokument d = new vsdokument();
|
||||
d.LogoTop = top;
|
||||
d.LogoLeft = left;
|
||||
d.LogoHeigth = height;
|
||||
d.LogoWidth = width;
|
||||
d.LogoColor = color;
|
||||
d.Logo = logo;
|
||||
d.LogoOnPages = "1";
|
||||
d.sourcedokument = dok.dokument;
|
||||
vscript.dokuments.Add(d);
|
||||
}
|
||||
|
||||
MemoryStream outputStream = new MemoryStream();
|
||||
loadedDocument.Save(outputStream);
|
||||
byte[] bytes;
|
||||
bytes = outputStream.ToArray();
|
||||
dok.dokument = Convert.ToBase64String(bytes);
|
||||
return dok.dokument;
|
||||
foreach (vsdokument vdok in vscript.dokuments)
|
||||
{
|
||||
var stream = new MemoryStream(Convert.FromBase64String(vdok.sourcedokument));
|
||||
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(stream);
|
||||
if (vdok.Logo)
|
||||
{
|
||||
Add_Logo(ref loadedDocument, vdok.LogoColor, vdok.LogoLeft, vdok.LogoTop, vdok.LogoWidth, vdok.LogoHeigth, vdok.LogoOnPages);
|
||||
}
|
||||
loadedDocument.Save(@"x:\output1.pdf");
|
||||
if (vdok.TextReplaces.Count > 0)
|
||||
{
|
||||
foreach (TextReplace tr in vdok.TextReplaces)
|
||||
{
|
||||
if (tr.TextToReplace.Trim() != "")
|
||||
{
|
||||
Replace_Text(ref loadedDocument, tr.TextToReplace, tr.NewText);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (loadedDocument.Pages.Count % 2 == 0) { } else { Add_EmptyPage(ref loadedDocument); }
|
||||
MemoryStream outputStream = new MemoryStream();
|
||||
loadedDocument.Save(outputStream);
|
||||
byte[] bytes;
|
||||
bytes = outputStream.ToArray();
|
||||
vdok.pdfdokument = Convert.ToBase64String(bytes);
|
||||
|
||||
}
|
||||
if (vscript.dokuments.Count > 1)
|
||||
{
|
||||
int i = 0;
|
||||
Stream[] streams = new Stream[vscript.dokuments.Count];
|
||||
|
||||
foreach (vsdokument vdoc in vscript.dokuments)
|
||||
{
|
||||
var stream = new MemoryStream(Convert.FromBase64String(vdoc.pdfdokument));
|
||||
streams[i] = stream;
|
||||
i++;
|
||||
|
||||
}
|
||||
PdfDocument finalDoc = new PdfDocument();
|
||||
PdfDocumentBase.Merge(finalDoc, streams);
|
||||
MemoryStream outputStream = new MemoryStream();
|
||||
finalDoc.Save(outputStream);
|
||||
byte[] bytes;
|
||||
bytes = outputStream.ToArray();
|
||||
dok.dokument = Convert.ToBase64String(bytes);
|
||||
vscript.FinalDoc = Convert.ToBase64String(bytes);
|
||||
finalDoc.Close();
|
||||
finalDoc.Dispose();
|
||||
streams = null;
|
||||
vscript.FinalDoc = vscript.FinalDoc;
|
||||
}
|
||||
else
|
||||
{
|
||||
vscript.FinalDoc = vscript.dokuments[0].pdfdokument.ToString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return vscript.FinalDoc;
|
||||
}
|
||||
|
||||
private void create_copies(ref versandscript vscript, string dokument)
|
||||
{
|
||||
vsdokument vsd = vscript.dokuments[0];
|
||||
if (vsd.LogoTop == 0) { vsd.LogoTop = top; }
|
||||
if (vsd.LogoLeft == 0) { vsd.LogoLeft = left; }
|
||||
if (vsd.LogoHeigth == 0) { vsd.LogoHeigth = height; }
|
||||
if (vsd.LogoWidth == 0) { vsd.LogoWidth = width; }
|
||||
vsd.sourcedokument = dokument;
|
||||
|
||||
int i = 1;
|
||||
List<String> copyparts = vscript.PartCopies.Split(';').ToList();
|
||||
foreach (string cp in copyparts)
|
||||
{
|
||||
string[] part = cp.Split(':');
|
||||
int part1 = Convert.ToInt32(part[0]);
|
||||
int part2 = Convert.ToInt32(part[1]);
|
||||
|
||||
vsdokument source = vscript.dokuments[part1 - 1];
|
||||
if (vscript.dokuments.Count >= part2) { vscript.dokuments[i] = source; } else { vscript.dokuments.Add(source); }
|
||||
}
|
||||
|
||||
}
|
||||
private void Replace_Text(ref PdfLoadedDocument document, string texttoreplace, string newtext)
|
||||
{
|
||||
PdfLoadedPage loadedPage = document.Pages[0] as PdfLoadedPage;
|
||||
@@ -84,7 +192,7 @@ namespace Versandstrasse
|
||||
for (int i = 0; i < matchedTextbounds.Count; i++)
|
||||
|
||||
{
|
||||
loadedPage = (PdfLoadedPage)document.Pages[i];
|
||||
loadedPage = (PdfLoadedPage)document.Pages[0];
|
||||
foreach (RectangleF rectangle in matchedTextbounds[i])
|
||||
{
|
||||
loadedPage.Graphics.DrawRectangle(PdfBrushes.White, rectangle);
|
||||
@@ -93,14 +201,18 @@ namespace Versandstrasse
|
||||
}
|
||||
}
|
||||
|
||||
private void Add_Logo(ref PdfLoadedDocument document, int color, int left, int top, string pages)
|
||||
private string get_logo(bool color)
|
||||
{
|
||||
if (color) { return @"E:\Software-Projekte\OnDoc\Images\tkb_logo_ohne_claim_sw.jpg"; } else { return @"E:\Software-Projekte\OnDoc\Images\tkb_logo_ohne_claim_4c_c.jpg"; }
|
||||
}
|
||||
private void Add_Logo(ref PdfLoadedDocument document, bool color, int left, int top, int width, int height, string pages)
|
||||
{
|
||||
string imagefile = "";
|
||||
imagefile = @"E:\Software-Projekte\OnDoc\Images\tkb_logo_ohne_claim_4c_c.jpg";
|
||||
if (color == 0) { imagefile = @"E:\Software-Projekte\OnDoc\Images\tkb_logo_ohne_claim_sw.jpg"; }
|
||||
|
||||
imagefile = get_logo(color);
|
||||
PdfBitmap image = new PdfBitmap(imagefile);
|
||||
|
||||
if (pages=="0") { return; }
|
||||
if (pages == "0") { return; }
|
||||
if (pages == "All")
|
||||
{
|
||||
for (int i = 0; i < document.Pages.Count; i++)
|
||||
@@ -113,8 +225,6 @@ namespace Versandstrasse
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
int docpages = document.Pages.Count;
|
||||
string[] page = pages.Split(';');
|
||||
|
||||
@@ -136,4 +246,37 @@ namespace Versandstrasse
|
||||
|
||||
|
||||
}
|
||||
public class versandscript
|
||||
{
|
||||
public string bezeichnung { get; set; } = "Versandstrassenparaemter";
|
||||
public int dokumenttypnr { get; set; } = 0;
|
||||
public string Split_Doc { get; set; } = "";
|
||||
public string PartCopies { get; set; } = "";
|
||||
|
||||
public string FinalDoc { get; set; } = "";
|
||||
public List<vsdokument> dokuments { get; set; } = new List<vsdokument>();
|
||||
|
||||
}
|
||||
|
||||
public class vsdokument
|
||||
{
|
||||
public bool Logo { get; set; } = true;
|
||||
public bool LogoColor { get; set; } = false;
|
||||
public int LogoTop { get; set; } = 0;
|
||||
public int LogoLeft { get; set; } = 0;
|
||||
public int LogoHeigth { get; set; } = 0;
|
||||
public int LogoWidth { get; set; } = 0;
|
||||
public string LogoOnPages { get; set; } = "1";
|
||||
|
||||
public string sourcedokument { get; set; } = "";
|
||||
public string pdfdokument { get; set; } = "";
|
||||
|
||||
public List<TextReplace> TextReplaces { get; set; } = new List<TextReplace>();
|
||||
}
|
||||
|
||||
public class TextReplace
|
||||
{
|
||||
public string TextToReplace { get; set; } = "";
|
||||
public string NewText { get; set; } = "";
|
||||
}
|
||||
}
|
||||
|
||||
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.
78
ZZPDFTest/Form1.Designer.cs
generated
78
ZZPDFTest/Form1.Designer.cs
generated
@@ -28,13 +28,20 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings messageBoxSettings1 = new Syncfusion.Windows.Forms.PdfViewer.MessageBoxSettings();
|
||||
Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings pdfViewerPrinterSettings1 = new Syncfusion.Windows.PdfViewer.PdfViewerPrinterSettings();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings textSearchSettings1 = new Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.button4 = new System.Windows.Forms.Button();
|
||||
this.pdfViewerControl1 = new Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(158, 79);
|
||||
this.button1.Location = new System.Drawing.Point(22, 746);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 0;
|
||||
@@ -44,7 +51,7 @@
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(314, 79);
|
||||
this.button2.Location = new System.Drawing.Point(22, 775);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
||||
this.button2.TabIndex = 1;
|
||||
@@ -52,11 +59,73 @@
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Location = new System.Drawing.Point(22, 804);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(75, 23);
|
||||
this.button3.TabIndex = 2;
|
||||
this.button3.Text = "button3";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// button4
|
||||
//
|
||||
this.button4.Location = new System.Drawing.Point(40, 27);
|
||||
this.button4.Name = "button4";
|
||||
this.button4.Size = new System.Drawing.Size(230, 23);
|
||||
this.button4.TabIndex = 3;
|
||||
this.button4.Text = "PDF_Aufbereiten";
|
||||
this.button4.UseVisualStyleBackColor = true;
|
||||
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||
//
|
||||
// pdfViewerControl1
|
||||
//
|
||||
this.pdfViewerControl1.CursorMode = Syncfusion.Windows.Forms.PdfViewer.PdfViewerCursorMode.SelectTool;
|
||||
this.pdfViewerControl1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.pdfViewerControl1.EnableContextMenu = true;
|
||||
this.pdfViewerControl1.EnableNotificationBar = true;
|
||||
this.pdfViewerControl1.HorizontalScrollOffset = 0;
|
||||
this.pdfViewerControl1.IsBookmarkEnabled = true;
|
||||
this.pdfViewerControl1.IsTextSearchEnabled = true;
|
||||
this.pdfViewerControl1.IsTextSelectionEnabled = true;
|
||||
this.pdfViewerControl1.Location = new System.Drawing.Point(288, 0);
|
||||
messageBoxSettings1.EnableNotification = true;
|
||||
this.pdfViewerControl1.MessageBoxSettings = messageBoxSettings1;
|
||||
this.pdfViewerControl1.MinimumZoomPercentage = 50;
|
||||
this.pdfViewerControl1.Name = "pdfViewerControl1";
|
||||
this.pdfViewerControl1.PageBorderThickness = 1;
|
||||
pdfViewerPrinterSettings1.Copies = 1;
|
||||
pdfViewerPrinterSettings1.PageOrientation = Syncfusion.Windows.PdfViewer.PdfViewerPrintOrientation.Auto;
|
||||
pdfViewerPrinterSettings1.PageSize = Syncfusion.Windows.PdfViewer.PdfViewerPrintSize.ActualSize;
|
||||
pdfViewerPrinterSettings1.PrintLocation = ((System.Drawing.PointF)(resources.GetObject("pdfViewerPrinterSettings1.PrintLocation")));
|
||||
pdfViewerPrinterSettings1.ShowPrintStatusDialog = true;
|
||||
this.pdfViewerControl1.PrinterSettings = pdfViewerPrinterSettings1;
|
||||
this.pdfViewerControl1.ReferencePath = null;
|
||||
this.pdfViewerControl1.ScrollDisplacementValue = 0;
|
||||
this.pdfViewerControl1.ShowHorizontalScrollBar = true;
|
||||
this.pdfViewerControl1.ShowToolBar = true;
|
||||
this.pdfViewerControl1.ShowVerticalScrollBar = true;
|
||||
this.pdfViewerControl1.Size = new System.Drawing.Size(1177, 854);
|
||||
this.pdfViewerControl1.SpaceBetweenPages = 8;
|
||||
this.pdfViewerControl1.TabIndex = 4;
|
||||
this.pdfViewerControl1.Text = "pdfViewerControl1";
|
||||
textSearchSettings1.CurrentInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(255)))), ((int)(((byte)(171)))), ((int)(((byte)(64)))));
|
||||
textSearchSettings1.HighlightAllInstance = true;
|
||||
textSearchSettings1.OtherInstanceColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(254)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))));
|
||||
this.pdfViewerControl1.TextSearchSettings = textSearchSettings1;
|
||||
this.pdfViewerControl1.VerticalScrollOffset = 0;
|
||||
this.pdfViewerControl1.VisualStyle = Syncfusion.Windows.Forms.PdfViewer.VisualStyle.Default;
|
||||
this.pdfViewerControl1.ZoomMode = Syncfusion.Windows.Forms.PdfViewer.ZoomMode.Default;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.ClientSize = new System.Drawing.Size(1465, 854);
|
||||
this.Controls.Add(this.pdfViewerControl1);
|
||||
this.Controls.Add(this.button4);
|
||||
this.Controls.Add(this.button3);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Name = "Form1";
|
||||
@@ -70,6 +139,9 @@
|
||||
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.Button button4;
|
||||
private Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl pdfViewerControl1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,14 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Serialization;
|
||||
using Syncfusion.Pdf;
|
||||
using Syncfusion.Pdf.Graphics;
|
||||
using Syncfusion.Pdf.Interactive;
|
||||
using Syncfusion.Pdf.Parsing;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using Versandstrasse;
|
||||
using System.IO;
|
||||
|
||||
namespace ZZPDFTest
|
||||
{
|
||||
@@ -158,5 +161,66 @@ namespace ZZPDFTest
|
||||
newdoc.Close(true);
|
||||
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
versandscript vscript = new versandscript();
|
||||
vsdokument dok = new vsdokument();
|
||||
|
||||
TextReplace tReplace = new TextReplace();
|
||||
tReplace.TextToReplace = "";
|
||||
tReplace.NewText = "";
|
||||
|
||||
dok.TextReplaces.Add(tReplace);
|
||||
vscript.dokuments.Add(dok);
|
||||
|
||||
vscript.bezeichnung = "Test";
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(versandscript));
|
||||
serializer.Serialize(System.IO.File.Create(@"x:\file.xml"), vscript);
|
||||
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
clsVersandstrasse vs = new clsVersandstrasse();
|
||||
string tempdir = @"h:\tssettings\edoka";
|
||||
string connectionstring = "data source=shu01\\shu00;initial catalog=edoka_dms;packet size=4096;user id=sa;password=*shu29";
|
||||
string pdfdokument = vs.Prepare_PDF("OFFEDK0082025002491692",tempdir,connectionstring);
|
||||
var stream = new MemoryStream(Convert.FromBase64String(pdfdokument));
|
||||
pdfViewerControl1.Load(stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class versandscript
|
||||
{
|
||||
public string bezeichnung { get; set; } = "Versandstrassenparaemter";
|
||||
public int dokumenttypnr { get; set; } = 0;
|
||||
public string Split_Doc { get; set; } = "";
|
||||
public string PartCopies { get; set; } = "1:0;2:1";
|
||||
|
||||
public List<vsdokument> dokuments { get; set; } = new List<vsdokument>();
|
||||
|
||||
}
|
||||
|
||||
public class vsdokument
|
||||
{
|
||||
public bool Logo { get; set; } = true;
|
||||
public bool LogoColor { get; set; } = false;
|
||||
public int LogoTop { get; set; } = 0;
|
||||
public int LogoLeft { get; set; } = 0;
|
||||
public int LogoHeigth { get; set; } = 0;
|
||||
public int LogoWidth { get; set; } = 0;
|
||||
public string LogoOnPages { get; set; } = "1";
|
||||
|
||||
public string sourcedokument { get; set; } = "";
|
||||
public string pdfdokument { get; set; } = "";
|
||||
|
||||
public List<TextReplace> TextReplaces { get; set; } = new List<TextReplace>();
|
||||
}
|
||||
|
||||
public class TextReplace
|
||||
{
|
||||
public string TextToReplace { get; set; } = "";
|
||||
public string NewText { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -117,4 +117,11 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="pdfViewerPrinterSettings1.PrintLocation" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0
|
||||
dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABVTeXN0ZW0uRHJh
|
||||
d2luZy5Qb2ludEYCAAAAAXgBeQAACwsCAAAAAAAAAAAAAAAL
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -46,8 +46,11 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Syncfusoin 462\Syncfusion.PdfToImageConverter.Base.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syncfusion.PdfViewer.Windows, Version=28.1462.33.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL" />
|
||||
<Reference Include="Syncfusion.Shared.Base, Version=28.1462.33.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -57,6 +60,9 @@
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Versandstrasse">
|
||||
<HintPath>..\Versandstrasse\bin\Debug\Versandstrasse.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
|
||||
BIN
ZZPDFTest/bin/Debug/BarcodeLib.dll
Normal file
BIN
ZZPDFTest/bin/Debug/BarcodeLib.dll
Normal file
Binary file not shown.
BIN
ZZPDFTest/bin/Debug/BarcodeLib.pdb
Normal file
BIN
ZZPDFTest/bin/Debug/BarcodeLib.pdb
Normal file
Binary file not shown.
BIN
ZZPDFTest/bin/Debug/DOCGEN.dll
Normal file
BIN
ZZPDFTest/bin/Debug/DOCGEN.dll
Normal file
Binary file not shown.
43
ZZPDFTest/bin/Debug/DOCGEN.dll.config
Normal file
43
ZZPDFTest/bin/Debug/DOCGEN.dll.config
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>
|
||||
BIN
ZZPDFTest/bin/Debug/DOCGEN.pdb
Normal file
BIN
ZZPDFTest/bin/Debug/DOCGEN.pdb
Normal file
Binary file not shown.
13
ZZPDFTest/bin/Debug/DOCGEN.xml
Normal file
13
ZZPDFTest/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
ZZPDFTest/bin/Debug/Database.dll
Normal file
BIN
ZZPDFTest/bin/Debug/Database.dll
Normal file
Binary file not shown.
BIN
ZZPDFTest/bin/Debug/Database.pdb
Normal file
BIN
ZZPDFTest/bin/Debug/Database.pdb
Normal file
Binary file not shown.
BIN
ZZPDFTest/bin/Debug/FastReport.Bars.dll
Normal file
BIN
ZZPDFTest/bin/Debug/FastReport.Bars.dll
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user