submit Add and Edit Command

This commit is contained in:
Natlinux81
2022-08-16 00:50:33 +02:00
parent cf8e7356e2
commit a72edbbafd
8 changed files with 96 additions and 21 deletions

View File

@@ -14,18 +14,19 @@ namespace Apollon.WPF.ViewModels
{
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
public EditTournamentViewModel(Tournament tournament, ModalNavigationStore modalNavigationStore)
public EditTournamentViewModel(ModalNavigationStore modalNavigationStore)
{
ICommand submitCommand = new EditTournamentCommand(modalNavigationStore);
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
AddEditDetailsViewModel = new AddEditDetailsViewModel(null, cancelCommand)
AddEditDetailsViewModel = new AddEditDetailsViewModel(submitCommand, cancelCommand )
{
Organisation = tournament.Organisation,
Tournamentname = tournament.Tournamentname,
Category = tournament.Category,
Startdate = tournament.Startdate,
Enddate = tournament.Enddate,
Location = tournament.Location,
Rounds = tournament.Rounds,
//Organisation = tournament.Organisation,
//Tournamentname = tournament.Tournamentname,
//Category = tournament.Category,
//Startdate = tournament.Startdate,
//Enddate = tournament.Enddate,
//Location = tournament.Location,
//Rounds = tournament.Rounds,
};
}
}