Esempio n. 1
0
 public void NewGoodsArrived()
 {
     if (goodsArrived != null)
     {
         goodsArrived();
     }
     goodsArrived -= new NewGoods(Handler);
 }
Esempio n. 2
0
        public void NewAddToShop(IGoods product)
        {
            List <IGoods> tempList = new List <IGoods>();

            tempList.AddRange(Favourites);

            AddToShop(product);

            foreach (var t in tempList)
            {
                if (t.Title == product.Title && product.Status)
                {
                    goodsArrived += new NewGoods(Handler);
                    RemoveFromFavourites(t);
                    AddToBasket(product, 1);
                }
            }

            NewGoodsArrived();
        }
Esempio n. 3
0
        public void OnGet()
        {
            parsing.DeleteAll();

            Goods = parsing.Parse("https://mi92.ru/catalog/smartfonyi/");

            foreach (var good in Goods)
            {
                if (!itemData.GetItems().Where(i => i.IdMi92 == good.GoodId).Any())
                {
                    NewGoods.Add(good);
                }
                else
                {
                    parsing.Add(good);
                    ExistingGoodsCount++;
                }
            }
            parsing.Commit();
        }
 public void NewGoodsArrived()
 {
     if (goodsArrived != null)
     {
         goodsArrived();
     }
     goodsArrived -= new NewGoods(Handler);
 }
        public void NewAddToShop(IGoods product)
        {
            List<IGoods> tempList = new List<IGoods>();
            tempList.AddRange(Favourites);

            AddToShop(product);

            foreach (var t in tempList)
                if (t.Title == product.Title && product.Status)
                {
                    goodsArrived += new NewGoods(Handler);
                    RemoveFromFavourites(t);
                    AddToBasket(product, 1);
                }

               NewGoodsArrived();
        }