public IActionResult EditR(LoanRepaymentTransactionModel loanRepaymentTransaction) { if (!ModelState.IsValid) { return(View(loanRepaymentTransaction)); } if (_memberService.GetById(loanRepaymentTransaction.NomorAnggota) == null) { ModelState.AddModelError("NomorAnggota", "Nomor anggota tidak ada"); } if (_loanService.GetById(loanRepaymentTransaction.NomorPinjaman) == null) { ModelState.AddModelError("NomorPinjaman", "Nomor pinjaman tidak ada"); } if (ModelState.ErrorCount > 0) { return(View(loanRepaymentTransaction)); } _loanRepaymentService.Update(loanRepaymentTransaction); return(RedirectToAction("EditRepayment")); }
public IActionResult EditRepayment(LoanRepaymentTransactionModel loanRepaymentTransaction) { //return RedirectToAction("EditR", new { id = loanRepaymentTransaction.NomorPembayaranPinjaman }); var loanRepayment = _loanRepaymentService.GetById(loanRepaymentTransaction.NomorPembayaranPinjaman); if (loanRepayment == null) { ModelState.AddModelError("NomorPembayaranPinjaman", "Nomor pembayaran pinjaman tidak ada"); return(View("EditRepayment")); } return(RedirectToAction("EditR", new { id = loanRepaymentTransaction.NomorPembayaranPinjaman })); }
public void Update(LoanRepaymentTransactionModel loanRepaymentTransaction) { _repository.Update(loanRepaymentTransaction); }
public void Save(LoanRepaymentTransactionModel loanRepaymentTransaction) { _repository.Save(loanRepaymentTransaction); }
public void Delete(LoanRepaymentTransactionModel loanRepaymentTransaction) { _repository.Delete(loanRepaymentTransaction); }