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> Create([Bind("Id,DatumPruzanjaUsluga,Oboljenje,RtgSnimak,Napomene,OpisUsluge,IzvjestajTerapije,KartonId,KnjigaProtokolaId")] StomatoloskaUsluga stomatoloskaUsluga) { if (ModelState.IsValid) { _context.Add(stomatoloskaUsluga); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(stomatoloskaUsluga)); }