/// <summary> /// /// </summary> /// <returns></returns> public override ICollection GetShippingServiceOptions() { InternationalShippingServiceOptionsTypeCollection ssos = new InternationalShippingServiceOptionsTypeCollection(); int row = this.Items.Count; int col = this.Items[0].SubItems.Count; int cnt = 0; for (int i = 0; i < row; i++) { ListViewItem lvi = this.Items[i]; //ShippingService string text = lvi.SubItems[0].Text; if (text.Length > 0) { if (!text.Equals("NotSelected")) { InternationalShippingServiceOptionsType sso = new InternationalShippingServiceOptionsType(); sso.ShippingService = text; sso.ShippingServicePriority = ++cnt; ssos.Add(sso); if (col > 1) { // ShippingServiceCost text = lvi.SubItems[1].Text; if (text.Length > 0) { sso.ShippingServiceCost = CurrencyUtility.GetAmountType(text); } // ShippingServiceAdditioanlCost text = lvi.SubItems[2].Text; if (text.Length > 0) { sso.ShippingServiceAdditionalCost = CurrencyUtility.GetAmountType(text); } // ShipToLocations text = lvi.SubItems[3].Text; if (text.Length > 0) { sso.ShipToLocation = this.GetShipToLocationCollection(text); } // Import charge text = lvi.SubItems[4].Text; if (text.Length > 0) { sso.ImportCharge = CurrencyUtility.GetAmountType(text); } } } } } return(ssos); }
/// <summary> /// /// </summary> /// <returns></returns> public virtual ICollection GetShippingServiceOptions() { ShippingServiceOptionsTypeCollection ssos = new ShippingServiceOptionsTypeCollection(); int row = this.Items.Count; int col = this.Items[0].SubItems.Count; int cnt = 0; for (int i = 0; i < row; i++) { ListViewItem lvi = this.Items[i]; //ShippingService string text = lvi.SubItems[0].Text; if (text.Length > 0) { if (!text.Equals("NotSelected")) { cnt++; ShippingServiceOptionsType sso = new ShippingServiceOptionsType(); sso.ShippingService = text; sso.ShippingServicePriority = cnt; ssos.Add(sso); if (col > 1) { // ShippingServiceCost text = lvi.SubItems[1].Text; if (text.Length > 0) { sso.ShippingServiceCost = CurrencyUtility.GetAmountType(text); } // ShippingServiceAdditioanlCost text = lvi.SubItems[2].Text; if (text.Length > 0) { sso.ShippingServiceAdditionalCost = CurrencyUtility.GetAmountType(text); } } } } } return(ssos); }