public IActionResult AnularToma(int idToma) { try { var toma = service.GetTomaByID(idToma); if (toma.Borrador) { toma.Anulado = true; } toma = service.Update(toma); return(Json(new { success = true })); } catch (Exception ex) { AltivaLog.Log.Insertar(ex.ToString(), "Error"); return(BadRequest()); throw; } }
public TbPrToma Update(TomaViewModel viewModel) { return(service.Update(ViewModelToDomainEdit(viewModel))); }