private void LoadShipping() { ShippingRates.CountryId = PageData.ShippingContact.CountryId; ShippingRates.Zip = PageData.ShippingContact.Zip; ShippingRates.City = PageData.ShippingContact.City; ShippingRates.Region = PageData.ShippingContact.RegionName; ShippingRates.SelectShippingOptionEx = PageData.ShippingOptionEx; ShippingRates.ShoppingCart = ShoppingCartService.CurrentShoppingCart; ShippingRates.LoadMethods(PageData.SelectShippingButtonId); btnNextFromShipPay.Enabled &= ShippingRates.ShippingRates.Count > 0; }
public bool Equals(CheckoutShippingRateListResponse other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(ShippingRates.SequenceEqual(other.ShippingRates)); }
private void LoadShipping() { ShippingRates.CountryId = PageData.ShippingContact.CountryId; ShippingRates.Zip = PageData.ShippingContact.Zip; ShippingRates.City = PageData.ShippingContact.City; ShippingRates.Region = PageData.ShippingContact.RegionName; ShippingRates.Distance = PageData.Distance; ShippingRates.PickpointId = PageData.SelectedShippingItem.Ext != null?PageData.SelectedShippingItem.Ext.PickpointId.TryParseInt() : 0; ShippingRates.SelectShippingOptionEx = PageData.SelectedShippingItem.Ext; ShippingRates.ShoppingCart = ShoppingCartService.CurrentShoppingCart; ShippingRates.LoadMethods(PageData.SelectedShippingItem.Id); if (ShippingRates.SelectedItem != null) { PageData.SelectedShippingItem = ShippingRates.SelectedItem; PageData.Distance = ShippingRates.Distance; } else { PageData.SelectedShippingItem = new ShippingItem(); PageData.Distance = 0; } DisplayBlock = ShippingMethodService.ShowAddressField(PageData.UserType, ShippingRates.SelectedItem) ? "block" : "none"; BlockCustomField = ShippingMethodService.ShowCustomField(PageData.UserType, ShippingRates.SelectedItem) ? "block" : "none"; liDelivery.Text = string.Format("{0}, {1}{2}", PageData.ShippingContact.Country, (PageData.ShippingContact.RegionName != "" && PageData.ShippingContact.RegionName != PageData.ShippingContact.City ? PageData.ShippingContact.RegionName + ", " : ""), PageData.ShippingContact.City); DeliveryJson = JsonConvert.SerializeObject(new { countryId = PageData.ShippingContact.CountryId, country = PageData.ShippingContact.Country, region = PageData.ShippingContact.RegionName, city = PageData.ShippingContact.City }); DisplayDelivery = PageData.UserType != EnUserType.RegisteredUser; }
private string calcFrghtClass(ShippingRates.FreightClassDetail[] arrFreightClasses) { string result = ""; result = "<table width=\"200\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">"; result = result + "<tr>"; result = result + "<td><u>Class</u></td>"; result = result + "<td align=\"right\"><u>Weight</u></td>"; result = result + "<td align=\"right\"><u>Cube</u></td>"; result = result + "</tr>"; // Create table rows foreach (ShippingRates.FreightClassDetail fc in arrFreightClasses) { result = result + "<tr>"; result = result + "<td nowrap>" + fc.freightClass + "</td>"; result = result + "<td nowrap align=\"right\">" + Math.Round(fc.weight, 1) + " lbs. </td>"; result = result + "<td nowrap align=\"right\">" + Math.Round(fc.cube, 1) + " ft^3</td>"; result = result + "</tr>"; } result = result + "</table>"; return result; }
public override int GetHashCode() { return(ShippingRates != null ? ShippingRates.GetHashCode() : 0); }