public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_parameter          serial_Excel_parameter          = serial_Class as FpmlSerializedCSharp.Excel_parameter;
            FpmlSerializedCSharp.Excel_standardCreditPara serial_Excel_standardCreditPara = serial_Excel_parameter.Excel_standardCreditPara_;

            this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardCreditPara.ReferenceDate_.ValueStr);

            this.simulationNum_ = serial_Excel_standardCreditPara.SimulationNum_.ValueStr;

            FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardCreditPara.Excel_underlyingCalcInfo_para_;
            string excel_underlyingCalcInfo_paratype = serial_excel_underlyingCalcInfo_para.Excel_type_.ValueStr;

            this.excel_underlyingCalcInfo_paraViewModel_ = Excel_underlyingCalcInfo_paraViewModel.CreateExcel_underlyingCalcInfo_para(excel_underlyingCalcInfo_paratype);
            this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para);

            FpmlSerializedCSharp.Excel_referenceCalcInfo_para serial_excel_referenceCalcInfo_para = serial_Excel_standardCreditPara.Excel_referenceCalcInfo_para_;
            string excel_referenceCalcInfo_paratype = serial_excel_referenceCalcInfo_para.Excel_type_.ValueStr;

            this.excel_referenceCalcInfo_paraViewModel_ = Excel_referenceCalcInfo_paraViewModel.CreateExcel_referenceCalcInfo_para(excel_referenceCalcInfo_paratype);
            this.excel_referenceCalcInfo_paraViewModel_.setFromSerial(serial_excel_referenceCalcInfo_para);

            FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardCreditPara.Excel_discountCurve_para_;
            string excel_discountCurve_paratype = serial_excel_discountCurve_para.Excel_type_.ValueStr;

            this.excel_discountCurve_paraViewModel_ = Excel_discountCurve_paraViewModel.CreateExcel_discountCurve_para(excel_discountCurve_paratype);
            this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para);

            FpmlSerializedCSharp.Excel_defaultCurve_para serial_excel_defaultCurve_para = serial_Excel_standardCreditPara.Excel_defaultCurve_para_;
            string excel_defaultCurve_paratype = serial_excel_defaultCurve_para.Excel_type_.ValueStr;

            this.excel_defaultCurve_paraViewModel_ = Excel_defaultCurve_paraViewModel.CreateExcel_defaultCurve_para(excel_defaultCurve_paratype);
            this.excel_defaultCurve_paraViewModel_.setFromSerial(serial_excel_defaultCurve_para);
        }
        public Excel_stepDownKICustomParaViewModel()
        {
            this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel();
            this.excel_discountCurve_paraViewModel_      = new Excel_discountCurve_paraViewModel();

            this.Excel_resultViewModel_ = new Excel_resultViewModel();

            //this.view_ = new Excel_stepDownKICustomParaView();
            //this.view_.DataContext = this;
        }
        public Excel_stepDownKICustomParaViewModel()
        {
            this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel();
            this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel();

            this.Excel_resultViewModel_ = new Excel_resultViewModel();

            //this.view_ = new Excel_stepDownKICustomParaView();
            //this.view_.DataContext = this;
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_parameter          serial_Excel_parameter          = serial_Class as FpmlSerializedCSharp.Excel_parameter;
            FpmlSerializedCSharp.Excel_standardHifivePara serial_Excel_standardHifivePara = serial_Excel_parameter.Excel_standardHifivePara_;

            this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardHifivePara.ReferenceDate_.ValueStr);

            this.simulationNum_ = serial_Excel_standardHifivePara.SimulationNum_.ValueStr;

            FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardHifivePara.Excel_underlyingCalcInfo_para_;
            this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel();
            this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para);

            FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardHifivePara.Excel_discountCurve_para_;
            this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel();
            this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para);
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_parameter        serial_Excel_parameter        = serial_Class as FpmlSerializedCSharp.Excel_parameter;
            FpmlSerializedCSharp.Excel_standardSwapPara serial_Excel_standardSwapPara = serial_Excel_parameter.Excel_standardSwapPara_;

            this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardSwapPara.ReferenceDate_.ValueStr);

            this.simulationNum_ = serial_Excel_standardSwapPara.SimulationNum_.ValueStr;

            FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardSwapPara.Excel_underlyingCalcInfo_para_;
            //string excel_underlyingCalcInfo_paratype = serial_excel_underlyingCalcInfo_para.Excel_type_.ValueStr;
            this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel();
            this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para);

            FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardSwapPara.Excel_discountCurve_para_;
            //string excel_discountCurve_paratype = serial_excel_discountCurve_para.Excel_type_.ValueStr;
            this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel();
            this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para);

            //List<FpmlSerializedCSharp.Excel_underlyingCalcInfo_para> serial_excel_underlyingCalcInfo_para = serial_Excel_standardSwapPara.Excel_underlyingCalcInfo_para_;
            //this.excel_underlyingCalcInfo_paraViewModel_ = new ObservableCollection<Excel_underlyingCalcInfo_paraViewModel>();
            //foreach (var item in serial_excel_underlyingCalcInfo_para)
            //{
            //    //string type = item.Excel_type_.ValueStr;
            //    Excel_underlyingCalcInfo_paraViewModel viewModel = new Excel_underlyingCalcInfo_paraViewModel();
            //    viewModel.setFromSerial(item);
            //    this.excel_underlyingCalcInfo_paraViewModel_.Add(viewModel);
            //}

            //List<FpmlSerializedCSharp.Excel_discountCurve_para> serial_excel_discountCurve_para = serial_Excel_standardSwapPara.Excel_discountCurve_para_;
            //this.excel_discountCurve_paraViewModel_ = new ObservableCollection<Excel_discountCurve_paraViewModel>();
            //foreach (var item in serial_excel_discountCurve_para)
            //{
            //    //string type = item.Excel_type_.ValueStr;
            //    Excel_discountCurve_paraViewModel viewModel = new Excel_discountCurve_paraViewModel();
            //    viewModel.setFromSerial(item);
            //    this.excel_discountCurve_paraViewModel_.Add(viewModel);
            //}
        }
 private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     this.viewModel_ = this.DataContext as Excel_discountCurve_paraViewModel;
     this.DiscountCurveDataGrid_.ItemsSource = this.viewModel_.Excel_yieldCurveViewModel_;
 }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_parameter serial_Excel_parameter = serial_Class as FpmlSerializedCSharp.Excel_parameter;
            FpmlSerializedCSharp.Excel_standardCreditPara serial_Excel_standardCreditPara = serial_Excel_parameter.Excel_standardCreditPara_;

            this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardCreditPara.ReferenceDate_.ValueStr);

            this.simulationNum_ = serial_Excel_standardCreditPara.SimulationNum_.ValueStr;

            FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardCreditPara.Excel_underlyingCalcInfo_para_;
            //string excel_underlyingCalcInfo_paratype = serial_excel_underlyingCalcInfo_para.Excel_type_.ValueStr;
            this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel();//.CreateExcel_underlyingCalcInfo_para(excel_underlyingCalcInfo_paratype);
            this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para);

            FpmlSerializedCSharp.Excel_referenceCalcInfo_para serial_excel_referenceCalcInfo_para = serial_Excel_standardCreditPara.Excel_referenceCalcInfo_para_;
            //string excel_referenceCalcInfo_paratype = serial_excel_referenceCalcInfo_para.Excel_type_.ValueStr;
            this.excel_referenceCalcInfo_paraViewModel_ = new Excel_referenceCalcInfo_paraViewModel();//.CreateExcel_referenceCalcInfo_para(excel_referenceCalcInfo_paratype);
            this.excel_referenceCalcInfo_paraViewModel_.setFromSerial(serial_excel_referenceCalcInfo_para);

            FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardCreditPara.Excel_discountCurve_para_;
            //string excel_discountCurve_paratype = serial_excel_discountCurve_para.Excel_type_.ValueStr;
            this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel();//.CreateExcel_discountCurve_para(excel_discountCurve_paratype);
            this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para);

            //FpmlSerializedCSharp.Excel_defaultCurve_para serial_excel_defaultCurve_para = serial_Excel_standardCreditPara.Excel_defaultCurve_para_;
            ////string excel_defaultCurve_paratype = serial_excel_defaultCurve_para.Excel_type_.ValueStr;
            //this.excel_defaultCurve_paraViewModel_ = new Excel_defaultCurve_paraViewModel();
            //this.excel_defaultCurve_paraViewModel_.setFromSerial(serial_excel_defaultCurve_para);

        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_parameter serial_Excel_parameter = serial_Class as FpmlSerializedCSharp.Excel_parameter;
            FpmlSerializedCSharp.Excel_standardSwapPara serial_Excel_standardSwapPara = serial_Excel_parameter.Excel_standardSwapPara_;

            this.referenceDate_ = StringConverter.xmlDateToDateTime(serial_Excel_standardSwapPara.ReferenceDate_.ValueStr);
            
            this.simulationNum_ = serial_Excel_standardSwapPara.SimulationNum_.ValueStr;

            FpmlSerializedCSharp.Excel_underlyingCalcInfo_para serial_excel_underlyingCalcInfo_para = serial_Excel_standardSwapPara.Excel_underlyingCalcInfo_para_;
            //string excel_underlyingCalcInfo_paratype = serial_excel_underlyingCalcInfo_para.Excel_type_.ValueStr;
            this.excel_underlyingCalcInfo_paraViewModel_ = new Excel_underlyingCalcInfo_paraViewModel();
            this.excel_underlyingCalcInfo_paraViewModel_.setFromSerial(serial_excel_underlyingCalcInfo_para);

            FpmlSerializedCSharp.Excel_discountCurve_para serial_excel_discountCurve_para = serial_Excel_standardSwapPara.Excel_discountCurve_para_;
            //string excel_discountCurve_paratype = serial_excel_discountCurve_para.Excel_type_.ValueStr;
            this.excel_discountCurve_paraViewModel_ = new Excel_discountCurve_paraViewModel();
            this.excel_discountCurve_paraViewModel_.setFromSerial(serial_excel_discountCurve_para);

            //List<FpmlSerializedCSharp.Excel_underlyingCalcInfo_para> serial_excel_underlyingCalcInfo_para = serial_Excel_standardSwapPara.Excel_underlyingCalcInfo_para_;
            //this.excel_underlyingCalcInfo_paraViewModel_ = new ObservableCollection<Excel_underlyingCalcInfo_paraViewModel>();
            //foreach (var item in serial_excel_underlyingCalcInfo_para)
            //{
            //    //string type = item.Excel_type_.ValueStr;
            //    Excel_underlyingCalcInfo_paraViewModel viewModel = new Excel_underlyingCalcInfo_paraViewModel();
            //    viewModel.setFromSerial(item);
            //    this.excel_underlyingCalcInfo_paraViewModel_.Add(viewModel);
            //}
            
            //List<FpmlSerializedCSharp.Excel_discountCurve_para> serial_excel_discountCurve_para = serial_Excel_standardSwapPara.Excel_discountCurve_para_;
            //this.excel_discountCurve_paraViewModel_ = new ObservableCollection<Excel_discountCurve_paraViewModel>();
            //foreach (var item in serial_excel_discountCurve_para)
            //{
            //    //string type = item.Excel_type_.ValueStr;
            //    Excel_discountCurve_paraViewModel viewModel = new Excel_discountCurve_paraViewModel();
            //    viewModel.setFromSerial(item);
            //    this.excel_discountCurve_paraViewModel_.Add(viewModel);
            //}
            
        }
 private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     this.viewModel_ = this.DataContext as Excel_discountCurve_paraViewModel;
     this.DiscountCurveDataGrid_.ItemsSource = this.viewModel_.Excel_yieldCurveViewModel_;
 }