public NameValueListTypeCollection GetItemSpecifics(IWheel wheel)
 {
     var result = new NameValueListTypeCollection();
     result.Add(GetSingleItemSpecific("Reifenhersteller", wheel.Manufactorer));
     result.Add(GetSingleItemSpecific("Hersteller-Artikelnummer", wheel.ArticleId));
     result.Add(GetSingleItemSpecific("Reifenspezifikation", GetWheelSpecification(wheel)));
     result.Add(GetSingleItemSpecific("Reifenbreite", wheel.WheelWidth.ToString()));
     result.Add(GetSingleItemSpecific("Reifenquerschnitt", wheel.WheelHeight.ToString()));
     result.Add(GetSingleItemSpecific("Zollgröße", wheel.CrossSection.Replace('R', ' ')));
     result.Add(GetSingleItemSpecific("Tragfähigkeitsindex", wheel.WeightIndex.ToString()));
     result.Add(GetSingleItemSpecific("Geschwindigkeitsindex", wheel.SpeedIndex.ToString()));
     result.Add(GetSingleItemSpecific("Winterreifen (Ja/Nein)", wheel.IsWinter ? "Ja" : "Nein"));
     result.Add(GetSingleItemSpecific("Reifengröße", GetWheelSize(wheel)));
     return result;
 }
        public NameValueListTypeCollection GetItemSpecifics(IWheel wheel)
        {
            var result = new NameValueListTypeCollection();

            result.Add(GetSingleItemSpecific("Reifenhersteller", wheel.Manufactorer));
            result.Add(GetSingleItemSpecific("Hersteller-Artikelnummer", wheel.ArticleId));
            result.Add(GetSingleItemSpecific("Reifenspezifikation", GetWheelSpecification(wheel)));
            result.Add(GetSingleItemSpecific("Reifenbreite", wheel.WheelWidth.ToString()));
            result.Add(GetSingleItemSpecific("Reifenquerschnitt", wheel.WheelHeight.ToString()));
            result.Add(GetSingleItemSpecific("Zollgröße", wheel.CrossSection.Replace('R', ' ')));
            result.Add(GetSingleItemSpecific("Tragfähigkeitsindex", wheel.WeightIndex.ToString()));
            result.Add(GetSingleItemSpecific("Geschwindigkeitsindex", wheel.SpeedIndex.ToString()));
            result.Add(GetSingleItemSpecific("Winterreifen (Ja/Nein)", wheel.IsWinter ? "Ja" : "Nein"));
            result.Add(GetSingleItemSpecific("Reifengröße", GetWheelSize(wheel)));
            return(result);
        }
Example #3
0
        /// <summary>
        /// Build sample item specifics
        /// </summary>
        /// <returns>ItemSpecifics object</returns>
        private NameValueListTypeCollection buildItemSpecifics(string sneakerID)
        {
            //create the content of item specifics
            NameValueListTypeCollection nvCollection = new NameValueListTypeCollection();
            NameValueListType           nv0          = new NameValueListType();

            nv0.Name = "Code";
            StringCollection nv0Col = new StringCollection();

            String[] strArr0 = new string[] { sneakerID };
            nv0Col.AddRange(strArr0);
            nv0.Value = nv0Col;
            NameValueListType nv1 = new NameValueListType();

            nv1.Name = "Name";
            StringCollection nv1Col = new StringCollection();

            String[] strArr1 = new string[] { SQLConnect.Select("Select ShoeName from Shoe where ShoeID = '" + sneakerID + "';") };
            nv1Col.AddRange(strArr1);
            nv1.Value = nv1Col;
            NameValueListType nv2 = new NameValueListType();

            nv2.Name = "Size";
            StringCollection nv2Col = new StringCollection();

            String[] strArr2 = new string[] { SQLConnect.Select("Select Size from Shoe where ShoeID = '" + sneakerID + "';") };
            nv2Col.AddRange(strArr2);
            nv2.Value = nv2Col;
            NameValueListType nv3 = new NameValueListType();

            nv3.Name = "Color";
            StringCollection nv3Col = new StringCollection();

            String[] strArr3 = new string[] { SQLConnect.Select("Select Color from Shoe where ShoeID = '" + sneakerID + "';") };
            nv3Col.AddRange(strArr3);
            nv3.Value = nv3Col;
            nvCollection.Add(nv0);
            nvCollection.Add(nv1);
            nvCollection.Add(nv1);
            nvCollection.Add(nv3);
            return(nvCollection);
        }
