예제 #1
0
        private async void SaveProductEdit()
        {
            try
            {
                SelectedProduct.CopyFrom(EditableProduct);
                await _service.UpdateProductAsync((ProductDto)SelectedProduct);
            }
            catch (Exception ex) when(ex is NetworkException || ex is HttpRequestException)
            {
                OnMessageApplication($"Unexpected error occured! ({ex.Message})");
            }

            LoadProductAsync(SelectedSubCat);
            FinishingProductEdit?.Invoke(this, EventArgs.Empty);
        }
예제 #2
0
 private void CancelItemEdit()
 {
     EditableProduct = null;
     FinishingProductEdit?.Invoke(this, EventArgs.Empty);
 }