// GET: Personals/Edit/5 //public ActionResult Edit(int? id) //{ // if (id == null) // { // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); // } // Personal personal = db.Personal.Find(id); // if (personal == null) // { // return HttpNotFound(); // } // return View(personal); //} // POST: Personals/Edit/5 // To protect from overposting attacks, enable the specific properties you want to bind to, for // more details see https://go.microsoft.com/fwlink/?LinkId=317598. //[HttpPost] //[ValidateAntiForgeryToken] //public ActionResult Edit([Bind(Include = "ID_personal,Nombre,ApePaterno,ApeMaterno,Edad,IsActive")] Personal personal) //{ // if (ModelState.IsValid) // { // db.Entry(personal).State = EntityState.Modified; // db.SaveChanges(); // return RedirectToAction("Index"); // } // return View(personal); //} // GET: Personals/Delete/5 //public ActionResult Delete(int? ID_personal) //{ // if (ID_personal == null) // { // return new HttpStatusCodeResult(HttpStatusCode.BadRequest); // } // Personal Empleado = emDB.RealAll().Find(x => x.ID_personal.Equals(ID_personal)); // if (Empleado == null) // { // return HttpNotFound(); // } // return View(Empleado); //} // POST: Personals/Delete/5 //[HttpPost, ActionName("Delete")] //[ValidateAntiForgeryToken] //public ActionResult DeleteConfirmed(int ID_personal) //{ // Personal Empleado = emDB.RealAll().Find(x => x.ID_personal.Equals(ID_personal)); // emDB.Delete(ID_personal); // return RedirectToAction("Index"); //} protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }