コード例 #1
0
ファイル: FinDataAdapter.cs プロジェクト: AFFA/Project
 public void AddDcfOutput(DcfOutput dco)
 {
     _dcfOutput = dco;
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: AFFA/Project
 private void btnCalculateForecast_Click(object sender, RoutedEventArgs e)
 {
     if (_finDataAdapter == null)
     {
         MessageBox.Show("Load data first.");
     }
     else
     {
         MessageBox.Show("Calculating forecast");
         //DcfDataDao dcfDataDao= new DcfDataDao();
         //_finDataAdapter.addDcfDataDao(dcfDataDao);
         //DcfCalculator.GenerateDcfData(_finDataAdapter.FinDataDao.FinDatas, dcfDataDao);
         //DcfInput dcfInput = new DcfInput();
         //_finDataAdapter.AddDcfInput(dcfInput);
         //DcfCalculator.CalculateQuaterlyForecasts(dcfDataDao.DcfDatas,dcfInput);
         if (_finDataAdapter.FinDataDao.FinDatas.Count > 0)
         {
             DcfOutput dcfOutput = new DcfOutput();
             _finDataAdapter.AddDcfOutput(dcfOutput);
             _dcfVM.PrepareCalculations(dataGridForecast, _finDataAdapter.DcfDataDao, _dci,
                                        _finDataAdapter.FinDataDao, _finDataAdapter);
             _dcfVM.GetDcf();
             _dcfVM.ClearTable();
             _dcfVM.PrepareTable(_finDataAdapter.DcfDataDao.DcfDatas);
             panelDcfOutput.DataContext = _dcfVM;
             panelForecast.DataContext = _dcfVM;
         }
         else
         {
             MessageBox.Show("No data available. Please load new XML or retrieve data from the web.");
         }
     }
     /*YChartsExcelScraperTest yExcel = new YChartsExcelScraperTest();
     XDocument data = yExcel.GetData("CSCO");
     FinDataAdapter finDataAdapter = new FinDataAdapter("csco", FinDataAdapter.DataSource.XLS, data);
     finDataAdapter.PrepareData();
     FinAnalysisVM finAnalysisVm = new FinAnalysisVM(finDataAdapter.FinDataDao.FinDatas, dataGrid);
     panelQuarterlyData.DataContext = finAnalysisVm;*/
 }