Kanalschaden werden richtig geparsed

This commit is contained in:
HuskyTeufel
2021-09-30 16:27:28 +02:00
parent 9da7090883
commit 98494be3cf
37 changed files with 576 additions and 136 deletions

View File

@@ -0,0 +1,49 @@
using DaSaSo.Domain.Model;
using DaSaSo.ViewModel.Controls;
using DaSaSo.ViewModel.Interface;
using Microsoft.Toolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DaSaSo.ViewModel
{
public class SewerDamageEditViewModel : BaseViewModel
{
private SewerDamage? _damage;
public SewerDamageControllViewModel damageControllViewModel { get; set; }
public SewerPreperationControllViewModel preperationControllViewModel { get; set; }
public IRelayCommand Berechne { get; set; }
public SewerDamage? Damage
{
get => _damage;
set
{
_damage = value;
OnPropertyChanged();
}
}
public SewerDamageEditViewModel(IActualProject actualProject)
{
if (actualProject.AktuellSewerDamage == null) throw new NullReferenceException(nameof(actualProject.AktuellSewerDamage));
Damage = actualProject.AktuellSewerDamage;
damageControllViewModel = new SewerDamageControllViewModel(Damage.DamageType);
preperationControllViewModel = new SewerPreperationControllViewModel(Damage.PreparationType);
Berechne = new RelayCommand(() =>
{
Damage.DamageType = damageControllViewModel.CalculateDamageFlags();
Damage.PreparationType = preperationControllViewModel.CalculatePreparationFlags();
});
}
}
}