//------

        //CONSTRUCTOR
        public InventoryController(string username, string password)
        {
            //INSTANTIATE OBJECTS
            conn = new MyConnection(username, password);       //Establish a connection when an object is created
            iss  = new VinInventory.InventoryServiceService(); //create INVENTORY SERVICES object

            //--------------
            //SEARCH INVENTORY
            iss_request2          = new VinInventory.Request2();        //create REQUEST object
            iss_request2.Security = new VinInventory.Security();        //Security settings for connection (to VIN65 web service)
            iss_response2         = new VinInventory.Response2();       //create RESPONSE object (array of Products[...])

            //SET USERNAME and PASSWORD
            iss_request2.Security.Username = conn.Ws_Username;        //set global username
            //ps_request.Security.Username = "******";
            iss_request2.Security.Password = conn.Ws_Password;        //set global password
            //ps_request.Security.Password = "******";
            //--------------

            //--------------
            //UPDATE INVENTORY
            iss_request1          = new VinInventory.Request1();        //create REQUEST object
            iss_request1.Security = new VinInventory.Security();        //Security settings for connection (to VIN65 web service)
            iss_response1         = new VinInventory.Response1();       //create RESPONSE object (array of Products[...])

            //SET USERNAME and PASSWORD
            iss_request1.Security.Username = conn.Ws_Username;        //set global username
            //ps_request.Security.Username = "******";
            iss_request1.Security.Password = conn.Ws_Password;        //set global password
            //ps_request.Security.Password = "******";
            //--------------
        }
        public Response2 SearchInventory(Request2 Request)
        {
            object[] results = this.Invoke("SearchInventory", new object[] {
                Request
            });

            return((Response2)(results[0]));
        }
 /// <remarks/>
 public void SearchInventoryAsync(Request2 Request, object userState)
 {
     if ((this.SearchInventoryOperationCompleted == null))
     {
         this.SearchInventoryOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSearchInventoryOperationCompleted);
     }
     this.InvokeAsync("SearchInventory", new object[] {
         Request
     }, this.SearchInventoryOperationCompleted, userState);
 }
 /// <remarks/>
 public void SearchInventoryAsync(Request2 Request)
 {
     this.SearchInventoryAsync(Request, null);
 }