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); }
private void CancelItemEdit() { EditableProduct = null; FinishingProductEdit?.Invoke(this, EventArgs.Empty); }