Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ProductBasic[] products = getProds();
            GetTopLevelCategoriesResponse categories = getTopCat();

            foreach (var item in categories.categoryList)
            {
                lstBxAnaKategori.DisplayMember = "name";
                lstBxAnaKategori.ValueMember   = "id";

                lstBxAnaKategori.Items.Add(new Category()
                {
                    id = item.id, name = item.id + "-" + item.name
                });
            }



            foreach (var prod in products)
            {
                listBox2.DisplayMember = "title";
                listBox2.ValueMember   = "id";
                listBox2.Items.Add(new ProductBasic()
                {
                    id = prod.id, title = prod.id + "-(" + prod.productSellerCode.ToString() + ")-" + prod.title
                });
            }

            txtprodPrepDay.Text  = "";
            txtUrunDurumu.Text   = "";
            txtKargoSablonu.Text = "";
            txtStokMiktari.Text  = "";
            label2.Text          = "Ürünler (" + products.Length.ToString() + ")";
        }
Beispiel #2
0
        public SubCategory[] GetTopCategories()
        {
            com.n11Category.api.Authentication authentication = new com.n11Category.api.Authentication();
            authentication.appKey    = apiKey;
            authentication.appSecret = apiSecret;

            GetTopLevelCategoriesRequest getTopLevelCategories = new GetTopLevelCategoriesRequest();

            getTopLevelCategories.auth = authentication;

            CategoryServicePortService    port = new CategoryServicePortService();
            GetTopLevelCategoriesResponse getTopLevelCategoriesResponse = port.GetTopLevelCategories(getTopLevelCategories);

            SubCategory[] subCategories = getTopLevelCategoriesResponse.categoryList;

            return(subCategories);
        }
Beispiel #3
0
        public List <SubCategory> GetTopLevelCategories()
        {
            var authentication = new Authentication();

            authentication.appKey    = "e2a9be17-8473-4efb-9e53-e29d87e0368b";
            authentication.appSecret = "O6PInuTZN0z1QZsn";

            GetTopLevelCategoriesRequest request = new GetTopLevelCategoriesRequest();

            request.auth = authentication;

            CategoryServicePortService    port = new CategoryServicePortService();
            GetTopLevelCategoriesResponse topTopLevelCategoriesResponse = port.GetTopLevelCategories(request);
            List <SubCategory>            categoryList = topTopLevelCategoriesResponse.categoryList.ToList();

            return(categoryList);
        }
        public void Getir()
        {
            try
            {
                String strAppKey    = "***";
                String strAppSecret = "***";

                Authentication authentication = new Authentication();
                authentication.appKey    = strAppKey;
                authentication.appSecret = strAppSecret;

                GetTopLevelCategoriesRequest request = new GetTopLevelCategoriesRequest();
                request.auth = authentication;

                CategoryServicePortService    port = new CategoryServicePortService();
                GetTopLevelCategoriesResponse topTopLevelCategoriesResponse = port.GetTopLevelCategories(request);
                List <SubCategory>            categoryList = topTopLevelCategoriesResponse.categoryList.ToList <SubCategory>();
            }
            catch (Exception)
            {
                throw;
            }
        }