示例#1
0
        public async Task <IActionResult> PutProductosProveedores(int id, ProductosProveedores productosProveedores)
        {
            if (id != productosProveedores.IdProveedor)
            {
                return(BadRequest());
            }

            _context.Entry(productosProveedores).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ProductosProveedoresExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
示例#2
0
        public async Task <IActionResult> PutEmpleados(int id, Empleados empleados)
        {
            if (id != empleados.IdEmpleado)
            {
                return(BadRequest());
            }

            _context.Entry(empleados).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!EmpleadosExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
示例#3
0
        public async Task <IActionResult> PutOrdenes(int id, Ordenes ordenes)
        {
            if (id != ordenes.IdOrden)
            {
                return(BadRequest());
            }

            _context.Entry(ordenes).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!OrdenesExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
示例#4
0
        public async Task <IActionResult> PutAsistencias(int id, Asistencias asistencias)
        {
            if (id != asistencias.IdAsistencia)
            {
                return(BadRequest());
            }

            _context.Entry(asistencias).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AsistenciasExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
示例#5
0
        public async Task <IActionResult> PutDetallecompra(int id, Detallecompra detallecompra)
        {
            if (id != detallecompra.IdCompra)
            {
                return(BadRequest());
            }

            _context.Entry(detallecompra).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!DetallecompraExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutInventario(int id, Inventario inventario)
        {
            if (id != inventario.IdInventario)
            {
                return(BadRequest());
            }

            _context.Entry(inventario).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!InventarioExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }