Esempio n. 1
0
        //create a new cart per store
        public CartDetail CreateCartDetail(cCartDetails cart)
        {
            //StoreDetail tempStore = db.StoreDetails.Find(cart.StoreId);
            //StorePickupPoint pickup = db.StorePickupPoints.Find(cart.PickupPointId);
            CartDetail cartDetails = new CartDetail
            {
                Id                 = cart.Id,
                UserDetailId       = getUserId(),
                StoreDetailId      = cart.StoreId,
                StoreDetail        = cartdb.GetStoreDetail(cart.StoreId),
                CartStatusId       = cart.CartStatus,         //default: active
                CartStatu          = cartdb.GetCartStatus(cart.CartStatus),
                StorePickupPoint   = cartdb.GetStorePickupPoint(cart.PickupPointId),
                StorePickupPointId = cart.PickupPointId,
                DeliveryType       = cart.DeliveryType,
                DtPickup           = cart.DtPickup,
                CartItems          = getCartItems(cart),
                PaymentDetails     = getPaymentDetails(cart)
            };

            return(cartDetails);
        }