Example #4
0
        private void AddProductVariants(product p)
        {
            // only add if there's more than 1 variant
            if (p.product_variants.Count > 1)
            {
                foreach (var entry in p.product_variants)
                {
                    var variant = new VariationType
                    {
                        SKU      = entry.sku,
                        Quantity = ebayProduct.quantity
                    };

                    var variants = new NameValueListTypeCollection();

                    if (!string.IsNullOrEmpty(entry.color))
                    {
                        variants.Add(new NameValueListType()
                        {
                            Name  = "color",
                            Value = new StringCollection(new[] { entry.color })
                        });
                    }

                    if (!string.IsNullOrEmpty(entry.size))
                    {
                        variants.Add(new NameValueListType()
                        {
                            Name  = "size",
                            Value = new StringCollection(new[] { entry.size })
                        });
                    }

                    variant.VariationSpecifics = variants;
                    service.AddProductVariant(variant);
                }
            }
        }
        /// <summary>
        /// Specify custom item specify
        /// </summary>
        /// <returns></returns>
        private NameValueListTypeCollection getCIS()
        {
            NameValueListTypeCollection list = new NameValueListTypeCollection();
            StringCollection            tmp  = new StringCollection();

            NameValueListType nameValue1 = new NameValueListType();

            nameValue1.Name = "test specifics(add name1)";
            tmp.Add("test specifics(add value1)");
            nameValue1.Value = tmp;

            NameValueListType nameValue2 = new NameValueListType();

            nameValue2.Name = "test specifics(add name2)";
            tmp.Clear();
            tmp.Add("test specifics(add value2)");
            nameValue2.Value = tmp;

            list.Add(nameValue1);
            list.Add(nameValue2);

            return(list);
        }
Example #6
0
        private NameValueListTypeCollection GetAllCustomItemSpecificsNameValue(NameValueCollection request)
        {
            NameValueListTypeCollection atts = new NameValueListTypeCollection();
            NameValueListType           nvList;

            foreach (string key in request.AllKeys)
            {
                int index;
                index = key.IndexOf(EBAY_CUSTOM_ITEM_SPECIFICS_NAME);
                if (index >= 0 && request[key] != string.Empty)
                {
                    string suffix = key.Substring(index + EBAY_CUSTOM_ITEM_SPECIFICS_NAME.Length);
                    nvList      = new NameValueListType();
                    nvList.Name = request[EBAY_CUSTOM_ITEM_SPECIFICS_NAME_CACHE + suffix];
                    eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection();
                    strCol.Add(request[key]);
                    nvList.Value = strCol;
                    atts.Add(nvList);
                    continue;
                }

                index = key.IndexOf(CUSTOME_ITEM_SPECIFICS_VALUE);
                if (index >= 0 && request[key] != string.Empty)
                {
                    string suffix = key.Substring(index + CUSTOME_ITEM_SPECIFICS_VALUE.Length);
                    nvList      = new NameValueListType();
                    nvList.Name = request[CUSTOME_ITEM_SPECIFICS_NAME + suffix];
                    eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection();
                    strCol.Add(request[key]);
                    nvList.Value = strCol;
                    atts.Add(nvList);
                    continue;
                }
            }

            return(atts);
        }
