public ActionResult DeleteConfirmed(int id) { ApplicantModels applicantModels = db.Applicants.Find(id); db.Applicants.Remove(applicantModels); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AplicantID,FirstName,MiddleName,LastName,Email,Phone,Comments,Salary")] ApplicantModels applicantModels) { if (ModelState.IsValid) { db.Entry(applicantModels).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(applicantModels)); }
public ActionResult Create([Bind(Include = "AplicantID,FirstName,MiddleName,LastName,Email,Phone,Comments,Salary")] ApplicantModels applicantModels) { if (ModelState.IsValid) { db.Applicants.Add(applicantModels); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(applicantModels)); }
// GET: Applicant/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ApplicantModels applicantModels = db.Applicants.Find(id); if (applicantModels == null) { return(HttpNotFound()); } return(View(applicantModels)); }