Projekte können erstellt und geladen werden
This commit is contained in:
35
SewerStammGen/Views/Projekte/ProjektEditView.xaml
Normal file
35
SewerStammGen/Views/Projekte/ProjektEditView.xaml
Normal file
@@ -0,0 +1,35 @@
|
||||
<UserControl x:Class="SewerStammGen.WPF.Views.ProjektEditView"
|
||||
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:SewerStammGen.WPF.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Projektname" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Erstelldatum" />
|
||||
<Label Grid.Column="0" Grid.Row="2" Content="Strasse" />
|
||||
<Label Grid.Column="0" Grid.Row="3" Content="Ort" />
|
||||
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding ProjektName}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Erstelldatum}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Strasse}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Ort}" />
|
||||
|
||||
<Button Grid.ColumnSpan="2" Grid.Row="4" Content="Speichern" Command="{Binding Speichern}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
SewerStammGen/Views/Projekte/ProjektEditView.xaml.cs
Normal file
28
SewerStammGen/Views/Projekte/ProjektEditView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
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 SewerStammGen.WPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ProjektEditView.xaml
|
||||
/// </summary>
|
||||
public partial class ProjektEditView : UserControl
|
||||
{
|
||||
public ProjektEditView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,19 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<DataGrid ItemsSource="{Binding Projekte}">
|
||||
<StackPanel>
|
||||
<DataGrid FontSize="20" Margin="10" SelectedItem="{Binding SelectedProjekt}" ItemsSource="{Binding Projekte}" IsReadOnly="True" SelectionMode="Single" AutoGenerateColumns="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Projektname" Binding="{Binding Projektname}" />
|
||||
<DataGridTextColumn Header="Erstelldatum" Binding="{Binding Erstelldatum}" />
|
||||
<DataGridTextColumn Header="Strasse" Binding="{Binding Strasse}" />
|
||||
<DataGridTextColumn Header="Ort" Binding="{Binding Ort}" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<Button Margin="2" FontSize="20" Content="Projekt Auswählen" IsEnabled="{Binding CanSelectProjekt}" Command="{Binding SelectCommand}" />
|
||||
<Button Margin="2" FontSize="20" Content="Projekt Editieren" IsEnabled="{Binding CanSelectProjekt}" Command="{Binding EditCommand}" />
|
||||
<Button Margin="2" FontSize="20" Content="Projekt Anlegen" Command="{Binding AddCommand}" />
|
||||
</StackPanel>
|
||||
|
||||
</DataGrid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user