Example #7
0
        /// <summary>
        /// Build sample item specifics
        /// </summary>
        /// <returns>ItemSpecifics object</returns>
        static NameValueListTypeCollection buildItemSpecifics()
        {
            //create the content of item specifics
            NameValueListTypeCollection nvCollection = new NameValueListTypeCollection();
            NameValueListType           nv1          = new NameValueListType();

            nv1.Name = "Platform";
            StringCollection nv1Col = new StringCollection();

            String[] strArr1 = new string[] { "Microsoft Xbox 360" };
            nv1Col.AddRange(strArr1);
            nv1.Value = nv1Col;
            NameValueListType nv2 = new NameValueListType();

            nv2.Name = "Genre";
            StringCollection nv2Col = new StringCollection();

            String[] strArr2 = new string[] { "Simulation" };
            nv2Col.AddRange(strArr2);
            nv2.Value = nv2Col;
            nvCollection.Add(nv1);
            nvCollection.Add(nv2);
            return(nvCollection);
        }
Example #8
0
        /// <summary>
        /// Specify custom item specify
        /// </summary>
        /// <returns></returns>
        private NameValueListTypeCollection getCIS()
        {
            NameValueListTypeCollection list = new NameValueListTypeCollection();
            StringCollection tmp=new StringCollection();

            NameValueListType nameValue1=new NameValueListType();
            nameValue1.Name="test specifics(add name1)";
            tmp.Add("test specifics(add value1)");
            nameValue1.Value=tmp;

            NameValueListType nameValue2=new NameValueListType();
            nameValue2.Name="test specifics(add name2)";
            tmp.Clear();
            tmp.Add("test specifics(add value2)");
            nameValue2.Value=tmp;

            list.Add(nameValue1);
            list.Add(nameValue2);

            return list;
        }
Example #9
0
        private NameValueListTypeCollection GetAllCustomItemSpecificsNameValue(NameValueCollection request)
        {
            NameValueListTypeCollection atts = new NameValueListTypeCollection();
            NameValueListType nvList;

            foreach (string key in request.AllKeys)
            {
                int index;
                index = key.IndexOf(EBAY_CUSTOM_ITEM_SPECIFICS_NAME);
                if (index >= 0 && request[key] != string.Empty)
                {
                    string suffix = key.Substring(index + EBAY_CUSTOM_ITEM_SPECIFICS_NAME.Length);
                    nvList = new NameValueListType();
                    nvList.Name = request[EBAY_CUSTOM_ITEM_SPECIFICS_NAME_CACHE + suffix];
                    eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection();
                    strCol.Add(request[key]);
                    nvList.Value = strCol;
                    atts.Add(nvList);
                    continue;
                }

                index = key.IndexOf(CUSTOME_ITEM_SPECIFICS_VALUE);
                if (index >= 0 && request[key] != string.Empty)
                {
                    string suffix = key.Substring(index + CUSTOME_ITEM_SPECIFICS_VALUE.Length);
                    nvList = new NameValueListType();
                    nvList.Name = request[CUSTOME_ITEM_SPECIFICS_NAME + suffix];
                    eBay.Service.Core.Soap.StringCollection strCol = new eBay.Service.Core.Soap.StringCollection();
                    strCol.Add(request[key]);
                    nvList.Value = strCol;
                    atts.Add(nvList);
                    continue;
                }

            }

            return atts;
        }
Example #10
0
        /// <summary>
        /// Build sample item specifics
        /// </summary>
        /// <returns>ItemSpecifics object</returns>
        static NameValueListTypeCollection buildItemSpecifics()
        {        	  
	        //create the content of item specifics
            NameValueListTypeCollection nvCollection = new NameValueListTypeCollection();
            NameValueListType nv1 = new NameValueListType();
            nv1.Name = "Platform";
            StringCollection nv1Col = new StringCollection();
            String[] strArr1 = new string[] { "Microsoft Xbox 360" };
            nv1Col.AddRange(strArr1);
            nv1.Value = nv1Col;
            NameValueListType nv2 = new NameValueListType();
            nv2.Name = "Genre";
            StringCollection nv2Col = new StringCollection();
            String[] strArr2 = new string[] { "Simulation" };
            nv2Col.AddRange(strArr2);
            nv2.Value = nv2Col;
            nvCollection.Add(nv1);
            nvCollection.Add(nv2);
            return nvCollection;
         }
