/// <summary>
        /// Fills the quote details.
        /// </summary>
        /// <param name="quoteInfo">The quote information.</param>
        /// <param name="quoteItemsInfo">The quote items information.</param>
        private void FillQuoteDetails(out QuoteInfo quoteInfo, out QuoteItemsInfo[] quoteItemsInfo)
        {
            // Quote Info.
            quoteInfo = new QuoteInfo();
            quoteInfo.ShipmentOriginZip = "98001";
            quoteInfo.ShipmentDestinationZip = "10001";
            quoteInfo.ShipmentRequestDate = DateTime.Today;
            quoteInfo.ShipperUserNameWithCarrierRate = Username;
            quoteInfo.ShipperPasswordWithCarrierRate = Password;
            quoteInfo.ShipmentDropoffService = DropoffTypes.None;
            quoteInfo.ShipmentPickupService = PickupTypes.None;
            quoteInfo.IsInsidePickup = false;
            quoteInfo.IsExtremeLength = false;
            quoteInfo.ExtremeLength = 0;
            quoteInfo.ExtremeLengthBundleCount = 0;
            quoteInfo.IsTradeShow = false;
            quoteInfo.IsSortnSegregate = false;
            quoteInfo.isInsuranceRequired = false;
            quoteInfo.isNewItem = false;
            quoteInfo.RequiredInsuranceAmount = 0;
            quoteInfo.ShipmentExtraService = ExtraServices.None;
            quoteInfo.NonCommercialDeliveryType = NonCommercialDeliveryTypes.None;
            quoteInfo.IsProtectFromFreeze = false;

            // Quote Items Info.
            quoteItemsInfo = new QuoteItemsInfo[1];
            quoteItemsInfo[0] = new QuoteItemsInfo();
            quoteItemsInfo[0].FAKClass = 50;
            quoteItemsInfo[0].Hazardous = false;
            quoteItemsInfo[0].ItemHeight = 0;
            quoteItemsInfo[0].ItemLength = 0;
            quoteItemsInfo[0].ItemNmfc = "85";
            quoteItemsInfo[0].ItemWeight = 500;
            quoteItemsInfo[0].ItemWidth = 0;
            quoteItemsInfo[0].PackageTypeId = 0;
            quoteItemsInfo[0].PackageTypeName = "Pallets(40x48)";
            quoteItemsInfo[0].PalletCount = 0;
            quoteItemsInfo[0].PieceDescription = "Boxes";
            quoteItemsInfo[0].Pieces = 1;
            quoteItemsInfo[0].ProductId = 1;
        }
 /// <remarks/>
 public void RateMyShipmentExelAsync(QuoteInfo quoteInfo, string exelKey, ConfirmQuoteRequestExel ConfirmQuoteRequestExel, object userState) {
     if ((this.RateMyShipmentExelOperationCompleted == null)) {
         this.RateMyShipmentExelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRateMyShipmentExelOperationCompleted);
     }
     this.InvokeAsync("RateMyShipmentExel", new object[] {
                 quoteInfo,
                 exelKey,
                 ConfirmQuoteRequestExel}, this.RateMyShipmentExelOperationCompleted, userState);
 }
        /// <summary>
        /// Handles the Click event of the btnRateMyShipment control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void btnRateMyShipment_Click(object sender, EventArgs e)
        {
            QuoteInfo quoteInfo = new QuoteInfo();
            QuoteItemsInfo[] quoteItemsInfo;

            FillQuoteDetails(out quoteInfo, out quoteItemsInfo);

            RateQuoteWebServiceReference.Service rateQuoteWebService = new RateQuoteWebServiceReference.Service();
            QuoteRates[] quoteRates = null;
            quoteRates = rateQuoteWebService.RateMyShipment(quoteInfo, quoteItemsInfo);
            if (quoteRates != null)
            {
                dgvRateMyShipment.DataSource = quoteRates;
            }
            else
            {
                dgvRateMyShipment.DataSource = null;
                MessageBox.Show("No carriers Found");
            }
        }
 public string RateMyShipmentExel(QuoteInfo quoteInfo, string exelKey, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] ConfirmQuoteRequestExel ConfirmQuoteRequestExel) {
     object[] results = this.Invoke("RateMyShipmentExel", new object[] {
                 quoteInfo,
                 exelKey,
                 ConfirmQuoteRequestExel});
     return ((string)(results[0]));
 }
 /// <remarks/>
 public void RateMyShipmentExelAsync(QuoteInfo quoteInfo, string exelKey, ConfirmQuoteRequestExel ConfirmQuoteRequestExel) {
     this.RateMyShipmentExelAsync(quoteInfo, exelKey, ConfirmQuoteRequestExel, null);
 }
 /// <remarks/>
 public void RateMyShipmentWithCarrierLiabilityAsync(QuoteInfo quoteInfo, QuoteItemsInfo[] quoteItems, object userState) {
     if ((this.RateMyShipmentWithCarrierLiabilityOperationCompleted == null)) {
         this.RateMyShipmentWithCarrierLiabilityOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRateMyShipmentWithCarrierLiabilityOperationCompleted);
     }
     this.InvokeAsync("RateMyShipmentWithCarrierLiability", new object[] {
                 quoteInfo,
                 quoteItems}, this.RateMyShipmentWithCarrierLiabilityOperationCompleted, userState);
 }
 /// <remarks/>
 public void RateMyShipmentWithCarrierLiabilityAsync(QuoteInfo quoteInfo, QuoteItemsInfo[] quoteItems) {
     this.RateMyShipmentWithCarrierLiabilityAsync(quoteInfo, quoteItems, null);
 }
 public QuoteRatesWithCarrierLiability[] RateMyShipmentWithCarrierLiability(QuoteInfo quoteInfo, QuoteItemsInfo[] quoteItems) {
     object[] results = this.Invoke("RateMyShipmentWithCarrierLiability", new object[] {
                 quoteInfo,
                 quoteItems});
     return ((QuoteRatesWithCarrierLiability[])(results[0]));
 }
 /// <remarks/>
 public void RateMyShipmentAsync(QuoteInfo quoteInfo, QuoteItemsInfo[] quoteItems) {
     this.RateMyShipmentAsync(quoteInfo, quoteItems, null);
 }
 public QuoteRates[] RateMyShipment(QuoteInfo quoteInfo, QuoteItemsInfo[] quoteItems) {
     object[] results = this.Invoke("RateMyShipment", new object[] {
                 quoteInfo,
                 quoteItems});
     return ((QuoteRates[])(results[0]));
 }