public async Task <IActionResult> Edit(int id, [Bind("Id,ImePrezime,Email,Sifra")] Korisnik korisnik)
        {
            if (id != korisnik.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(korisnik);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KorisnikExists(korisnik.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(korisnik));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,NazivFirme,BrojTelefona,Adresa")] Kontakt kontakt)
        {
            if (id != kontakt.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(kontakt);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KontaktExists(kontakt.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(kontakt));
        }
Пример #3
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,DatumKreiranja")] LoyalKartica loyalKartica)
        {
            if (id != loyalKartica.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(loyalKartica);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LoyalKarticaExists(loyalKartica.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(loyalKartica));
        }
Пример #4
0
        public async Task <IActionResult> Edit(int id, [Bind("DatumRodjenja,BrojTelefona,Spol,Prebivaliste,JedinstveniMatičniBroj,ZdravstveneNapomene,LoyalKarticaId,Id,ImePrezime,Email,Sifra")] Pacijent pacijent)
        {
            if (id != pacijent.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(pacijent);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PacijentExists(pacijent.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(pacijent));
        }
Пример #5
0
        public async Task <IActionResult> Edit(int id, [Bind("Id")] KnjigaProtokola knjigaProtokola)
        {
            if (id != knjigaProtokola.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(knjigaProtokola);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!KnjigaProtokolaExists(knjigaProtokola.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(knjigaProtokola));
        }
Пример #6
0
        public async Task <IActionResult> Edit(int id, [Bind("TerminId,PacijentId,VrijemeTermina,ZauzetostTermina,ObrazlozenjeTermina")] Termin termin)
        {
            if (id != termin.TerminId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(termin);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TerminExists(termin.TerminId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(termin));
        }
Пример #7
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,DatumPruzanjaUsluga,Oboljenje,RtgSnimak,Napomene,OpisUsluge,IzvjestajTerapije,KartonId,KnjigaProtokolaId")] StomatoloskaUsluga stomatoloskaUsluga)
        {
            if (id != stomatoloskaUsluga.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(stomatoloskaUsluga);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StomatoloskaUslugaExists(stomatoloskaUsluga.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(stomatoloskaUsluga));
        }
 public async Task <IActionResult> Edit(StomatoloskiKarton stomatoloskiKarton)
 {
     if (ModelState.IsValid)
     {
         try
         {
             _context.Update(stomatoloskiKarton);
             await _context.SaveChangesAsync();
         }
         catch (DbUpdateConcurrencyException)
         {
             if (!StomatoloskiKartonExists(stomatoloskiKarton.Id))
             {
                 return(NotFound());
             }
             else
             {
                 throw;
             }
         }
         return(RedirectToAction(nameof(Index)));
     }
     return(View(stomatoloskiKarton));
 }
Пример #9
0
 public async Task <IActionResult> Edit(CjenovnikItem cjenovnikItem)
 {
     if (ModelState.IsValid)
     {
         try
         {
             _context.Update(cjenovnikItem);
             await _context.SaveChangesAsync();
         }
         catch (DbUpdateConcurrencyException)
         {
             if (!CjenovnikExists(cjenovnikItem.Id))
             {
                 return(NotFound());
             }
             else
             {
                 throw;
             }
         }
         return(RedirectToAction(nameof(Index)));
     }
     return(View(cjenovnikItem));
 }