public ActionResult Edit([Bind(Include = "PlayerPositionId,Position,Description")] PlayerPosition playerPosition)
 {
     if (ModelState.IsValid)
     {
         db.Entry(playerPosition).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(playerPosition));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "HonourId,Image,Award,Amount,Season,Type")] Honour honour)
 {
     if (ModelState.IsValid)
     {
         db.Entry(honour).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(honour));
 }
示例#3
0
 public ActionResult Edit([Bind(Include = "CompetitionId,Name")] Competition competition)
 {
     if (ModelState.IsValid)
     {
         db.Entry(competition).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(competition));
 }
示例#4
0
 public ActionResult Edit([Bind(Include = "TeamId,Name")] Team team)
 {
     if (ModelState.IsValid)
     {
         db.Entry(team).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(team));
 }
示例#5
0
 public ActionResult Edit([Bind(Include = "ManagerId,Image,FirstName,LastName,DOB,Nationality,Period")] Manager manager)
 {
     if (ModelState.IsValid)
     {
         db.Entry(manager).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(manager));
 }
示例#6
0
 public ActionResult Edit([Bind(Include = "FixtureId,Date,Stadium,HomeTeam,HomeScore,AwayScore,AwayTeam,CompetitionId")] Fixture fixture)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fixture).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CompetitionId = new SelectList(db.Competitions, "CompetitionId", "Name", fixture.CompetitionId);
     return(View(fixture));
 }
示例#7
0
 public ActionResult Edit([Bind(Include = "PlayerId,Image,FirstName,LastName,Age,Nationality,SquadNumber,PlayerPositionId,TeamId")] Player player)
 {
     if (ModelState.IsValid)
     {
         db.Entry(player).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PlayerPositionId = new SelectList(db.PlayerPositions, "PlayerPositionId", "Position", player.PlayerPositionId);
     ViewBag.TeamId           = new SelectList(db.Teams, "TeamId", "Name", player.TeamId);
     return(View(player));
 }