예제 #1
0
 public ActionResult Edit([Bind(Include = "WC_Id,Location,Year")] WorldCup worldCup)
 {
     if (ModelState.IsValid)
     {
         db.Entry(worldCup).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(worldCup));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "Group_Id,Name")] Group group)
 {
     if (ModelState.IsValid)
     {
         db.Entry(group).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(group));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "Country_Id,Name")] Country country)
 {
     if (ModelState.IsValid)
     {
         db.Entry(country).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(country));
 }
예제 #4
0
 public ActionResult Edit([Bind(Include = "Scorer_Id,Name,Surname,Country_Id")] Scorer scorer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(scorer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Country_Id = new SelectList(db.Countries, "Country_Id", "Name", scorer.Country_Id);
     return(View(scorer));
 }
예제 #5
0
 public ActionResult Edit([Bind(Include = "Phase_Id,PhaseName,WC_Id")] Phase phase)
 {
     if (ModelState.IsValid)
     {
         db.Entry(phase).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.WC_Id = new SelectList(db.WorldCups, "WC_Id", "Location", phase.WC_Id);
     return(View(phase));
 }
예제 #6
0
 public ActionResult Edit([Bind(Include = "Amount,Scorer_Id,Game_Id")] ScorerInGame scorerInGame)
 {
     if (ModelState.IsValid)
     {
         db.Entry(scorerInGame).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Game_Id   = new SelectList(db.Games, "Game_Id", "Game_Id", scorerInGame.Game_Id);
     ViewBag.Scorer_Id = new SelectList(db.Scorers, "Scorer_Id", "Name", scorerInGame.Scorer_Id);
     return(View(scorerInGame));
 }
예제 #7
0
 public ActionResult Edit([Bind(Include = "Country_Id,Group_Id,WC_Id")] CountryInGroup countryInGroup)
 {
     if (ModelState.IsValid)
     {
         db.Entry(countryInGroup).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Country_Id = new SelectList(db.Countries, "Country_Id", "Name", countryInGroup.Country_Id);
     ViewBag.Group_Id   = new SelectList(db.Groups, "Group_Id", "Name", countryInGroup.Group_Id);
     ViewBag.WC_Id      = new SelectList(db.WorldCups, "WC_Id", "Location", countryInGroup.WC_Id);
     return(View(countryInGroup));
 }
예제 #8
0
 public ActionResult Edit([Bind(Include = "Game_Id,Score1_90,Score2_90,Score1_120,Score2_120,PK1,PK2,Group_Id,WC_Id,Country_Id1,Country_Id2")] Game game)
 {
     if (ModelState.IsValid)
     {
         db.Entry(game).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Country_Id1 = new SelectList(db.Countries, "Country_Id", "Name", game.Country_Id1);
     ViewBag.Country_Id2 = new SelectList(db.Countries, "Country_Id", "Name", game.Country_Id2);
     ViewBag.Group_Id    = new SelectList(db.Groups, "Group_Id", "Name", game.Group_Id);
     ViewBag.WC_Id       = new SelectList(db.WorldCups, "WC_Id", "Location", game.WC_Id);
     return(View(game));
 }