public ActionResult Edit([Bind(Include = "ClubId,ClubName,CreationDate,AdminId")] Club club) { if (ModelState.IsValid) { db.Entry(club).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(club)); }
public ActionResult Edit([Bind(Include = "EventId,Venue,Location,StartDateTime,EndDateTime,ClubId")] ClubEvent clubEvent) { if (ModelState.IsValid) { db.Entry(clubEvent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details", "Clubs", new { id = clubEvent.ClubId })); } ViewBag.ClubId = new SelectList(db.Clubs, "ClubId", "ClubName", clubEvent.ClubId); return(View(clubEvent)); }
public ActionResult Edit([Bind(Include = "MemberId,ClubId,StudentId,Approved")] Member member) { if (ModelState.IsValid) { db.Entry(member).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Details", "Clubs", new { id = member.ClubId })); } ViewBag.ClubId = new SelectList(db.Clubs, "ClubId", "ClubName", member.ClubId); ViewBag.StudentId = new SelectList(db.Students, "StudentId", "FirstName", member.StudentId); return(View(member)); }