public IActionResult getTotalLoanAmount(int fundtypeid)
        {
            var     resultt    = loanRegisterService.getListofLoanRegisterByStatus(fundtypeid, "8").Result;
            var     loanlist   = resultt.ToList();
            decimal loanamount = 0;

            if (loanlist != null)
            {
                loanamount = Convert.ToDecimal(loanlist.Sum(x => x.Amount));
            }
            return(Ok(new { responseCode = "200", responseDescription = "Successfull", data = loanamount }));
        }
        public async Task <IActionResult> printloanregister(LoanRegisterViewModel loan)
        {
            var fundcode = HttpContext.Session.GetInt32("fundtypeid");

            if ((loan.Status != "8") && (loan.Status != "9"))
            {
                var listloan1 = loanRegisterService.getListofLoanRegisterByStatus(Convert.ToInt32(fundcode), loan.Status).Result;
                return(await generatePdf.GetPdf("Views/LoanRegister/LoanRegisterReportPage.cshtml", listloan1));
            }
            else
            {
                var listloan = loanRegisterService.getListofLoanReport(Convert.ToInt32(fundcode), loan.Status, loan.startdate, loan.enddate).Result;
                return(await generatePdf.GetPdf("Views/LoanRegister/LoanRegisterReportPage.cshtml", listloan));
            }
            //return View();
        }
 public IEnumerable <LoanRegisterViewModel> getAllLoanRegisterByStatus(int id, string statusid)
 {
     return(loanRegisterService.getListofLoanRegisterByStatus(id, statusid).Result);
 }