Exemple #1
0
 public ActionResult Edit([Bind(Include = "TEAM_ID,TEAM_NAME,TEAM_CITY,TEAM_SPONSER")] TEAM tEAM)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tEAM).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tEAM));
 }
 public ActionResult Edit([Bind(Include = "JERSEY_NUMBER,PLAYER_NAME,POINTS_PER_GAME,REBOUNDS_PER_GAME,ASSISTS_PER_GAME,TEAM_ID")] PLAYER pLAYER)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pLAYER).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.TEAM_ID = new SelectList(db.TEAMS, "TEAM_ID", "TEAM_NAME", pLAYER.TEAM_ID);
     return(View(pLAYER));
 }