public ActionResult Edit([Bind(Include = "REG_ID,REG_NOMBRE")] REGION rEGION) { if (ModelState.IsValid) { db.Entry(rEGION).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(rEGION)); }
public ActionResult Edit([Bind(Include = "DIRECCION_DIR_ID,EMP_ID,EMP_NOMBRE,EMP_RUT")] EMPRESA eMPRESA) { if (ModelState.IsValid) { db.Entry(eMPRESA).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DIRECCION_DIR_ID = new SelectList(db.DIRECCION, "DIR_ID", "CALLE", eMPRESA.DIRECCION_DIR_ID); return(View(eMPRESA)); }