public async Task <IActionResult> Edit(int id, [Bind("IdRoba,SifraProizvoda,Status,Tezina,DatumIsporuke")] Roba20191220 roba20191220) { if (id != roba20191220.IdRoba) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(roba20191220); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Roba20191220Exists(roba20191220.IdRoba)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(roba20191220)); }
public async Task <IActionResult> Create([Bind("IdRoba,SifraProizvoda,Status,Tezina,DatumIsporuke")] Roba20191220 roba20191220) { if (ModelState.IsValid) { _context.Add(roba20191220); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(roba20191220)); }