예제 #1
0
        private async void DeleteAeroplaneType()
        {
            try
            {
                await _service.DeleteAsync(SelectedAeroplaneType.Id);

                AeroplaneTypes.Remove(SelectedAeroplaneType);
            }
            catch (System.InvalidOperationException ex)
            {
                await _dialogService.ShowMessage(ex.Message, "Error");
            }
        }
예제 #2
0
        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");
            }
        }