private void OnRemoveFromList()
 {
     // selected Investments are in SelectedCommitments
     // remove each Commitment within SelectedCommitments an remove it from AllCommitments
     // clear SelectedCommitments
     foreach (InvestorCommitment item in SelectedCommitments)
     {
         AllCommitments.Remove(item);
     }
     SelectedCommitments.Clear();
 }
 private void OnAnalyzingChanged(AnalyzingInformation obj)
 {
     AllCommitments.Clear();
     foreach (InvestorCommitment c in obj.AllCommitments)
     {
         AllCommitments.Add(c);
     }
     SelectedCommitments.Clear();
     foreach (InvestorCommitment c in obj.SelectedCommitments)
     {
         SelectedCommitments.Add(c);
     }
     SetPeriodStartAndEnd();
 }
        private void OnInvestorSelected()
        {
            if (SelectedInvestor == null)
            {
                return;
            }
            // Read all commitments for the Investor and add them to AllCommitments
            IEnumerable <InvestorCommitment> additionalCommitments = investorAccess.GetCommitmentsForInvestor(SelectedInvestor.Id);

            foreach (InvestorCommitment item in additionalCommitments)
            {
                AllCommitments.Add(item);
            }
            SetPeriodStartAndEnd();
        }