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 void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Pricing serial_Pricing = serial_Class as FpmlSerializedCSharp.Pricing; this.evaluationTime_ = serial_Pricing.EvaluationTime_.ValueStr; FpmlSerializedCSharp.Excel_parameter serial_excel_parameter = serial_Pricing.Excel_parameter_; string excel_parametertype = serial_excel_parameter.Excel_type_.ValueStr; this.excel_parameterViewModel_ = Excel_parameterViewModel.CreateExcel_parameter(excel_parametertype); this.excel_parameterViewModel_.setFromSerial(serial_excel_parameter); }
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 void loadParameterFromXml(XmlDocument xmlDoc = null) { //this.excel_parameterViewModel_.loadParameterFromXml(); //XmlDocument xmlDoc = XMLFileLoader.LoadParameter(this.masterInformationViewModel_.Item_code_, // this.excel_parameterViewModel_.ReferenceDate_); if (xmlDoc == null) { this.para_xmlDoc_ = XMLFileLoader.LoadParameter(this.masterInformationViewModel_.Item_code_, this.excel_parameterViewModel_.ReferenceDate_); } else { this.para_xmlDoc_ = xmlDoc; } try { if (this.para_xmlDoc_ != null) { XmlNode paraNode = this.para_xmlDoc_.SelectSingleNode("pricing/excel_parameter"); FpmlSerializedCSharp.Excel_parameter serial_excel_parameter = new FpmlSerializedCSharp.Excel_parameter(paraNode); this.excel_parameterViewModel_.setFromSerial(serial_excel_parameter); XmlNode resultNode = this.para_xmlDoc_.SelectSingleNode("pricing/pricingResult"); if (resultNode != null) { FpmlSerializedCSharp.PricingResult serial_pricingResult = new FpmlSerializedCSharp.PricingResult(resultNode); this.excel_parameterViewModel_.Excel_resultViewModel_.setFromSerial(serial_pricingResult); } } } catch (Exception e) { OutputLogViewModel.addResult("parameter load error : " + e.Message); } }
protected override void loadParaResultFromXml(XmlNode node) { FpmlSerializedCSharp.ParaRoot serial_paraRoot = new FpmlSerializedCSharp.ParaRoot(node); FpmlSerializedCSharp.Pricing serial_pricing = serial_paraRoot.Pricing_; FpmlSerializedCSharp.Excel_parameter serial_pricingPara = serial_pricing.Excel_parameter_; //FpmlSerializedCSharp.PricingResult serial_pricingResult = serial_pricing.; PricingParameterViewModel vm1 = PricingParameterViewModel.CreatePricingParameter(serial_pricingPara); vm1.setFromSerial(serial_pricingPara); this.PricingParameterViewModel_ = vm1; //PricingResultViewModel vm2 = PricingResultViewModel.CreatePricingResult(serial_pricingResult); //vm2.setFromSerial(serial_pricingResult); //this.PricingResultViewModel_ = vm2; //this.view_ = new StandardInstBaseView(); }
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); //} }
public void loadParameterFromXml(XmlDocument xmlDoc = null) { //this.excel_parameterViewModel_.loadParameterFromXml(); //XmlDocument xmlDoc = XMLFileLoader.LoadParameter(this.masterInformationViewModel_.Item_code_, // this.excel_parameterViewModel_.ReferenceDate_); if (xmlDoc == null) { this.para_xmlDoc_ = XMLFileLoader.LoadParameter(this.masterInformationViewModel_.Item_code_, this.excel_parameterViewModel_.ReferenceDate_); } else { this.para_xmlDoc_ = xmlDoc; } try { if (this.para_xmlDoc_ != null) { XmlNode paraNode = this.para_xmlDoc_.SelectSingleNode("pricing/excel_parameter"); FpmlSerializedCSharp.Excel_parameter serial_excel_parameter = new FpmlSerializedCSharp.Excel_parameter(paraNode); this.excel_parameterViewModel_.setFromSerial(serial_excel_parameter); XmlNode resultNode = this.para_xmlDoc_.SelectSingleNode("pricing/pricingResult"); if (resultNode != null) { FpmlSerializedCSharp.PricingResult serial_pricingResult = new FpmlSerializedCSharp.PricingResult(resultNode); this.excel_parameterViewModel_.Excel_resultViewModel_.setFromSerial(serial_pricingResult); } } } catch (Exception e) { OutputLogViewModel.addResult("parameter load error : " + e.Message); } }