public static bool InsertProductShoppingCart(ShoppingCartModel cart)
        {
            bool status = false;
            ProductCartManager productMgr = new ProductCartManager();

            ShoppingCartDTO toReturn = new ShoppingCartDTO();
            toReturn.ShoppingCartProductKId = cart.ShoppingCartProductKId;
            toReturn.ShoppingCartQuantity = cart.ShoppingCartQuantity;
            toReturn.ShoppingCartProductPrice = cart.ShoppingCartProductPrice;
            toReturn.ShoppingCartId = cart.ShoppingCartId;

            //status = productMgr.InsertProductCart(toReturn);
            return status;
        }
예제 #2
0
 public bool InsertProductCart(ShoppingCartDTO product)
 {
     ProductCartManager MN = new ProductCartManager();
     bool status = false;
     try
     {
         //status = MN.InsertProductCart(product);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return status;
 }
예제 #3
0
 public static ShoppingCartDTO ToModel(this ShoppingCartModel cart)
 {
     if (cart != null)
     {
         ShoppingCartDTO toReturn = new ShoppingCartDTO();
         toReturn.ShoppingCartProductKId = cart.ShoppingCartProductKId;
         toReturn.ShoppingCartQuantity = cart.ShoppingCartQuantity;
         toReturn.ShoppingCartProductPrice = cart.ShoppingCartProductPrice;
         toReturn.ShoppingCartId = cart.ShoppingCartId;
         return toReturn;
     }
     else
     {
         return null;
     }
 }