Ejemplo n.º 1
0
        public ViewCOASpecific(ViewModelCOASpecific dataContextSource)
        {
            InitializeComponent();
            this.DataContext  = dataContextSource;
            DataContextSource = dataContextSource;
            //Update column headers and visibility
            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(0, 3, 4, 6, false);

            PeriodColumns.UpdateColumnInformation(this.dgCOASpecific, new PeriodColumnUpdateEventArg()
            {
                PeriodColumnNamespace = typeof(ViewModelCOASpecific).FullName,
                PeriodRecord          = periodRecord,
                PeriodColumnHeader    = PeriodColumns.SetColumnHeaders(periodRecord),
                PeriodIsYearly        = true
            }, false);
            //Event Subcription - PeriodColumnUpdateEvent
            PeriodColumns.PeriodColumnUpdate += new PeriodColumnUpdateEvent(PeriodColumns_PeriodColumnUpdate);
            this.grdRadChart.Visibility       = Visibility.Collapsed;
            this.grdRadGridView.Visibility    = Visibility.Visible;
            this.txtADD.Visibility            = Visibility.Collapsed;
            this.cmbAddSeries.Visibility      = Visibility.Collapsed;
            this.btnAddToChart.Visibility     = Visibility.Collapsed;
            this.itemDel.Visibility           = Visibility.Collapsed;
            this.txtGadgetName.Visibility     = Visibility.Collapsed;
            this.cbGadgetName.Visibility      = Visibility.Collapsed;
            ApplyChartStyles();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// PeriodColumnNavigationEvent Event Handler
        /// </summary>
        /// <param name="e">PeriodColumnNavigationEventArg</param>
        private void PeriodColumns_PeriodColumnNavigate(PeriodColumnNavigationEventArg e)
        {
            //validate namespace before implementation
            if (e.PeriodColumnNamespace == GetType().FullName&& IsActive)
            {
                BusyIndicatorNotification(true, "Retrieving data for updated period range");
                Iterator = e.PeriodColumnNavigationDirection == NavigationDirection.LEFT ? Iterator - 1 : Iterator + 1;
                PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(incrementFactor: Iterator, defaultHistoricalYearCount: 3
                                                                          , defaultHistoricalQuarterCount: 4, netColumnCount: 6, isQuarterImplemented: true);

                var nList = FinancialStatementInfo.Where(record => record.IsConsensus == "N").ToList();
                this.SetDecimals(nList, 1);

                FinancialStatementDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo <FinancialStatementData>(nList, out periodRecord, periodRecord, subGroups: null, updatePeriodRecord: true);
                if (financialStatementType != FinancialStatementType.FUNDAMENTAL_SUMMARY)
                {
                    var yList = FinancialStatementInfo.Where(record => record.IsConsensus == "Y").ToList();
                    this.SetDecimals(yList, 1);
                    FinancialStatementExtDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo <FinancialStatementData>(yList, out periodRecord, periodRecord, updatePeriodRecord: false);
                }
                PeriodRecord       = periodRecord;
                PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord);
                BusyIndicatorNotification();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="dataContextSource"></param>
        public ViewFinstat(ViewModelFinstat dataContextSource)
        {
            InitializeComponent();
            this.DataContext   = dataContextSource;
            DataContextFinstat = dataContextSource;
            PeriodRecord  periodRecord       = PeriodColumns.SetPeriodRecord(defaultHistoricalYearCount: 4, netColumnCount: 7, isQuarterImplemented: false);
            List <string> periodColumnHeader = PeriodColumns.SetColumnHeaders(periodRecord, displayPeriodType: false);

            PeriodColumns.UpdateColumnInformation(this.dgFinstat, new PeriodColumnUpdateEventArg()
            {
                PeriodRecord          = periodRecord,
                PeriodColumnNamespace = typeof(ViewModelFinstat).FullName,
                PeriodColumnHeader    = periodColumnHeader,
                PeriodIsYearly        = true
            }, isQuarterImplemented: false, navigatingColumnStartIndex: 1);
            dgFinstat.Columns[8].Header = "Avg " + periodColumnHeader[1] + "-" + periodColumnHeader[3];
            dgFinstat.Columns[9].Header = "Avg " + periodColumnHeader[4] + "-" + periodColumnHeader[6];
            SettingGridColumnUniqueNames(periodColumnHeader);

            PeriodColumns.PeriodColumnUpdate += (e) =>
            {
                if (e.PeriodColumnNamespace == this.DataContext.GetType().FullName)
                {
                    PeriodColumns.UpdateColumnInformation(this.dgFinstat, e, false, 1);
                    dgFinstat.Columns[8].Header = "Avg " + e.PeriodColumnHeader[1] + "-" + e.PeriodColumnHeader[3];
                    dgFinstat.Columns[9].Header = "Avg " + periodColumnHeader[4] + "-" + periodColumnHeader[6];

                    SettingGridColumnUniqueNames(e.PeriodColumnHeader);
                    this.btnExportExcel.IsEnabled = true;
                }
            };
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        public ViewModelValuations(DashboardGadgetParam param)
        {
            dbInteractivity = param.DBInteractivity;
            logger          = param.LoggerFacade;
            eventAggregator = param.EventAggregator;

            PeriodColumns.PeriodColumnNavigate += (e) =>
            {
                if (e.PeriodColumnNamespace == GetType().FullName)
                {
                    BusyIndicatorNotification(true, "Retrieving data for updated time span");
                    Iterator = e.PeriodColumnNavigationDirection == NavigationDirection.LEFT ? Iterator - 1 : Iterator + 1;
                    PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(Iterator, defaultHistoricalYearCount: 2, defaultHistoricalQuarterCount: 2, netColumnCount: 5);
                    ConsensusEstimateDetailDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo(ConsensusEstimateDetailInfo, out periodRecord,
                                                                                                  periodRecord, subGroups: DataGrouping);
                    PeriodRecord       = periodRecord;
                    PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord, displayPeriodType: false);
                    BusyIndicatorNotification();
                }
            };

            EntitySelectionInfo = param.DashboardGadgetPayload.EntitySelectionData;
            if (eventAggregator != null)
            {
                eventAggregator.GetEvent <SecurityReferenceSetEvent>().Subscribe(HandleSecurityReferenceSetEvent);
            }
            if (EntitySelectionInfo != null)
            {
                HandleSecurityReferenceSetEvent(EntitySelectionInfo);
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="dataContextSource"></param>
        public ViewValuations(ViewModelValuations dataContextSource)
        {
            InitializeComponent();
            this.DataContext           = dataContextSource;
            this.DataContextValuations = dataContextSource;
            InitializeComponent();
            this.DataContext = dataContextSource;

            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(defaultHistoricalYearCount: 2, defaultHistoricalQuarterCount: 2, netColumnCount: 5);

            PeriodColumns.UpdateColumnInformation(this.dgConsensusEstimateValuations, new PeriodColumnUpdateEventArg()
            {
                PeriodRecord       = periodRecord,
                PeriodColumnHeader = PeriodColumns.SetColumnHeaders(periodRecord, displayPeriodType: false),
                PeriodIsYearly     = true
            });

            PeriodColumns.PeriodColumnUpdate += (e) =>
            {
                if (e.PeriodColumnNamespace == typeof(ViewModelValuations).FullName)
                {
                    PeriodColumns.UpdateColumnInformation(this.dgConsensusEstimateValuations, e);
                    this.btnExportExcel.IsEnabled = true;
                    this.dgConsensusEstimateValuations.Columns[0].Header     = "Consensus Valuations in " + this.DataContextValuations.SelectedCurrency;
                    this.dgConsensusEstimateValuations.Columns[0].UniqueName = "Consensus Valuations in " + this.DataContextValuations.SelectedCurrency;
                }
            };
        }
Ejemplo n.º 6
0
        /// <summary>
        /// constructor
        /// </summary>
        /// <param name="dataContextSource"></param>
        public ViewConsensusEstimatesDetails(ViewModelConsensusEstimatesDetails dataContextSource)
        {
            InitializeComponent();
            this.DataContext = dataContextSource;
            DataContextConsensusEstimatesDetails = dataContextSource;
            eventAggregator = (this.DataContext as ViewModelConsensusEstimatesDetails).eventAggregator;
            logger          = (this.DataContext as ViewModelConsensusEstimatesDetails).logger;

            eventAggregator.GetEvent <ConsensusEstimateDetailCurrencyChangeEvent>().Subscribe(HandleConsensusEstimateDetailCurrencyChangeEvent);

            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(defaultHistoricalYearCount: 2, defaultHistoricalQuarterCount: 2, netColumnCount: 5);

            PeriodColumns.UpdateColumnInformation(this.dgConsensusEstimate, new PeriodColumnUpdateEventArg()
            {
                PeriodRecord       = periodRecord,
                PeriodColumnHeader = PeriodColumns.SetColumnHeaders(periodRecord, displayPeriodType: false),
                PeriodIsYearly     = true
            });

            dgConsensusEstimate.Columns[0].Header     = "Median Estimates in " + dataContextSource.SelectedCurrency.ToString() + "(Millions)";
            dgConsensusEstimate.Columns[0].UniqueName = "Median Estimates in " + dataContextSource.SelectedCurrency.ToString() + "(Millions)";

            PeriodColumns.PeriodColumnUpdate += (e) =>
            {
                if (e.PeriodColumnNamespace == typeof(ViewModelConsensusEstimatesDetails).FullName)
                {
                    PeriodColumns.UpdateColumnInformation(this.dgConsensusEstimate, e, false);
                    this.btnExportExcel.IsEnabled = true;
                }
            };
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Set Display Data
        /// </summary>
        public void SetConsensusEstimateMedianDisplayInfo()
        {
            BusyIndicatorNotification(true, "Updating information based on selected preference");
            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(Iterator, defaultHistoricalYearCount: 2, defaultHistoricalQuarterCount: 2, netColumnCount: 5);

            ConsensusEstimateDetailDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo(ConsensusEstimateDetailInfo, out periodRecord, periodRecord, subGroups: DataGrouping);
            PeriodRecord       = periodRecord;
            PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord, false);
            BusyIndicatorNotification();
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Sets COA Specific Display Info on the grid
        /// </summary>
        public void SetCOASpecificDisplayInfo()
        {
            BusyIndicatorNotification(true, "Updating information based on selected preference");
            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(Iterator, 3, 4, 6, false);

            COASpecificDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo(COASpecificInfo, out periodRecord, periodRecord, subGroups: null);
            PeriodRecord           = periodRecord;
            PeriodColumnHeader     = PeriodColumns.SetColumnHeaders(PeriodRecord, true);
            BusyIndicatorNotification();
        }
Ejemplo n.º 9
0
        /// <summary>
        /// method to create display data
        /// </summary>
        public void SetFinstatDetailDisplayInfo()
        {
            BusyIndicatorNotification(true, "Updating information based on selected preference");
            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(Iterator, defaultHistoricalYearCount: 4, netColumnCount: 7, isQuarterImplemented: false);

            FinstatDetailDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo(FinstatDetailInfo, out periodRecord,
                                                                                periodRecord, uniqueByGroupDesc: true, additionalFirstDescPropertyName: "HarmonicFirst", additionalSecondDescPropertyName: "HarmonicSecond", addPercentSign: false);
            PeriodRecord       = periodRecord;
            PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord, displayPeriodType: false);
            BusyIndicatorNotification();
        }
        public void SetFinancialStatementDisplayInfo()
        {
            BusyIndicatorNotification(true, "Updating Financial Statement Information based on selected preference");

            PeriodRecord periodRecord = new PeriodRecord();

            FinancialStatementDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo(FinancialStatementInfo, out periodRecord,
                                                                                     PeriodColumns.SetPeriodRecord(Iterator));
            PeriodRecord       = periodRecord;
            PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord);

            BusyIndicatorNotification();
        }
Ejemplo n.º 11
0
        /// <summary>
        /// create display information
        /// </summary>
        public void SetConsensusEstimatePivotDisplayInfo()
        {
            BusyIndicatorNotification(true, "Updating information based on selected preference");
            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(Iterator, defaultHistoricalYearCount: 2, defaultHistoricalQuarterCount: 2, netColumnCount: 5);
            List <PeriodColumnDisplayData> estimateDetailPivotInfo = PeriodColumns.SetPeriodColumnDisplayInfo(ConsensusEstimateDetailInfo, out periodRecord,
                                                                                                              periodRecord, subGroups: DataGrouping);
            List <PeriodColumnDisplayData> brokerDetailPivotInfo = PeriodColumns.SetPeriodColumnDisplayInfo(BrokerDetailUnpivotInfo, out periodRecord,
                                                                                                            periodRecord, uniqueByGroupDesc: true);

            estimateDetailPivotInfo.AddRange(brokerDetailPivotInfo);
            ConsensusEstimateDetailDisplayInfo = estimateDetailPivotInfo;

            PeriodRecord       = periodRecord;
            PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord, displayPeriodType: false);
            BusyIndicatorNotification();
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Sets financial statement display info
        /// </summary>
        public void SetFinancialStatementDisplayInfo()
        {
            BusyIndicatorNotification(true, "Updating Financial Statement Information based on selected preference");

            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord(Iterator);
            var          nList        = FinancialStatementInfo.Where(record => record.IsConsensus == "N").ToList();

            this.SetDecimals(nList, 1);
            FinancialStatementDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo <FinancialStatementData>(nList, out periodRecord, periodRecord);

            if (financialStatementType != FinancialStatementType.FUNDAMENTAL_SUMMARY)
            {
                var yList = FinancialStatementInfo.Where(record => record.IsConsensus == "Y").ToList();
                this.SetDecimals(yList, 1);
                FinancialStatementExtDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo <FinancialStatementData>(yList, out periodRecord, periodRecord, updatePeriodRecord: false);
            }
            PeriodRecord       = periodRecord;
            PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord);
            BusyIndicatorNotification();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="dataContextSource">ViewModelFinancialStatements</param>
        public ViewFinancialStatements(ViewModelFinancialStatements dataContextSource)
        {
            InitializeComponent();
            this.DataContext  = dataContextSource;
            DataContextSource = dataContextSource;

            //update column headers and visibility
            PeriodRecord periodRecord = PeriodColumns.SetPeriodRecord();

            PeriodColumns.UpdateColumnInformation(this.dgFinancialReport, new PeriodColumnUpdateEventArg()
            {
                PeriodColumnNamespace = typeof(ViewModelFinancialStatements).FullName,
                PeriodRecord          = periodRecord,
                PeriodColumnHeader    = PeriodColumns.SetColumnHeaders(periodRecord),
                PeriodIsYearly        = true
            });

            //event Subcription - PeriodColumnUpdateEvent
            PeriodColumns.PeriodColumnUpdate += new PeriodColumnUpdateEvent(PeriodColumns_PeriodColumnUpdate);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public ViewModelFundamentalSummary(DashboardGadgetParam param)
        {
            _logger                 = param.LoggerFacade;
            _dbInteractivity        = param.DBInteractivity;
            _eventAggregator        = param.EventAggregator;
            EntitySelectionInfo     = param.DashboardGadgetPayload.EntitySelectionData;
            _financialStatementType = (FinancialStatementType)param.AdditionalInfo;

            PeriodColumns.PeriodColumnNavigate += (e) =>
            {
                if (e.PeriodColumnNamespace == GetType().FullName)
                {
                    BusyIndicatorNotification(true, "Retrieving data for updated time span");
                    PeriodRecord periodRecord = new PeriodRecord();

                    FinancialStatementDisplayInfo = PeriodColumns.SetPeriodColumnDisplayInfo(FinancialStatementInfo, out periodRecord,
                                                                                             PeriodColumns.SetPeriodRecord(e.PeriodColumnNavigationDirection == PeriodColumns.NavigationDirection.LEFT
                            ? --Iterator : ++Iterator));

                    PeriodRecord       = periodRecord;
                    PeriodColumnHeader = PeriodColumns.SetColumnHeaders(PeriodRecord);
                    BusyIndicatorNotification();
                }
            };

            if (_eventAggregator != null)
            {
                _eventAggregator.GetEvent <SecurityReferenceSetEvent>().Subscribe(HandleSecurityReferenceSetEvent);
            }

            if (EntitySelectionInfo != null)
            {
                HandleSecurityReferenceSetEvent(EntitySelectionInfo);
            }
        }