Пример #1
0
        public void AddVakoBild(Artikel artikel, VakoArtikel vakoArtikel, List <ResultTask <ArtikelBild> > artikelBildList)
        {
            foreach (ResultTask <ArtikelBild> task in artikelBildList)
            {
                ArtikelBild artikelBild = task.Item;
                Boolean     success     = true;

                /* vakoArtikel = VakoArtikel to add the artikelBild to
                 * artikel = Artikel the vako is from */

                if (success)
                {
                    task.OnSuccess("yourVakoBildIdOnMarketplace_" + (new Random().Next(1000, 9999)));
                }
                else
                {
                    List <ItemError> errorList = new List <ItemError>
                    {
                        /* Add your errors here */
                    };

                    task.OnError(errorList);
                }
            }
        }
Пример #2
0
        public void DeleteVakoBild(Artikel artikel, VakoArtikel vakoArtikel, List <ResultTask <ArtikelBild> > artikelBildList)
        {
            foreach (ResultTask <ArtikelBild> task in artikelBildList)
            {
                ArtikelBild artikelBild = task.Item;
                Boolean     success     = true;

                /* you can identify the ArtikelBild with artikelBild.ShopId */

                if (success)
                {
                    task.OnSuccess(null);
                }
                else
                {
                    List <ItemError> errorList = new List <ItemError>
                    {
                        /* Add your errors here */
                    };

                    task.OnError(errorList);
                }
            }
        }
Пример #3
0
        public void AddArtikelBild(Artikel artikel, List <ResultTask <ArtikelBild> > artikelBildList)
        {
            foreach (ResultTask <ArtikelBild> task in artikelBildList)
            {
                ArtikelBild artikelBild = task.Item;
                Boolean     success     = true;

                /* artikel = article to add the picture to */

                if (success)
                {
                    task.OnSuccess("yourPictureIdOnMarketplace_" + (new Random().Next(1000, 9999)));
                }
                else
                {
                    List <ItemError> errorList = new List <ItemError>
                    {
                        /* Add your errors here */
                    };

                    task.OnError(errorList);
                }
            }
        }