Client wird gespeichert mittels interface
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
using DaSaSo.Domain.Model;
|
||||
using DaSaSo.Domain.Services;
|
||||
using DaSaSo.Domain.Services.ClientServices;
|
||||
using DaSaSo.EntityFramework;
|
||||
using DaSaSo.EntityFramework.Services;
|
||||
using DaSaSo.ViewModel;
|
||||
using DaSaSo.ViewModel.Factories;
|
||||
using DaSaSo.ViewModel.Interface;
|
||||
using DaSaSo.ViewModel.State.ActualState;
|
||||
using DaSaSo.ViewModel.State.Navigation;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace DaSaSo.Wpf
|
||||
@@ -23,7 +18,7 @@ namespace DaSaSo.Wpf
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
protected override async void OnStartup(StartupEventArgs e)
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
IServiceProvider serviceProvider = CreateServiceProvider();
|
||||
|
||||
@@ -43,6 +38,8 @@ namespace DaSaSo.Wpf
|
||||
services.AddSingleton<IViewModelAbstractFactory, ViewModelAbstractFactory>();
|
||||
services.AddSingleton<IViewModelFactory<HomeViewModel>, HomeViewModelFactory>();
|
||||
services.AddSingleton<IViewModelFactory<ClientListViewModel>, ClientListViewModelFactory>();
|
||||
services.AddSingleton<IViewModelFactory<ClientEditViewModel>, ClientEditViewModelFactory>();
|
||||
services.AddScoped<IActualProject, ActualProject>();
|
||||
services.AddScoped<INavigator, Navigator>();
|
||||
|
||||
services.AddScoped<MainWindowViewModel>();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<RadioButton Grid.Row="0" Content="Kunden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateViewModelCommand}" CommandParameter="{x:Static nav:EViewType.Clients}" />
|
||||
<RadioButton Grid.Row="1" Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateViewModelCommand}" CommandParameter="{x:Static nav:EViewType.Projects}" />
|
||||
<RadioButton Grid.Row="1" Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateViewModelCommand}" CommandParameter="{x:Static nav:EViewType.ClientEdit}" />
|
||||
<RadioButton Grid.Row="2" Content="Baustellen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateViewModelCommand}" CommandParameter="{x:Static nav:EViewType.Buildingsites}" />
|
||||
<RadioButton Grid.Row="3" Content="Objekten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateViewModelCommand}" CommandParameter="{x:Static nav:EViewType.SewerObjects}" />
|
||||
</Grid>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<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 auswählen" Command="{Binding SelectCommand}" />
|
||||
<Button Content="Kunde Editieren" Command="{Binding EditClientCommand}"/>
|
||||
<Button Content="Kunde Hinzufügen" Command="{Binding AddNewClientCommand}" />
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user