private ObservableCollection <PostLoan> CreatePostedLoans(PeriodYear future, PaymentSequence sequence) { ObservableCollection <PostLoan> posLoansList = new ObservableCollection <PostLoan>(); foreach (var loan in CurrentLoans) { if (loan.Selected) { PostLoan pl = new PostLoan(loan.Selected, loan.MemberCode, loan.MemberName, loan.LoanTypeId, loan.LoanTypeDescription, future.Year, future.Year, sequence.Id, sequence.SequenceDescription, loan.LoanAmount); posLoansList.Add(pl); } } return(posLoansList); }
private ObservableCollection <PostLoan> LoadCurrentLoans(LoanType selected) { ObservableCollection <PostLoan> psList = new ObservableCollection <PostLoan>(); var result = _loansRepository.Where( x => x.LoanType.Code == selected.Code && x.PeriodYear.Year == SelectedYear.Year ); foreach (var loan in result) { PostLoan pl = new PostLoan(true, loan.FamilyMember.Code, loan.FamilyMember.FullName, loan.LoanType.Code, loan.LoanType.LoanDescription, loan.PeriodYear.Year, loan.PeriodYear.Year, loan.PaymentSequence.Id, loan.PaymentSequence.SequenceDescription, loan.Amount); psList.Add(pl); } return(psList); }