public ActionResult Edit(EMS_Person eMS_Person)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eMS_Person).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(eMS_Person));
 }
Example #2
0
 public ActionResult Edit([Bind(Include = "Fulltime_Employee_ID,Person_ID,Company_ID,Date_Of_Hire,Date_Of_Termination,Reason_For_Leaving,Salary,Status,Completion")] EMS_FullTimeEmployee eMS_FullTimeEmployee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eMS_FullTimeEmployee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Company_ID = new SelectList(db.EMS_Company, "Company_ID", "CompanyDescription", eMS_FullTimeEmployee.Company_ID);
     ViewBag.Person_ID  = new SelectList(db.EMS_Person, "Person_ID", "First_Name", eMS_FullTimeEmployee.Person_ID);
     return(View(eMS_FullTimeEmployee));
 }