Adding Customers now works.
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user