Ejemplo n.º 1
0
 private static void AddParentCategories(this InventoryItem @this, ProductCategory productCategory)
 {
     if (productCategory.ExistParents)
     {
         foreach (ProductCategory parent in productCategory.Parents)
         {
             @this.AddDerivedProductCategory(parent);
             @this.AddParentCategories(parent);
         }
     }
 }
Ejemplo n.º 2
0
        public static void AppsOnDeriveProductCategories(this InventoryItem @this, IDerivation derivation)
        {
            @this.RemoveDerivedProductCategories();

            if (@this.ExistGood)
            {
                foreach (ProductCategory productCategory in @this.Good.ProductCategories)
                {
                    @this.AddDerivedProductCategory(productCategory);
                    @this.AddParentCategories(productCategory);
                }
            }
        }