public async Task <IActionResult> Edit(long id, [Bind("EMSO,Ime,Priimek,Email,Datum_Roj,Kraj_Roj,Starost,Naslov,Postna_Stevilka,Drzava")] UserWithGeslo userWithGeslo) { if (id != userWithGeslo.EMSO) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(userWithGeslo); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserWithGesloExists(userWithGeslo.EMSO)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(userWithGeslo)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Naziv,Alkohol")] Vino vino) { if (id != vino.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(vino); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VinoExists(vino.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(vino)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Naziv,Naslov")] Klet klet) { if (id != klet.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(klet); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!KletExists(klet.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(klet)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Naziv")] Proizvajalec proizvajalec) { if (id != proizvajalec.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(proizvajalec); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProizvajalecExists(proizvajalec.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(proizvajalec)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Datum_Nakupa,Kolicina,Cena")] Dobava dobava) { if (id != dobava.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(dobava); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DobavaExists(dobava.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(dobava)); }