54 lines
1.5 KiB
C#
54 lines
1.5 KiB
C#
using KanSan.Base.Models;
|
|
using System;
|
|
using System.Text;
|
|
|
|
namespace KanSan.ViewModel
|
|
{
|
|
public class SchaedenViewModel
|
|
{
|
|
Schaeden model;
|
|
|
|
bool RissBruchScherbe;
|
|
bool WurzelInkrustationAblagerungen;
|
|
bool StutzenEinragend;
|
|
bool Infiltration;
|
|
/*
|
|
bool VorbehandeltHD;
|
|
bool VorbehandeltMech;
|
|
bool VorbehandeltFraeser;
|
|
bool SchadstelleFaekalienFrei;
|
|
*/
|
|
decimal Entfernung;
|
|
|
|
public SchaedenViewModel(Schaeden schaden)
|
|
{
|
|
model = schaden;
|
|
|
|
RissBruchScherbe = model.RissBruchScherbe;
|
|
WurzelInkrustationAblagerungen = model.WurzelInkrustationAblagerungen;
|
|
StutzenEinragend = model.StutzenEinragend;
|
|
Infiltration = model.Infiltration;
|
|
Entfernung = model.Entfernung;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
StringBuilder result = new StringBuilder();
|
|
|
|
result.Append(string.Format("Schaden bei {0} m",Entfernung));
|
|
result.Append(" ");
|
|
if (RissBruchScherbe)
|
|
result.Append("Riss / Bruch / Scherbe ");
|
|
if (StutzenEinragend)
|
|
result.Append("& Einragende Stutzen ");
|
|
if (WurzelInkrustationAblagerungen)
|
|
result.Append("& Wurzeln / Inkrustationen / Ablagerungen ");
|
|
if (Infiltration)
|
|
result.Append("& Eindringen von Grundwasser");
|
|
|
|
return result.ToString();
|
|
}
|
|
|
|
|
|
}
|
|
} |