public async Task <IActionResult> PutFacturas([FromRoute] int id, [FromBody] Facturas facturas) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != facturas.Id) { return(BadRequest()); } _context.Entry(facturas).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FacturasExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public ActionResult Edit([Bind(Include = "IdEstatus,Estatus,MayorQue,MenorQue")] ValorCalificacion valorCalificacion) { if (ModelState.IsValid) { db.Entry(valorCalificacion).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(valorCalificacion)); }
public async Task <ActionResult> Edit([Bind(Include = "id_menu,Nombre,Link,Padre")] cat_menu cat_menu) { if (ModelState.IsValid) { db.Entry(cat_menu).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(cat_menu)); }