WIP dependency Injection
This commit is contained in:
39
DaSaSo.Wpf/View/Client/ClientEditView.xaml
Normal file
39
DaSaSo.Wpf/View/Client/ClientEditView.xaml
Normal file
@@ -0,0 +1,39 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.View.Client.ClientEditView"
|
||||
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:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientEditViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Text="Vorname" />
|
||||
<TextBlock Grid.Row="1" Text="Nachname" />
|
||||
<TextBlock Grid.Row="2" Text="Strasse" />
|
||||
<TextBlock Grid.Row="3" Text="Postleitzahl" />
|
||||
<TextBlock Grid.Row="4" Text="Ort" />
|
||||
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Model.Firstname}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Model.LastName}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Model.Street}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Model.Postcode}" />
|
||||
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Model.Country}" />
|
||||
|
||||
<Button Grid.Row="5" Grid.ColumnSpan="2" Command="{Binding SaveClientCommand}" Content="Daten Speichern" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
DaSaSo.Wpf/View/Client/ClientEditView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/Client/ClientEditView.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 DaSaSo.Wpf.View.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ClientEditView.xaml
|
||||
/// </summary>
|
||||
public partial class ClientEditView : UserControl
|
||||
{
|
||||
public ClientEditView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
24
DaSaSo.Wpf/View/Client/ClientListView.xaml
Normal file
24
DaSaSo.Wpf/View/Client/ClientListView.xaml
Normal file
@@ -0,0 +1,24 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.View.Client.ClientListView"
|
||||
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:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientListViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<TextBlock Text="Kundenliste" />
|
||||
<ListView ItemsSource="{Binding Clients}" DisplayMemberPath="Firstname" SelectedItem="{Binding SelectedClient, Mode=TwoWay}"/>
|
||||
<Button Content="Kunde auswählen" Command="{Binding SelectClientCommand}" />
|
||||
<Button Content="Kunde Editieren" Command="{Binding EditClientCommand}"/>
|
||||
<Button Content="Kunde Hinzufügen" Command="{Binding AddNewClientCommand}" />
|
||||
</StackPanel>
|
||||
<Border Background="Gray" d:Visibility="Hidden" Visibility="{Binding IsLoading, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||
<TextBlock Foreground="White" FontSize="40" Text="Loading"></TextBlock>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
DaSaSo.Wpf/View/Client/ClientListView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/Client/ClientListView.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 DaSaSo.Wpf.View.Client
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ClientListView.xaml
|
||||
/// </summary>
|
||||
public partial class ClientListView : UserControl
|
||||
{
|
||||
public ClientListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user