void AltKategoriGetir(Int64 CategoriyID) { //n11ProductService.get ALtKategoriOZelligi.categoryId = CategoriyID; var request = new GetSubCategoriesRequest(); request.auth = KategoriAuthentication; request.categoryId = CategoriyID; //var categories = proxy.GetTopLevelCategories(request); var categories = proxy.GetSubCategories(request); //MessageBox.Show(categories.category.); if (categories.category[0].subCategoryList != null) { foreach (var item in categories.category[0].subCategoryList) { dt_Kategoriler.Rows.Add(dt_Kategoriler.NewRow()); dt_Kategoriler.Rows[dt_Kategoriler.Rows.Count - 1]["ID"] = item.id; dt_Kategoriler.Rows[dt_Kategoriler.Rows.Count - 1]["KategoriAdi"] = item.name; dt_Kategoriler.Rows[dt_Kategoriler.Rows.Count - 1]["UstKategoriID"] = CategoriyID; AltKategoriGetir(item.id); } } }
public List <SubCategoryData> GetSubCategories(long cid) { var authentication = new Authentication(); authentication.appKey = "e2a9be17-8473-4efb-9e53-e29d87e0368b"; authentication.appSecret = "O6PInuTZN0z1QZsn"; GetSubCategoriesRequest request = new GetSubCategoriesRequest(); request.auth = authentication; request.categoryId = cid; CategoryServicePortService port = new CategoryServicePortService(); GetSubCategoriesResponse response = port.GetSubCategories(request); List <SubCategoryData> categoryList = response.category.ToList(); return(categoryList); }
private static SubCategoryData[] getSubCat(long CatId) { var authentication1 = new n11Api.ServiceReference1.Authentication(); authentication1.appKey = apiAnahtari1; //api anahtarınız authentication1.appSecret = apiSifresi1; //api şifeniz CategoryServicePortClient port = new CategoryServicePortClient(); GetSubCategoriesRequest getSubbCatt = new GetSubCategoriesRequest(); getSubbCatt.categoryId = CatId; getSubbCatt.auth = authentication1; GetSubCategoriesResponse response = port.GetSubCategories(getSubbCatt); var subCategory = response.category; return(subCategory); }
public SubCategory[] GetSubCategories(long categoryId) { com.n11Category.api.Authentication authentication = new com.n11Category.api.Authentication { appKey = apiKey, appSecret = apiSecret }; GetSubCategoriesRequest getSubCategoriesRequest = new GetSubCategoriesRequest(); getSubCategoriesRequest.auth = authentication; getSubCategoriesRequest.categoryId = categoryId; CategoryServicePortService port = new CategoryServicePortService(); GetSubCategoriesResponse getSubCategoriesResponse = port.GetSubCategories(getSubCategoriesRequest); SubCategory[] subCategories = getSubCategoriesResponse.category[0].subCategoryList; return(subCategories); }
private static SubCategoryData[] getSubCat(long CatId) { var authentication1 = new n11Api.ServiceReference1.Authentication(); authentication1.appKey = apiAnahtari1; //api anahtarınız authentication1.appSecret = apiSifresi1;//api şifeniz CategoryServicePortClient port = new CategoryServicePortClient(); GetSubCategoriesRequest getSubbCatt = new GetSubCategoriesRequest(); getSubbCatt.categoryId = CatId; getSubbCatt.auth = authentication1; GetSubCategoriesResponse response = port.GetSubCategories(getSubbCatt); var subCategory = response.category; return subCategory; }