public async Task <IActionResult> Edit(Guid id, [Bind("ID,Descripcion,Cantidad,Precio,Total")] ventas ventas) { if (id != ventas.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ventas); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ventasExists(ventas.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(ventas)); }
public async Task <IActionResult> Edit(Guid id, [Bind("ProductoId,MyProperty,TipoProducto,PrecioAproximado,FechaProducción,CantidadProduccion")] Produccion produccion) { if (id != produccion.ProductoId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(produccion); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProduccionExists(produccion.ProductoId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(produccion)); }