示例#1
0
        public async Task <IActionResult> PutHocvien(Hocvien hocvien)
        {
            //if (id != hocvien.Mahv)
            //{
            //    return BadRequest();
            //}

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

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

            return(NoContent());
        }
示例#2
0
        public async Task <IActionResult> PutLichhoc(Lichhoc lichhoc)
        {
            //if (id != lichhoc.Malichhoc)
            //{
            //    return BadRequest();
            //}

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

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

            return(NoContent());
        }
示例#3
0
        public async Task <IActionResult> PutKythi(Kythi kythi)
        {
            //if (id != kythi.Makythi)
            //{
            //    return BadRequest();
            //}

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

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

            return(NoContent());
        }
示例#4
0
        public async Task <IActionResult> PutPhancong(Phancong phancong)
        {
            //if (id != phancong.Malop)
            //{
            //    return BadRequest();
            //}

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

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

            return(NoContent());
        }
示例#5
0
        public async Task <IActionResult> PutDiadiem(Diadiem diadiem)
        {
            //if (id != diadiem.Madiadiem)
            //{
            //    return BadRequest();
            //}

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

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

            return(NoContent());
        }
示例#6
0
        public async Task <IActionResult> PutGiangday(Giangday giangday)
        {
            //if (id != giangday.Mamonhoc)
            //{
            //    return BadRequest();
            //}

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

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

            return(NoContent());
        }
示例#7
0
        public async Task <IActionResult> PutDonvihocvien(Donvihocvien donvihocvien)
        {
            //if (id != donvihocvien.Madonvi)
            //{
            //    return BadRequest(new { message = "Product not found" });
            //}

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

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

            return(NoContent());
        }
示例#8
0
        public async Task <IActionResult> PutNhomlop(Nhomlop nhomlop)
        {
            //if (id != nhomlop.Manhom)
            //{
            //    return BadRequest();
            //}

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

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

            return(NoContent());
        }