public ActionResult CancelOrder() { SessionHelper session = new SessionHelper(); string id = session.SessionID; ProductVisitRepo pvr = new ProductVisitRepo(); pvr.removeProductVisit(id); //VisitRepo visitRepo = new VisitRepo(); //visitRepo.removeVisit(id); return RedirectToAction("Index", "Cart"); }
public ActionResult ViewCart(int productId, int qty) { if (qty < 1) { TempData["error"] = "A positive quantity must be used"; return RedirectToAction("Add", "Cart", new { id = productId }); } ShoppingCartEntities db = new ShoppingCartEntities(); SessionHelper session = new SessionHelper(); string id = session.SessionID; ProductVisitRepo pvRepo = new ProductVisitRepo(); pvRepo.addProductVisit(id, productId, qty, DateTime.Now); return RedirectToAction("MyCart", "Cart"); }