private void UnderlyingAdd_Button_Click(object sender, RoutedEventArgs e)
        {
            Window w = new Window();

            //Excel_underlyingLoaderView e_ulv = new Excel_underlyingLoaderView();

            Excel_underlyingLoaderViewModel e_ulvm = new Excel_underlyingLoaderViewModel();

            w.Width = 600;
            w.Height = 400;
            w.Content = e_ulvm.view();

            if (w.ShowDialog() == true)
            {
                string underType = e_ulvm.SelectedUnderlyingVM_.Excel_type_;
                string code = e_ulvm.SelectedUnderlyingVM_.KrCode_;

                // default로 basePrice effective일로 함.
                e_ulvm.SelectedUnderlyingVM_.BasePrice_ 
                    = Excel_loaderViewModel.loadMarketData(this.viewModel_.EffectiveDate_, underType, code);

                this.viewModel_.addUnderlyingInfoVM(e_ulvm.SelectedUnderlyingVM_);
            }
            else 
            {
            
            }

            //this.viewModel_.Excel_underlyingInfoViewModel_.Add();
        }
Esempio n. 2
0
        private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            this.viewModel_ = this.DataContext as Excel_underlyingLoaderViewModel;

            this.equityTabGrid_.Children.Clear();
            this.equityTabGrid_.Children.Add(this.viewModel_.Excel_equityLoaderViewModel_.view());

            this.indexTabGrid_.Children.Clear();
            this.indexTabGrid_.Children.Add(this.viewModel_.Excel_indexLoaderViewModel_.view());

            this.fxCurveTabGrid_.Children.Clear();
            this.fxCurveTabGrid_.Children.Add(this.viewModel_.Excel_fxLoaderViewModel_.view());

            this.irTabGrid_.Children.Clear();
            this.irTabGrid_.Children.Add(this.viewModel_.Excel_irLoaderViewModel_.view());

            this.irCurveTabGrid_.Children.Clear();
            this.irCurveTabGrid_.Children.Add(this.viewModel_.Excel_irCurveLoaderViewModel_.view());

            this.creditCurveTabGrid_.Children.Clear();
            this.creditCurveTabGrid_.Children.Add(this.viewModel_.Excel_creditCurveLoaderViewModel_.view());

            this.commTabGrid_.Children.Clear();
            this.commTabGrid_.Children.Add(this.viewModel_.Excel_commLoaderViewModel_.view());


            //this.ScheduleDataGrid_.ItemsSource = this.viewModel_.Excel_scheduleViewModel_;
        }
        private void UnderlyingAdd_Button_Click(object sender, RoutedEventArgs e)
        {
            Window w = new Window();

            //Excel_underlyingLoaderView e_ulv = new Excel_underlyingLoaderView();

            Excel_underlyingLoaderViewModel e_ulvm = new Excel_underlyingLoaderViewModel();

            w.Width   = 600;
            w.Height  = 400;
            w.Content = e_ulvm.view();

            if (w.ShowDialog() == true)
            {
                string underType = e_ulvm.SelectedUnderlyingVM_.Excel_type_;
                string code      = e_ulvm.SelectedUnderlyingVM_.KrCode_;

                // default로 basePrice effective일로 함.
                e_ulvm.SelectedUnderlyingVM_.BasePrice_
                    = Excel_loaderViewModel.loadMarketData(this.viewModel_.EffectiveDate_, underType, code);

                this.viewModel_.addUnderlyingInfoVM(e_ulvm.SelectedUnderlyingVM_);
            }
            else
            {
            }

            //this.viewModel_.Excel_underlyingInfoViewModel_.Add();
        }
        private void resultDataGrid_MouseDoubleClick2(object sender, MouseButtonEventArgs e)
        {
            Excel_commoditySymbolViewModel selectedItem = this.symbolDataGrid_.SelectedItem as Excel_commoditySymbolViewModel;

            if (selectedItem != null)
            {
                Excel_underlyingLoaderViewModel e_ulvm = ((Grid)this.Parent).DataContext as Excel_underlyingLoaderViewModel;

                e_ulvm.SelectedUnderlyingVM_ = selectedItem.underlyingInfoVM();
            }
        }
        private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            this.viewModel_ = this.DataContext as Excel_underlyingLoaderViewModel;

            this.equityTabGrid_.Children.Clear();
            this.equityTabGrid_.Children.Add(this.viewModel_.Excel_equityLoaderViewModel_.view());

            this.indexTabGrid_.Children.Clear();
            this.indexTabGrid_.Children.Add(this.viewModel_.Excel_indexLoaderViewModel_.view());

            this.fxCurveTabGrid_.Children.Clear();
            this.fxCurveTabGrid_.Children.Add(this.viewModel_.Excel_fxLoaderViewModel_.view());

            this.irTabGrid_.Children.Clear();
            this.irTabGrid_.Children.Add(this.viewModel_.Excel_irLoaderViewModel_.view());

            this.irCurveTabGrid_.Children.Clear();
            this.irCurveTabGrid_.Children.Add(this.viewModel_.Excel_irCurveLoaderViewModel_.view());

            this.creditCurveTabGrid_.Children.Clear();
            this.creditCurveTabGrid_.Children.Add(this.viewModel_.Excel_creditCurveLoaderViewModel_.view());

            this.commTabGrid_.Children.Clear();
            this.commTabGrid_.Children.Add(this.viewModel_.Excel_commLoaderViewModel_.view());


            //this.ScheduleDataGrid_.ItemsSource = this.viewModel_.Excel_scheduleViewModel_;
        }