Schlauchliner form wird vollständig verwaltet
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
using DaSaSo.Domain.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.ViewModel.Controls
|
||||
{
|
||||
public class SewerRhebalationControllViewModel : BaseViewModel
|
||||
{
|
||||
public string Bediener
|
||||
{
|
||||
get => model.Operator;
|
||||
set
|
||||
{
|
||||
if(model.Operator != value)
|
||||
{
|
||||
model.Operator = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal TemperaturAussen
|
||||
{
|
||||
get => model.TemperatureOutdoors;
|
||||
set
|
||||
{
|
||||
if(model.TemperatureOutdoors != value)
|
||||
{
|
||||
model.TemperatureOutdoors = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal TemperaturSewer
|
||||
{
|
||||
get => model.TemperatureSewer;
|
||||
set
|
||||
{
|
||||
if(model.TemperatureSewer != value)
|
||||
{
|
||||
model.TemperatureSewer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Weather
|
||||
{
|
||||
get => model.Weather;
|
||||
set
|
||||
{
|
||||
if(model.Weather != value)
|
||||
{
|
||||
model.Weather = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
private DateTime _date;
|
||||
public DateTime Datum
|
||||
{
|
||||
get => _date;
|
||||
set
|
||||
{
|
||||
if(_date != value)
|
||||
{
|
||||
_date = value;
|
||||
model.Date = DateOnly.FromDateTime(_date);
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SewerPreperationControllViewModel SewerPreperationControllViewModel { get; set; }
|
||||
|
||||
private PipeLiner model;
|
||||
|
||||
public SewerRhebalationControllViewModel(PipeLiner model)
|
||||
{
|
||||
this.model = model;
|
||||
SewerPreperationControllViewModel = new SewerPreperationControllViewModel(model.PreparationType);
|
||||
_date = model.Date.ToDateTime(new TimeOnly(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using DaSaSo.ViewModel.Controls;
|
||||
using DaSaSo.ViewModel.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -11,7 +12,7 @@ namespace DaSaSo.ViewModel
|
||||
{
|
||||
public class SewerPipeLinerViewModel : BaseViewModel
|
||||
{
|
||||
private SewerPreperationControllViewModel _sewerPreperationControllViewModel;
|
||||
private SewerRhebalationControllViewModel _sewerRhebalationControllViewModel;
|
||||
private PipeLiner _model;
|
||||
|
||||
public PipeLiner Model
|
||||
@@ -80,21 +81,43 @@ namespace DaSaSo.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
public SewerPreperationControllViewModel SewerPreperationControllViewModel
|
||||
public decimal EinbauDruck
|
||||
{
|
||||
get => _sewerPreperationControllViewModel;
|
||||
set => _sewerPreperationControllViewModel = value;
|
||||
get => Model.InversionPressure;
|
||||
set
|
||||
{
|
||||
if(Model.InversionPressure != value)
|
||||
{
|
||||
Model.InversionPressure = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public SewerRhebalationControllViewModel SewerRhebalationControllViewModel
|
||||
{
|
||||
get => _sewerRhebalationControllViewModel;
|
||||
set => _sewerRhebalationControllViewModel = value;
|
||||
}
|
||||
|
||||
public SewerPipeLinerViewModel(IActualProject actualProject)
|
||||
{
|
||||
SewerPreperationControllViewModel = new SewerPreperationControllViewModel(EPreparationType.WaterBaried);
|
||||
|
||||
if(actualProject.AktuellSewerObject.PipeLiner == null)
|
||||
{
|
||||
actualProject.AktuellSewerObject.PipeLiner = new PipeLiner();
|
||||
}
|
||||
Model = actualProject.AktuellSewerObject.PipeLiner;
|
||||
|
||||
SewerRhebalationControllViewModel = new SewerRhebalationControllViewModel(Model);
|
||||
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
// Todo Calculate SewerPreperation
|
||||
//EPreparationType preparationFlags = SewerPreperationControllViewModel.CalculatePreparationFlags();
|
||||
//Model.PreparationType = preparationFlags;
|
||||
//SewerPreperationControllViewModel.Dispose();
|
||||
//Debugger.Break();
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace DaSaSo.ViewModel
|
||||
|
||||
private string _clientname = "";
|
||||
private string _projektname = "";
|
||||
private string _projektnummer = "";
|
||||
private string _buildingsitename = "";
|
||||
private RegistryKey? registry;
|
||||
const string REGISTRYKEY = "HKEY_CURRENT_USER\\Software\\Cosysda\\DaSaSo";
|
||||
@@ -73,6 +74,18 @@ namespace DaSaSo.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Projektnummer
|
||||
{
|
||||
get => _projektnummer;
|
||||
set
|
||||
{
|
||||
if (_projektnummer != value)
|
||||
{
|
||||
_projektnummer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Buildingsitename
|
||||
{
|
||||
get => _buildingsitename;
|
||||
@@ -203,6 +216,7 @@ namespace DaSaSo.ViewModel
|
||||
{
|
||||
SaveInRegistry("lastproject", _actualProject.AktuellProjekt.Id.ToString());
|
||||
Projektname = _actualProject.AktuellProjekt.Name;
|
||||
Projektnummer = _actualProject.AktuellProjekt.Projektnummer;
|
||||
OnPropertyChanged(nameof(CanSelectBuildingSite));
|
||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Buildingsites);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user