Exemplo n.º 1
0
        public async Task <IActionResult> PutFactureFrs(Guid id, FactureFrs factureFrs)
        {
            if (id != factureFrs.IdFac)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutFournisseur(Guid id, Fournisseur fournisseur)
        {
            if (id != fournisseur.IdFO)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 3
0
        public async Task <IActionResult> PutPaquet(Guid id, Paquet paquet)
        {
            if (id != paquet.IdPA)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 4
0
        public async Task <IActionResult> PutArticle(Guid id, Article article)
        {
            if (id != article.IdAR)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <ActionResult <ProduitItem> > PutProduitItem(int id, ProduitItem produitItem)
        {
            if (id != produitItem.Id)
            {
                return(BadRequest());
            }

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

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (System.Data.Entity.Infrastructure.DbUpdateConcurrencyException)
            {
                if (!ProduitItemExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            //NoContentResult res= NoContent();

            return(produitItem);
        }
Exemplo n.º 6
0
        public async Task <IActionResult> PutProd(int IdProd, Produit prod)
        {
            if (IdProd != prod.IdProd)
            {
                return(BadRequest());
            }
            _context.Entry(prod).State = EntityState.Modified;
            await _context.SaveChangesAsync();

            return(NoContent());
        }