public ActionResult Game(string name) { //display a game onto the user when selecting order now GameDal dal = new GameDal(); Game g = new Game(); g = dal.findGame(name); return(View(g)); }
public ActionResult addToCart(string name) { //game dal refrense to add a game to cart GameDal dal = new GameDal(); Game g = new Game(); //find game by game name g = dal.findGame(name); //adds the found game to cart Global.cart.Add(g); //updates sum Global.sum += Int32.Parse(g.price); Session["sum"] = Global.sum.ToString(); //shows current cart return(View("viewcart")); }