/// <summary>
        /// Recharge les Categories de prix depuis la DB
        /// </summary>
        public void LoadCategories()
        {
            List <CategoryPrice> categoryPrices = CategoryPriceServices.GetAllPrice();

            ListCategories.Clear();
            foreach (CategoryPrice categoryPrice in categoryPrices)
            {
                ListCategories.Add(categoryPrice);
            }
        }
 public void DeleteCategoryPrice(CategoryPrice categoryPrice)
 {
     try
     {
         CategoryPriceServices.Delete(categoryPrice);
         LoadCategories();
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
        public void RefreshProductList()
        {
            List <Product> products = ProductServices.GetAllProduct();

            ListProduct.Clear();

            foreach (Product product in products)
            {
                int CatId = product.CategoryPriceId != null ? (int)product.CategoryPriceId : 0;

                ListProduct.Add(new ProductUI
                {
                    Product       = product,
                    CategoryPrice = CategoryPriceServices.GetPrice(CatId)
                });
            }
        }
 public void CreateCategoryPrice()
 {
     CategoryPriceServices.Add(CategoryPriceOfProduct.Color, CategoryPriceOfProduct.Price);
     LoadCategories();
 }