Adding Customers now works.

This commit is contained in:
2024-05-05 18:14:31 +02:00
parent 39fb1aaffa
commit 04f7e998cb
12 changed files with 279 additions and 25 deletions

View File

@@ -4,6 +4,7 @@ using System.Windows;
using CommunityToolkit.Mvvm.ComponentModel;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using WD7UVN_SzTGUI_2023242.Client.WPF.Windows;
namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
{
@@ -16,10 +17,16 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
public MaintainerTeam SelectedMaintainerTeam
{
get { return selectedMaintainerTeam; }
set { SetProperty(ref selectedMaintainerTeam, value); (UpdateMaintainerTeamCommand as RelayCommand).NotifyCanExecuteChanged(); }
set
{
SetProperty(ref selectedMaintainerTeam, value);
(UpdateMaintainerTeamCommand as RelayCommand).NotifyCanExecuteChanged();
(GetColleaguesCommand as RelayCommand).NotifyCanExecuteChanged();
}
}
public ICommand UpdateMaintainerTeamCommand { get; set; }
public ICommand GetColleaguesCommand { get; set; }
public static bool IsInDesignMode
{
@@ -44,6 +51,16 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
{
return SelectedMaintainerTeam != null;
});
GetColleaguesCommand = new RelayCommand(() =>
{
Window window = new GetColleagues(SelectedMaintainerTeam);
window.Show();
},
() =>
{
return SelectedMaintainerTeam != null;
});
}
}
}