public async Task GetAllInterestPointByServiceAsync() { var service = new InterestPointService(); var listInterestPoints = await service.GetAllInterestPointSortedByVoteInterestPoint(Token.tokenCurrent); ListInterestPoints = new ObservableCollection <InterestPointWithVote>(listInterestPoints); }
public async Task DeleteInterestPointAsync() { var service = new InterestPointService(); int resultCode = await service.DeleteInterestPointById((int)SelectedInterestPoint.InterestPoint.IdInterestPoint, Token.tokenCurrent); if (resultCode == Constants.CODE_SUCCESS) { MessengerInstance.Send <InterestPointWithVote>(SelectedInterestPoint, "deleteInterestPoint"); } else { var messageDialog = new Windows.UI.Popups.MessageDialog("L'élément à supprimer est introuvable"); await messageDialog.ShowAsync(); } _navigationService.NavigateTo("ListInterestPoint"); }