/// <summary>
        /// Assigns UI Field Properties based on Fund reference
        /// </summary>
        /// <param name="PortfolioSelectionData">Object of PortfolioSelectionData Class</param>
        public void HandleFundReferenceSet(PortfolioSelectionData PortfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);

            try
            {
                if (PortfolioSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, PortfolioSelectionData, 1);
                    portfolioSelectionData = PortfolioSelectionData;
                    if (effectiveDate != null && portfolioSelectionData != null && IsActive)
                    {
                        CallingWebMethod();
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
        public ViewModelMarketCapitalization(DashboardGadgetParam param)
        {
            eventAggregator = param.EventAggregator;
            dbInteractivity = param.DBInteractivity;
            logger          = param.LoggerFacade;

            portfolioSelectionData = param.DashboardGadgetPayload.PortfolioSelectionData;
            effectiveDate          = param.DashboardGadgetPayload.EffectiveDate;
            mktCapDataFilter       = param.DashboardGadgetPayload.FilterSelectionData;
            IsExCashSecurity       = param.DashboardGadgetPayload.IsExCashSecurityData;
            lookThruEnabled        = param.DashboardGadgetPayload.IsLookThruEnabled;

            if (effectiveDate != null && portfolioSelectionData != null && IsActive)// && _mktCapDataFilter != null)
            {
                CallingWebMethod();
            }
            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandleFundReferenceSet);
                eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
                eventAggregator.GetEvent <HoldingFilterReferenceSetEvent>().Subscribe(HandleFilterReferenceSetEvent);
                eventAggregator.GetEvent <ExCashSecuritySetEvent>().Subscribe(HandleExCashSecuritySetEvent);
                eventAggregator.GetEvent <LookThruFilterReferenceSetEvent>().Subscribe(HandleLookThruReferenceSetEvent);
            }
        }
        /// <summary>
        /// Handle Fund Change Event
        /// </summary>
        /// <param name="PortfolioSelectionData">Details of Selected Portfolio</param>
        public void HandleFundReferenceSet(PortfolioSelectionData PortfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (PortfolioSelectionData != null)
                {
                    if (SelectedEntityValues.ContainsKey("PORTFOLIO"))
                    {
                        SelectedEntityValues.Remove("PORTFOLIO");
                    }
                    Logging.LogMethodParameter(logger, methodNamespace, PortfolioSelectionData, 1);
                    SelectedPortfolio = PortfolioSelectionData;
                    SelectedEntityValues.Add("PORTFOLIO", PortfolioSelectionData.PortfolioId);
                    if (SelectedSecurity != null && SelectedDate != null && SelectedPortfolio != null && SelectedEntityValues != null && IsActive)
                    {
                        dbInteractivity.RetrieveRelativePerformanceUIData(SelectedEntityValues, SelectedDate, RelativePerformanceUIDataCallbackMethod);
                        BusyIndicatorStatus = true;
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
        /// <summary>
        /// Constructor that initialises the class.
        /// </summary>
        /// <param name="param">DashboardGadget payload</param>
        public ViewModelRelativePerformanceUI(DashboardGadgetParam param)
        {
            dbInteractivity = param.DBInteractivity;
            logger          = param.LoggerFacade;
            eventAggregator = param.EventAggregator;

            portfolioSelectionData = param.DashboardGadgetPayload.PortfolioSelectionData;
            entitySelectionData    = param.DashboardGadgetPayload.EntitySelectionData;
            effectiveDate          = param.DashboardGadgetPayload.EffectiveDate;

            if (portfolioSelectionData != null)
            {
                HandleFundReferenceSet(portfolioSelectionData);
            }
            if (entitySelectionData != null)
            {
                HandleSecurityReferenceSet(entitySelectionData);
            }
            if (effectiveDate != null)
            {
                HandleEffectiveDateSet(Convert.ToDateTime(effectiveDate));
            }
            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <SecurityReferenceSetEvent>().Subscribe(HandleSecurityReferenceSet, false);
                eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandleFundReferenceSet);
                eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
            }
        }
Example #5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="param">DashBoardGadgetParam</param>
        public ViewModelTopHoldings(DashboardGadgetParam param)
        {
            eventAggregator            = param.EventAggregator;
            dbInteractivity            = param.DBInteractivity;
            logger                     = param.LoggerFacade;
            regionManager              = param.RegionManager;
            portfolioSelectionDataInfo = param.DashboardGadgetPayload.PortfolioSelectionData;
            isExCashSecurity           = param.DashboardGadgetPayload.IsExCashSecurityData;
            EffectiveDate              = param.DashboardGadgetPayload.EffectiveDate;
            lookThruEnabled            = param.DashboardGadgetPayload.IsLookThruEnabled;
            if ((portfolioSelectionDataInfo != null) && (EffectiveDate != null) && IsActive)
            {
                dbInteractivity.RetrieveTopHoldingsData(portfolioSelectionDataInfo, Convert.ToDateTime(effectiveDate), isExCashSecurity, lookThruEnabled,
                                                        RetrieveTopHoldingsDataCallbackMethod);
                BusyIndicatorStatus = true;
            }

            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandlePortfolioReferenceSet);
                eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
                eventAggregator.GetEvent <ExCashSecuritySetEvent>().Subscribe(HandleExCashSecuritySetEvent);
                eventAggregator.GetEvent <LookThruFilterReferenceSetEvent>().Subscribe(HandleLookThruReferenceSetEvent);
            }
        }
        /// <summary>
        /// Handle Fund Change Event
        /// </summary>
        /// <param name="portfolioSelectionData">Details of Selected Portfolio</param>
        public void HandleFundReferenceSet(PortfolioSelectionData portfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);

            try
            {
                if (portfolioSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, portfolioSelectionData, 1);
                    this.portfolioSelectionData = portfolioSelectionData;
                    if (effectiveDate != null && portfolioSelectionData != null && IsActive)
                    {
                        BusyIndicatorStatus = true;
                        dbInteractivity.RetrieveAssetAllocationData(portfolioSelectionData, Convert.ToDateTime(effectiveDate), enableLookThru, ExcludeCashSecurities, RetrieveAssetAllocationDataCallbackMethod);
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="param">DashBoardGadgetParam</param>
        public ViewModelRiskIndexExposures(DashboardGadgetParam param)
        {
            eventAggregator            = param.EventAggregator;
            dbInteractivity            = param.DBInteractivity;
            logger                     = param.LoggerFacade;
            portfolioSelectionDataInfo = param.DashboardGadgetPayload.PortfolioSelectionData;
            isExCashSecurity           = param.DashboardGadgetPayload.IsExCashSecurityData;
            EffectiveDate              = param.DashboardGadgetPayload.EffectiveDate;
            holdingDataFilter          = param.DashboardGadgetPayload.FilterSelectionData;
            lookThruEnabled            = param.DashboardGadgetPayload.IsLookThruEnabled;

            if ((portfolioSelectionDataInfo != null) && (EffectiveDate != null) && holdingDataFilter != null && IsActive)
            {
                dbInteractivity.RetrieveRiskIndexExposuresData(portfolioSelectionDataInfo, Convert.ToDateTime(effectiveDateInfo), isExCashSecurity, lookThruEnabled,
                                                               holdingDataFilter.Filtertype, holdingDataFilter.FilterValues, RetrieveRiskIndexExposuresDataCallbackMethod);
                BusyIndicatorStatus = true;
            }
            else if ((portfolioSelectionDataInfo != null) && (EffectiveDate != null) && holdingDataFilter == null && IsActive)
            {
                dbInteractivity.RetrieveRiskIndexExposuresData(portfolioSelectionDataInfo, Convert.ToDateTime(effectiveDateInfo), isExCashSecurity, lookThruEnabled,
                                                               "Show Everything", " ", RetrieveRiskIndexExposuresDataCallbackMethod);
                BusyIndicatorStatus = true;
            }

            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandlePortfolioReferenceSet);
                eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
                eventAggregator.GetEvent <ExCashSecuritySetEvent>().Subscribe(HandleExCashSecuritySetEvent);
                eventAggregator.GetEvent <LookThruFilterReferenceSetEvent>().Subscribe(HandleLookThruReferenceSetEvent);
                eventAggregator.GetEvent <HoldingFilterReferenceSetEvent>().Subscribe(HandleFilterReferenceSetEvent);
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="param">DashboardGadgetParam</param>
        public ViewModelRelativePerformance(DashboardGadgetParam param)
        {
            //MEF singleton initialization
            eventAggregator = param.EventAggregator;
            dbInteractivity = param.DBInteractivity;
            logger          = param.LoggerFacade;

            //selection data initialization
            portfolioSelectionDataInfo = param.DashboardGadgetPayload.PortfolioSelectionData;
            EffectiveDate = param.DashboardGadgetPayload.EffectiveDate;
            periodInfo    = param.DashboardGadgetPayload.PeriodSelectionData;

            //service call to retrieve sector data relating fund selection data/ benchmark selection data and effective date
            if (effectiveDateInfo != null && portfolioSelectionDataInfo != null && Period != null && IsActive)
            {
                dbInteractivity.RetrieveRelativePerformanceSectorData(portfolioSelectionDataInfo, Convert.ToDateTime(effectiveDateInfo),
                                                                      RetrieveRelativePerformanceSectorDataCallbackMethod);
                BusyIndicatorNotification(true);
            }

            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandlePortfolioReferenceSet);
                eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
                eventAggregator.GetEvent <PeriodReferenceSetEvent>().Subscribe(HandlePeriodReferenceSet);
                eventAggregator.GetEvent <RelativePerformanceGridCountrySectorClickEvent>().Subscribe(HandleRelativePerformanceGridCountrySectorClickEvent);
            }
        }
 /// <summary>
 /// Constructor of the class that initializes various objects
 /// </summary>
 /// <param name="param">MEF Eventaggrigator instance</param>
 public ViewModelValuationQualityGrowth(DashboardGadgetParam param)
 {
     dbInteractivity        = param.DBInteractivity;
     logger                 = param.LoggerFacade;
     eventAggregator        = param.EventAggregator;
     portfolioSelectionData = param.DashboardGadgetPayload.PortfolioSelectionData;
     effectiveDate          = param.DashboardGadgetPayload.EffectiveDate;
     holdingDataFilter      = param.DashboardGadgetPayload.FilterSelectionData;
     lookThruEnabled        = param.DashboardGadgetPayload.IsLookThruEnabled;
     if (eventAggregator != null)
     {
         eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandleFundReferenceSet);
         eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
         eventAggregator.GetEvent <HoldingFilterReferenceSetEvent>().Subscribe(HandleFilterReferenceSetEvent);
         eventAggregator.GetEvent <LookThruFilterReferenceSetEvent>().Subscribe(HandleLookThruReferenceSetEvent);
     }
     if (effectiveDate != null && portfolioSelectionData != null && holdingDataFilter != null && IsActive)
     {
         dbInteractivity.RetrieveValuationGrowthData(portfolioSelectionData, effectiveDate, holdingDataFilter.Filtertype,
                                                     holdingDataFilter.FilterValues, lookThruEnabled, RetrieveValuationQualityGrowthCallbackMethod);
     }
     if (effectiveDate != null && portfolioSelectionData != null && holdingDataFilter == null && IsActive)
     {
         dbInteractivity.RetrieveValuationGrowthData(portfolioSelectionData, effectiveDate, "Show Everything", " ",
                                                     lookThruEnabled, RetrieveValuationQualityGrowthCallbackMethod);
     }
 }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="param">DashboardGadgetParam</param>
        public ViewModelRelativePerformanceSecurityActivePosition(DashboardGadgetParam param)
        {
            eventAggregator = param.EventAggregator;
            dbInteractivity = param.DBInteractivity;
            logger          = param.LoggerFacade;

            portfolioSelectionDataInfo = param.DashboardGadgetPayload.PortfolioSelectionData;
            EffectiveDate = param.DashboardGadgetPayload.EffectiveDate;
            Period        = param.DashboardGadgetPayload.PeriodSelectionData;

            if (EffectiveDate != null && portfolioSelectionDataInfo != null && Period != null && IsActive)
            {
                dbInteractivity.RetrieveRelativePerformanceSecurityActivePositionData(portfolioSelectionDataInfo, Convert.ToDateTime(effectiveDateInfo),
                                                                                      periodInfo, RetrieveRelativePerformanceSecurityActivePositionDataCallbackMethod);
                BusyIndicatorStatus = true;
            }

            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandlePortfolioReferenceSet);
                eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
                eventAggregator.GetEvent <PeriodReferenceSetEvent>().Subscribe(HandlePeriodReferenceSet);
                eventAggregator.GetEvent <RelativePerformanceGridClickEvent>().Subscribe(HandleRelativePerformanceGridClickEvent);
            }
        }
        /// <summary>
        /// Event Handler to subscribed event 'PortfolioReferenceSetEvent'
        /// </summary>
        /// <param name="result">PortfolioSelectionData</param>
        public void HandlePortfolioReferenceSet(PortfolioSelectionData result)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);

            try
            {
                if (result != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, result, 1);
                    SelectedPortfolio = result;
                    if (SelectedPortfolio != null && dbInteractivity != null && IsActive)
                    {
                        BusyIndicatorNotification(true, "Retrieving market summary report data...");
                        dbInteractivity.RetrieveEMSummaryMarketData(SelectedPortfolio.PortfolioId, RetrieveEMSummaryDataCallbackMethod);
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
Example #12
0
        /// <summary>
        /// Assigns UI Field Properties based on Fund reference
        /// </summary>
        /// <param name="portSelectionData">Object of PortfolioSelectionData class containg the Fund Selection Data </param>
        public void HandleFundReferenceSet(PortfolioSelectionData portSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (portSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, portSelectionData, 1);
                    portfolioSelectionData = portSelectionData;

                    /*  if (portSelectionData != null && effectiveDate != null && selectedPeriod != null && IsActive && nodeName != null)
                     * {
                     *   BeginWebServiceCall(portfolioSelectionData, Convert.ToDateTime(effectiveDate), nodeName);
                     * }*/
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
Example #13
0
        /// <summary>
        /// Handle Portfolio Change Event
        /// </summary>
        /// <param name="portfolioSelectionData">Detail of Selected Portfolio</param>
        public void HandlePortfolioReferenceSet(PortfolioSelectionData portfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                //ArgumentNullException
                if (portfolioSelectionData != null && portfolioSelectionData.PortfolioId != null)
                {
                    if (SelectedEntities.ContainsKey("PORTFOLIO"))
                    {
                        SelectedEntities.Remove("PORTFOLIO");
                    }
                    SelectedEntities.Add("PORTFOLIO", portfolioSelectionData.PortfolioId);
                    if (SelectedEntities != null && SelectedEntities.ContainsKey("PORTFOLIO") && periodSelectionData != null && IsActive)
                    {
                        dbInteractivity.RetrieveBenchmarkChartReturnData(SelectedEntities, RetrieveBenchmarkChartDataCallBackMethod);
                        dbInteractivity.RetrieveBenchmarkGridReturnData(SelectedEntities, RetrieveBenchmarkGridDataCallBackMethod);
                        BusyIndicatorStatus = true;
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
        }
Example #14
0
        /// <summary>
        /// Assigns UI Field Properties based on Fund reference
        /// </summary>
        /// <param name="PortfolioSelectionData">Object of PortfolioSelectionData Class</param>
        public void HandleFundReferenceSetEvent(PortfolioSelectionData portSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (portSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, portSelectionData, 1);
                    portfolioSelectionData = portSelectionData;

                    if (EffectiveDate != null && portfolioSelectionData != null && holdingDataFilter != null && IsActive)
                    {
                        BeginWebServiceCall(portSelectionData, Convert.ToDateTime(EffectiveDate), holdingDataFilter.Filtertype, holdingDataFilter.FilterValues, lookThruEnabled);
                    }

                    if (EffectiveDate != null && portfolioSelectionData != null && holdingDataFilter == null && IsActive)
                    {
                        BeginWebServiceCall(portfolioSelectionData, Convert.ToDateTime(EffectiveDate), "Show Everything", " ", lookThruEnabled);
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
Example #15
0
        /// <summary>
        /// Event Handler to subscribed event 'PortfolioReferenceSetEvent'
        /// </summary>
        /// <param name="portfolioSelectionData">PortfolioSelectionData</param>
        public void HandlePortfolioReferenceSet(PortfolioSelectionData portfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (portfolioSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, portfolioSelectionData, 1);
                    PortfolioSelectionData = portfolioSelectionData;
                    if (entitySelectionData != null && PortfolioSelectionData != null && IsActive)
                    {
                        BusyIndicatorNotification(true, "Retrieving Data based on selected security and portfolio");
                        dbInteractivity.RetrieveCompositeFundData(entitySelectionData, PortfolioSelectionData, RetrieveCompositeFundDataCallBackMethod);
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
        /// <summary>
        /// Event handler for PortfolioSelection changed Event
        /// </summary>
        /// <param name="PortfolioSelectionData"></param>
        public void HandlePortfolioReferenceSet(PortfolioSelectionData PortfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                //arguement null exception
                if (PortfolioSelectionData != null)
                {
                    SelectedPortfolio = PortfolioSelectionData;
                    if (SelectedEntities.ContainsKey("PORTFOLIO"))
                    {
                        SelectedEntities.Remove("PORTFOLIO");
                    }
                    SelectedEntities.Add("PORTFOLIO", PortfolioSelectionData.PortfolioId);

                    if (SelectedEntities.ContainsKey("PORTFOLIO") && SelectedEntities.ContainsKey("SECURITY") && SelectedStartDate != null && period != null && IsActive)
                    {
                        dbInteractivity.RetrieveChartExtensionData(SelectedEntities, Convert.ToDateTime(SelectedStartDate), RetrieveChartExtensionDataCallbackMethod);
                        BusyIndicatorStatus = true;
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
        }
        /// <summary>
        /// Assigns UI Field Properties based on Entity Selection Data
        /// </summary>
        /// <param name="entitySelectionData">EntitySelectionData</param>
        public void HandleSecurityReferenceSet(EntitySelectionData entitySelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (entitySelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, entitySelectionData, 1);
                    EntitySelectionInfo = entitySelectionData;
                    PortfolioSelectionData p = new PortfolioSelectionData();
                    p.IsComposite          = true;
                    p.PortfolioId          = "EQYALL";
                    PortfolioSelectionInfo = p;
                    if (IsActive && EntitySelectionInfo != null && PortfolioSelectionInfo != null)
                    {
                        //  RaisePropertyChanged(() => this.SubmitCommand);


                        HandlePortfolioReferenceSet(PortfolioSelectionInfo);
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
        /// <summary>
        /// Event Handler to subscribed event 'PortfolioReferenceSetEvent'
        /// </summary>
        /// <param name="portfolioSelectionData">PortfolioSelectionData</param>
        public void HandlePortfolioReferenceSet(PortfolioSelectionData portfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);

            try
            {
                if (portfolioSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, portfolioSelectionData, 1);
                    portfolioSelectionDataInfo = portfolioSelectionData;
                    if (EffectiveDate != null && portfolioSelectionDataInfo != null && Period != null && IsActive)
                    {
                        dbInteractivity.RetrieveRelativePerformanceSecurityActivePositionData(portfolioSelectionDataInfo, Convert.ToDateTime(effectiveDateInfo),
                                                                                              periodInfo, RetrieveRelativePerformanceSecurityActivePositionDataCallbackMethod);
                        BusyIndicatorStatus = true;
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="param">MEF Eventaggrigator instance</param>
        public ViewModelHoldingsPieChartRegion(DashboardGadgetParam param)
        {
            dbInteractivity        = param.DBInteractivity;
            logger                 = param.LoggerFacade;
            eventAggregator        = param.EventAggregator;
            portfolioSelectionData = param.DashboardGadgetPayload.PortfolioSelectionData;
            EffectiveDate          = param.DashboardGadgetPayload.EffectiveDate;
            holdingDataFilter      = param.DashboardGadgetPayload.FilterSelectionData;
            lookThruEnabled        = param.DashboardGadgetPayload.IsLookThruEnabled;

            if (EffectiveDate != null && portfolioSelectionData != null && holdingDataFilter != null && IsActive)
            {
                dbInteractivity.RetrieveHoldingsPercentageDataForRegion(portfolioSelectionData, Convert.ToDateTime(EffectiveDate), holdingDataFilter.Filtertype, holdingDataFilter.FilterValues, lookThruEnabled, RetrieveHoldingsPercentageDataForRegionCallbackMethod);
            }
            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandleFundReferenceSetEvent);
                eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateReferenceSetEvent);
                eventAggregator.GetEvent <HoldingFilterReferenceSetEvent>().Subscribe(HandleFilterReferenceSetEvent);
                eventAggregator.GetEvent <LookThruFilterReferenceSetEvent>().Subscribe(HandleLookThruReferenceSetEvent);
            }
            if (EffectiveDate != null && portfolioSelectionData != null && holdingDataFilter == null)
            {
                dbInteractivity.RetrieveHoldingsPercentageDataForRegion(portfolioSelectionData, Convert.ToDateTime(EffectiveDate), "Show Everything", " ", lookThruEnabled, RetrieveHoldingsPercentageDataForRegionCallbackMethod);
            }
        }
Example #20
0
        /// <summary>
        /// Service call to Retrieve the Details for propertyName Portfolio
        /// </summary>
        /// <param name="objPortfolioId">PortfolioName</param>
        private void RetrievePortfolioDetailsData(PortfolioSelectionData objPortfolioId, DateTime objSelectedDate, String filterType, String filterValue, bool objgetBenchmark, Action <List <PortfolioDetailsData> > callback)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (objPortfolioId != null && objSelectedDate != null && dbInteractivity != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, objSelectedDate, 1);
                    Logging.LogMethodParameter(logger, methodNamespace, objPortfolioId, 1);

                    dbInteractivity.RetrievePortfolioDetailsData(objPortfolioId, objSelectedDate, filterType, filterValue, EnableLookThru, ExcludeCashSecurities, GetBenchmarkData, callback);
                    BusyIndicatorStatus = true;
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
 /// <summary>
 /// Calling web service through dbInteractivity
 /// </summary>
 /// <param name="portfolioSelectionData"></param>
 /// <param name="effectiveDate"></param>
 /// <param name="country"></param>
 private void BeginWebServiceCall(PortfolioSelectionData portfolioSelectionData, DateTime effectiveDate, String country)
 {
     if (null != PerformanceGridDataLoadedEvent)
     {
         PerformanceGridDataLoadedEvent(new DataRetrievalProgressIndicatorEventArgs()
         {
             ShowBusy = true
         });
     }
     dbInteractivity.RetrievePerformanceGridData(portfolioSelectionData, effectiveDate, country, RetrievePerformanceGridDataCallbackMethod);
 }
 /// <summary>
 /// Calling Web services through dbInteractivity
 /// </summary>
 /// <param name="portSelectionData"></param>
 /// <param name="effectiveDate"></param>
 /// <param name="filterType"></param>
 /// <param name="filterValue"></param>
 /// <param name="enableLookThru"></param>
 private void BeginWebServiceCall(PortfolioSelectionData portSelectionData, DateTime effectiveDate, String filterType, String filterValue, bool enableLookThru)
 {
     if (null != holdingsPieChartForRegionDataLoadedEvent)
     {
         holdingsPieChartForRegionDataLoadedEvent(new DataRetrievalProgressIndicatorEventArgs()
         {
             ShowBusy = true
         });
     }
     dbInteractivity.RetrieveHoldingsPercentageDataForRegion(portSelectionData, effectiveDate, filterType, filterValue, enableLookThru, RetrieveHoldingsPercentageDataForRegionCallbackMethod);
 }
Example #23
0
 /// <summary>
 /// Calls Web services through dbInteractivity
 /// </summary>
 /// <param name="portfolioSelectionData"></param>
 /// <param name="effectiveDate"></param>
 private void BeginWebServiceCall(PortfolioSelectionData portfolioSelectionData, DateTime effectiveDate)
 {
     if (null != PortfolioRiskReturnDataLoadedEvent)
     {
         PortfolioRiskReturnDataLoadedEvent(new DataRetrievalProgressIndicatorEventArgs()
         {
             ShowBusy = true
         });
     }
     dbInteractivity.RetrievePortfolioRiskReturnData(portfolioSelectionData, Convert.ToDateTime(effectiveDate), RetrievePortfolioRiskReturnDataCallbackMethod);
 }
Example #24
0
 /// <summary>
 /// Calling Web services through dbInteractivity
 /// </summary>
 /// <param name="portfolioSelectionData"></param>
 /// <param name="effectiveDate"></param>
 /// <param name="nodeName"></param>
 private void BeginWebServiceCall(PortfolioSelectionData portfolioSelectionData, DateTime effectiveDate, String nodeName)
 {
     if (null != AttributionDataLoadedEvent)
     {
         AttributionDataLoadedEvent(new DataRetrievalProgressIndicatorEventArgs()
         {
             ShowBusy = true
         });
     }
     dbInteractivity.RetrieveAttributionData(portfolioSelectionData, effectiveDate, nodeName, RetrieveAttributionDataCallBackMethod);
 }
        /// <summary>
        /// Assigns UI Field Properties based on Fund reference
        /// </summary>
        /// <param name="portSelectionData">Object of PortfolioSelectionData Class containing Fund data</param>
        public void HandleFundReferenceSet(PortfolioSelectionData portSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (portSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, portSelectionData, 1);
                    portfolioSelectionData = portSelectionData;

                    if (effectiveDate != null && portfolioSelectionData != null && holdingDataFilter != null && IsActive)
                    {
                        if (null != ValuationQualityGrowthDataLoadedEvent)
                        {
                            ValuationQualityGrowthDataLoadedEvent(new DataRetrievalProgressIndicatorEventArgs()
                            {
                                ShowBusy = true
                            });
                        }
                        dbInteractivity.RetrieveValuationGrowthData(portfolioSelectionData, effectiveDate, holdingDataFilter.Filtertype,
                                                                    holdingDataFilter.FilterValues, lookThruEnabled, RetrieveValuationQualityGrowthCallbackMethod);
                    }
                    if (effectiveDate != null && portfolioSelectionData != null && holdingDataFilter == null && IsActive)
                    {
                        if (null != ValuationQualityGrowthDataLoadedEvent)
                        {
                            ValuationQualityGrowthDataLoadedEvent(new DataRetrievalProgressIndicatorEventArgs()
                            {
                                ShowBusy = true
                            });
                        }
                        dbInteractivity.RetrieveValuationGrowthData(portfolioSelectionData, effectiveDate, "Show Everything", " ",
                                                                    lookThruEnabled, RetrieveValuationQualityGrowthCallbackMethod);
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
            Logging.LogEndMethod(logger, methodNamespace);
        }
Example #26
0
 /// <summary>
 /// Calls the webservice to retrieve the data
 /// </summary>
 /// <param name="PortfolioSelectionData">Selected Portfolio</param>
 /// <param name="effectiveDate">Selected Effective Date</param>
 /// <param name="selectedPeriodType">Selected Period Type</param>
 private void BeginWebServiceCall(PortfolioSelectionData PortfolioSelectionData, DateTime effectiveDate,
                                  String selectedPeriodType)
 {
     if (portfolioSelectionData != null && effectiveDate != null && selectedPeriod != null)
     {
         if (null != HeatMapDataLoadedEvent)
         {
             HeatMapDataLoadedEvent(new DataRetrievalProgressIndicatorEventArgs()
             {
                 ShowBusy = true
             });
         }
         dbInteractivity.RetrieveHeatMapData(PortfolioSelectionData, effectiveDate, selectedPeriodType, RetrieveHeatMapDataCallbackMethod);
     }
 }
        /// <summary>
        /// Event handler for PortfolioSelection changed Event
        /// </summary>
        /// <param name="PortfolioSelectionData">PortfolioSelectionData</param>
        public void HandlePortfolioReferenceSet(PortfolioSelectionData portfolioSelectionData)
        {
            string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name);

            Logging.LogBeginMethod(logger, methodNamespace);
            try
            {
                if (portfolioSelectionData != null)
                {
                    Logging.LogMethodParameter(logger, methodNamespace, portfolioSelectionData, 1);
                    PortfolioSelectionInfo = portfolioSelectionData;

                    if (IsActive && entitySelectionInfo != null && PortfolioSelectionInfo != null)
                    {
                        //  RaisePropertyChanged(() => this.SubmitCommand);
                        BusyIndicatorNotification(true, "Retrieving security reference data for '"
                                                  + entitySelectionInfo.LongName + " (" + entitySelectionInfo.ShortName + ")'");

                        ICPresentationOverviewInfo = new ICPresentationOverviewData()
                        {
                            AcceptWithoutDiscussionFlag = true,
                            StatusType      = StatusType.IN_PROGRESS,
                            Presenter       = SessionManager.SESSION.UserName.ToLower(),
                            CreatedBy       = SessionManager.SESSION.UserName.ToLower(),
                            CreatedOn       = DateTime.UtcNow,
                            ModifiedBy      = SessionManager.SESSION.UserName.ToLower(),
                            ModifiedOn      = DateTime.UtcNow,
                            MeetingDateTime = DateTime.UtcNow,

                            MeetingClosedDateTime       = DateTime.UtcNow,
                            MeetingVotingClosedDateTime = DateTime.UtcNow,
                        };

                        dbInteractivity.RetrieveSecurityDetails(entitySelectionInfo, ICPresentationOverviewInfo
                                                                , portfolioSelectionInfo, RetrieveSecurityDetailsCallBackMethod);
                    }
                }
                else
                {
                    Logging.LogMethodParameterNull(logger, methodNamespace, 1);
                }
            }
            catch (Exception ex)
            {
                Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK);
                Logging.LogException(logger, ex);
            }
        }
Example #28
0
 // <summary>
 /// Constructor of the class that initializes various objects
 /// </summary>
 /// <param name="param">MEF Eventaggrigator instance</param>
 public ViewModelPortfolioRiskReturns(DashboardGadgetParam param)
 {
     dbInteractivity        = param.DBInteractivity;
     logger                 = param.LoggerFacade;
     eventAggregator        = param.EventAggregator;
     portfolioSelectionData = param.DashboardGadgetPayload.PortfolioSelectionData;
     effectiveDate          = param.DashboardGadgetPayload.EffectiveDate;
     if (eventAggregator != null)
     {
         eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandleFundReferenceSet);
         eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet);
     }
     if (effectiveDate != null && portfolioSelectionData != null && selectedPeriod != null && IsActive)
     {
         dbInteractivity.RetrievePortfolioRiskReturnData(portfolioSelectionData, Convert.ToDateTime(effectiveDate),
                                                         RetrievePortfolioRiskReturnDataCallbackMethod);
     }
 }
 /// <summary>
 /// Constructor of the class that initializes various objects
 /// </summary>
 /// <param name="param">MEF Eventaggrigator instance</param>
 public ViewModelPerformanceGrid(DashboardGadgetParam param)
 {
     effectiveDate          = param.DashboardGadgetPayload.EffectiveDate;
     dbInteractivity        = param.DBInteractivity;
     logger                 = param.LoggerFacade;
     eventAggregator        = param.EventAggregator;
     country                = param.DashboardGadgetPayload.HeatMapCountryData;
     portfolioSelectionData = param.DashboardGadgetPayload.PortfolioSelectionData;
     if (effectiveDate != null && portfolioSelectionData != null && IsActive)
     {
         dbInteractivity.RetrievePerformanceGridData(portfolioSelectionData, Convert.ToDateTime(effectiveDate), "NoFiltering", RetrievePerformanceGridDataCallbackMethod);
     }
     if (eventAggregator != null)
     {
         eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandlePortfolioReferenceSet, false);
         eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet, false);
         eventAggregator.GetEvent <HeatMapClickEvent>().Subscribe(HandleCountrySelectionDataSet, false);
     }
 }
Example #30
0
 /// <summary>
 /// Constructor of the class that initializes various objects
 /// </summary>
 /// <param name="param">MEF Eventaggrigator instance</param>
 public ViewModelAttribution(DashboardGadgetParam param)
 {
     effectiveDate          = param.DashboardGadgetPayload.EffectiveDate;
     dbInteractivity        = param.DBInteractivity;
     logger                 = param.LoggerFacade;
     selectedPeriod         = param.DashboardGadgetPayload.PeriodSelectionData;
     eventAggregator        = param.EventAggregator;
     nodeName               = param.DashboardGadgetPayload.NodeNameSelectionData;
     portfolioSelectionData = param.DashboardGadgetPayload.PortfolioSelectionData;
     if (effectiveDate != null && portfolioSelectionData != null && selectedPeriod != null && IsActive && nodeName != null)
     {
         dbInteractivity.RetrieveAttributionData(portfolioSelectionData, Convert.ToDateTime(effectiveDate), nodeName, RetrieveAttributionDataCallBackMethod);
     }
     if (eventAggregator != null)
     {
         eventAggregator.GetEvent <PortfolioReferenceSetEvent>().Subscribe(HandleFundReferenceSet, false);
         eventAggregator.GetEvent <EffectiveDateReferenceSetEvent>().Subscribe(HandleEffectiveDateSet, false);
         eventAggregator.GetEvent <PeriodReferenceSetEvent>().Subscribe(HandlePeriodReferenceSet, false);
         eventAggregator.GetEvent <NodeNameReferenceSetEvent>().Subscribe(HandleNodeNameReferenceSet, false);
     }
 }