Leistungsverzeichnis hinzugefügt
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding OrtTeil}" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding BaustelleNummer}"/>
|
||||
|
||||
<Button Grid.ColumnSpan="2" Grid.Row="2" Content="Speichern" Name="Speichern" Click="Speichern_Click" />
|
||||
<Button Grid.ColumnSpan="2" Grid.Row="2" Content="Leistungsverzeichnis" Name="Leistungsverzeichnis" Click="Leistungsverzeichnis_Click" />
|
||||
<Button Grid.ColumnSpan="2" Grid.Row="3" Content="Speichern" Name="Speichern" Click="Speichern_Click" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace KanSan.UI
|
||||
public partial class UCBaustelleEdit : UserControl
|
||||
{
|
||||
public event EventHandler SpeichernClicked;
|
||||
public event EventHandler<SelectBaustelleEventArgs> LeistungsverzeichnisClicked;
|
||||
public UCBaustelleEdit(Baustelle baustelle)
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -32,11 +33,25 @@ namespace KanSan.UI
|
||||
if (handler != null)
|
||||
handler(this, e);
|
||||
}
|
||||
protected virtual void OnLeistungsverzeichnisClicked(SelectBaustelleEventArgs e)
|
||||
{
|
||||
EventHandler<SelectBaustelleEventArgs> handler = LeistungsverzeichnisClicked;
|
||||
if (handler != null)
|
||||
handler(this, e);
|
||||
}
|
||||
|
||||
private void Speichern_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
(DataContext as BaustelleEditViewModel).Speichern();
|
||||
OnSpeichernKlicked(EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void Leistungsverzeichnis_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OnLeistungsverzeichnisClicked(new SelectBaustelleEventArgs()
|
||||
{
|
||||
baustelle = (DataContext as BaustelleEditViewModel).Baustelle
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<UserControl x:Class="KanSan.UI.UCLeistungsverzeichnisPosList"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:KanSan.UI"
|
||||
xmlns:sd="clr-namespace:KanSan.SampleData"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="1024">
|
||||
<d:UserControl.DataContext>
|
||||
<sd:LeistungsverzeichnisListSampleData />
|
||||
</d:UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="373*" />
|
||||
<RowDefinition Height="77*" />
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid ItemsSource="{Binding LVPositionen}" AutoGenerateColumns="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Positionsnummer" Binding="{Binding Positionsnummer}" />
|
||||
<DataGridTextColumn Header="Beschreibung" Binding="{Binding Beschreibung}" />
|
||||
<DataGridTextColumn Header="Einheit" Binding="{Binding Einheit}" />
|
||||
<DataGridTextColumn Header="Tag" Binding="{Binding Tag}" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<Button Grid.Row="1" Name="NewLVPosition" Content="Neue LeistungsverzeichnisPosition" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace KanSan.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für UCLeistungsverzeichnisPosList.xaml
|
||||
/// </summary>
|
||||
public partial class UCLeistungsverzeichnisPosList : UserControl
|
||||
{
|
||||
public UCLeistungsverzeichnisPosList()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,8 +60,8 @@ namespace KanSan.UI
|
||||
if (treeView == null) return;
|
||||
if (!(treeView.SelectedItem is Taetigkeiten))
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
Debugger.Break();
|
||||
//if (Debugger.IsAttached)
|
||||
// Debugger.Break();
|
||||
return;
|
||||
}
|
||||
Taetigkeiten taetigkeiten = (Taetigkeiten)treeView.SelectedItem;
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Mitarbeiter}" />
|
||||
|
||||
<Calendar Style="{StaticResource DefaultCalendar}" Grid.Row="2" Grid.Column="1" SelectedDate="{Binding ZeitStempel}"/>
|
||||
<Calendar Style="{StaticResource DefaultCalendar}" Grid.Row="2" Grid.Column="1" Name="Calender" SelectedDate="{Binding ZeitStempel}"/>
|
||||
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Menge}" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Anzahl}" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Bemerkung}"/>
|
||||
<Button Grid.Row="6" Grid.ColumnSpan="2" Content="Speichern" Name="Speichern" Click="Speichern_Click" />
|
||||
|
||||
|
||||
@@ -47,14 +47,8 @@ namespace KanSan.UI
|
||||
|
||||
private void SelectTodayExecuted(object target, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
var calendar = target as Calendar;
|
||||
if(calendar == null)
|
||||
{
|
||||
if (Debugger.IsAttached)
|
||||
Debugger.Break();
|
||||
return;
|
||||
}
|
||||
Debugger.Break();
|
||||
|
||||
Calender.SelectedDate = DateTime.Now;
|
||||
}
|
||||
|
||||
private void SelectTodayCanExecute(object target, CanExecuteRoutedEventArgs e)
|
||||
|
||||
38
KanSan/UI/UCLeistungsverzeichnisPosition.xaml
Normal file
38
KanSan/UI/UCLeistungsverzeichnisPosition.xaml
Normal file
@@ -0,0 +1,38 @@
|
||||
<UserControl x:Class="KanSan.UI.UCLeistungsverzeichnisPosition"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:KanSan.UI"
|
||||
xmlns:sd="clr-namespace:KanSan.SampleData"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<d:UserControl.DataContext>
|
||||
<sd:LeistungsverzeichnisPositionViewModelSampleData />
|
||||
</d:UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Positionsnummer" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Beschreibung" />
|
||||
<Label Grid.Column="0" Grid.Row="2" Content="Einheit" />
|
||||
<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="1" Text="{Binding Beschreibung}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Einheit}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Tag}" />
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Content="Speichern" Name="Save" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
26
KanSan/UI/UCLeistungsverzeichnisPosition.xaml.cs
Normal file
26
KanSan/UI/UCLeistungsverzeichnisPosition.xaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace KanSan.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für UCLeistungsverzeichnisPosition.xaml
|
||||
/// </summary>
|
||||
public partial class UCLeistungsverzeichnisPosition : UserControl
|
||||
{
|
||||
public UCLeistungsverzeichnisPosition()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
KanSan/UI/UCLeistungsverzeichnisPositionenBaustelle.xaml
Normal file
33
KanSan/UI/UCLeistungsverzeichnisPositionenBaustelle.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<UserControl x:Class="KanSan.UI.LeistungsverzeichnisPositionenBaustelle"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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:KanSan.UI"
|
||||
xmlns:sd="clr-namespace:KanSan.SampleData"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<d:UserControl.DataContext>
|
||||
<sd:LeistungsverzeichnisBaustelleViewModelSampleData />
|
||||
</d:UserControl.DataContext>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="57*" />
|
||||
<RowDefinition Height="320*" />
|
||||
<RowDefinition Height="73*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ComboBox ItemsSource="{Binding Baustellen}" />
|
||||
|
||||
<DataGrid Grid.Row="1" ItemsSource="{Binding LeistungsverzeichnisPositionen}" AutoGenerateColumns="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridCheckBoxColumn Header="Aktiviert" Binding="{Binding Activate}" />
|
||||
<DataGridTextColumn Header="Positionsnummer" Binding="{Binding Positionsnummer}" />
|
||||
<DataGridTextColumn Header="Beschreibung" Binding="{Binding Beschreibung}" />
|
||||
<DataGridTextColumn Header="Einheit" Binding="{Binding Einheit}" />
|
||||
<DataGridTextColumn Header="Tag" Binding="{Binding Tag}" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<Button Grid.Row="2" Content="Speichern" />
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
26
KanSan/UI/UCLeistungsverzeichnisPositionenBaustelle.xaml.cs
Normal file
26
KanSan/UI/UCLeistungsverzeichnisPositionenBaustelle.xaml.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace KanSan.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für LeistungsverzeichnisPositionenBaustelle.xaml
|
||||
/// </summary>
|
||||
public partial class LeistungsverzeichnisPositionenBaustelle : UserControl
|
||||
{
|
||||
public LeistungsverzeichnisPositionenBaustelle()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -59,20 +59,35 @@ namespace KanSan.UI
|
||||
|
||||
|
||||
}
|
||||
|
||||
Schaeden aktuellSchadenSelected = null;
|
||||
private void UCSchaedenList_SanierungsmaßnahmenSelected(object sender, SelectSchaedenEventArgs e)
|
||||
{
|
||||
aktuellSchadenSelected = e.schaeden;
|
||||
UI.UCSanMaßnahmenList uCSanMaßnahmenList = new UCSanMaßnahmenList(e.schaeden);
|
||||
uCSanMaßnahmenList.TaetigkeitenSelected += UCSanMaßnahmenList_TaetigkeitenSelected;
|
||||
rbSchaeden.IsChecked = false;
|
||||
ObjektContentcontroller.Content = uCSanMaßnahmenList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void UCSanMaßnahmenList_TaetigkeitenSelected(object sender, TaetigkeitenSelectEventArgs e)
|
||||
{
|
||||
UI.UCTaetigkeitEdit uCTaetigkeitEdit = new UCTaetigkeitEdit(e.Taetigkeit);
|
||||
uCTaetigkeitEdit.SpeichernClicked += UCTaetigkeitEdit_SpeichernClicked;
|
||||
ObjektContentcontroller.Content = uCTaetigkeitEdit;
|
||||
}
|
||||
|
||||
private void UCTaetigkeitEdit_SpeichernClicked(object sender, EventArgs e)
|
||||
{
|
||||
if (aktuellSchadenSelected == null) return;
|
||||
UI.UCSanMaßnahmenList uCSanMaßnahmenList = new UCSanMaßnahmenList(aktuellSchadenSelected);
|
||||
uCSanMaßnahmenList.TaetigkeitenSelected += UCSanMaßnahmenList_TaetigkeitenSelected;
|
||||
rbSchaeden.IsChecked = false;
|
||||
ObjektContentcontroller.Content = uCSanMaßnahmenList;
|
||||
|
||||
}
|
||||
|
||||
private void UCSchaedenList_SchaedenSelected(object sender, SelectSchaedenEventArgs e)
|
||||
{
|
||||
rbSchaeden.IsChecked = false;
|
||||
|
||||
Reference in New Issue
Block a user