示例#1
0
        public List <Carts> Map(List <CartDAO> CartListToMap)
        {
            List <Carts> CartListToReturn = new List <Carts>();

            foreach (CartDAO CartToMap in CartListToMap)
            {
                Carts CartViewModel = Map(CartToMap);
                CartListToReturn.Add(CartViewModel);
            }
            return(CartListToReturn);
        }
示例#2
0
        public CartDAO Map(Carts cartToCreate)
        {
            CartDAO daCartToCreate = new CartDAO();

            daCartToCreate.CartID       = cartToCreate.UserID;
            daCartToCreate.PantsID      = cartToCreate.PantsID;
            daCartToCreate.ShirtsID     = cartToCreate.ShirtsID;
            daCartToCreate.UserID       = cartToCreate.UserID;
            daCartToCreate.ShirtQuanity = cartToCreate.ShirtQuanity;
            daCartToCreate.PantQuanity  = cartToCreate.PantQuanity;
            daCartToCreate.ShirtPrice   = cartToCreate.ShirtPrice;
            daCartToCreate.PantPrice    = cartToCreate.PantPrice;
            daCartToCreate.TotalPrice   = cartToCreate.TotalPrice;

            return(daCartToCreate);
        }
示例#3
0
        public Carts Map(CartDAO cartToUpdate)
        {
            Carts _cartToUpdate = new Carts();

            _cartToUpdate.UserID       = cartToUpdate.UserID;
            _cartToUpdate.PantsID      = cartToUpdate.PantsID;
            _cartToUpdate.ShirtsID     = cartToUpdate.ShirtsID;
            _cartToUpdate.ShirtQuanity = cartToUpdate.ShirtQuanity;
            _cartToUpdate.PantQuanity  = cartToUpdate.PantQuanity;
            _cartToUpdate.ShirtPrice   = cartToUpdate.ShirtPrice;
            _cartToUpdate.PantPrice    = cartToUpdate.PantPrice;
            _cartToUpdate.TotalPrice   = cartToUpdate.TotalPrice;



            return(_cartToUpdate);
        }
示例#4
0
        public Carts Map(CartsBLO _SelectCartLogic)
        {
            Carts LogicToReturn = new Carts();

            {
                Carts _cartLogicView = new Carts();
                _cartLogicView.CartID       = _SelectCartLogic.CartID;
                _cartLogicView.PantsID      = _SelectCartLogic.PantsID;
                _cartLogicView.ShirtsID     = _SelectCartLogic.ShirtsID;
                _cartLogicView.UserID       = _SelectCartLogic.UserID;
                _cartLogicView.ShirtQuanity = _SelectCartLogic.ShirtQuanity;
                _cartLogicView.PantQuanity  = _SelectCartLogic.PantQuanity;
                _cartLogicView.TotalPrice   = _SelectCartLogic.TotalPrice;
                _cartLogicView.ShirtPrice   = _SelectCartLogic.ShirtPrice;
                _cartLogicView.PantPrice    = _SelectCartLogic.PantPrice;
            }
            return(LogicToReturn);
        }
示例#5
0
        public CartsBLO Mapcarts(Carts _SingleCartLogic)
        {
            CartsBLO LogicToReturn = new CartsBLO();

            {
                CartsBLO _cartLogicView = new CartsBLO();
                _cartLogicView.CartID       = _SingleCartLogic.CartID;
                _cartLogicView.PantsID      = _SingleCartLogic.PantsID;
                _cartLogicView.ShirtsID     = _SingleCartLogic.ShirtsID;
                _cartLogicView.UserID       = _SingleCartLogic.UserID;
                _cartLogicView.ShirtQuanity = _SingleCartLogic.ShirtQuanity;
                _cartLogicView.PantQuanity  = _SingleCartLogic.PantQuanity;
                _cartLogicView.TotalPrice   = _SingleCartLogic.TotalPrice;
                _cartLogicView.ShirtPrice   = _SingleCartLogic.ShirtPrice;
                _cartLogicView.PantPrice    = _SingleCartLogic.PantPrice;
            }
            return(LogicToReturn);
        }
示例#6
0
        public List <Carts> Mapcart(List <CartsBLO> _CartListToMap)
        {
            List <Carts> _CartListToReturn = new List <Carts>();

            foreach (CartsBLO _CartToMap in _CartListToMap)
            {
                Carts _CartViewModel = new Carts();
                _CartViewModel.CartID       = _CartToMap.UserID;
                _CartViewModel.PantsID      = _CartToMap.PantsID;
                _CartViewModel.ShirtsID     = _CartToMap.ShirtsID;
                _CartViewModel.UserID       = _CartToMap.UserID;
                _CartViewModel.ShirtQuanity = _CartToMap.ShirtQuanity;
                _CartViewModel.PantQuanity  = _CartToMap.PantQuanity;
                _CartViewModel.TotalPrice   = _CartToMap.TotalPrice;
                _CartViewModel.ShirtPrice   = _CartToMap.ShirtPrice;
                _CartViewModel.PantPrice    = _CartToMap.PantPrice;

                _CartListToReturn.Add(_CartViewModel);
            }
            return(_CartListToReturn);
        }
示例#7
0
 public CartViewModel()
 {
     SingleCart = new Carts();
     CartList   = new List <Carts>();
 }