Example #1
0
        private async void cbProductSlector_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string pSelected = "";

            var comboBoxItem = cbProductSlector.Items[cbProductSlector.SelectedIndex] as ComboBoxItem;

            if (comboBoxItem != null)
            {
                pSelected = comboBoxItem.Content.ToString();
            }
            try
            {
                WebServiceUGP.UGPWebServiceSoapClient serviceUGPWebDetails = new WebServiceUGP.UGPWebServiceSoapClient();
                WebServiceUGP.GetPcDetailsResponse    UGPWebResponse       = await serviceUGPWebDetails.GetPcDetailsAsync(pSelected);

                txtProductTitle.Text       = UGPWebResponse.Body.GetPcDetailsResult.ProductTitle;
                txtProductDescription.Text = UGPWebResponse.Body.GetPcDetailsResult.ProductDescription;
                txtProductPrice.Text       = "$" + UGPWebResponse.Body.GetPcDetailsResult.ProductPrice;
            }
            catch (Exception)
            {
                var dialog = new MessageDialog("An error has occourd trying to access the web resorce.");
                await dialog.ShowAsync();
            }
        }
Example #2
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(UGPWebServiceSoapClient.GetEndpointAddress(EndpointConfiguration.UGPWebServiceSoap));
 }
Example #3
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(UGPWebServiceSoapClient.GetBindingForEndpoint(EndpointConfiguration.UGPWebServiceSoap));
 }
Example #4
0
 public UGPWebServiceSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(UGPWebServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Example #5
0
 public UGPWebServiceSoapClient(EndpointConfiguration endpointConfiguration) :
     base(UGPWebServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), UGPWebServiceSoapClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Example #6
0
 public UGPWebServiceSoapClient() :
     base(UGPWebServiceSoapClient.GetDefaultBinding(), UGPWebServiceSoapClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.UGPWebServiceSoap.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }