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