private void ShowProductsClick(object sender, RoutedEventArgs e)
        {
            getProduct product = new getProduct();

            product.iProductId    = new long[1];
            product.iProductId[0] = 1122223;

            Product[] result = client.getProduct(userAuthentication, product);

            _products.Clear();

            foreach (var item in result)
            {
                _products.Add(new ObservableProduct(item.iId, item.sName));
            }
        }
示例#2
0
        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";
        }