Ejemplo n.º 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();
            }
        }
Ejemplo n.º 2
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(UGPWebServiceSoapClient.GetEndpointAddress(EndpointConfiguration.UGPWebServiceSoap));
 }
Ejemplo n.º 3
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(UGPWebServiceSoapClient.GetBindingForEndpoint(EndpointConfiguration.UGPWebServiceSoap));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 5
0
 public UGPWebServiceSoapClient(EndpointConfiguration endpointConfiguration) :
     base(UGPWebServiceSoapClient.GetBindingForEndpoint(endpointConfiguration), UGPWebServiceSoapClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Ejemplo n.º 6
0
 public UGPWebServiceSoapClient() :
     base(UGPWebServiceSoapClient.GetDefaultBinding(), UGPWebServiceSoapClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.UGPWebServiceSoap.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }