public async Task <IActionResult> PutTblGiaoVienChuNhiem(long id, TblGiaoVienChuNhiem tblGiaoVienChuNhiem)
        {
            if (id != tblGiaoVienChuNhiem.MaGvcn)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutTblDkgiangDay(long id, TblDkgiangDay tblDkgiangDay)
        {
            if (id != tblDkgiangDay.MaDkgd)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> PutTblPhongKhoa(string id, TblPhongKhoa tblPhongKhoa)
        {
            if (id != tblPhongKhoa.MaPk)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> PutUser(string id, User user)
        {
            if (id != user.UserId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> PutTblKhenThuongKiLuat(long id, TblKhenThuongKiLuat tblKhenThuongKiLuat)
        {
            if (id != tblKhenThuongKiLuat.MaKtkl)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }