Example #1
0
        public static void ShouldRetrieveProductStockAmount(StockClient.StockService.StockServiceV2Client proxy)
        {
            Console.WriteLine("Test - RETRIEVE a ProductStock AMOUNT");
            string productStockNumber = "number1";
            int    productStockAmount = proxy.RetrieveProductStockAmount(productStockNumber);

            Console.WriteLine("ProductStock amount is: " + productStockAmount);
            Console.WriteLine();
        }
Example #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Press ENTER when the service has started");
            Console.ReadLine();

            StockClient.StockService.StockServiceV2Client proxyV2 = OpenProxyConnectionV2("WS2007HttpBinding_IStockServiceV2");

            ShouldRetrieveProductStockAmount(proxyV2);
            ShouldUpdateProductStockAmount(proxyV2);

            CloseProxyConnection(proxyV2);
        }
Example #3
0
        public static void ShouldUpdateProductStockAmount(StockClient.StockService.StockServiceV2Client proxy)
        {
            Console.WriteLine("Test - UPDATE a ProductStock AMOUNT");
            string productStockNumber    = "number1";
            int    newProductStockAmount = 1;

            if (proxy.UpdateProductStockAmount(productStockNumber, newProductStockAmount))
            {
                Console.WriteLine("ProductStock Number: " + productStockNumber + " had its amount updated successfully");
            }
            else
            {
                Console.WriteLine("Failed to update the amount of the ProductStock Number: " + productStockNumber);
            }
            Console.WriteLine();
        }
Example #4
0
 public static void CloseProxyConnection(StockClient.StockService.StockServiceV2Client proxy)
 {
     proxy.Close();
     Console.WriteLine("Press ENTER to finish");
     Console.ReadLine();
 }