public async Task <IActionResult> Edit(int id, [Bind("Id,PaymentType,Sequence")] FncPaymentType fncPaymentType) { if (id != fncPaymentType.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(fncPaymentType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FncPaymentTypeExists(fncPaymentType.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(PartialView("~/Areas/Finance/Views/FncPaymentType/CreateEdit.cshtml", fncPaymentType)); }
public async Task <IActionResult> Create([Bind("Id,PaymentType,Sequence")] FncPaymentType fncPaymentType) { if (ModelState.IsValid) { _context.Add(fncPaymentType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(PartialView("~/Areas/Finance/Views/FncPaymentType/CreateEdit.cshtml", fncPaymentType)); }