Ejemplo n.º 1
0
 private void Save(BeforeSyncProduct product)
 {
     if (!product.Checked)
     {
         ProductFactory.Delete(product.Base);
     }
 }
Ejemplo n.º 2
0
 public BeforeSyncProdNode(BeforeSyncProduct @base)
 {
     Base = @base;
 }
Ejemplo n.º 3
0
        private BeforeSyncCategory BuildTree(BeforeSyncCategory parentSyncCat, category category)
        {
            var beforeSyncCategory = new BeforeSyncCategory(parentSyncCat, category);

            var products = StoreProducts.Where(p => p.id_category_default == category.id).ToList();
            foreach (product product in products)
            {
                var beforeSyncProduct = new BeforeSyncProduct(beforeSyncCategory, product);
            }

            var childCategories = StoreCategories.Where(c => c.id_parent == category.id).ToList();
            foreach (category child in childCategories)
            {
                BuildTree(beforeSyncCategory, child);
            }

            return beforeSyncCategory;
        }