public async Task DeleteTicketAsync(VmTicket ticket) { var ok = await CsroDialogService.ShowDialog("Delete Vm Ticket", $"Do you really want to delete these record Id: {ticket.Id}?", "Delete"); if (ok) { var res = await VmTicketDataService.DeleteItemAsync(ticket.Id); if (res) { Tickets.Remove(ticket); } } }
public async Task DeleteTicketAsync(Ticket ticket) { throw new Exception("Fake!!! Exception in DeleteTicketAsync"); var ok = await CsroDialogService.ShowDialog("Delete Ticket", $"Do you really want to delete these record Id: {ticket.Id}?", "Delete"); if (ok) { var res = await TicketDataService.DeleteItemAsync(ticket.Id); if (res) { Tickets.Remove(ticket); } } }