Imprägnierungsprotokolle werden erstellt

This commit is contained in:
HuskyTeufel
2019-10-22 16:54:21 +02:00
parent 416db297b4
commit 9747e129cc
16 changed files with 386 additions and 22 deletions

View File

@@ -27,6 +27,7 @@ namespace BerichtGen
string speicherpfad;
string source;
string filename;
bool hidden = false;
List<BilderObject> bilderObjects;
DataTable tableContent = null;
@@ -40,7 +41,7 @@ namespace BerichtGen
/// <param name="grunddaten"></param>
/// <param name="bilderObjects"></param>
/// <param name="tableContent"></param>
public FrmOptions(string firma, string vorlage, string speicherpfad,string filename, Hashtable grunddaten, List<BilderObject> bilderObjects, DataTable tableContent = null)
public FrmOptions(string firma, string vorlage, string speicherpfad, string filename, Hashtable grunddaten, List<BilderObject> bilderObjects, DataTable tableContent = null, bool hidden = false)
{
InitializeComponent();
@@ -55,6 +56,11 @@ namespace BerichtGen
this.tableContent = tableContent;
this.source = Path.Combine("documents", firma, vorlage);
this.filename = filename;
this.hidden = hidden;
if(hidden)
{
GenerateBericht();
}
}
@@ -65,7 +71,7 @@ namespace BerichtGen
bericht.Erzeuge(source, speicherpfad,filename, grundDaten, bilderObjects, tableContent,cb_doc.Checked,cb_pdf.Checked);
}
private void btn_start_Click(object sender, EventArgs e)
private void GenerateBericht()
{
generateProtokollThread = new Thread(Gen);
generateProtokollThread.IsBackground = true;
@@ -76,12 +82,17 @@ namespace BerichtGen
}
if (rb_yes.Checked && cb_pdf.Checked)
if (rb_yes.Checked && cb_pdf.Checked && !hidden)
{
string pfad = Path.Combine(speicherpfad, string.Format("{0}.pdf", filename));
FrmPDFViewer frmPDFViewer = new FrmPDFViewer(pfad);
frmPDFViewer.ShowDialog();
}
}
private void btn_start_Click(object sender, EventArgs e)
{
GenerateBericht();
this.Close();
}