update 20250324

This commit is contained in:
Stefan Hutter
2025-03-24 21:19:13 +01:00
parent 9651721aa0
commit c767e2ed82
184 changed files with 908767 additions and 445 deletions

View File

@@ -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; } = "";
}
}