public ActionResult DeleteConfirmed(int id) { ApplicantTable applicantTable = db.ApplicantTables.Find(id); db.ApplicantTables.Remove(applicantTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ApplicantTableId,Email,FirstName,LastName,OtherName,MatricNo,FacultyName")] ApplicantTable applicantTable) { if (ModelState.IsValid) { db.Entry(applicantTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(applicantTable)); }
public ActionResult Create([Bind(Include = "ApplicantTableId,Email,FirstName,LastName,OtherName,MatricNo,FacultyName")] ApplicantTable applicantTable) { if (ModelState.IsValid) { db.ApplicantTables.Add(applicantTable); db.SaveChanges(); return(RedirectToAction("ApplicantConfirmationPage")); } return(View(applicantTable)); }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ApplicantTable applicantTable = db.ApplicantTables.Find(id); if (applicantTable == null) { return(HttpNotFound()); } return(View(applicantTable)); }