void KategorileriGetir() { //var KategoriAuthentication = new n11CategoryService.Authentication(); KategoriAuthentication.appKey = "66e296ef-ba12-4c7a-8d3f-67027f1e1962"; //api anahtarınız KategoriAuthentication.appSecret = "OiVekmVJRKC2wi0X"; //api şifeniz var proxy = new n11CategoryService.CategoryServicePortService(); //var proxy = new n11CategoryService.categ; var request = new GetTopLevelCategoriesRequest(); request.auth = KategoriAuthentication; //proxy. var categories = proxy.GetTopLevelCategories(request); foreach (var item in categories.categoryList) { 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; ahanadaAltKAteroriGetir(item.id); } gridControl1.DataSource = dt_Kategoriler; treeList1.DataSource = dt_Kategoriler; }
void ahanadaAltKAteroriGetir(Int64 CategoriyID) { //authentication = new n11CategoryService.Authentication(); KategoriAuthentication.appKey = "66e296ef-ba12-4c7a-8d3f-67027f1e1962"; //api anahtarınız KategoriAuthentication.appSecret = "OiVekmVJRKC2wi0X"; //api şifeniz proxy = new n11CategoryService.CategoryServicePortService(); ALtKategoriOZelligi = new GetCategoryAttributesRequest(); ALtKategoriOZelligi.auth = KategoriAuthentication; proxy.GetCategoryAttributes(ALtKategoriOZelligi); AltKategoriGetir(CategoriyID); }