public ActionResult DeleteConfirmed(int id) { betting betting = db.bettings.Find(id); db.bettings.Remove(betting); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "id,coefficient,fk_users_bets,fk_match")] betting betting) { if (ModelState.IsValid) { db.Entry(betting).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.fk_users_bets = new SelectList(db.users_bets, "id", "id", betting.fk_users_bets); ViewBag.fk_match = new SelectList(db.matches, "id", "map", betting.fk_match); return(View(betting)); }
public ActionResult Create([Bind(Include = "id,coefficient,fk_users_bets,fk_match,team_name")] betting betting) { if (ModelState.IsValid) { db.bettings.Add(betting); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.fk_users_bets = new SelectList(db.users_bets, "id", "id", betting.fk_users_bets); ViewBag.fk_match = new SelectList(db.matches, "id", "map", betting.fk_match); return(View(betting)); }
// GET: Bettings/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } betting betting = db.bettings.Find(id); if (betting == null) { return(HttpNotFound()); } return(View(betting)); }
// GET: Bettings/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } betting betting = db.bettings.Find(id); if (betting == null) { return(HttpNotFound()); } ViewBag.fk_users_bets = new SelectList(db.users_bets, "id", "id", betting.fk_users_bets); ViewBag.fk_match = new SelectList(db.matches, "id", "map", betting.fk_match); return(View(betting)); }