public ActionResult Edit([Bind(Include = "area_id,nom_area")] area area) { if (ModelState.IsValid) { db.Entry(area).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(area)); }
public ActionResult Edit([Bind(Include = "emp_id,nom_empleado,ap_pat, ap_mat,email,area_id")] empleado empleado) { if (ModelState.IsValid) { db.Entry(empleado).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.area_id = new SelectList(db.area, "area_id", "nom_area", empleado.area_id); return(View(empleado)); }