Modification Zarghatt

This commit is contained in:
2019-03-14 01:31:56 +01:00
parent ad07674711
commit 30ec8ae90b
9 changed files with 76 additions and 27 deletions

View File

@@ -49,6 +49,7 @@ namespace LaDOSE.DesktopApp.ViewModels
{
_currentGame = value;
NotifyOfPropertyChange(()=>CurrentGame);
NotifyOfPropertyChange(() => CanDeleteGame);
}
}
@@ -60,8 +61,16 @@ namespace LaDOSE.DesktopApp.ViewModels
public void AddGame()
{
var item = new GameDTO();
this.Games.Add(item);
this.CurrentGame = item;
this.RestService.UpdateGame(item);
LoadGames();
}
public void DeleteGame()
{
this.RestService.DeleteGame(this.CurrentGame.Id);
LoadGames();
}
public bool CanDeleteGame => CurrentGame != null;
}
}