Imprägnierungsprotokolle werden erstellt
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user