public async Task <IActionResult> PutCanBoBenhVien(int id, CanBoBenhVien canBoBenhVien)
        {
            if (id != canBoBenhVien.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutChiTietPhieuDanhGia(int id, ChiTietPhieuDanhGia chiTietPhieuDanhGia)
        {
            if (id != chiTietPhieuDanhGia.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemple #3
0
        public async Task <IActionResult> PutMauKhaoSat(int id, MauKhaoSat mauKhaoSat)
        {
            if (id != mauKhaoSat.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemple #4
0
        public async Task <IActionResult> PutPhieuDanhGia(int id, PhieuDanhGia phieuDanhGia)
        {
            if (id != phieuDanhGia.Id)
            {
                return(BadRequest());
            }
            phieuDanhGia.NgayCapNhat = DateTime.Now;

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

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

            return(NoContent());
        }