update 20250317
This commit is contained in:
207
Client/Versandstrasse/Versandstrasse.Designer.cs
generated
207
Client/Versandstrasse/Versandstrasse.Designer.cs
generated
@@ -29,28 +29,41 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
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();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Versandstrasse));
|
||||
Syncfusion.Windows.Forms.PdfViewer.TextSearchSettings textSearchSettings1 = 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.GrpPaketDetails = new System.Windows.Forms.GroupBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
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.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.rbversandoption3 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.rbversandoption2 = new System.Windows.Forms.RadioButton();
|
||||
this.rbversandoption1 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton1 = new System.Windows.Forms.RadioButton();
|
||||
this.radioButton2 = new System.Windows.Forms.RadioButton();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.pdfViewerControl1 = new Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl();
|
||||
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();
|
||||
((System.ComponentModel.ISupportInitialize)(this.treeViewAdv1)).BeginInit();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.GrpPaketDetails.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeViewAdv1
|
||||
@@ -68,10 +81,10 @@
|
||||
treeNodeAdvStyleInfo1.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)});
|
||||
this.treeViewAdv1.BeforeTouchSize = new System.Drawing.Size(487, 502);
|
||||
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;
|
||||
this.treeViewAdv1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.treeViewAdv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.treeViewAdv1.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.treeViewAdv1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(43)))), ((int)(((byte)(43)))));
|
||||
//
|
||||
@@ -89,7 +102,7 @@
|
||||
this.treeViewAdv1.Indent = 20;
|
||||
this.treeViewAdv1.ItemHeight = 25;
|
||||
this.treeViewAdv1.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(94)))), ((int)(((byte)(94)))), ((int)(((byte)(94)))));
|
||||
this.treeViewAdv1.Location = new System.Drawing.Point(2, 39);
|
||||
this.treeViewAdv1.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeViewAdv1.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218)))));
|
||||
this.treeViewAdv1.MetroScrollBars = true;
|
||||
this.treeViewAdv1.Name = "treeViewAdv1";
|
||||
@@ -97,7 +110,7 @@
|
||||
this.treeViewAdv1.SelectedNodeBackground = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(197)))), ((int)(((byte)(197))))));
|
||||
this.treeViewAdv1.SelectedNodeForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(43)))), ((int)(((byte)(43)))));
|
||||
this.treeViewAdv1.ShowFocusRect = false;
|
||||
this.treeViewAdv1.Size = new System.Drawing.Size(487, 502);
|
||||
this.treeViewAdv1.Size = new System.Drawing.Size(438, 502);
|
||||
this.treeViewAdv1.Style = Syncfusion.Windows.Forms.Tools.TreeStyle.Office2016Colorful;
|
||||
this.treeViewAdv1.TabIndex = 7;
|
||||
this.treeViewAdv1.Text = "treeViewAdv2";
|
||||
@@ -132,10 +145,11 @@
|
||||
this.toolStrip1.AutoSize = false;
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.tsbtnDruckPaketNew,
|
||||
this.tsbtnVersenden});
|
||||
this.tsbtnVersenden,
|
||||
this.tscheckboxpreview});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(2, 2);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(933, 37);
|
||||
this.toolStrip1.Size = new System.Drawing.Size(1551, 37);
|
||||
this.toolStrip1.TabIndex = 8;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
@@ -158,26 +172,18 @@
|
||||
//
|
||||
// GrpPaketDetails
|
||||
//
|
||||
this.GrpPaketDetails.Controls.Add(this.btnSend);
|
||||
this.GrpPaketDetails.Controls.Add(this.groupBox3);
|
||||
this.GrpPaketDetails.Controls.Add(this.groupBox1);
|
||||
this.GrpPaketDetails.Controls.Add(this.button1);
|
||||
this.GrpPaketDetails.Location = new System.Drawing.Point(495, 39);
|
||||
this.GrpPaketDetails.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.GrpPaketDetails.Location = new System.Drawing.Point(0, 0);
|
||||
this.GrpPaketDetails.Name = "GrpPaketDetails";
|
||||
this.GrpPaketDetails.Size = new System.Drawing.Size(437, 502);
|
||||
this.GrpPaketDetails.Size = new System.Drawing.Size(453, 502);
|
||||
this.GrpPaketDetails.TabIndex = 9;
|
||||
this.GrpPaketDetails.TabStop = false;
|
||||
this.GrpPaketDetails.Text = "Details zum Druckpaket";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(6, 454);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 3;
|
||||
this.button1.Text = "Speichern";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.label1);
|
||||
@@ -186,7 +192,7 @@
|
||||
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.groupBox3.Location = new System.Drawing.Point(3, 130);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(431, 192);
|
||||
this.groupBox3.Size = new System.Drawing.Size(447, 192);
|
||||
this.groupBox3.TabIndex = 2;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Rückantwort";
|
||||
@@ -224,6 +230,7 @@
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.radioButton3);
|
||||
this.groupBox1.Controls.Add(this.radioButton2);
|
||||
this.groupBox1.Controls.Add(this.rbversandoption3);
|
||||
this.groupBox1.Controls.Add(this.radioButton1);
|
||||
@@ -232,11 +239,21 @@
|
||||
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(431, 114);
|
||||
this.groupBox1.Size = new System.Drawing.Size(447, 114);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Versandoptionen";
|
||||
//
|
||||
// radioButton2
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(332, 74);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(62, 17);
|
||||
this.radioButton2.TabIndex = 4;
|
||||
this.radioButton2.Text = "B2-Post";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbversandoption3
|
||||
//
|
||||
this.rbversandoption3.AutoSize = true;
|
||||
@@ -247,6 +264,16 @@
|
||||
this.rbversandoption3.Text = "Hauptadresse, Postversand erzwingen";
|
||||
this.rbversandoption3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(332, 29);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(56, 17);
|
||||
this.radioButton1.TabIndex = 3;
|
||||
this.radioButton1.Text = "A-Post";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// rbversandoption2
|
||||
//
|
||||
this.rbversandoption2.AutoSize = true;
|
||||
@@ -267,35 +294,117 @@
|
||||
this.rbversandoption1.Text = "Hauptadresse und Versandart";
|
||||
this.rbversandoption1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButton1
|
||||
// button1
|
||||
//
|
||||
this.radioButton1.AutoSize = true;
|
||||
this.radioButton1.Location = new System.Drawing.Point(332, 52);
|
||||
this.radioButton1.Name = "radioButton1";
|
||||
this.radioButton1.Size = new System.Drawing.Size(56, 17);
|
||||
this.radioButton1.TabIndex = 3;
|
||||
this.radioButton1.Text = "A-Post";
|
||||
this.radioButton1.UseVisualStyleBackColor = true;
|
||||
this.button1.Location = new System.Drawing.Point(27, 337);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 3;
|
||||
this.button1.Text = "Speichern";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// radioButton2
|
||||
// pdfViewerControl1
|
||||
//
|
||||
this.radioButton2.AutoSize = true;
|
||||
this.radioButton2.Checked = true;
|
||||
this.radioButton2.Location = new System.Drawing.Point(332, 29);
|
||||
this.radioButton2.Name = "radioButton2";
|
||||
this.radioButton2.Size = new System.Drawing.Size(56, 17);
|
||||
this.radioButton2.TabIndex = 4;
|
||||
this.radioButton2.TabStop = true;
|
||||
this.radioButton2.Text = "B-Post";
|
||||
this.radioButton2.UseVisualStyleBackColor = true;
|
||||
this.pdfViewerControl1.CursorMode = Syncfusion.Windows.Forms.PdfViewer.PdfViewerCursorMode.SelectTool;
|
||||
this.pdfViewerControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
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(0, 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(660, 502);
|
||||
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;
|
||||
this.pdfViewerControl1.VerticalScrollOffset = 0;
|
||||
this.pdfViewerControl1.VisualStyle = Syncfusion.Windows.Forms.PdfViewer.VisualStyle.Default;
|
||||
this.pdfViewerControl1.ZoomMode = Syncfusion.Windows.Forms.PdfViewer.ZoomMode.Default;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.treeViewAdv1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.panel1.Location = new System.Drawing.Point(2, 39);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(438, 502);
|
||||
this.panel1.TabIndex = 11;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.GrpPaketDetails);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.panel2.Location = new System.Drawing.Point(440, 39);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(453, 502);
|
||||
this.panel2.TabIndex = 12;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.Controls.Add(this.pdfViewerControl1);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel3.Location = new System.Drawing.Point(893, 39);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(660, 502);
|
||||
this.panel3.TabIndex = 13;
|
||||
//
|
||||
// radioButton3
|
||||
//
|
||||
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;
|
||||
//
|
||||
// tscheckboxpreview
|
||||
//
|
||||
this.tscheckboxpreview.Name = "tscheckboxpreview";
|
||||
this.tscheckboxpreview.Size = new System.Drawing.Size(205, 34);
|
||||
this.tscheckboxpreview.Text = "Vorschau aufbereitete Dokumente";
|
||||
//
|
||||
// btnSend
|
||||
//
|
||||
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);
|
||||
//
|
||||
// Versandstrasse
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(937, 543);
|
||||
this.Controls.Add(this.treeViewAdv1);
|
||||
this.Controls.Add(this.GrpPaketDetails);
|
||||
this.ClientSize = new System.Drawing.Size(1555, 543);
|
||||
this.Controls.Add(this.panel3);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.KeyPreview = true;
|
||||
@@ -312,6 +421,9 @@
|
||||
this.groupBox3.PerformLayout();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -333,5 +445,12 @@
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.RadioButton radioButton2;
|
||||
private System.Windows.Forms.RadioButton radioButton1;
|
||||
private Syncfusion.Windows.Forms.PdfViewer.PdfViewerControl pdfViewerControl1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,10 @@ using Syncfusion.Windows.Forms;
|
||||
using Model;
|
||||
using OnDoc.DocMgmt;
|
||||
using System.Xml.Linq;
|
||||
using Versandstrasse;
|
||||
using System.IO;
|
||||
using Syncfusion.Pdf;
|
||||
using Database;
|
||||
|
||||
namespace OnDoc.Versandstrasse
|
||||
{
|
||||
@@ -242,7 +246,16 @@ namespace OnDoc.Versandstrasse
|
||||
lbgasadresse.SelectedIndex = Convert.ToInt32(paket.GASAdresse.ToString());
|
||||
} else { chkGAS.Checked= false; }
|
||||
}
|
||||
else { GrpPaketDetails.Enabled=false; }
|
||||
else {
|
||||
if (tscheckboxpreview.Checked)
|
||||
{
|
||||
clsVersandstrasse vs = new clsVersandstrasse();
|
||||
string dok = vs.Prepare_PDF(node.Tag.ToString(), AppParams.tempdir, AppParams.connectionstring);
|
||||
var stream = new MemoryStream(Convert.FromBase64String(dok));
|
||||
this.pdfViewerControl1.Load(stream);
|
||||
}
|
||||
|
||||
GrpPaketDetails.Enabled=false; }
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
@@ -261,5 +274,54 @@ namespace OnDoc.Versandstrasse
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void btnSend_Click(object sender, EventArgs e)
|
||||
{
|
||||
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;
|
||||
}
|
||||
private string save_stapel(ref Stream[] streams)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
PdfDocument finalDoc = new PdfDocument();
|
||||
PdfDocumentBase.Merge(finalDoc, streams);
|
||||
|
||||
MemoryStream outputStream = new MemoryStream();
|
||||
finalDoc.Save(outputStream);
|
||||
byte[] bytes;
|
||||
bytes = outputStream.ToArray();
|
||||
return Convert.ToBase64String(bytes);
|
||||
}
|
||||
catch { return ""; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,6 +120,13 @@
|
||||
<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">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0
|
||||
dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABVTeXN0ZW0uRHJh
|
||||
d2luZy5Qb2ludEYCAAAAAXgBeQAACwsCAAAAAAAAAAAAAAAL
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
Reference in New Issue
Block a user