Exemplo n.º 1
0
        private void ShowMerchantsClick(object sender, RoutedEventArgs e)
        {
            getMerchant merchant = new getMerchant();

            Merchant[] result = client.getMerchant(userAuthentication, merchant);

            _merchants.Clear();

            foreach (var item in result)
            {
                _merchants.Add(new ObservableMerchant(item.iId, item.sName));
            }
        }
Exemplo n.º 2
0
        private void btnShowResult_Click(object sender, EventArgs e)
        {
            getMerchant merchant = new getMerchant();

            // comment out following lines to get all merchants …
            merchant.iMerchantId    = new int[5];
            merchant.iMerchantId[0] = 2518;
            merchant.iMerchantId[1] = 368;
            merchant.iMerchantId[2] = 6180;
            merchant.iMerchantId[3] = 732;
            merchant.iMerchantId[4] = 1148;
            // … until here

            Merchant[] result = client.getMerchant(userAuthentication, merchant);

            lblMerchants.Text = "Merchants (id, name):\n";

            foreach (var item in result)
            {
                lblMerchants.Text += item.iId.ToString() + ", " + item.sName + "\n";
            }
        }