public ActionResult DatosMascota(Mascota model) { if (ModelState.IsValid) { bool resultado = AD_Mascota.ActualizarDatosMascota(model); if (resultado) { return(RedirectToAction("ListadoMascotas", "Mascota")); } else { return(View(model)); } } return(View()); }
public ActionResult AgregarMascota(Mascota model) { if (ModelState.IsValid) { bool resultado = AD_Mascota.InsertarNuevaMascota(model); if (resultado) { return(RedirectToAction("ListadoMascotas", "Mascota")); } else { return(View(model)); } } else { return(View(model)); } }
public ActionResult ListadoMascotas() { List <Mascota> lista = AD_Mascota.ObtenerListasMascotas(); return(View(lista)); }
// GET: Mascota public ActionResult DatosMascota(int idMascota) { Mascota resultado = AD_Mascota.ObtenerMascota(idMascota); return(View(resultado)); }