public ActionResult DeleteConfirmed(Guid id) { BowlingInn bowlingInn = db.BowlingInns.Find(id); db.BowlingInns.Remove(bowlingInn); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: BowlingInns/Details/5 public ActionResult Details(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BowlingInn bowlingInn = db.BowlingInns.Find(id); if (bowlingInn == null) { return(HttpNotFound()); } return(View(bowlingInn)); }
public ActionResult Edit([Bind(Include = "bowlingInnsid,matchid,bowlingInnsnumber,countryid,playerid,runs,wickets,maidens,overs,extras,lastupdated")] BowlingInn bowlingInn) { if (ModelState.IsValid) { db.Entry(bowlingInn).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.bowlingInnsid = new SelectList(db.BowlingInns, "bowlingInnsid", "bowlingInnsid", bowlingInn.bowlingInnsid); ViewBag.bowlingInnsid = new SelectList(db.BowlingInns, "bowlingInnsid", "bowlingInnsid", bowlingInn.bowlingInnsid); ViewBag.countryid = new SelectList(db.Countries, "countryid", "countrycode", bowlingInn.countryid); ViewBag.matchid = new SelectList(db.Matches, "matchid", "matchid", bowlingInn.matchid); ViewBag.playerid = new SelectList(db.Players, "playerid", "playername", bowlingInn.playerid); return(View(bowlingInn)); }
// GET: BowlingInns/Edit/5 public ActionResult Edit(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } BowlingInn bowlingInn = db.BowlingInns.Find(id); if (bowlingInn == null) { return(HttpNotFound()); } ViewBag.bowlingInnsid = new SelectList(db.BowlingInns, "bowlingInnsid", "bowlingInnsid", bowlingInn.bowlingInnsid); ViewBag.bowlingInnsid = new SelectList(db.BowlingInns, "bowlingInnsid", "bowlingInnsid", bowlingInn.bowlingInnsid); ViewBag.countryid = new SelectList(db.Countries, "countryid", "countrycode", bowlingInn.countryid); ViewBag.matchid = new SelectList(db.Matches, "matchid", "matchid", bowlingInn.matchid); ViewBag.playerid = new SelectList(db.Players, "playerid", "playername", bowlingInn.playerid); return(View(bowlingInn)); }