Пример #1
0
 public ActionResult Edit([Bind(Include = "PlayerId,FirstName,LastName,Phone,Email,Paid,ShirtSize,ShortsSize,IsActive,Updated,UpdatedBy")] Player player)
 {
     if (ModelState.IsValid)
     {
         db.Entry(player).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(player));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,NameClub,City")] Club club)
 {
     if (ModelState.IsValid)
     {
         db.Entry(club).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(club));
 }
Пример #3
0
 public ActionResult Edit([Bind(Include = "Id,Firstname,Lastname,Number,ClubId")] Player player)
 {
     if (ModelState.IsValid)
     {
         db.Entry(player).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ClubId = new SelectList(db.Club, "Id", "NameClub", player.ClubId);
     return(View(player));
 }
Пример #4
0
        public ActionResult Edit(Player player)
        {
            SoccerEntities db = new SoccerEntities();

            {
                db.Entry(player).State = System.Data.Entity.EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index", new { teamId = player.TeamID }));
            }
            //   return View(player);
        }
Пример #5
0
        public ActionResult Edit(Team1 team)
        {
            SoccerEntities db = new SoccerEntities();

            if (ModelState.IsValid)
            {
                db.Entry(team).State = System.Data.Entity.EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(team));
        }
Пример #6
0
 public ActionResult Edit([Bind(Include = "GameId,GameDateTime,Location,Updated,UpdatedBy")] Game game)
 {
     if (ModelState.IsValid)
     {
         db.Entry(game).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(game));
 }