public ActionResult DeleteConfirmed(int id) { ALSEmployee aLSEmployee = db.ALSEmployees.Find(id); db.ALSEmployees.Remove(aLSEmployee); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Employee_Id,First_Name,Last_Name,Gender,D_O_B,Technology,Contact_Number,Email_Id,SSN,EAD,Is_Internal_Employee")] ALSEmployee aLSEmployee) { if (ModelState.IsValid) { db.Entry(aLSEmployee).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aLSEmployee)); }
// GET: ALSEmployee/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ALSEmployee aLSEmployee = db.ALSEmployees.Find(id); if (aLSEmployee == null) { return(HttpNotFound()); } return(View(aLSEmployee)); }