private void lblResult_Click(object sender, EventArgs e) { Awin.ApiPortTypeClient client = new Awin.ApiPortTypeClient(); UserAuthentication userAuthentication = new UserAuthentication(); userAuthentication.sApiKey = "b9e01904105aac94b7ded008abcef422"; getProductList product = new getProductList(); product.sQuery = "Real Madrid Home"; product.iLimit = 5; lblProductLists.Text = "Products (id, name):\n"; getProductListResponse result = new getProductListResponse(); result.oProduct = new Product[100]; result = client.getProductList(userAuthentication, product); lblProductLists.Text += "Products in total:" + result.iTotalCount.ToString() + "\n"; for (int i = 0; i < 10; i++) { lblProductLists.Text += result.oProduct[i].sName + "\n"; } }
public Form1() { InitializeComponent(); Awin.ApiPortTypeClient client = new Awin.ApiPortTypeClient(); UserAuthentication userAuthentication = new UserAuthentication(); userAuthentication.sApiKey = "b9e01904105aac94b7ded008abcef422"; }
public MainWindow() { InitializeComponent(); _merchants = new ObservableCollection <ObservableMerchant>(); _products = new ObservableCollection <ObservableProduct>(); ProductsDataGrid.ItemsSource = _products; MerchantsDataGrid.ItemsSource = _merchants; client = new Awin.ApiPortTypeClient(); userAuthentication = new UserAuthentication(); userAuthentication.sApiKey = "b9e01904105aac94b7ded008abcef422"; }
private void btnShowProducts_Click(object sender, EventArgs e) { Awin.ApiPortTypeClient client = new Awin.ApiPortTypeClient(); UserAuthentication userAuthentication = new UserAuthentication(); userAuthentication.sApiKey = "b9e01904105aac94b7ded008abcef422"; getProduct product = new getProduct(); product.iProductId = new long[1]; product.iProductId [0] = 3389364729; lblProducts.Text = "Products (id, name):\n"; Product[] result = client.getProduct(userAuthentication, product); lblProducts.Text += result[0].sName + "\n"; }