コード例 #1
0
 //GetCartCount(CartViewModel cartViewModel)
 public CartViewModel UpdateCartDetailLineItem(CartViewModel cartViewModel)
 {
     CartDataAccessService cartDataAccessService = new CartDataAccessService();
     CartViewModel viewModel = new CartViewModel();
     viewModel = cartDataAccessService.UpdateCartDetailLineItem(cartViewModel);
     return viewModel;
 }
コード例 #2
0
 public CartViewModel GetCartCount(CartViewModel cartViewModel)
 {
     CartDataAccessService cartDataAccessService = new CartDataAccessService();
     //CartViewModel viewModel = new CartViewModel();
        // viewModel = cartDataAccessService.GetCartCount(cartViewModel);
     return cartDataAccessService.GetCartCount(cartViewModel);
 }
コード例 #3
0
        public CartViewModel GetCarts(string CartID)
        {
            CartDataAccessService cartDataAccessService = new CartDataAccessService();
            CartViewModel viewModel = new CartViewModel();
            viewModel.Cart.CartID = CartID;
            viewModel = cartDataAccessService.GetCarts(viewModel);

            return viewModel;
        }
コード例 #4
0
 public CartViewModel AddCartDetailLineItem(CartViewModel cartViewModel)
 {
     CartDataAccessService cartDataAccessService = new CartDataAccessService();
     CartViewModel incartViewModel = new CartViewModel();
     CartViewModel incartViewModel2 = new CartViewModel();
     List<String> returnMessage = new List<String>();
     returnMessage.Add(cartViewModel.Cart.ProductName + " is added in the cart");
     int count = 0;
     incartViewModel.ReturnStatus = true;
     Boolean returnMessageforAddtoCart = true;
     returnMessageforAddtoCart = cartDataAccessService.AddToCart(cartViewModel);
     if (returnMessageforAddtoCart != true)
     {
         returnMessage.Add(cartViewModel.Cart.ProductName + " is not added in the cart");
         incartViewModel.ReturnStatus = false;
     }
     incartViewModel.ReturnMessage = returnMessage;
        incartViewModel2= cartDataAccessService.GetCartCount(cartViewModel);
        count = incartViewModel2.Cart.Count;
        incartViewModel.Cart.Count = count;
     return incartViewModel;
 }
コード例 #5
0
 public void UpdateOrderEmptyCart(int currentOrderId, string PaymentConfirmation, string CartID)
 {
     CartDataAccessService cartDataAccessService = new CartDataAccessService();
     cartDataAccessService.UpdateOrderEmptyCart(currentOrderId, PaymentConfirmation, CartID);
 }
コード例 #6
0
 public OrderViewModel CreateOrder(OrderViewModel orderViewModel)
 {
     CartDataAccessService cartDataAccessService = new CartDataAccessService();
        return cartDataAccessService.CreateOrder(orderViewModel);
 }
コード例 #7
0
 public void MigrateCart(string userName,string ShoppingCartId)
 {
     CartDataAccessService cartDataAccessService = new CartDataAccessService();
     cartDataAccessService.MigrateCart(userName,ShoppingCartId);
 }