public async Task <IActionResult> PutDonor(int id, Donor donor)
        {
            if (id != donor.DonorId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutZdravstvenaUstanova(int id, ZdravstvenaUstanova zdravstvenaUstanova)
        {
            if (id != zdravstvenaUstanova.ZdravstvenaUstanovaId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#3
0
        public async Task <IActionResult> PutIsporuka(int id, Isporuka isporuka)
        {
            if (id != isporuka.IsporukaId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutLjekarskiPregled(int id, LjekarskiPregled ljekarskiPregled)
        {
            if (id != ljekarskiPregled.LjekarskiPregledId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#5
0
        public async Task <IActionResult> PutPotraznja(int id, Potraznja potraznja)
        {
            if (id != potraznja.PotraznjaId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#6
0
        public async Task <IActionResult> PutZahtjev(int id, Zahtjev zahtjev)
        {
            if (id != zahtjev.ZahtjevId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#7
0
        public async Task <IActionResult> PutKontakt(int id, Kontakt kontakt)
        {
            if (id != kontakt.KontaktId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#8
0
        public async Task <IActionResult> PutVazeceDoze(int id, VazeceDoze vazeceDoze)
        {
            if (id != vazeceDoze.DozaKrviId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#9
0
        public async Task <IActionResult> PutRadnik(int id, Radnik radnik)
        {
            if (id != radnik.RadnikId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutMagacin(int id, Magacin magacin)
        {
            if (id != magacin.MagacinId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }