absperrblasen werden gezählt
This commit is contained in:
@@ -13,6 +13,10 @@ namespace XMLParser.Functions
|
||||
{
|
||||
internal FileStream handle = null;
|
||||
|
||||
public void WriteBaried(string content)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public abstract void WriteEntry(Dictionary<ECalculatedResult, decimal> calculated, List<KanalObjekt> inspektionenAmTag);
|
||||
|
||||
|
||||
@@ -8,6 +8,27 @@ namespace XMLParser.Functions
|
||||
{
|
||||
public static class Calculate
|
||||
{
|
||||
public static string CalculateWaterBariedAsString(List<KanalObjekt> inspektionen)
|
||||
{
|
||||
List<KanalObjekt> barieded = inspektionen.FindAll(x => x.Inspektionsdaten.OptischeInspektion.Wasserhaltung != EWasserhaltung.NONE);
|
||||
List<int> DistinctDurchmesser = barieded.Select(s => s.Inspektionsdaten.OptischeInspektion.Rohrleitung.Grunddaten.Profilbreite).Distinct().ToList();
|
||||
|
||||
string result = "#ANZAHLGESAMT# Dichtkissen gesetzt. ";
|
||||
int counter = 0;
|
||||
|
||||
foreach(int durchmesser in DistinctDurchmesser)
|
||||
{
|
||||
List<KanalObjekt> abgesperrt = barieded.FindAll(x => x.Inspektionsdaten.OptischeInspektion.Rohrleitung.Grunddaten.Profilbreite.Equals(durchmesser));
|
||||
result = string.Format("{0} DN{1} in Schacht", result, durchmesser);
|
||||
foreach(KanalObjekt objekt in abgesperrt)
|
||||
{
|
||||
result = string.Format(" {0} {1} ", result, objekt.Stammdaten.Objektbezeichnung);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
result = result.Replace("#ANZAHLGESAMT#",counter.ToString());
|
||||
return result;
|
||||
}
|
||||
public static Dictionary<ECalculatedResult,decimal> CalculateStreet(List<KanalObjekt> inspektionen)
|
||||
{
|
||||
Dictionary<ECalculatedResult,decimal> result = new Dictionary<ECalculatedResult, decimal>();
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace XMLParser.Functions.ProtokollWriter
|
||||
makeHeaderTitlesInHtml(avaibleHeaders);
|
||||
writeToFile(result);
|
||||
writeToFile("</table>");
|
||||
writeHTMLFooter();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -87,5 +87,12 @@ namespace XMLParser.Functions.ProtokollWriter
|
||||
}
|
||||
writeToFile("</tr>");
|
||||
}
|
||||
|
||||
public void WriteBaried(string content)
|
||||
{
|
||||
|
||||
writeToFile(string.Format("<p>{0}</p>",content));
|
||||
writeHTMLFooter();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ namespace XMLParser.Functions.UmsatzCalculator
|
||||
|
||||
Dictionary<ECalculatedResult,decimal> d = XMLParser.Functions.Calculate.CalculateStreet(objekte);
|
||||
protokollWriter.WriteEntry(d,objekte);
|
||||
protokollWriter.WriteBaried(XMLParser.Functions.Calculate.CalculateWaterBariedAsString(objekte));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user