Example #11
0
        /// <summary>
        /// Build sample item Variations
        /// </summary>
        /// <returns>Variations object</returns>
        static VariationsType buildVariationsType()
        {
            // listing variations
            VariationsType variations = new VariationsType();

            // first variation
            VariationType variation1 = new VariationType();
            // create the content of VariationSpecifics
            NameValueListTypeCollection nvcol1 = new NameValueListTypeCollection();
            NameValueListType           nv11   = new NameValueListType();

            nv11.Name = "Color";
            StringCollection nv1StrCol = new StringCollection();

            String[] strArr1 = new string[] { "RED" };
            nv1StrCol.AddRange(strArr1);
            nv11.Value = nv1StrCol;
            NameValueListType nv12 = new NameValueListType();

            nv12.Name = "Size";
            StringCollection nv2StrCol = new StringCollection();

            String[] strArr2 = new string[] { "M" };
            nv2StrCol.AddRange(strArr2);
            nv12.Value = nv2StrCol;
            nvcol1.Add(nv11);
            nvcol1.Add(nv12);
            // set variation-level specifics for first variation
            variation1.VariationSpecifics = nvcol1;
            // set start price
            AmountType amount1 = new AmountType();

            amount1.Value         = 100;
            amount1.currencyID    = CurrencyCodeType.USD;
            variation1.StartPrice = amount1;
            // set quantity
            variation1.Quantity = 10;
            // set variation name
            variation1.VariationTitle = "RED,M";

            // second variation
            VariationType variation2 = new VariationType();
            // create the content of specifics for each variation
            NameValueListTypeCollection nvcol2 = new NameValueListTypeCollection();
            NameValueListType           nv21   = new NameValueListType();

            nv21.Name = "Color";
            StringCollection nv21StrCol = new StringCollection();

            String[] strArr21 = new string[] { "BLACK" };
            nv21StrCol.AddRange(strArr21);
            nv21.Value = nv21StrCol;
            NameValueListType nv22 = new NameValueListType();

            nv22.Name = "Size";
            StringCollection nv22StrCol = new StringCollection();

            String[] strArr22 = new string[] { "L" };
            nv22StrCol.AddRange(strArr22);
            nv22.Value = nv22StrCol;
            nvcol2.Add(nv21);
            nvcol2.Add(nv22);
            // set variation-level specifics for first variation
            variation2.VariationSpecifics = nvcol2;
            // set start price
            AmountType amount2 = new AmountType();

            amount2.Value         = 110;
            amount2.currencyID    = CurrencyCodeType.USD;
            variation2.StartPrice = amount2;
            // set quantity
            variation2.Quantity = 20;
            // set variation name
            variation2.VariationTitle = "BLACK,L";

            // set variation
            VariationTypeCollection varCol = new VariationTypeCollection();

            varCol.Add(variation1);
            varCol.Add(variation2);
            variations.Variation = varCol;

            // create the content of specifics for variations
            NameValueListTypeCollection nvcol3 = new NameValueListTypeCollection();
            NameValueListType           nv31   = new NameValueListType();

            nv31.Name = "Color";
            StringCollection nv31StrCol = new StringCollection();

            String[] strArr31 = new string[] { "BLACK", "RED" };
            nv31StrCol.AddRange(strArr31);
            nv31.Value = nv31StrCol;
            NameValueListType nv32 = new NameValueListType();

            nv32.Name = "Size";
            StringCollection nv32StrCol = new StringCollection();

            String[] strArr32 = new string[] { "M", "L" };
            nv32StrCol.AddRange(strArr32);
            nv32.Value = nv32StrCol;
            nvcol3.Add(nv31);
            nvcol3.Add(nv32);
            // set variationSpecifics
            variations.VariationSpecificsSet = nvcol3;
            return(variations);
        }