public ActionResult DeleteConfirmed(int id) { Teacher_Profile teacher_profile = db.Teacher_Profile.Find(id); db.Teacher_Profile.Remove(teacher_profile); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /Teacher_Profile/Details/5 public ActionResult Details(int id = 0) { Teacher_Profile teacher_profile = db.Teacher_Profile.Find(id); if (teacher_profile == null) { return(HttpNotFound()); } return(View(teacher_profile)); }
public ActionResult Edit(Teacher_Profile teacher_profile) { if (ModelState.IsValid) { db.Entry(teacher_profile).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.School_ID = new SelectList(db.School_Profile, "School_ID", "SchoolAdmin_username", teacher_profile.School_ID); return(View(teacher_profile)); }
// // GET: /Teacher_Profile/Edit/5 public ActionResult Edit(int id = 0) { Teacher_Profile teacher_profile = db.Teacher_Profile.Find(id); if (teacher_profile == null) { return(HttpNotFound()); } ViewBag.School_ID = new SelectList(db.School_Profile, "School_ID", "SchoolAdmin_username", teacher_profile.School_ID); return(View(teacher_profile)); }
public ActionResult Create(Teacher_Profile teacher_profile) { if (ModelState.IsValid) { db.Teacher_Profile.Add(teacher_profile); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.School_ID = new SelectList(db.School_Profile, "School_ID", "SchoolAdmin_username", teacher_profile.School_ID); return(View(teacher_profile)); }