public ActionResult DeleteConfirmed(int id) { vw_EmployeeList vw_EmployeeList = db.vw_EmployeeList.Find(id); db.vw_EmployeeList.Remove(vw_EmployeeList); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "empid,EmployeeName,empNo,PositionDescription,DateHired,EmpStatusDescription,DeptDescription,CivilStatusDescription")] vw_EmployeeList vw_EmployeeList) { if (ModelState.IsValid) { db.Entry(vw_EmployeeList).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vw_EmployeeList)); }
public ActionResult Create([Bind(Include = "empid,EmployeeName,empNo,PositionDescription,DateHired,EmpStatusDescription,DeptDescription,CivilStatusDescription")] vw_EmployeeList vw_EmployeeList) { if (ModelState.IsValid) { db.vw_EmployeeList.Add(vw_EmployeeList); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vw_EmployeeList)); }
// GET: EmployeeList/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } vw_EmployeeList vw_EmployeeList = db.vw_EmployeeList.Find(id); if (vw_EmployeeList == null) { return(HttpNotFound()); } return(View(vw_EmployeeList)); }