private async void DeleteAeroplaneType() { try { await _service.DeleteAsync(SelectedAeroplaneType.Id); AeroplaneTypes.Remove(SelectedAeroplaneType); } catch (System.InvalidOperationException ex) { await _dialogService.ShowMessage(ex.Message, "Error"); } }
private async void UpdateAeroplaneType() { try { var resultItem = await _service.UpdateAsync(SelectedAeroplaneType); AeroplaneTypes.Remove(SelectedAeroplaneType); AeroplaneTypes.Insert(0, resultItem); } catch (System.InvalidOperationException ex) { await _dialogService.ShowMessage(ex.Message, "Error"); } }