Example #1
0
        public void CalcWeightAndSize(Products itemList)
        {
            foreach (var kvpItem in items)
            {
                var tempItem = itemList.GetItem(kvpItem.Key);

                if (String.IsNullOrEmpty(ItemNumber))
                {
                    ItemNumber = tempItem.ItemNumber;
                    Description = tempItem.Description;
                }

                TotalWeight += tempItem.GetWeightByQty(kvpItem.Value);

                if (tempItem.CubicSize > cubicSize)
                {
                    H = tempItem.H;
                    L = tempItem.L;
                    W = tempItem.W;
                    cubicSize = tempItem.CubicSize;
                }
            }
        }
Example #2
0
        public void SetCarrier(Products itemList)
        {
            if (CustInfo.POBox)
            {
                // Must use US Mail for PO Box addresses.
                Carrier = "USPS";
                return;
            }

            if (multiItem == "M")
            {
                // Must use UPS for multiple item packages.
                Carrier = "UPS";
                return;
            }

            // Single item package carrier determined by flag on item.
            Carrier = (itemList.GetItem(itemNum).ShipUSMail ? "USPS" : "UPS");
        }