Beispiel #1
0
 //Visar alla lån till en medlem
 public IActionResult FilterOnMember(LoanIndexVM vm)
 {
     vm.Loans     = _loanService.GetAllLoansForMember(vm.SelectMember.ID);
     vm.Book      = _bookService.GetAll();
     vm.Members   = _memberService.GetSelectListItems();
     ViewBag.Debt = _loanService.LoanOverdue(vm.Loans);
     vm.TotalDebt = _loanService.GetTotalDebt(vm.Loans);
     return(View("Index", vm));
 }
Beispiel #2
0
        public IActionResult Index()
        {
            var vm = new LoanIndexVM();

            vm.Loans     = _loanService.GetAll();
            vm.Book      = _bookService.GetAll();
            vm.Members   = _memberService.GetSelectListItems();
            ViewBag.Debt = _loanService.LoanOverdue(vm.Loans);
            vm.TotalDebt = _loanService.GetTotalDebt(vm.Loans);
            return(View(vm));
        }