public ActionResult UpdateExamAdmin([Bind(Include = "Id,day,st_hour,end_hour,classroom,Moad1,Moad2")] course course) { if (ModelState.IsValid) { db.Entry(course).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(course)); }
public ActionResult Edit([Bind(Include = "Id_lecturer,id_course,id_student")] registStudent2Course registStudent2Course) { if (ModelState.IsValid) { db.Entry(registStudent2Course).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.id_course = new SelectList(db.courses, "Id", "Id", registStudent2Course.id_course); ViewBag.Id_lecturer = new SelectList(db.Lecturers, "Id", "Id", registStudent2Course.Id_lecturer); ViewBag.id_student = new SelectList(db.students, "Id", "Id", registStudent2Course.id_student); return(View(registStudent2Course)); }
public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,UserName,password,Email")] student student) { if (ModelState.IsValid) { db.Entry(student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(student)); }
public ActionResult Edit([Bind(Include = "Id,UserName,Password")] Admin admin) { if (ModelState.IsValid) { db.Entry(admin).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(admin)); }
public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,UserName,password,Email")] Lecturer lecturer) { if (ModelState.IsValid) { db.Entry(lecturer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Id = new SelectList(db.registStudent2Course, "Id_lecturer", "Id_lecturer", lecturer.Id); return(View(lecturer)); }