public ActionResult UpdateEmployee(TBLEMPLOYEE p) { var employee = db.TBLEMPLOYEE.Find(p.ID); employee.Employee = p.Employee; db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult AddNewEmployee(TBLEMPLOYEE p) { if (!ModelState.IsValid) { return(View("AddNewEmployee")); } db.TBLEMPLOYEE.Add(p); db.SaveChanges(); return(RedirectToAction("Index")); }