Beispiel #1
0
 public ActionResult Edit([Bind(Include = "LocationID,NLocation,MeetDate")] MeetLocation meetLocation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(meetLocation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(meetLocation));
 }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "AthleteId,AthleteName,AthleteGender,TeamID")] Athlete athlete)
 {
     if (ModelState.IsValid)
     {
         db.Entry(athlete).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.TeamID = new SelectList(db.Teams, "TeamID", "TeamName", athlete.TeamID);
     return(View(athlete));
 }
 public ActionResult Edit([Bind(Include = "ID,DISTANCE,LOCATIONID,ATHLETEID,RACETIME")] RACEEVENT rACEEVENT)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rACEEVENT).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ATHLETEID  = new SelectList(db.Athletes, "AthleteId", "AthleteName", rACEEVENT.ATHLETEID);
     ViewBag.LOCATIONID = new SelectList(db.MeetLocations, "LocationID", "NLocation", rACEEVENT.LOCATIONID);
     return(View(rACEEVENT));
 }