public async Task <IActionResult> Edit(int id, [Bind("totalRotacionID,invCosto,invVenta,pedidoCompra,backOrderTotal")] TotalRotacion totalRotacion) { if (id != totalRotacion.totalRotacionID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(totalRotacion); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TotalRotacionExists(totalRotacion.totalRotacionID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(totalRotacion)); }
public async Task <IActionResult> Create([Bind("totalRotacionID,invCosto,invVenta,pedidoCompra,backOrderTotal")] TotalRotacion totalRotacion) { if (ModelState.IsValid) { _context.Add(totalRotacion); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(totalRotacion)); }