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

@@ -83,6 +83,10 @@
<Compile Include="Sanierung\Renovation\WerkseitigImprägniert.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BerichtGen\BerichtGen.csproj">
<Project>{3022DA07-FD06-4AEA-9FC8-00D318E95A82}</Project>
<Name>BerichtGen</Name>
</ProjectReference>
<ProjectReference Include="..\CSVParser\CSVParser.csproj">
<Project>{3F79BD28-9BF6-4902-8977-41E9E71F8488}</Project>
<Name>CSVParser</Name>

View File

@@ -27,5 +27,6 @@ namespace KlassenBIB
public double HarzTemperatur { get; set; }
public double Vakuum { get; set; }
public string HarzTyp { get; set; }
public double Walzenabstand { get; set; }
}
}

View File

@@ -1,4 +1,7 @@
using SanShared;
using BerichtGen;
using CSVParser;
using SanShared;
using SanShared.Exceptions;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -34,9 +37,10 @@ namespace KlassenBIB
string bediener;
DateTime anfangKalibrierung;
DateTime endeKalibirierung;
AbstractImprägnier imprägnierungsbericht;
public double GetGesamtHarzbedarf(double haltungslaenge)
{
return haltungslaenge * harzbedarf;
@@ -55,6 +59,43 @@ namespace KlassenBIB
public Hashtable MakeProtokoll(string destinationPath, IProjekt projekt)
{
IEnumerable<string> files = Directory.EnumerateFiles(destinationPath, "*.csv", SearchOption.AllDirectories);
IReadCSVData csvFile = null;
List<UVcsvStrukture> struktures = null;
if (files.Count() > 0)
{
csvFile = CsvParserFactory.ReadCSVFile(AcceptedCSVFormats.BLUELIGHT, files.Last());
try
{
try
{
struktures = csvFile.ReadCSVStrukture();
}
catch (CSVImportException)
{
//MessageBox.Show("Es scheint den Falschen Anlagentyp angegeben worden sein.", "CSV Datei konnte nicht gelesen werden", MessageBoxButtons.OK, MessageBoxIcon.Error);
//return false;
}
this.AnfangAushaertung = struktures.Select(x => x.Zeitstempel).Min();
this.EndeAushaertung = struktures.Select(x => x.Zeitstempel).Max();
this.Rueckholgeschwindigkeit = 0;
}
catch (FileNotFoundException ex)
{
Trace.WriteLine(ex.Message);
//MessageBox.Show(string.Format("Datei {0} wurde nicht gefunden", ex.FileName));
}
}
if (struktures != null)
{
makeGraphic.GetGraphics(struktures, destinationPath);
}
Hashtable grunddaten = new Hashtable()
{
{"AG_Vorname","" },
@@ -106,7 +147,7 @@ namespace KlassenBIB
grunddaten["hausnummer"] = Inspektionsobjekt.Hausnummer;
grunddaten["AG_Vorname"] = projekt.Auftraggeber.Name;
grunddaten["KLP_Nummer"] = Inspektionsobjekt.Sanierungsnummer;
grunddaten["KLP_Datum"] = DateTime.Now.ToShortDateString();
grunddaten["KLP_Datum"] = this.Datum.ToShortDateString();//DateTime.Now.ToShortDateString();
grunddaten["AG_Ort"] = projekt.Auftraggeber.Ort;
grunddaten["AG_Strasse"] = projekt.Auftraggeber.Strasse;
grunddaten["AG_Ansprechpartner"] = projekt.Auftraggeber.Ansprechpartner;
@@ -202,5 +243,6 @@ namespace KlassenBIB
public DateTime EndeKalibirierung { get => endeKalibirierung; set => endeKalibirierung = value; }
public bool Preliner { get => preliner; set => preliner = value; }
public AbstractImprägnier Imprägnierungsbericht { get => imprägnierungsbericht; set => imprägnierungsbericht = value; }
}
}

View File

@@ -12,5 +12,10 @@ namespace KlassenBIB
public string Imprägniernummer { get; set; }
public bool LagerungKorrekt { get; set; }
public string LängeCode { get; set; }
public override string ToString()
{
return Imprägniernummer;
}
}
}