Exemple #1
0
        private async void btnSearch_Click(object sender, RoutedEventArgs e)
        {
            string code = ((ComboBoxItem)cbProductCodes.SelectedItem).Content.ToString();

            ProductDetails.WebServiceScriptSoapClient serviceProductDetails = new ProductDetails.WebServiceScriptSoapClient();

            ProductDetails.GetProductDetailsResponse ProductDetailsResponse = await serviceProductDetails.GetProductDetailsAsync(code);

            lblProductCode.Text = "Product Code: " + ProductDetailsResponse.Body.GetProductDetailsResult.ProductCode;
            lblProuctName.Text  = "Product Name: " + ProductDetailsResponse.Body.GetProductDetailsResult.Title;
            lblDescription.Text = "Description:  " + ProductDetailsResponse.Body.GetProductDetailsResult.Description;
            lblPrice.Text       = "Price:        " + ProductDetailsResponse.Body.GetProductDetailsResult.Price;
        }
Exemple #2
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(WebServiceScriptSoapClient.GetEndpointAddress(EndpointConfiguration.WebServiceScriptSoap));
 }
Exemple #3
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(WebServiceScriptSoapClient.GetBindingForEndpoint(EndpointConfiguration.WebServiceScriptSoap));
 }
Exemple #4
0
 public WebServiceScriptSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(WebServiceScriptSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #5
0
 public WebServiceScriptSoapClient(EndpointConfiguration endpointConfiguration) :
     base(WebServiceScriptSoapClient.GetBindingForEndpoint(endpointConfiguration), WebServiceScriptSoapClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #6
0
 public WebServiceScriptSoapClient() :
     base(WebServiceScriptSoapClient.GetDefaultBinding(), WebServiceScriptSoapClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.WebServiceScriptSoap.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }