private void Persist() { try { Product product = new Product(); product.Category = Category; product.Id = Id; product.Name = Libelle; BusinessManager.Instance.EditProduct(product); } catch (Exception e) { ErrorMessage = e.Message; View.ErrorWindow errorWindow = new View.ErrorWindow(); errorWindow.DataContext = this; errorWindow.ShowDialog(); } }
private void Persist() { try { Product product = new Product(); product.Category = Category; product.Id = Id; product.Code = Code; product.Name = Libelle; product.Stock = Stock; product.Price = Prix; product.Description = Description; product.Active = Actif; BusinessManager.Instance.EditProduct(product); } catch (Exception e) { ErrorMessage = e.Message; View.ErrorWindow errorWindow = new View.ErrorWindow(); errorWindow.DataContext = this; errorWindow.ShowDialog(); } }