Edit Function are available
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Apollon.WPF.Models;
|
||||
using Apollon.WPF.Commands;
|
||||
using Apollon.WPF.Models;
|
||||
using Apollon.WPF.Stores;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -9,16 +11,28 @@ using System.Windows.Input;
|
||||
namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class OverviewListingItemViewModel : ViewModelBase
|
||||
{
|
||||
public Tournament Tournament { get;}
|
||||
{
|
||||
public Tournament Tournament { get; private set; }
|
||||
|
||||
public string TournamentName => Tournament.TournamentName;
|
||||
public string Location => Tournament.Location;
|
||||
|
||||
public ICommand EditCommand { get; }
|
||||
public ICommand DeleteCommand { get; }
|
||||
|
||||
public OverviewListingItemViewModel(Tournament tournament)
|
||||
|
||||
public OverviewListingItemViewModel(Tournament tournament, TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
Tournament = tournament;
|
||||
|
||||
EditCommand = new OpenEditTournamentCommand(this, tournamentStore, modalNavigationStore);
|
||||
}
|
||||
|
||||
public void Update(Tournament tournament)
|
||||
{
|
||||
Tournament = tournament;
|
||||
|
||||
OnPropertyChanged(nameof(TournamentName));
|
||||
OnPropertyChanged(nameof(Location));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user