コード例 #1
0
 public IActionResult Edit(InstallmentLoanContract installmentLoanContract)
 {
     GetViewBag();
     if (installmentLoanContract.Term > installmentLoanContract.ContractSignDate)
     {
         installmentLoanContractService.Edit(installmentLoanContract);
         return(RedirectToAction("Index"));
     }
     else
     {
         ViewData["EditError"] = "Error";
         return(View());
     }
 }
コード例 #2
0
 public IActionResult Create(InstallmentLoanContract InstallmentLoanContract)
 {
     GetViewBag();
     if (InstallmentLoanContract.Term > InstallmentLoanContract.ContractSignDate)
     {
         installmentLoanContractService.Create(InstallmentLoanContract);
         ViewData["CreateSuccess"] = "Add Success";
         return(RedirectToAction("Index"));
     }
     else
     {
         ViewData["CreateError"] = "Error";
         return(RedirectToAction("Index"));
     }
 }
コード例 #3
0
 public IActionResult Delete(InstallmentLoanContract InstallmentLoanContract)
 {
     /*var TransactionHistory = installmentLoanContractService.GetTransactionHistories(InstallmentLoanContract.ContractID);
      * if (TransactionHistory == null)
      * {
      *  installmentLoanContractService.Delete(InstallmentLoanContract);
      *  ViewData["DeleteSuccess"] = "Delete Contract";
      * }
      * else
      * {
      *  ViewData["DeleteFail"] = "Cannot delete this team";
      *  return RedirectToAction("Index");
      * }*/
     installmentLoanContractService.Delete(InstallmentLoanContract);
     return(RedirectToAction("Index"));
 }
コード例 #4
0
 public void Edit(InstallmentLoanContract InstallmentLoanContract)
 {
     installmentloanRepository.Edit(InstallmentLoanContract);
     SaveInstallmentLoanContract();
 }
コード例 #5
0
 public void Delete(InstallmentLoanContract InstallmentLoanContract)
 {
     installmentloanRepository.Delete(InstallmentLoanContract);
     SaveInstallmentLoanContract();
 }
コード例 #6
0
 void IInstallmentLoanContractService.Create(InstallmentLoanContract InstallmentLoanContract)
 {
     installmentloanRepository.Create(InstallmentLoanContract);
     SaveInstallmentLoanContract();
 }