// GET: TomatoCheese public ActionResult TomatoCheese(int price, string order) { TomatoCheeseModel smodel = new TomatoCheeseModel(); smodel.generalPrice = price; smodel.generalOrder = order; return(View(smodel)); }
public ActionResult TomatoCheese(TomatoCheeseModel smodel) { if (smodel.sauce == true) { smodel.generalPrice += 1000; smodel.generalOrder += ", salsa de tomate"; } if (smodel.cheese == true) { smodel.generalPrice += 400; smodel.generalOrder += ", con queso"; } TempData["price"] = (smodel.generalPrice).ToString(); TempData["order"] = smodel.generalOrder; return(RedirectToAction("Ingredients", "Ingredients")); }