Exemplo n.º 1
0
        public void SaveInfo()
        {
            Category category = CategoryManager.GetCategoryByID(this.CategoryID);

            if (category != null)
            {
                foreach (Discount discount in DiscountManager.GetDiscountsByCategoryID(category.CategoryID))
                {
                    DiscountManager.RemoveDiscountFromCategory(category.CategoryID, discount.DiscountID);
                }
                foreach (int discountID in DiscountMappingControl.SelectedDiscountIDs)
                {
                    DiscountManager.AddDiscountToCategory(category.CategoryID, discountID);
                }
            }
        }