public static bool DeleteShoppingCart(int PCartKId) { ProductCartManager productCart = new ProductCartManager(); bool status = false; status = productCart.DeleteShoppingCart(PCartKId); return status; }
public bool DeleteShoppingCart(int productCartId) { ProductCartManager MN = new ProductCartManager(); bool status = false; status = MN.DeleteShoppingCart(productCartId); return status; }
public ActionResult DeleteItemInShoppingCart(int productCartId) { shoppingCartId = base.GetShoppingCartId(); var productCartManager = new ProductCartManager(); this.productCartManager.DeleteShoppingCart(productCartId); ViewBag.ItemsCount = productCartManager.CountCartItems(shoppingCartId); return View("ShoppingCart", productCartManager.GetCartItems(shoppingCartId)); }
public ActionResult Product() { var productCartMgr = new ProductCartManager(); var productManager = new ProductManager(); IList<ProductModel> productModels = productManager.GetallProducts(); ViewBag.ItemsCount = productCartMgr.CountCartItems(GetShoppingCartId()); return View(productModels); }
public ActionResult Index(ProductModel product) { var productCartMgr = new ProductCartManager(); ViewBag.ItemsCount = productCartMgr.CountCartItems(GetShoppingCartId()); ViewBag.ProductId = product.Id; ViewBag.Price = product.Price; ViewBag.ProductName = product.Name; ViewBag.Description = product.Description; var productManager = new ProductManager(); var productImages = productManager.GetProductImagesById(product.Id); return View("ProductDetail", productImages); }
public bool InsertProductCart(ShoppingCartDTO product) { ProductCartManager MN = new ProductCartManager(); bool status = false; try { //status = MN.InsertProductCart(product); } catch (Exception ex) { throw ex; } return status; }
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; }
public static IList<ShoppingCartModel> GetShoppingCartIteim(Guid cartId) { ProductCartManager productMgr = new ProductCartManager(); //IList<ShoppingCartDTO> productCartList = productMgr.GetShoppingCartIteim(cartId); IList<ShoppingCartModel> shoppingCartList = new List<ShoppingCartModel>(); //if (productCartList != null) //{ // foreach (ShoppingCartDTO productCart in productCartList) // { // ShoppingCartModel toReturn = new ShoppingCartModel(); // toReturn.ProductCategoryName = productCart.ProductCategoryName; // toReturn.ShoppingCartProductPrice = productCart.ShoppingCartProductPrice; // toReturn.ShoppingCartQuantity = productCart.ShoppingCartQuantity; // toReturn.ProductImageURL = productCart.ProductImageURL; // toReturn.ShoppingCartId = productCart.ShoppingCartId; // toReturn.ShoppingCartProductKId = productCart.ShoppingCartProductKId; // shoppingCartList.Add(toReturn); // } //} return shoppingCartList; }
public List<ShoppingCartDTO> GetShoppingCartIteim(Guid CartId) { ProductCartManager MN = new ProductCartManager(); //List<ShoppingCartDTO> productCartList = MN.GetShoppingCartIteim(CartId); return null; }
public int CountCartItems(Guid cartId) { ProductCartManager productCartMgr = new ProductCartManager(); return productCartMgr.CountCartItems(cartId); }
public ActionResult UpdateQuantityInCart(int productCartId, int quantity) { shoppingCartId = base.GetShoppingCartId(); var productCartModel = new ProductCartModel(); productCartModel.Id = productCartId; productCartModel.Quantity = quantity; var productCartManager = new ProductCartManager(); productCartManager.UpdateQuantityInCart(productCartModel); return RedirectToAction("ShoppingCart", productCartManager.GetCartItems(shoppingCartId).FirstOrDefault()); }
public static int CountShoppingCartItems(Guid cartId) { ProductCartManager productCart = new ProductCartManager(); int CartIterm = productCart.CountCartItems(cartId); return CartIterm; }
public ActionResult Index() { ProductCartManager productCartMgr = new ProductCartManager(); ViewBag.ItemsCount = productCartMgr.CountCartItems(GetShoppingCartId()); return View(); }