public ActionResult Edit(CatalogoTalavera pCT) { if (ModelState.IsValid) { int res = tvsv.editCatalogo(pCT); if (res > 0) { return(RedirectToAction("Index")); } } return(new HttpStatusCodeResult(201, "No fue posible guardar los cambios, intentelo mas tarde")); }
public ActionResult NuevaPieza(CatalogoTalavera pCT) { if (ModelState.IsValid) { int res = tvsv.addPiezaTalavera(pCT); if (res > 0) { return(RedirectToAction("Index")); } } return(View()); }
public ActionResult Delete(CatalogoTalavera CT) { int res = tvsv.deleteCatalogo(CT.Id); if (res == 1) { return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Delete(int id) { CatalogoTalavera CT = tvsv.getPiezasTalavera(id); return(View(CT)); }