Genehmigungen hinzugefügt
This commit is contained in:
@@ -13,6 +13,9 @@ namespace DaSaSo.ViewModel.Controls
|
||||
public bool Mechanisch { get; set; }
|
||||
public bool Roboter { get; set; }
|
||||
public bool Faekalienfrei { get; set; }
|
||||
public bool Genehmigung { get; set; }
|
||||
public bool WaterBaried { get; set; }
|
||||
public bool STVO { get; set; }
|
||||
|
||||
public SewerPreperationControllViewModel(EPreparationType preparationType)
|
||||
{
|
||||
@@ -20,6 +23,9 @@ namespace DaSaSo.ViewModel.Controls
|
||||
Mechanisch = preparationType.HasFlag(EPreparationType.CleanedMechanisch);
|
||||
Roboter = preparationType.HasFlag(EPreparationType.CleanedRoboter);
|
||||
Faekalienfrei = preparationType.HasFlag(EPreparationType.FaekalienFrei);
|
||||
Genehmigung = preparationType.HasFlag(EPreparationType.PermitNeeded);
|
||||
WaterBaried = preparationType.HasFlag(EPreparationType.WaterBaried);
|
||||
STVO = preparationType.HasFlag(EPreparationType.STVO);
|
||||
}
|
||||
|
||||
public EPreparationType CalculatePreparationFlags()
|
||||
@@ -29,6 +35,9 @@ namespace DaSaSo.ViewModel.Controls
|
||||
if (Mechanisch) result |= EPreparationType.CleanedMechanisch;
|
||||
if (Roboter) result |= EPreparationType.CleanedRoboter;
|
||||
if (Faekalienfrei) result |= EPreparationType.FaekalienFrei;
|
||||
if (Genehmigung) result |= EPreparationType.PermitNeeded;
|
||||
if (WaterBaried) result |= EPreparationType.WaterBaried;
|
||||
if (STVO) result |= EPreparationType.STVO;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using DaSaSo.Domain.Model;
|
||||
using DaSaSo.ViewModel.Controls;
|
||||
using DaSaSo.ViewModel.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -8,5 +11,90 @@ namespace DaSaSo.ViewModel
|
||||
{
|
||||
public class SewerPipeLinerViewModel : BaseViewModel
|
||||
{
|
||||
private SewerPreperationControllViewModel _sewerPreperationControllViewModel;
|
||||
private PipeLiner _model;
|
||||
|
||||
public PipeLiner Model
|
||||
{
|
||||
get => _model;
|
||||
set => _model = value;
|
||||
}
|
||||
|
||||
public string Operator
|
||||
{
|
||||
get => Model.Operator;
|
||||
set
|
||||
{
|
||||
if(Model.Operator != value)
|
||||
{
|
||||
Model.Operator = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool ClosedEnd
|
||||
{
|
||||
get => Model.ClosedEnd;
|
||||
set
|
||||
{
|
||||
if(Model.ClosedEnd != value)
|
||||
{
|
||||
Model.ClosedEnd = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool Preliner
|
||||
{
|
||||
get => Model.Preliner;
|
||||
set
|
||||
{
|
||||
if(Model.Preliner != value)
|
||||
{
|
||||
Model.Preliner = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal EinbauTemperatur
|
||||
{
|
||||
get => Model.TemperaturAssembly;
|
||||
set
|
||||
{
|
||||
if(Model.TemperaturAssembly != value)
|
||||
{
|
||||
Model.TemperaturAssembly = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal LagerungTemperatur
|
||||
{
|
||||
get => Model.TemperaturStorage;
|
||||
set
|
||||
{
|
||||
if (Model.TemperaturStorage != value)
|
||||
{
|
||||
Model.TemperaturStorage = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public SewerPreperationControllViewModel SewerPreperationControllViewModel
|
||||
{
|
||||
get => _sewerPreperationControllViewModel;
|
||||
set => _sewerPreperationControllViewModel = value;
|
||||
}
|
||||
|
||||
public SewerPipeLinerViewModel(IActualProject actualProject)
|
||||
{
|
||||
SewerPreperationControllViewModel = new SewerPreperationControllViewModel(EPreparationType.WaterBaried);
|
||||
if(actualProject.AktuellSewerObject.PipeLiner == null)
|
||||
{
|
||||
actualProject.AktuellSewerObject.PipeLiner = new PipeLiner();
|
||||
}
|
||||
Model = actualProject.AktuellSewerObject.PipeLiner;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -20,6 +21,7 @@ namespace DaSaSo.Wpf.HostBuilders
|
||||
string connectionString = "";
|
||||
Action<DbContextOptionsBuilder> configureDbContext = null;
|
||||
string databaseToUse = context.Configuration.GetConnectionString("databaseToUse");
|
||||
Trace.WriteLine(databaseToUse);
|
||||
if(databaseToUse.Equals("default"))
|
||||
{
|
||||
connectionString = context.Configuration.GetConnectionString("default");
|
||||
|
||||
@@ -90,7 +90,9 @@ namespace DaSaSo.Wpf.HostBuilders
|
||||
});
|
||||
services.AddTransient<CreateViewModel<SewerPipeLinerViewModel>>(services =>
|
||||
{
|
||||
return () => new SewerPipeLinerViewModel();
|
||||
return () => new SewerPipeLinerViewModel(
|
||||
services.GetRequiredService<IActualProject>()
|
||||
);
|
||||
});
|
||||
|
||||
services.AddTransient<CreateViewModel<ClientListViewModel>>(services =>
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<CheckBox Margin="5" Content="Mechanisch Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Mechanisch}" />
|
||||
<CheckBox Margin="5" Content="Mit Roborter Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Roboter}" />
|
||||
<CheckBox Margin="5" Content="Schadstelle Fäkalienfrei" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Faekalienfrei}" />
|
||||
<CheckBox Margin="5" Content="Genehmigung wurde eingeholt" Style="{StaticResource checkBoxCircleSmall}" />
|
||||
<CheckBox Margin="5" Content="Wasserhaltung wurde eingerichtet" Style="{StaticResource checkBoxCircleSmall}" />
|
||||
<CheckBox Margin="5" Content="Es wurde nach StVO abgesichert" Style="{StaticResource checkBoxCircleSmall}" />
|
||||
<CheckBox Margin="5" Content="Genehmigung wurde eingeholt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Genehmigung}" />
|
||||
<CheckBox Margin="5" Content="Wasserhaltung wurde eingerichtet" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding WaterBaried}" />
|
||||
<CheckBox Margin="5" Content="Es wurde nach StVO abgesichert" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding STVO}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPipeLinerViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
@@ -31,7 +31,7 @@
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="2" Content="Temperatur Aussen" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="3" Content="Temperatur Kanal" />
|
||||
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Margin="20" Text="{Binding Operator}" />
|
||||
<!--<TextBox Grid.Column="1" Grid.Row="1" Margin="20" />-->
|
||||
<DatePicker Grid.Column="1" Grid.Row="1" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Margin="20" />
|
||||
|
||||
@@ -4,45 +4,44 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
||||
xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPipeLinerViewModel}"
|
||||
mc:Ignorable="d" d:DesignWidth="800" Height="722">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0">
|
||||
<controls:SewerRehabilation />
|
||||
<controls:SewerRehabilation DataContext="{Binding SewerPreperationControllViewModel}" />
|
||||
</Border>
|
||||
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="1">
|
||||
<Grid Background="LightBlue">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Background="LightBlue">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="0" Content="Geschlossene Ende" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="1" Content="Preliner verwendet?" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="2" Content="Liner-Charge" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="3" Content="Lagerung Temperatur" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="4" Content="Temperatur beim Einbau" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="5" Content="Einbaudruck" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="0" Content="Geschlossene Ende" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="1" Content="Preliner verwendet?" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="2" Content="Liner-Charge" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="3" Content="Lagerung Temperatur" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="4" Content="Temperatur beim Einbau" />
|
||||
<Label Margin="20" Grid.Column="0" Grid.Row="5" Content="Einbaudruck" />
|
||||
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="0" Margin="20" Content="Ja" />
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="1" Margin="20" Content="Ja" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="2" Margin="20" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="3" Margin="20" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="4" Margin="20" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="5" Margin="20" />
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="0" Margin="20" Content="Ja" IsChecked="{Binding ClosedEnd}" />
|
||||
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="1" Margin="20" Content="Ja" IsChecked="{Binding Preliner}" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="2" Margin="20" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="3" Margin="20" Text="{Binding LagerungTemperatur}" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="4" Margin="20" Text="{Binding EinbauTemperatur}" />
|
||||
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="5" Margin="20" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user