Liste sortiert zusammenfassung
Die leitungen werden richtig angezeigt und zusammengefasst
This commit is contained in:
@@ -15,6 +15,6 @@ namespace XMLParser
|
|||||||
public string Entwaesserungsart { get => entwaesserungsart; set => entwaesserungsart = value; }
|
public string Entwaesserungsart { get => entwaesserungsart; set => entwaesserungsart = value; }
|
||||||
public Kante Kante { get => kante; set => kante = value; }
|
public Kante Kante { get => kante; set => kante = value; }
|
||||||
public Geometrie Geometrie { get => geometrie; set => geometrie = value; }
|
public Geometrie Geometrie { get => geometrie; set => geometrie = value; }
|
||||||
internal Knoten Knoten { get => knoten; set => knoten = value; }
|
public Knoten Knoten { get => knoten; set => knoten = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace XMLParser
|
namespace XMLParser
|
||||||
{
|
{
|
||||||
internal class Anschlusspunkt
|
public class Anschlusspunkt
|
||||||
{
|
{
|
||||||
string punktkennung;
|
string punktkennung;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ namespace XMLParser
|
|||||||
|
|
||||||
public EKnotenTyp KnotenTyp { get => knotenTyp; set => knotenTyp = value; }
|
public EKnotenTyp KnotenTyp { get => knotenTyp; set => knotenTyp = value; }
|
||||||
public Schacht Schacht { get => schacht; set => schacht = value; }
|
public Schacht Schacht { get => schacht; set => schacht = value; }
|
||||||
internal Anschlusspunkt Anschlusspunkt { get => anschlusspunkt; set => anschlusspunkt = value; }
|
public Anschlusspunkt Anschlusspunkt { get => anschlusspunkt; set => anschlusspunkt = value; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using XMLParser;
|
using XMLParser;
|
||||||
|
|
||||||
namespace XMLProgramm
|
namespace XMLProgramm
|
||||||
@@ -7,8 +10,42 @@ namespace XMLProgramm
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Hello World!");
|
|
||||||
XMLParse ser = new XMLParse("input.xml");
|
XMLParse ser = new XMLParse("input.xml");
|
||||||
|
IEnumerable<string> datums = ser.KanalObjekte.Select(x => x.Inspektionsdaten.OptischeInspektion.Inspektionsdatum).Distinct();
|
||||||
|
foreach(string datum in datums) {
|
||||||
|
Console.WriteLine("Folgende Datums sind erfasst worden : "+datum);
|
||||||
|
List<KanalObjekt> inspektionen = ser.KanalObjekte.FindAll(x => x.Inspektionsdaten.OptischeInspektion.Inspektionsdatum.Equals(datum));
|
||||||
|
int counter = 0;
|
||||||
|
foreach(KanalObjekt s in inspektionen) {
|
||||||
|
counter++;
|
||||||
|
decimal length = s.Inspektionsdaten.OptischeInspektion.Rohrleitung.Inspektionslaenge;
|
||||||
|
Console.Write(s.Stammdaten.Objektbezeichnung+ " "+length);
|
||||||
|
//if(s.Stammdaten.Objektbezeichnung.Equals("45893017")) Debugger.Break();
|
||||||
|
if(s.Inspektionsdaten.Anlagentyp.Equals(EAnlagetyp.Anschlussleitung)) {
|
||||||
|
if(s.Stammdaten.Knoten != null && s.Stammdaten.Knoten.Anschlusspunkt != null && s.Stammdaten.Knoten.Anschlusspunkt.Punktkennung.Equals("SE")) {
|
||||||
|
// 45903556RS07 ist anschlusspunkt => null, denn es ist einen Schacht
|
||||||
|
if(length > 5.0m) {
|
||||||
|
Console.Write(" Straßenablauf ");
|
||||||
|
decimal overlength = length - 5.0m;
|
||||||
|
Console.Write("# Over : "+overlength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(length > 7.0m) {
|
||||||
|
Console.Write(" Sonstiges ");
|
||||||
|
decimal overlength = length - 7.0m;
|
||||||
|
Console.Write("# Over : "+overlength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Console.WriteLine();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
Console.WriteLine(counter);
|
||||||
|
counter = 0;
|
||||||
|
Console.WriteLine("####");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user