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));
 }
Example #2
0
 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));
 }