public virtual void calculate(string instCode, DateTime refDate) { this.inst_xmlDoc_ = XMLFileLoader.LoadInstrument(instCode); this.para_xmlDoc_ = XMLFileLoader.LoadParameter(instCode, refDate); this.calculateSavedXml(refDate); }
public void enqueue_intrument(string itemCode) { // itemCode 를 master에서 찾아서 만들어서 넣음 try { Excel_instrumentViewModel e_ivm = MasterInformationViewModel.loadInstrumentVM(itemCode); // inst xml e_ivm.loadInterfaceVMFromXml(XMLFileLoader.LoadInstrument(itemCode)); // para xml e_ivm.loadParameterFromXml(XMLFileLoader.LoadParameter(itemCode, this.calculationDate_)); BatchItemViewModel bvm = new BatchItemViewModel(e_ivm); this.BatchItemViewModelQueueList_.Add(bvm); } catch (Exception e) { throw e; } // }
private void loadParameter() { foreach (var item in this.BatchItemViewModelQueueList_) { item.Excel_instrumentViewModel_.loadParameterFromXml( XMLFileLoader.LoadParameter(item.ItemCode_, this.calculationDate_)); } }
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); } }