private void OnGotoNextStep()
        {
            PrepareCashFlow cf = new PrepareCashFlow();

            cf.cfInfo = cashFlowInformation;
            eventAggregator.GetEvent <PrepareCashFlowEvent>().Publish(cf);
        }
 private void OnFurtherCashflow(IConfirmation obj)
 {
     if (obj.Confirmed)
     {
         CashFlowInformation.CashFlowDataEntered = true;
         PrepareCashFlow prepareCashFlow = new PrepareCashFlow()
         {
             cfInfo = cashFlowInformation
         };
         eventAggregator.GetEvent <PrepareCashFlowEvent>().Publish(prepareCashFlow);
     }
 }
        private void OnPrepareCashFlow(PrepareCashFlow obj)
        {
            cashFlowInformation = obj.cfInfo;
            WriteInformationToTextFile();
            SetProgressStatus();
            // the next step will be automatically started

            if (cashFlowInformation.OtherWorkDone)
            {
                return;                                     //CashFlow has been processed; no further action required
            }
            if (cashFlowInformation.LettersPrinted)
            {
                // start OtherWork
                return;
            }
            if (cashFlowInformation.InvestorDetailsEntered)
            {
                // start Print Letters
                NavigationParameters parameter = new NavigationParameters();
                parameter.Add("Info", cashFlowInformation);
                regionManager.RequestNavigate(RegionNames.CashFlowRegion, ViewNames.CheckLetters, parameter);
                return;
            }
            if (cashFlowInformation.CashFlowDataEntered)
            {
                // start Enter CashFlowData for investors
                NavigationParameters parameter = new NavigationParameters();
                parameter.Add("Info", cashFlowInformation);
                regionManager.RequestNavigate(RegionNames.CashFlowRegion, ViewNames.EditInvestorSplit, parameter);
                return;
            }
            if (cashFlowInformation.InvestorsChecked)
            {
                // start Enter CashFlowData
                NavigationParameters parameter = new NavigationParameters();
                parameter.Add("Info", cashFlowInformation);
                regionManager.RequestNavigate(RegionNames.CashFlowRegion, ViewNames.EditCashFlowData, parameter);
                return;
            }
        }
        private void OnGotoNextStep()
        {
            // check cashflows whether another cashflow for the same fund has already been entered
            // checkFlowexists returns true if a cashflow exists for date and fund

            if (PefundAccess.CashFlowExists(CashFlowInformation.EffectiveDate, CashFlowInformation.Fund.Id) == false)
            {
                CashFlowInformation.CashFlowDataEntered = true;
                PrepareCashFlow prepareCashFlow = new PrepareCashFlow()
                {
                    cfInfo = cashFlowInformation
                };
                eventAggregator.GetEvent <PrepareCashFlowEvent>().Publish(prepareCashFlow);
            }
            else
            {
                ConfirmationRequest.Raise(new Confirmation()
                {
                    Title   = ApplicationNames.NotificationTitle,
                    Content = "Für dieses Datum wurde bereits ein Cashflow erfasst. Wollen Sie einen weiteren CashFlow erfassen?"
                }, OnFurtherCashflow);
            }
        }