private async Task AddInvestorCashFlowsAsync() { CashFlowsLoading = true; cashFlows = new ObservableCollection <PsPlusCashFlow>(); List <PeFund> funds = PefundAccess.GetFundListForBeteiligungsnumer(fund.FundHqTrustNumber); StringBuilder builder = new StringBuilder(fund.FundHqTrustNumber + ": "); bool firstItem = true; foreach (PeFund f in funds) { // // add FundName to FundNames // if (string.IsNullOrEmpty(f.FundLegalName)) { f.FundLegalName = f.FundName; } if (firstItem) { builder.Append(f.FundName); } else { builder.Append(", " + f.FundName); } firstItem = false; // // read commitments for each fund // var commitments = await PefundAccess.GetCommitmentsForPeFundIncludingCashFlowsAsync(f.Id); // // read cashflows for each commitment and add properties to be displayed in the gridview // foreach (InvestorCommitment commitment in commitments) { // nur HQT Kunden verarbeiten if (commitment.Investor.IsHqtClient == false) { continue; } foreach (InvestorCashFlow cf in commitment.InvestorCashFlows) { PsPlusCashFlow psPlusCf = new PsPlusCashFlow() { InvestorCashFlow = cf, InvestorHqTrustAccount = commitment.Investor.InvestorHqTrustAccount, InvestorId = (int)commitment.InvestorId, InvestorReference = commitment.Investor.InvestorReference }; cashFlows.Add(psPlusCf); } } } FundNames = builder.ToString(); CashFlowsLoading = false; }
private void OnSearchForTransactionNuumber() { PsPlusCashFlow cashFlow = cashFlows.FirstOrDefault(c => c.InvestorCashFlow.PsPlusId == PsPlusTransactionNumber); if (cashFlow != null) { PsPlusCashFlows.MoveCurrentTo(cashFlow); return; } NotificationRequest.Raise(new Notification() { Title = ApplicationNames.NotificationTitle, Content = $"Ein Cashflow mit der Transaktionsnummer {PsPlusTransactionNumber} wurde nicht gefunden." }); }