Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
        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));
        }