update 20241217
This commit is contained in:
@@ -21,6 +21,7 @@ namespace OnDoc.UIControls
|
||||
{
|
||||
public partial class DocPreview : UserControl
|
||||
{
|
||||
string PrintDokID = "";
|
||||
public int ZoomPercentage { get; set; }
|
||||
public DocPreview()
|
||||
{
|
||||
@@ -51,6 +52,7 @@ namespace OnDoc.UIControls
|
||||
}
|
||||
public void Show_Doc(string dokumentid)
|
||||
{
|
||||
PrintDokID= dokumentid;
|
||||
clsdok dok = new clsdok("", "", "");
|
||||
if (dokumentid.Length > 25) { dok.dokument = dokumentid; } else { dok = GetDoc(true, dokumentid); }
|
||||
var stream = new MemoryStream(Convert.FromBase64String(dok.dokument));
|
||||
@@ -70,8 +72,9 @@ namespace OnDoc.UIControls
|
||||
}
|
||||
}
|
||||
|
||||
public void show_base64(string image)
|
||||
public void show_base64(string image,string Logtext)
|
||||
{
|
||||
PrintDokID = "Vorschau Vorlage: " + Logtext; ;
|
||||
var stream = new MemoryStream(Convert.FromBase64String(image));
|
||||
if (stream.Length > 0)
|
||||
{
|
||||
@@ -98,6 +101,7 @@ namespace OnDoc.UIControls
|
||||
var stream = new MemoryStream(Convert.FromBase64String(db.dsdaten.Tables[0].Rows[0][0].ToString()));
|
||||
if (stream.Length > 0)
|
||||
{
|
||||
PrintDokID = "Serienbrief: Nr:" + Serienbriefnr.ToString() + " / " + dokumentid.ToString();
|
||||
this.pdfViewerControl1.Load(stream);
|
||||
this.pdfViewerControl1.Visible = true;
|
||||
pdfViewerControl1.ZoomMode = ZoomMode.FitWidth;
|
||||
@@ -283,11 +287,13 @@ namespace OnDoc.UIControls
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
pdfViewerControl1.Print(true);
|
||||
Logging.DocLog.Info("Preview gedruckt", "OnDoc", PrintDokID,"","");
|
||||
}
|
||||
|
||||
public void printpdf()
|
||||
{
|
||||
pdfViewerControl1.Print(true);
|
||||
Logging.DocLog.Info("Preview gedruckt", "OnDoc", PrintDokID, "", "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user