public ActionResult Edit([Bind(Include = "EmployeeId,EmployeeName,EmployeeAddress,EmployeePosition,EmployeePhone,EmployeeEmail")] Employee employee) { if (ModelState.IsValid) { db.Entry(employee).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee)); }
public ActionResult Edit([Bind(Include = "C_Leave_ID_,C_Employee_Name_,Reason,C_Leave_Type_,C_Start_date_,C_End_date_,Length,Status,C_Document_")] Leave leave) { if (ModelState.IsValid) { db.Entry(leave).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(leave)); }