37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using DaSaSo.Domain.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DaSaSo.ViewModel.Controls
|
|
{
|
|
public class SewerPreperationControllViewModel : BaseViewModel
|
|
{
|
|
public bool HD { get; set; }
|
|
public bool Mechanisch { get; set; }
|
|
public bool Roboter { get; set; }
|
|
public bool Faekalienfrei { get; set; }
|
|
|
|
public SewerPreperationControllViewModel(EPreparationType preparationType)
|
|
{
|
|
HD = preparationType.HasFlag(EPreparationType.CleanedHD);
|
|
Mechanisch = preparationType.HasFlag(EPreparationType.CleanedMechanisch);
|
|
Roboter = preparationType.HasFlag(EPreparationType.CleanedRoboter);
|
|
Faekalienfrei = preparationType.HasFlag(EPreparationType.FaekalienFrei);
|
|
}
|
|
|
|
public EPreparationType CalculatePreparationFlags()
|
|
{
|
|
EPreparationType result = EPreparationType.NONE;
|
|
if (HD) result |= EPreparationType.CleanedHD;
|
|
if (Mechanisch) result |= EPreparationType.CleanedMechanisch;
|
|
if (Roboter) result |= EPreparationType.CleanedRoboter;
|
|
if (Faekalienfrei) result |= EPreparationType.FaekalienFrei;
|
|
|
|
return result;
|
|
}
|
|
}
|
|
}
|