public ActionResult Edit(Venta venta) { ViewBag.local = localservice.FindAll(); ViewBag.motorizado = motorizadoservice.FindAll(); ViewBag.cliente = clienteservice.FindAll(); if (!ModelState.IsValid) { return(View()); } bool rpta = ventaservice.Update(venta); if (rpta) { return(RedirectToAction("Index")); } return(View()); }
public ActionResult Update([FromBody] Venta entity) { return(Ok(ventaServ.Update(entity))); }