public async Task <IActionResult> Edit(int id, [Bind("ZavodId,Naziv,Grad")] Zavod zavod) { if (id != zavod.ZavodId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(zavod); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZavodExists(zavod.ZavodId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(zavod)); }
public async Task <IActionResult> Edit(int id, [Bind("DonacijaId,DatumDonacije,DoniranaKolicinaKrvi")] Donacija donacija) { if (id != donacija.DonacijaId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(donacija); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DonacijaExists(donacija.DonacijaId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(donacija)); }
public async Task <IActionResult> Edit(int id, [Bind("KlinikaId,Naziv")] Klinika klinika) { if (id != klinika.KlinikaId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(klinika); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!KlinikaExists(klinika.KlinikaId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(klinika)); }
public async Task <IActionResult> Edit(int id, [Bind("ZahtjevId,Odobren,KolicinaKrvi")] Zahtjev zahtjev) { if (id != zahtjev.ZahtjevId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(zahtjev); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZahtjevExists(zahtjev.ZahtjevId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(zahtjev)); }
public async Task <IActionResult> Edit(int id, [Bind("PregledId,DatumPregleda,DetaljiPregleda,UspjesanPregled")] Pregled pregled) { if (id != pregled.PregledId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(pregled); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PregledExists(pregled.PregledId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(pregled)); }
public async Task <IActionResult> Edit(int id, [Bind("DonorId,Ime,Prezime,Email,Jmbg,BrojMobilnogTelefona,Grad")] Donor donor) { if (id != donor.DonorId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(donor); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DonorExists(donor.DonorId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(donor)); }
public async Task <IActionResult> Edit(int id, [Bind("KorisnikId,KorisnickoIme,sifra")] Korisnik korisnik) { if (id != korisnik.KorisnikId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(korisnik); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!KorisnikExists(korisnik.KorisnikId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(korisnik)); }
public async Task <IActionResult> Edit(int id, [Bind("KomponenteKrviId,Eritrociti,Trombociti,Leukociti,KrvnaPlazma")] KomponenteKrvi komponenteKrvi) { if (id != komponenteKrvi.KomponenteKrviId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(komponenteKrvi); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!KomponenteKrviExists(komponenteKrvi.KomponenteKrviId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(komponenteKrvi)); }