Tätigkeiten erfassen angefangen

This commit is contained in:
Husky
2020-06-12 16:22:19 +02:00
parent 06fc472965
commit 9442d94de5
15 changed files with 239 additions and 6 deletions

View File

@@ -21,6 +21,7 @@
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="100" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<DataGrid CanUserAddRows="False" IsReadOnly="True" Grid.Row="0" ItemsSource="{Binding Schaeden}" Background="Gray" AutoGenerateColumns="False" Margin="0,0,0,0">
<DataGrid.RowStyle>
@@ -52,5 +53,6 @@
</DataGrid.Columns>
</DataGrid>
<Button Grid.Row="1" Name="NewSchaden" Click="NewSchaden_Click" Content="Neue Schäden Hinzufügen" />
<Button Grid.Row="2" Name="GenerateExcel" Content="Schadensbericht erstellen" Click="GenerateExcel_Click" />
</Grid>
</UserControl>

View File

@@ -70,6 +70,11 @@ namespace KanSan.UI
schaeden = schaeden
});
}
private void GenerateExcel_Click(object sender, RoutedEventArgs e)
{
(DataContext as SchaedenListViewModel).GenerateExcelFile();
}
}
public class SelectSchaedenEventArgs : EventArgs
{

View File

@@ -0,0 +1,27 @@
<UserControl x:Class="KanSan.UI.UCTätigkeitenNew"
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:TätigkeitNewViewModelSampleData />
</d:UserControl.DataContext>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="./../../my_controls.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<ContentControl Grid.Row="0" Content="{Binding }" ContentTemplate="{StaticResource SelectNewTätigkeitenLVPosition}" />
</Grid>
</UserControl>

View 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 UCTätigkeitenNew.xaml
/// </summary>
public partial class UCTätigkeitenNew : UserControl
{
public UCTätigkeitenNew()
{
InitializeComponent();
}
}
}