Code cleanup
auf Lambda umgebaut
This commit is contained in:
@@ -39,24 +39,17 @@ namespace XMLParser
|
|||||||
result.Add("SonstigesPauschal",SOPauschal);
|
result.Add("SonstigesPauschal",SOPauschal);
|
||||||
result.Add("HauptkanalPreis",HauptkanalPreis);
|
result.Add("HauptkanalPreis",HauptkanalPreis);
|
||||||
|
|
||||||
decimal SEOverlength = 0.0m;
|
|
||||||
// SE preise
|
|
||||||
foreach(KanalObjekt Strassenablauf in SEs) {
|
|
||||||
decimal length = Strassenablauf.Inspektionsdaten.OptischeInspektion.Rohrleitung.Inspektionslaenge;
|
|
||||||
if(length > 5.0m) {
|
|
||||||
SEOverlength += length - 5.0m;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
decimal SOOverlength = 0.0m;
|
|
||||||
// SO preise
|
|
||||||
foreach(KanalObjekt Sonstige in SOs) {
|
|
||||||
decimal length = Sonstige.Inspektionsdaten.OptischeInspektion.Rohrleitung.Inspektionslaenge;
|
|
||||||
if(length > 7.0m) {
|
|
||||||
SOOverlength += length - 7.0m;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
decimal LeitungOverlength = SEOverlength + SOOverlength;
|
|
||||||
|
decimal LeitungOverlength = 0.0m;
|
||||||
|
SEs.ForEach(x => {
|
||||||
|
decimal length = x.Inspektionsdaten.OptischeInspektion.Rohrleitung.Inspektionslaenge;
|
||||||
|
if(length > 5.0m) LeitungOverlength += length - 5.0m;
|
||||||
|
});
|
||||||
|
SOs.ForEach(x => {
|
||||||
|
decimal length = x.Inspektionsdaten.OptischeInspektion.Rohrleitung.Inspektionslaenge;
|
||||||
|
if(length > 7.0m) LeitungOverlength += length - 7.0m;
|
||||||
|
});
|
||||||
|
|
||||||
decimal LeitungsOverlengthPreis = LeitungOverlength * 2.4m;
|
decimal LeitungsOverlengthPreis = LeitungOverlength * 2.4m;
|
||||||
result.Add("LeitungÜberlaenge",LeitungOverlength);
|
result.Add("LeitungÜberlaenge",LeitungOverlength);
|
||||||
|
|||||||
Reference in New Issue
Block a user