예제 #1
0
        private void btnGetCategoryProducts_Click(object sender, RoutedEventArgs e)
        {
            ACDB.AmeriCommerceDatabaseIO oWS = new AmeriCommerceApiExamples.ACDB.AmeriCommerceDatabaseIO();
            ACDB.AmeriCommerceHeaderInfo oHeader = new AmeriCommerceApiExamples.ACDB.AmeriCommerceHeaderInfo();
            oHeader.UserName = Properties.Settings.Default.ApiUsername;
            oHeader.Password = Properties.Settings.Default.ApiPassword;
            oHeader.SecurityToken = Properties.Settings.Default.ApiSecurityToken;
            oWS.AmeriCommerceHeaderInfoValue = oHeader;

            this.txtResults.Text = "";
            this.txtResults.Text += "Grabbing Products from Category\r\n";
            var aryProducts = new System.Collections.ArrayList(oWS.Category_GetProducts(1));
            this.txtResults.Text += "Products Returned: " + aryProducts.Count + "\r\n";
            foreach (ACDB.ProductTrans oProduct in aryProducts)
            {
                this.txtResults.Text += "ID: " + oProduct.itemID.Value + ": " + oProduct.itemName + "\r\n";
            }
        }
예제 #2
0
        private void btnGetCategoryProducts_Click(object sender, RoutedEventArgs e)
        {
            ACDB.AmeriCommerceDatabaseIO oWS     = new AmeriCommerceApiExamples.ACDB.AmeriCommerceDatabaseIO();
            ACDB.AmeriCommerceHeaderInfo oHeader = new AmeriCommerceApiExamples.ACDB.AmeriCommerceHeaderInfo();
            oHeader.UserName                 = Properties.Settings.Default.ApiUsername;
            oHeader.Password                 = Properties.Settings.Default.ApiPassword;
            oHeader.SecurityToken            = Properties.Settings.Default.ApiSecurityToken;
            oWS.AmeriCommerceHeaderInfoValue = oHeader;

            this.txtResults.Text  = "";
            this.txtResults.Text += "Grabbing Products from Category\r\n";
            var aryProducts = new System.Collections.ArrayList(oWS.Category_GetProducts(1));

            this.txtResults.Text += "Products Returned: " + aryProducts.Count + "\r\n";
            foreach (ACDB.ProductTrans oProduct in aryProducts)
            {
                this.txtResults.Text += "ID: " + oProduct.itemID.Value + ": " + oProduct.itemName + "\r\n";
            }
        }