submit Add and Edit Command
This commit is contained in:
@@ -15,8 +15,9 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
public AddTournamentViewModel(ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel(null, cancelCommand);
|
||||
ICommand submitCommand = new AddTournamentCommand(modalNavigationStore);
|
||||
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel(submitCommand, cancelCommand);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
|
||||
|
||||
public OverviewViewModel(SelectedTournamentStore selectedTournamentStore, ModalNavigationStore modalNavigationStore, Tournament tournament)
|
||||
public OverviewViewModel(SelectedTournamentStore selectedTournamentStore, ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
OverviewListingViewModel = new OverviewListingViewModel(selectedTournamentStore, modalNavigationStore);
|
||||
OverviewDetailsViewModel = new OverviewDetailsViewModel(selectedTournamentStore);
|
||||
|
||||
AddTournamentCommand = new OpenAddTournamentCommand(modalNavigationStore);
|
||||
EditTournamentCommand = new OpenEditTournamentCommand(modalNavigationStore, tournament);
|
||||
EditTournamentCommand = new OpenEditTournamentCommand(modalNavigationStore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user