This commit is contained in:
2024-04-30 15:26:02 +02:00
parent 7fed581178
commit 320391bd06
4 changed files with 186 additions and 1 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
{
@@ -42,7 +43,7 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
{
if (!IsInDesignMode)
{
Employees = new RestCollection<Employee>("http://localhost:5000/", "api/GetSubordinates", "hub");
Employees = new RestCollection<Employee>("http://localhost:5000/", "api/Employee", "hub");
UpdateEmployeeCommand = new RelayCommand(() =>
{
@@ -61,6 +62,16 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
{
return SelectedEmployee != null;
});
GetSubordinatesCommand = new RelayCommand(() =>
{
Window window = new GetSubordinates(SelectedEmployee);
window.Show();
},
() =>
{
return SelectedEmployee != null;
});
}
}
}