Exemplo n.º 1
0
 public Package(int ID, Order objOrder, Customer objCustInfo, OrderInfo objOrdInfo)
 {
     BaseOrder = objOrder;
     CustInfo = objCustInfo;
     PackageID = ID.ToString();
     PackageOrderNumber = objOrdInfo.OrderNumber;
     PackageSubOrderNumber = objOrdInfo.OrderItemId;
     ShipMethod = objOrdInfo.ShipMethod;
 }
Exemplo n.º 2
0
        public Package(int ID, Product objItem, Order objOrder, int orderItemId, Customer objCustInfo, string carrier)
        {
            BaseOrder = objOrder;
            CustInfo = objCustInfo;
            Carrier = carrier;
            PackageID = ID.ToString();
            PackageOrderNumber = objOrder.OrderNumber;
            PackageSubOrderNumber = orderItemId;

            itemNum = objItem.ItemNumber;
            itemDesc = objItem.Description;
            signReq = (objItem.SignatureRequired ? "Y" : "N");

            ShipMethod = objOrder.OrderItems[itemNum + "_" + orderItemId].OrderInfo.ShipMethod;
        }
Exemplo n.º 3
0
        public byte IsSameCustomer(Customer customer)
        {
            byte matchCount = 0;

            if (customer.FirstName==FirstName)
                matchCount++;

            if (customer.LastName == LastName)
                matchCount += 3;

            if (customer.Address == Address)
            {
                matchCount++;
            }
            else
            {
                var addressPart1 = customer.Address.Split(' ');
                int streetNumber;
                if (int.TryParse(addressPart1[0], out streetNumber))
                {
                    var addressPart2 = Address.Split(' ');
                    if (streetNumber.ToString() == addressPart2[0])
                        matchCount++;
                }
            }

            if (customer.Zip == Zip)
                matchCount += 3;

            return matchCount;
        }