public async Task <IActionResult> Edit(int id, [Bind("TipoDeTransaccionID,TransactionTypecode,DescripcionTipoDeTransaccion")] TipoDeTransaccion tipoDeTransaccion) { if (id != tipoDeTransaccion.TipoDeTransaccionID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tipoDeTransaccion); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TipoDeTransaccionExists(tipoDeTransaccion.TipoDeTransaccionID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tipoDeTransaccion)); }
public Transaccion(TipoDeTransaccion tipoDeTransaccion, Concepto concepto, decimal monto) { this.TipoDeTransaccion = tipoDeTransaccion; this.Concepto = concepto; this.Monto = monto; }
public async Task <IActionResult> Create([Bind("TipoDeTransaccionID,TransactionTypecode,DescripcionTipoDeTransaccion")] TipoDeTransaccion tipoDeTransaccion) { if (ModelState.IsValid) { _context.Add(tipoDeTransaccion); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tipoDeTransaccion)); }