private void GetProducts()
        {
            try
            {
                PricingConfigurations pricingConfig = new PricingConfigurations(SPContext.Current.Site.ID, SPContext.Current.Web.ID);
                if (pricingConfig.IsSuccess)
                {
                    BasicHttpBinding binding = new BasicHttpBinding() { MaxReceivedMessageSize = 1048576 }; //1048576 = 1mb
                    binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
                    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
                    EndpointAddress endpoint = new EndpointAddress(pricingConfig.URLWebService);//http://localhost:51372/Services/SalesWS.svc

                    ServiceSalesWS.SalesWSClient proxy = new ServiceSalesWS.SalesWSClient(binding, endpoint);

                    //proxy.ClientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
                    //proxy.ClientCredentials.Windows.ClientCredential.Domain = this.Domain;
                    //proxy.ClientCredentials.Windows.ClientCredential.UserName = this.UserName;
                    //proxy.ClientCredentials.Windows.ClientCredential.Password = this.Password;

                    proxy.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;

                    wsProducts[] Products = proxy.GetProducts();

                    StringBuilder ProductsLi = new StringBuilder();

                    for (int i = 0; i < Products.Length; i++)
                    {
                        ProductsLi.Append(string.Format("<li class='ui-widget-content' data-id='{0}'>{1}</li>", Products[i].ProductID.ToString(), Products[i].Name));
                    }

                    OLProductData.Text = ProductsLi.ToString();
                }
                else
                {
                    OLProductData.Text = "Error: " + pricingConfig.Message;
                }
            }
            catch (Exception ex)
            {
                OLProductData.Text = "Error: " + ex.Message;
            }
        }
 private bool GetConfigurations()
 {
     bool result = false;
     try
     {
         pricingConfig = new PricingConfigurations(SPContext.Current.Site.ID, SPContext.Current.Web.ID);
         if (pricingConfig.IsSuccess)
         {
             result = true;
         }
         else
         {
             result = false;
             AddError(pricingConfig.Message);
         }
     }
     catch(Exception ex)
     {
         AddError(ex.Message);
         result = false;
     }
     return result;
 }