public async Task <IActionResult> Edit(int id, [Bind("PlanillaConceptoId,PlanillaConceptoTipoId,Descripcion,EsPago,EsRetencion,PagaIR,PagaSS,PagaINATEC,EsIR,EsSS")] PlanillaConcepto planillaConcepto) { if (id != planillaConcepto.PlanillaConceptoId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(planillaConcepto); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlanillaConceptoExists(planillaConcepto.PlanillaConceptoId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PlanillaConceptoTipoId"] = new SelectList(_context.PlanillaConceptoTipo, "PlanillaConceptoTipoId", "PlanillaConceptoTipoId", planillaConcepto.PlanillaConceptoTipoId); return(View(planillaConcepto)); }
public async Task <IActionResult> Create([Bind("PlanillaConceptoId,PlanillaConceptoTipoId,Descripcion,EsPago,EsRetencion,PagaIR,PagaSS,PagaINATEC,EsIR,EsSS")] PlanillaConcepto planillaConcepto) { if (ModelState.IsValid) { _context.Add(planillaConcepto); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PlanillaConceptoTipoId"] = new SelectList(_context.PlanillaConceptoTipo, "PlanillaConceptoTipoId", "PlanillaConceptoTipoId", planillaConcepto.PlanillaConceptoTipoId); return(View(planillaConcepto)); }