Esempio n. 1
0
        private async void AddAeroplaneType()
        {
            try
            {
                var result = await _service.AddAsync(SelectedAeroplaneType);

                AeroplaneTypes.Insert(0, result);
            }
            catch (System.InvalidOperationException ex)
            {
                await _dialogService.ShowMessage(ex.Message, "Error");
            }
        }
Esempio n. 2
0
        private async void DeleteAeroplaneType()
        {
            try
            {
                await _service.DeleteAsync(SelectedAeroplaneType.Id);

                AeroplaneTypes.Remove(SelectedAeroplaneType);
            }
            catch (System.InvalidOperationException ex)
            {
                await _dialogService.ShowMessage(ex.Message, "Error");
            }
        }