public ActionResult Edit([Bind(Include = "c_id,sem,section")] Class @class) { if (ModelState.IsValid) { db.Entry(@class).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(@class); }
public ActionResult Edit([Bind(Include = "organization,category,amount")] Sponsor sponsor) { if (ModelState.IsValid) { db.Entry(sponsor).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sponsor)); }
public ActionResult Edit([Bind(Include = "e_id,name,date,time,venue,prize,description")] Event @event) { if (ModelState.IsValid) { db.Entry(@event).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(@event)); }
public ActionResult Edit([Bind(Include = "d_id,d_name")] Department department) { if (ModelState.IsValid) { db.Entry(department).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(department)); }
public ActionResult Edit([Bind(Include = "usn,name,d_id,c_id")] Student student) { if (ModelState.IsValid) { db.Entry(student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.c_id = new SelectList(db.Classes, "c_id", "section", student.c_id); ViewBag.d_id = new SelectList(db.Departments, "d_id", "d_name", student.d_id); return(View(student)); }