public ActionResult Edit(PersonalTalavera PT) { if (ModelState.IsValid) { int res = tsvc.editPersonal(PT); if (res > 0) { return(RedirectToAction("Index")); } } return(new HttpStatusCodeResult(201, "No fue posible guardar los cambios, intentelo mas tarde")); }
public ActionResult Crear(PersonalTalavera PT) { if (ModelState.IsValid) { int res = tsvc.addPersonalTalaver(PT); if (res >= 1) { return(RedirectToAction("Index")); } } return(new HttpStatusCodeResult(404, "No se pudo registrar, vuelva a intentarlo mas tarde")); }
public ActionResult Delete(PersonalTalavera CT) { int res = tsvc.deletePersonal(CT.Id); if (res == 1) { return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Delete(int id) { PersonalTalavera CT = tsvc.getPersonal(id); return(View(CT)); }
public ActionResult Edit(int id) { PersonalTalavera pt = tsvc.getPersonal(id); return(View(pt)); }