public ActionResult Edit([Bind(Include = "SemisterId,SemisterName")] Semister semister) { if (ModelState.IsValid) { db.Entry(semister).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(semister)); }
public ActionResult Edit([Bind(Include = "DesignationId,DesignationName")] Designation designation) { if (ModelState.IsValid) { db.Entry(designation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(designation)); }
public ActionResult Edit([Bind(Include = "DepartmentId,Code,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 = "CourseId,CourseCode,CourseCredit,CourseName,Description,DepartmentId,SemisterId")] Course course) { if (ModelState.IsValid) { db.Entry(course).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DepartmentId = new SelectList(db.DepartmentDbSet, "DepartmentId", "Code", course.DepartmentId); ViewBag.SemisterId = new SelectList(db.SemisterDbSet, "SemisterId", "SemisterName", course.SemisterId); return(View(course)); }
public ActionResult Edit([Bind(Include = "TeacherId,TeacherName,TeacherAddress,TeacherEmail,ContactNo,DesignationId,TeacherCredit,DepartmentId")] Teacher teacher) { if (ModelState.IsValid) { db.Entry(teacher).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DepartmentId = new SelectList(db.DepartmentDbSet, "DepartmentId", "Code", teacher.DepartmentId); ViewBag.DesignationId = new SelectList(db.DesignationDbSet, "DesignationId", "DesignationName", teacher.DesignationId); return(View(teacher)); }