public IActionResult Edit(InstallmentLoanContract installmentLoanContract) { GetViewBag(); if (installmentLoanContract.Term > installmentLoanContract.ContractSignDate) { installmentLoanContractService.Edit(installmentLoanContract); return(RedirectToAction("Index")); } else { ViewData["EditError"] = "Error"; return(View()); } }
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")); } }
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")); }
public void Edit(InstallmentLoanContract InstallmentLoanContract) { installmentloanRepository.Edit(InstallmentLoanContract); SaveInstallmentLoanContract(); }
public void Delete(InstallmentLoanContract InstallmentLoanContract) { installmentloanRepository.Delete(InstallmentLoanContract); SaveInstallmentLoanContract(); }
void IInstallmentLoanContractService.Create(InstallmentLoanContract InstallmentLoanContract) { installmentloanRepository.Create(InstallmentLoanContract); SaveInstallmentLoanContract(); }