Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Date,OppositeTeam,Result,Id,Point,Goals")] Match match)
 {
     if (ModelState.IsValid)
     {
         db.Entry(match).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(match));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,PlayerUserName,MatchId,NumberOfGoals,Point,Card")] Goal goal)
 {
     if (ModelState.IsValid)
     {
         db.Entry(goal).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MatchId        = new SelectList(db.Matches, "Id", "OppositeTeam", goal.MatchId);
     ViewBag.PlayerUserName = new SelectList(db.Players, "UserName", "UserName", goal.PlayerUserName);
     return(View(goal));
 }