Пример #1
0
        public async Task <IActionResult> PutDimmaster(int id, Dimmaster dimmaster)
        {
            if (id != dimmaster.DimId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Пример #2
0
        public async Task <IActionResult> PutSecqmaster(byte id, Secqmaster secqmaster)
        {
            if (id != secqmaster.SecQid)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutOrderdetail(int id, Orderdetail orderdetail)
        {
            if (id != orderdetail.DetailId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutUseraddress(int id, Useraddress useraddress)
        {
            if (id != useraddress.AddrId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Пример #5
0
        public async Task <IActionResult> PutProductmaterial(short id, Productmaterial productmaterial)
        {
            if (id != productmaterial.MatId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Пример #6
0
        public async Task <IActionResult> PutUserdetail(int userid, [FromBody] Userdetail userdetail)
        {
            //if (email != userdetail.Email)
            //{
            //    return BadRequest();
            //}

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

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                //throw e;
                if (!UserdetailExists(userdetail.UserId))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }