public IHttpActionResult Puttipo_revistas(int id, tipo_revistas tipo_revistas) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != tipo_revistas.id_tipo) { return(BadRequest()); } db.Entry(tipo_revistas).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!tipo_revistasExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutDiasAsesor(int id, DiasAsesor diasAsesor) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != diasAsesor.Id) { return(BadRequest()); } db.Entry(diasAsesor).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!DiasAsesorExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult Putrevistas_libros(int id, revistas_libros revistas_libros) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != revistas_libros.id_Informacion) { return(BadRequest()); } db.Entry(revistas_libros).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!revistas_librosExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public ActionResult Edit([Bind(Include = "idUsuario,nomUsuario,apellido,correo,contrasena")] Usuarios usuarios) { if (ModelState.IsValid) { db.Entry(usuarios).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(usuarios)); }
public ActionResult Edit([Bind(Include = "region_id,region_name")] Region region) { if (ModelState.IsValid) { db.Entry(region).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(region)); }
public ActionResult Edit([Bind(Include = "country_id,country_name,region_id")] Country country) { if (ModelState.IsValid) { db.Entry(country).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.region_id = new SelectList(db.Regions, "region_id", "region_name", country.region_id); return(View(country)); }