public ActionResult DeleteConfirmed(int id) { TSTEmpStatus tSTEmpStatus = db.TSTEmpStatuses.Find(id); db.TSTEmpStatuses.Remove(tSTEmpStatus); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "EmpStatusID,EmpStatusName,EmpStatusDescription")] TSTEmpStatus tSTEmpStatus) { if (ModelState.IsValid) { db.Entry(tSTEmpStatus).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tSTEmpStatus)); }
public ActionResult Create([Bind(Include = "EmpStatusID,EmpStatusName,EmpStatusDescription")] TSTEmpStatus tSTEmpStatus) { if (ModelState.IsValid) { db.TSTEmpStatuses.Add(tSTEmpStatus); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tSTEmpStatus)); }
// GET: EmpStatus/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TSTEmpStatus tSTEmpStatus = db.TSTEmpStatuses.Find(id); if (tSTEmpStatus == null) { return(HttpNotFound()); } return(View(tSTEmpStatus)); }