private async void Save() { if (creditCard == null) { creditCard = new DebitCard(); creditCard.Id = 0; } creditCard.Name = txtNombre.Text; if (await DebitCards.save(creditCard)) { CloureManager.GoBack("reload"); } }
private async void DisplayDeleteDialog(DebitCard bank) { ContentDialog deleteFileDialog = new ContentDialog { Title = "¿Está seguro que desea eliminar este registro?", Content = "El registro se borrará de forma permanente", PrimaryButtonText = "Borrar", CloseButtonText = "Cancelar" }; ContentDialogResult result = await deleteFileDialog.ShowAsync(); // Delete the file if the user clicked the primary button. /// Otherwise, do nothing. if (result == ContentDialogResult.Primary) { bool api_result = await DebitCards.Delete(bank.Id); if (api_result) { LoadData(); } } }
public async void LoadData() { List <DebitCard> receipts = await DebitCards.getList(); lstItems.ItemsSource = receipts; }