public ActionResult DeleteConfirmed(string id) { EmplyeeInfo emplyeeInfo = db.EmplyeeInfoes.Find(id); db.EmplyeeInfoes.Remove(emplyeeInfo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "EmployeeID,EmployeeName,EmployeeAddress,EmployeePhoneNumber,EmployeeEmailID,EmployeeDoB")] EmplyeeInfo emplyeeInfo) { if (ModelState.IsValid) { db.Entry(emplyeeInfo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(emplyeeInfo)); }
public ActionResult Create([Bind(Include = "EmployeeID,EmployeeName,EmployeeAddress,EmployeePhoneNumber,EmployeeEmailID,EmployeeDoB")] EmplyeeInfo emplyeeInfo) { if (ModelState.IsValid) { db.EmplyeeInfoes.Add(emplyeeInfo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(emplyeeInfo)); }
// GET: EmployeeInfo/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmplyeeInfo emplyeeInfo = db.EmplyeeInfoes.Find(id); if (emplyeeInfo == null) { return(HttpNotFound()); } return(View(emplyeeInfo)); }