/// <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; } }; }
/// <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(); } }
/// <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); } }
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(); }
/// <summary> /// PeriodColumnUpdateEvent Event Handler - Updates column information and enables export button first time data is received /// </summary> /// <param name="e">PeriodColumnUpdateEventArg</param> void PeriodColumns_PeriodColumnUpdate(PeriodColumnUpdateEventArg e) { if (e.PeriodColumnNamespace == typeof(ViewModelCOASpecific).FullName && IsActive) { PeriodColumns.UpdateColumnInformation(this.dgCOASpecific, e, isQuarterImplemented: false); } }
/// <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; } }; }
/// <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; } }; }
/// <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); } }
/// <summary> /// Right navigation button click event handler /// </summary> /// <param name="sender"></param> /// <param name="e">MouseButtonEventArgs</param> private void RightNavigation_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { PeriodColumns.RaisePeriodColumnNavigationCompleted(new PeriodColumnNavigationEventArg() { PeriodColumnNamespace = typeof(ViewModelFinancialStatements).FullName, PeriodColumnNavigationDirection = NavigationDirection.RIGHT }); }
/// <summary> /// Left navigation button click event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LeftNavigation_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { PeriodColumns.RaisePeriodColumnNavigationCompleted(new PeriodColumnNavigationEventArg() { PeriodColumnNamespace = typeof(ViewModelCOASpecific).FullName, PeriodColumnNavigationDirection = NavigationDirection.LEFT }); }
/// <summary> /// Right-Navigation button click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RightNavigation_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { PeriodColumns.RaisePeriodColumnNavigationCompleted(new PeriodColumnNavigationEventArg() { PeriodColumnNamespace = typeof(ViewModelConsensusEstimatesDetails).FullName, PeriodColumnNavigationDirection = NavigationDirection.RIGHT }); }
/// <summary> /// PeriodColumnUpdateEvent Event Handler - Updates column information and enables export button first time data is received /// </summary> /// <param name="e">PeriodColumnUpdateEventArg</param> void PeriodColumns_PeriodColumnUpdate(PeriodColumnUpdateEventArg e) { if (e.PeriodColumnNamespace == typeof(ViewModelFinancialStatements).FullName && IsActive) { PeriodColumns.UpdateColumnInformation(this.dgFinancialReport, e, isQuarterImplemented: true); PeriodColumns.UpdateColumnInformation(this.dgFinancialReportExt, e, isQuarterImplemented: true); this.btnExportExcel.IsEnabled = true; } }
/// <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(); }
/// <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(); }
/// <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(); }
/// <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(); }
/// <summary> /// Right Navigation Button Click /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RightNavigation_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name); Logging.LogBeginMethod(this.DataContextValuations.Logger, methodNamespace); try { PeriodColumns.RaisePeriodColumnNavigationCompleted(new PeriodColumnNavigationEventArg() { PeriodColumnNamespace = typeof(ViewModelValuations).FullName, PeriodColumnNavigationDirection = NavigationDirection.RIGHT }); } catch (Exception ex) { Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK); Logging.LogException(this.DataContextValuations.Logger, ex); } }
/// <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> /// Row Loaded /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgCOASpecific_RowLoaded(object sender, RowLoadedEventArgs e) { PeriodColumns.RowDataCustomizationforCOASpecificGadget(e); }
/// <summary> /// dgFinstat RowLoaded EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e">RowLoadedEventArgs</param> private void dgFinstat_RowLoaded(object sender, RowLoadedEventArgs e) { PeriodColumns.RowDataCustomization(e, false); }
/// <summary> /// dgFinancialReport RowLoaded EventHandler /// </summary> /// <param name="sender"></param> /// <param name="e">RowLoadedEventArgs</param> private void dgFinancialReport_RowLoaded(object sender, RowLoadedEventArgs e) { PeriodColumns.RowDataCustomization(e); }