public ActionResult DeleteConfirmed(int id) { EmployeEducation employeeducation = db.EmployeEducations.Find(id); db.EmployeEducations.Remove(employeeducation); db.SaveChanges(); return(RedirectToAction("ViewEmployeeEducation")); }
public ActionResult EditEmployeeEducation([Bind(Include = "Id,EmployeeId,EducationId,ExamId,Subject,InstituteName,FromDate,ToDate,Duration,PassingYear")] EmployeEducation employeeducation) { if (ModelState.IsValid) { db.Entry(employeeducation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("ViewEmployeeEducation")); } ViewBag.EducationId = new SelectList(db.Educations, "Id", "EducationName", employeeducation.EducationId); ViewBag.EmployeeId = new SelectList(db.Employees, "Id", "EmployeeRegNo", employeeducation.EmployeeId); ViewBag.ExamId = new SelectList(db.Exams, "Id", "ExamName", employeeducation.ExamId); return(View(employeeducation)); }
// GET: /EmployeEducation/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmployeEducation employeeducation = db.EmployeEducations.Find(id); if (employeeducation == null) { return(HttpNotFound()); } return(View(employeeducation)); }
// GET: /EmployeEducation/Edit/5 public ActionResult EditEmployeeEducation(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmployeEducation employeeducation = db.EmployeEducations.Find(id); if (employeeducation == null) { return(HttpNotFound()); } ViewBag.EducationId = new SelectList(db.Educations, "Id", "EducationName", employeeducation.EducationId); ViewBag.EmployeeId = new SelectList(db.Employees, "Id", "EmployeeRegNo", employeeducation.EmployeeId); ViewBag.ExamId = new SelectList(db.Exams, "Id", "ExamName", employeeducation.ExamId); return(View(employeeducation)); }