private async Task DeleteAction(AccountDto vm) { var deleteConfirmation = await _pageService.DisplayAlert("Delete account", "Are you sure?", "Yes", "No"); var account = Mapper.Map <AccountDto, Account>(vm); if (deleteConfirmation) { var status = _repository.DeleteAccount(account); if (status != "OK") { await _pageService.DisplayAlert("Erase canceled", status, "OK"); } else { MessagingCenter.Send(this, MessagingString.DeleteAccounts); } } }
private async Task EditAction(AccountDto vm) { await _pageService.PushAsync(new AccountsDetailsPage(_pageService, _repository, vm)); }
private async Task SelectAccount(AccountDto account) { SelectedAccount = null; }