예제 #1
0
        public List <CartPO> Map(List <CartDAO> cartListToMap)
        {
            // instaniate a new list of type userPO
            List <CartPO> cartListToReturn = new List <CartPO>();

            // create a foreach loop to loop throught the list
            foreach (CartDAO cartToMap in cartListToMap)
            {
                CartPO cartToView = new CartPO();

                // map the values
                cartToView.checkOutID         = cartToMap.checkOutID;
                cartToView.supplierID         = cartToMap.supplierID;
                cartToView.supplierName       = cartToMap.supplierName;
                cartToView.productDescription = cartToMap.productDescription;
                cartToView.productPrice       = cartToMap.productPrice;
                cartToView.checkOutQuantity   = cartToMap.checkOutQuantity;
                cartToView.checkOutTax        = cartToMap.checkOutTax;
                cartToView.checkOutShipping   = cartToMap.checkOutShipping;
                cartToView.checkOutTotal      = cartToMap.checkOutTotal;
                cartToView.checkOutDate       = cartToMap.checkOutDate;
                cartToView.userTableID        = cartToMap.userTableID;
                cartToView.productID          = cartToMap.productID;
                cartToView.userTransactionID  = cartToMap.userTransactionID;
                cartToView.datePurchase       = cartToMap.datePurchase;
                cartToView.productQuantity    = cartToMap.productQuantity;
                cartListToReturn.Add(cartToView);
            }
            // return the list
            return(cartListToReturn);
        }
예제 #2
0
        public CartPO Map(CartDAO cartToMap)
        {
            // Create an instance of the object
            CartPO cartToView = new CartPO();

            // map the values
            cartToView.checkOutID         = cartToMap.checkOutID;
            cartToView.supplierID         = cartToMap.supplierID;
            cartToView.supplierName       = cartToMap.supplierName;
            cartToView.productDescription = cartToMap.productDescription;
            cartToView.productPrice       = cartToMap.productPrice;
            cartToView.checkOutQuantity   = cartToMap.checkOutQuantity;
            cartToView.checkOutTax        = cartToMap.checkOutTax;
            cartToView.checkOutShipping   = cartToMap.checkOutShipping;
            cartToView.checkOutTotal      = cartToMap.checkOutTotal;
            cartToView.checkOutDate       = cartToMap.checkOutDate;
            cartToView.userTableID        = cartToMap.userTableID;
            cartToView.productID          = cartToMap.productID;
            cartToView.userTransactionID  = cartToMap.userTransactionID;
            cartToView.datePurchase       = cartToMap.datePurchase;
            cartToView.productQuantity    = cartToMap.productQuantity;

            // return the values
            return(cartToView);
        }
예제 #3
0
        public CartBO GetProductInfo(CartPO infoToMap)
        {
            // return an instance of the object
            CartBO infoToView = new CartBO();

            // map the info
            infoToView.checkOutQuantity = infoToMap.checkOutQuantity;
            infoToView.checkOutTax      = infoToMap.checkOutTax;
            infoToView.checkOutShipping = infoToMap.checkOutShipping;
            infoToView.checkOutTotal    = infoToMap.checkOutTotal;

            // return the info
            return(infoToView);
        }
예제 #4
0
 public CartViewModel()
 {
     singleItemPO  = new CartPO();
     listOfItemsPO = new List <CartPO>();
 }