Edit Modal not Works

This commit is contained in:
Natlinux81
2022-08-16 02:52:01 +02:00
parent a72edbbafd
commit cc060b273a
5 changed files with 20 additions and 15 deletions

View File

@@ -14,19 +14,19 @@ namespace Apollon.WPF.ViewModels
{
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
public EditTournamentViewModel(ModalNavigationStore modalNavigationStore)
public EditTournamentViewModel(ModalNavigationStore modalNavigationStore, Tournament tournament)
{
ICommand submitCommand = new EditTournamentCommand(modalNavigationStore);
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
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,
};
}
}

View File

@@ -48,7 +48,10 @@ namespace Apollon.WPF.ViewModels
}
private void AddTournament(Tournament tournament, ModalNavigationStore modalNavigationStore)
{
_overviewListingItemViewModels.Add(new OverviewListingItemViewModel(tournament));
ICommand editTournamentCommand = new OpenAddTournamentCommand(modalNavigationStore);
_overviewListingItemViewModels.Add(new OverviewListingItemViewModel(tournament
//,editTournamentCommand
));
}
}

View File

@@ -26,7 +26,7 @@ namespace Apollon.WPF.ViewModels
OverviewDetailsViewModel = new OverviewDetailsViewModel(selectedTournamentStore);
AddTournamentCommand = new OpenAddTournamentCommand(modalNavigationStore);
EditTournamentCommand = new OpenEditTournamentCommand(modalNavigationStore);
//EditTournamentCommand = new OpenEditTournamentCommand(modalNavigationStore);
}
}
}