Tätigkeiten überarbeitet.
This commit is contained in:
4
KanSan.ViewModel/KanSan.ViewModel.csproj.user
Normal file
4
KanSan.ViewModel/KanSan.ViewModel.csproj.user
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -18,6 +18,7 @@ namespace KanSan.ViewModel
|
||||
string beschreibung;
|
||||
string einheit;
|
||||
string tag;
|
||||
bool hatGüteschutzProtokoll;
|
||||
|
||||
public string Positionsnummer
|
||||
{
|
||||
@@ -60,6 +61,17 @@ namespace KanSan.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public bool HatGüteschutzProtokoll
|
||||
{
|
||||
get => hatGüteschutzProtokoll;
|
||||
set
|
||||
{
|
||||
if (hatGüteschutzProtokoll == value) return;
|
||||
hatGüteschutzProtokoll = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public LeistungsverzeichnisPositionViewModel(LeistungsverzeichnisPosition position)
|
||||
{
|
||||
this.model = position;
|
||||
@@ -67,6 +79,7 @@ namespace KanSan.ViewModel
|
||||
beschreibung = model.Beschreibung;
|
||||
einheit = model.Einheit;
|
||||
tag = model.Tag;
|
||||
hatGüteschutzProtokoll = model.HatGueteschutzProtokol;
|
||||
}
|
||||
|
||||
public void Speichern()
|
||||
@@ -75,6 +88,7 @@ namespace KanSan.ViewModel
|
||||
model.Beschreibung = beschreibung;
|
||||
model.Einheit = einheit;
|
||||
model.Tag = tag;
|
||||
model.HatGueteschutzProtokol = hatGüteschutzProtokoll;
|
||||
|
||||
unitOfWork.LeistungsverzeichnisRepository.Update(model);
|
||||
unitOfWork.Commit();
|
||||
|
||||
54
KanSan.ViewModel/Schaeden/SchadenViewModel.cs
Normal file
54
KanSan.ViewModel/Schaeden/SchadenViewModel.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.ViewModel
|
||||
@@ -9,6 +10,9 @@ namespace KanSan.ViewModel
|
||||
public class SewerMainMenuViewModel : PropertyChangedClass,INotifyPropertyChanged
|
||||
{
|
||||
private Sewer model;
|
||||
private SchaedenViewModel schadenViewModel;
|
||||
private Schaeden schaden;
|
||||
|
||||
|
||||
public Sewer Objekt
|
||||
{
|
||||
@@ -23,6 +27,36 @@ namespace KanSan.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public Schaeden Schaden
|
||||
{
|
||||
set
|
||||
{
|
||||
if (schaden == value) return;
|
||||
schaden = value;
|
||||
schadenViewModel = new SchaedenViewModel(schaden);
|
||||
OnPropertyChanged("SchadenEntfernung");
|
||||
}
|
||||
}
|
||||
|
||||
public string SchadenEntfernung
|
||||
{
|
||||
get
|
||||
{
|
||||
Trace.WriteLine("Entfernung Schaden abgerufen");
|
||||
if (schaden == null) return string.Empty;
|
||||
return string.Format(schadenViewModel.ToString());
|
||||
}
|
||||
/*set
|
||||
{
|
||||
schadenEntfernung = value;
|
||||
Trace.WriteLine("Entfernung Schaden gesetzt");
|
||||
OnPropertyChanged();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public SewerMainMenuViewModel(Sewer model)
|
||||
{
|
||||
|
||||
@@ -103,6 +103,7 @@ namespace KanSan.ViewModel
|
||||
bemerkung = model.Bemerkung;
|
||||
fahrzeug = model.Fahrzeug;
|
||||
leistungsverzeichnis = model.LeistungsverzeichnisPosition;
|
||||
hatGueteschutzProtokoll = model.LeistungsverzeichnisPosition == null? false: model.LeistungsverzeichnisPosition.HatGueteschutzProtokol;
|
||||
|
||||
IEnumerable<BaustelleLeistungsverzeichnisReferenz> baustelleLeistungsverzeichnis = unitOfWork.LeistungsverzeichnisReferenz.Get(x => x.Baustelle.Equals(MainWindowViewModel.Baustelle),includeProperties:"LVPosition");
|
||||
lvPositionen = new List<LeistungsverzeichnisPosition>();
|
||||
@@ -117,6 +118,12 @@ namespace KanSan.ViewModel
|
||||
var x = LVPositionen.Equals(leistungsverzeichnis);
|
||||
}
|
||||
|
||||
public void LöscheErledigt()
|
||||
{
|
||||
zeitStempel = DateTime.MinValue;
|
||||
Mitarbeiter = String.Empty;
|
||||
}
|
||||
|
||||
public void Speichern()
|
||||
{
|
||||
model.Mitarbeiter = mitarbeiter;
|
||||
|
||||
Reference in New Issue
Block a user