Tätigkeiten überarbeitet.
This commit is contained in:
@@ -10,5 +10,6 @@ namespace KanSan.Base.Interfaces.UI
|
|||||||
public string Beschreibung { get; set; }
|
public string Beschreibung { get; set; }
|
||||||
public string Einheit { get; set; }
|
public string Einheit { get; set; }
|
||||||
public string Tag { get; set; }
|
public string Tag { get; set; }
|
||||||
|
public bool HatGüteschutzProtokoll { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace KanSan.Base.Interfaces.UI
|
|||||||
decimal Anzahl { get; set; }
|
decimal Anzahl { get; set; }
|
||||||
string Bemerkung { get; set; }
|
string Bemerkung { get; set; }
|
||||||
bool HatGueteschutzProtokoll { get; }
|
bool HatGueteschutzProtokoll { get; }
|
||||||
|
void LöscheErledigt();
|
||||||
LeistungsverzeichnisPosition Leistungsverzeichnis { get; set; }
|
LeistungsverzeichnisPosition Leistungsverzeichnis { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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 beschreibung;
|
||||||
string einheit;
|
string einheit;
|
||||||
string tag;
|
string tag;
|
||||||
|
bool hatGüteschutzProtokoll;
|
||||||
|
|
||||||
public string Positionsnummer
|
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)
|
public LeistungsverzeichnisPositionViewModel(LeistungsverzeichnisPosition position)
|
||||||
{
|
{
|
||||||
this.model = position;
|
this.model = position;
|
||||||
@@ -67,6 +79,7 @@ namespace KanSan.ViewModel
|
|||||||
beschreibung = model.Beschreibung;
|
beschreibung = model.Beschreibung;
|
||||||
einheit = model.Einheit;
|
einheit = model.Einheit;
|
||||||
tag = model.Tag;
|
tag = model.Tag;
|
||||||
|
hatGüteschutzProtokoll = model.HatGueteschutzProtokol;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Speichern()
|
public void Speichern()
|
||||||
@@ -75,6 +88,7 @@ namespace KanSan.ViewModel
|
|||||||
model.Beschreibung = beschreibung;
|
model.Beschreibung = beschreibung;
|
||||||
model.Einheit = einheit;
|
model.Einheit = einheit;
|
||||||
model.Tag = tag;
|
model.Tag = tag;
|
||||||
|
model.HatGueteschutzProtokol = hatGüteschutzProtokoll;
|
||||||
|
|
||||||
unitOfWork.LeistungsverzeichnisRepository.Update(model);
|
unitOfWork.LeistungsverzeichnisRepository.Update(model);
|
||||||
unitOfWork.Commit();
|
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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace KanSan.ViewModel
|
namespace KanSan.ViewModel
|
||||||
@@ -9,6 +10,9 @@ namespace KanSan.ViewModel
|
|||||||
public class SewerMainMenuViewModel : PropertyChangedClass,INotifyPropertyChanged
|
public class SewerMainMenuViewModel : PropertyChangedClass,INotifyPropertyChanged
|
||||||
{
|
{
|
||||||
private Sewer model;
|
private Sewer model;
|
||||||
|
private SchaedenViewModel schadenViewModel;
|
||||||
|
private Schaeden schaden;
|
||||||
|
|
||||||
|
|
||||||
public Sewer Objekt
|
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)
|
public SewerMainMenuViewModel(Sewer model)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ namespace KanSan.ViewModel
|
|||||||
bemerkung = model.Bemerkung;
|
bemerkung = model.Bemerkung;
|
||||||
fahrzeug = model.Fahrzeug;
|
fahrzeug = model.Fahrzeug;
|
||||||
leistungsverzeichnis = model.LeistungsverzeichnisPosition;
|
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");
|
IEnumerable<BaustelleLeistungsverzeichnisReferenz> baustelleLeistungsverzeichnis = unitOfWork.LeistungsverzeichnisReferenz.Get(x => x.Baustelle.Equals(MainWindowViewModel.Baustelle),includeProperties:"LVPosition");
|
||||||
lvPositionen = new List<LeistungsverzeichnisPosition>();
|
lvPositionen = new List<LeistungsverzeichnisPosition>();
|
||||||
@@ -117,6 +118,12 @@ namespace KanSan.ViewModel
|
|||||||
var x = LVPositionen.Equals(leistungsverzeichnis);
|
var x = LVPositionen.Equals(leistungsverzeichnis);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LöscheErledigt()
|
||||||
|
{
|
||||||
|
zeitStempel = DateTime.MinValue;
|
||||||
|
Mitarbeiter = String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
public void Speichern()
|
public void Speichern()
|
||||||
{
|
{
|
||||||
model.Mitarbeiter = mitarbeiter;
|
model.Mitarbeiter = mitarbeiter;
|
||||||
|
|||||||
@@ -5,17 +5,14 @@
|
|||||||
xmlns:local="clr-namespace:KanSan"
|
xmlns:local="clr-namespace:KanSan"
|
||||||
StartupUri="MainWindow.xaml">
|
StartupUri="MainWindow.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="Resources.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type UserControl}">
|
|
||||||
<Setter Property="FontFamily" Value="Comic Sans MS"/>
|
|
||||||
<Setter Property="FontSize" Value="20" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type Window}">
|
|
||||||
<Setter Property="FontFamily" Value="Comic Sans MS"/>
|
|
||||||
<Setter Property="FontSize" Value="20" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
25
KanSan/IstFertigZuBackgroundConverter.cs
Normal file
25
KanSan/IstFertigZuBackgroundConverter.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace KanSan
|
||||||
|
{
|
||||||
|
public class IstFertigZuBackgroundConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
var istFertig = (bool)value;
|
||||||
|
if (istFertig)
|
||||||
|
return Brushes.Green;
|
||||||
|
return Brushes.Blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
26
KanSan/IstFertigZuTextConverter.cs
Normal file
26
KanSan/IstFertigZuTextConverter.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using Syncfusion.Windows.Shared;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace KanSan
|
||||||
|
{
|
||||||
|
class IstFertigZuTextConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
DateTime dateTime = (DateTime)value;
|
||||||
|
if (dateTime != null && dateTime != DateTime.MinValue)
|
||||||
|
return string.Format("(Erledigt am {0})",dateTime.ToShortDateString());
|
||||||
|
return "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -75,6 +75,9 @@
|
|||||||
<Page Update="my_controls.xaml">
|
<Page Update="my_controls.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="Resources.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="UI\Leistungsverzeichnis\UCLeistungsverzeichnisPositionenBaustelle.xaml">
|
<Page Update="UI\Leistungsverzeichnis\UCLeistungsverzeichnisPositionenBaustelle.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
16
KanSan/Resources.xaml
Normal file
16
KanSan/Resources.xaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:local="clr-namespace:KanSan"
|
||||||
|
xmlns:l="clr-namespace:KanSan">
|
||||||
|
<l:IstFertigZuBackgroundConverter x:Key="IstFertigZuBackgroundConverter" />
|
||||||
|
<l:IstFertigZuTextConverter x:Key="IstFertigZuTextConverter" />
|
||||||
|
<Style TargetType="{x:Type UserControl}">
|
||||||
|
<Setter Property="FontFamily" Value="Comic Sans MS"/>
|
||||||
|
<Setter Property="FontSize" Value="20" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="{x:Type Window}">
|
||||||
|
<Setter Property="FontFamily" Value="Comic Sans MS"/>
|
||||||
|
<Setter Property="FontSize" Value="20" />
|
||||||
|
</Style>
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -11,10 +11,12 @@ namespace KanSan.SampleData
|
|||||||
string beschreibung;
|
string beschreibung;
|
||||||
string einheit;
|
string einheit;
|
||||||
string tag;
|
string tag;
|
||||||
|
bool hatGüteschutzprotokoll;
|
||||||
public string Positionsnummer { get => positionnummer; set => throw new NotImplementedException(); }
|
public string Positionsnummer { get => positionnummer; set => throw new NotImplementedException(); }
|
||||||
public string Beschreibung { get => beschreibung; set => throw new NotImplementedException(); }
|
public string Beschreibung { get => beschreibung; set => throw new NotImplementedException(); }
|
||||||
public string Einheit { get => einheit; set => throw new NotImplementedException(); }
|
public string Einheit { get => einheit; set => throw new NotImplementedException(); }
|
||||||
public string Tag { get => tag; set => throw new NotImplementedException(); }
|
public string Tag { get => tag; set => throw new NotImplementedException(); }
|
||||||
|
public bool HatGüteschutzProtokoll { get => hatGüteschutzprotokoll; set => throw new NotImplementedException(); }
|
||||||
|
|
||||||
public LeistungsverzeichnisPositionViewModelSampleData()
|
public LeistungsverzeichnisPositionViewModelSampleData()
|
||||||
{
|
{
|
||||||
@@ -22,6 +24,7 @@ namespace KanSan.SampleData
|
|||||||
beschreibung = "TV Inspektion DN200";
|
beschreibung = "TV Inspektion DN200";
|
||||||
einheit = "M";
|
einheit = "M";
|
||||||
tag = "JMStandard";
|
tag = "JMStandard";
|
||||||
|
hatGüteschutzprotokoll = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using KanSan.Base.Enums;
|
using KanSan.Base.Enums;
|
||||||
using KanSan.Base.Interfaces.UI;
|
using KanSan.Base.Interfaces.UI;
|
||||||
using KanSan.Base.Models;
|
using KanSan.Base.Models;
|
||||||
|
using Syncfusion.Windows.Shared;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -20,11 +21,27 @@ namespace KanSan.SampleData
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
|
DateTime timestamp;
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
timestamp = DateTime.Now;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
timestamp = DateTime.MinValue;
|
||||||
|
}
|
||||||
taetigkeiten.Add(new Base.Models.Taetigkeiten()
|
taetigkeiten.Add(new Base.Models.Taetigkeiten()
|
||||||
{
|
{
|
||||||
|
|
||||||
GuidNr = Guid.NewGuid(),
|
GuidNr = Guid.NewGuid(),
|
||||||
Anzahl = 2m,
|
Anzahl = 2m,
|
||||||
Bemerkung = "Test"
|
ZeitStempel = timestamp,
|
||||||
|
Bemerkung = "Test",
|
||||||
|
LeistungsverzeichnisPosition = new LeistungsverzeichnisPosition()
|
||||||
|
{
|
||||||
|
Beschreibung = "TV Inspektion"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}) ;
|
}) ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,13 @@
|
|||||||
xmlns:sd="clr-namespace:KanSan.SampleData"
|
xmlns:sd="clr-namespace:KanSan.SampleData"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="./../../my_controls.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
|
</UserControl.Resources>
|
||||||
<d:UserControl.DataContext>
|
<d:UserControl.DataContext>
|
||||||
<sd:LeistungsverzeichnisPositionViewModelSampleData />
|
<sd:LeistungsverzeichnisPositionViewModelSampleData />
|
||||||
</d:UserControl.DataContext>
|
</d:UserControl.DataContext>
|
||||||
@@ -22,17 +29,20 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Column="0" Grid.Row="0" Content="Positionsnummer" />
|
<Label Grid.Column="0" Grid.Row="0" Content="Positionsnummer" />
|
||||||
<Label Grid.Column="0" Grid.Row="1" Content="Beschreibung" />
|
<Label Grid.Column="0" Grid.Row="1" Content="Beschreibung" />
|
||||||
<Label Grid.Column="0" Grid.Row="2" Content="Einheit" />
|
<Label Grid.Column="0" Grid.Row="2" Content="Einheit" />
|
||||||
<Label Grid.Column="0" Grid.Row="3" Content="Tag" />
|
<Label Grid.Column="0" Grid.Row="3" Content="Tag" />
|
||||||
|
|
||||||
|
|
||||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Positionsnummer}" />
|
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Positionsnummer}" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Beschreibung}" />
|
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Beschreibung}" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Einheit}" />
|
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Einheit}" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Tag}" />
|
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Tag}" />
|
||||||
|
|
||||||
<Button Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Content="Speichern" Name="Save" Click="Save_Click" />
|
<CheckBox Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Content="Güteschutzprotokoll erforderlich" IsChecked="{Binding HatGüteschutzProtokoll}" Style="{StaticResource checkBoxCircle}" HorizontalAlignment="Center" />
|
||||||
|
<Button Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" Content="Speichern" Name="Save" Click="Save_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -23,8 +23,11 @@
|
|||||||
<DataTemplate DataType="{x:Type model:Taetigkeiten}">
|
<DataTemplate DataType="{x:Type model:Taetigkeiten}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{Binding LeistungsverzeichnisPosition.Beschreibung}" />
|
<TextBlock Text="{Binding LeistungsverzeichnisPosition.Beschreibung}" />
|
||||||
|
<TextBlock Text=" " />
|
||||||
|
<TextBlock Text="{Binding ZeitStempel, Converter={StaticResource IstFertigZuTextConverter}}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
|
|
||||||
</TreeView>
|
</TreeView>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<ControlTemplate TargetType="{x:Type Calendar}">
|
<ControlTemplate TargetType="{x:Type Calendar}">
|
||||||
<StackPanel HorizontalAlignment="Center" Name="PART_Root">
|
<StackPanel HorizontalAlignment="Center" Name="PART_Root">
|
||||||
<CalendarItem Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}" Name="PART_CalendarItem" Style="{TemplateBinding Calendar.CalendarItemStyle}" />
|
<CalendarItem Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}" Name="PART_CalendarItem" Style="{TemplateBinding Calendar.CalendarItemStyle}" />
|
||||||
<Button Content="Heute" Command="local:CalendarCommands.SelectToday" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
|
<Button Content="Heute" Background="{Binding Erledigt, Converter={StaticResource IstFertigZuBackgroundConverter}}" Command="local:CalendarCommands.SelectToday" CommandParameter="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -51,6 +51,7 @@
|
|||||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Mitarbeiter}" />
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Mitarbeiter}" />
|
||||||
|
|
||||||
<Calendar Style="{StaticResource DefaultCalendar}" Grid.Row="2" Grid.Column="1" Name="Calender" SelectedDate="{Binding ZeitStempel}" Margin="-220,0,0,0"/>
|
<Calendar Style="{StaticResource DefaultCalendar}" Grid.Row="2" Grid.Column="1" Name="Calender" SelectedDate="{Binding ZeitStempel}" Margin="-220,0,0,0"/>
|
||||||
|
<Button Grid.Row="2" Grid.Column="1" Content="Löschen" Margin="400,100,10,20" Name="ErledigtLöschen" Click="ErledigtLöschen_Click" />
|
||||||
<ComboBox Grid.Row="3" Grid.Column="1" ItemsSource="{Binding LVPositionen}" DisplayMemberPath="Beschreibung" SelectedValuePath="Beschreibung" SelectedItem="{Binding Leistungsverzeichnis, Mode=TwoWay}">
|
<ComboBox Grid.Row="3" Grid.Column="1" ItemsSource="{Binding LVPositionen}" DisplayMemberPath="Beschreibung" SelectedValuePath="Beschreibung" SelectedItem="{Binding Leistungsverzeichnis, Mode=TwoWay}">
|
||||||
<!--<ComboBox.ItemTemplate>
|
<!--<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@@ -62,7 +63,7 @@
|
|||||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Anzahl}" />
|
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Anzahl}" />
|
||||||
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Bemerkung}"/>
|
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Bemerkung}"/>
|
||||||
<Button Grid.Row="6" Grid.ColumnSpan="2" Content="Speichern" Name="Speichern" Click="Speichern_Click" />
|
<Button Grid.Row="6" Grid.ColumnSpan="2" Content="Speichern" Name="Speichern" Click="Speichern_Click" />
|
||||||
<Button Grid.Row="7" Grid.ColumnSpan="2" Content="Güteschutzprotokoll" IsEnabled="{Binding HatGueteschutzProtokoll}" />
|
<Button Grid.Row="7" Grid.ColumnSpan="2" Content="Güteschutzprotokoll" IsEnabled="{Binding HatGueteschutzProtokoll}" Name="Güteschutzprotokoll" Click="Güteschutzprotokoll_Click" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ namespace KanSan.UI
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.DataContext = new TaetigkeitEditViewModel(taetigkeit);
|
this.DataContext = new TaetigkeitEditViewModel(taetigkeit);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Speichern_Click(object sender, RoutedEventArgs e)
|
private void Speichern_Click(object sender, RoutedEventArgs e)
|
||||||
@@ -55,5 +56,16 @@ namespace KanSan.UI
|
|||||||
{
|
{
|
||||||
e.CanExecute = true;
|
e.CanExecute = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void Güteschutzprotokoll_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ErledigtLöschen_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
(DataContext as TaetigkeitEditViewModel).LöscheErledigt();
|
||||||
|
MessageBox.Show("Eintrag wurde als gelöscht Markiert");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,12 +20,18 @@
|
|||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="23*" />
|
<RowDefinition Height="11*" />
|
||||||
<RowDefinition Height="277*" />
|
<RowDefinition Height="64*" />
|
||||||
|
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Path=(self:SewerMainMenuViewModel.ObjektBezeichnung)}" />
|
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
|
||||||
<StackPanel Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Name="MenuItems">
|
<TextBlock Text="{Binding Path=(self:SewerMainMenuViewModel.ObjektBezeichnung)}" />
|
||||||
|
<TextBlock Text="{Binding Path=(self:SewerMainMenuViewModel.SchadenEntfernung)}" />
|
||||||
|
<TextBlock Text="" />
|
||||||
|
</StackPanel>
|
||||||
|
<!--<TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding Path=(self:SewerMainMenuViewModel.ObjektBezeichnung)}" />-->
|
||||||
|
|
||||||
|
<StackPanel Grid.Column="0" Grid.Row="1" Name="MenuItems">
|
||||||
|
|
||||||
<RadioButton Name="rbStammdaten" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Stammdaten" />
|
<RadioButton Name="rbStammdaten" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Stammdaten" />
|
||||||
<RadioButton Name="rbSchaeden" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Schäden" />
|
<RadioButton Name="rbSchaeden" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Schäden" />
|
||||||
@@ -33,6 +39,6 @@
|
|||||||
<RadioButton Name="rbSchachtAnb1" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Schachtanbindung 1" />
|
<RadioButton Name="rbSchachtAnb1" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Schachtanbindung 1" />
|
||||||
<RadioButton Name="Kurzliner1" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Kurzliner" />
|
<RadioButton Name="Kurzliner1" Checked="rbSewerMenuItem_Checked" Style="{StaticResource ToggelButtonList}" Content="Kurzliner" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ContentControl Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" Name="ObjektContentcontroller" />
|
<ContentControl Grid.Column="1" Grid.Row="1" Name="ObjektContentcontroller" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace KanSan.UI
|
|||||||
this.DataContext = new SewerMainMenuViewModel(objekt);
|
this.DataContext = new SewerMainMenuViewModel(objekt);
|
||||||
UI.UCObjektEdit uCObjektEdit = new UCObjektEdit(objekt);
|
UI.UCObjektEdit uCObjektEdit = new UCObjektEdit(objekt);
|
||||||
ObjektContentcontroller.Content = uCObjektEdit;
|
ObjektContentcontroller.Content = uCObjektEdit;
|
||||||
|
rbStammdaten.IsChecked = true;
|
||||||
|
|
||||||
Style style = this.FindResource("ToggelButtonList") as Style;
|
Style style = this.FindResource("ToggelButtonList") as Style;
|
||||||
|
|
||||||
@@ -64,6 +65,8 @@ namespace KanSan.UI
|
|||||||
{
|
{
|
||||||
aktuellSchadenSelected = e.schaeden;
|
aktuellSchadenSelected = e.schaeden;
|
||||||
UI.UCSanMaßnahmenList uCSanMaßnahmenList = new UCSanMaßnahmenList(e.schaeden);
|
UI.UCSanMaßnahmenList uCSanMaßnahmenList = new UCSanMaßnahmenList(e.schaeden);
|
||||||
|
(DataContext as SewerMainMenuViewModel).Schaden = e.schaeden;
|
||||||
|
|
||||||
uCSanMaßnahmenList.TaetigkeitenSelected += UCSanMaßnahmenList_TaetigkeitenSelected;
|
uCSanMaßnahmenList.TaetigkeitenSelected += UCSanMaßnahmenList_TaetigkeitenSelected;
|
||||||
rbSchaeden.IsChecked = false;
|
rbSchaeden.IsChecked = false;
|
||||||
ObjektContentcontroller.Content = uCSanMaßnahmenList;
|
ObjektContentcontroller.Content = uCSanMaßnahmenList;
|
||||||
@@ -74,6 +77,7 @@ namespace KanSan.UI
|
|||||||
private void UCSanMaßnahmenList_TaetigkeitenSelected(object sender, TaetigkeitenSelectEventArgs e)
|
private void UCSanMaßnahmenList_TaetigkeitenSelected(object sender, TaetigkeitenSelectEventArgs e)
|
||||||
{
|
{
|
||||||
UI.UCTaetigkeitEdit uCTaetigkeitEdit = new UCTaetigkeitEdit(e.Taetigkeit);
|
UI.UCTaetigkeitEdit uCTaetigkeitEdit = new UCTaetigkeitEdit(e.Taetigkeit);
|
||||||
|
Trace.WriteLine("Taetigkeit");
|
||||||
uCTaetigkeitEdit.SpeichernClicked += UCTaetigkeitEdit_SpeichernClicked;
|
uCTaetigkeitEdit.SpeichernClicked += UCTaetigkeitEdit_SpeichernClicked;
|
||||||
ObjektContentcontroller.Content = uCTaetigkeitEdit;
|
ObjektContentcontroller.Content = uCTaetigkeitEdit;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user