示例#1
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            BowlingInn bowlingInn = db.BowlingInns.Find(id);

            db.BowlingInns.Remove(bowlingInn);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
        // 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));
        }
示例#3
0
 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));
 }
示例#4
0
        // 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));
        }