public string get_quote(DateTime refDate, string code) { try { //Excel_underlyingInfoViewModel e = Excel_loaderViewModel.loadUnderInfoWithoutBasePrice(code return(Excel_loaderViewModel.loadMarketData(refDate, code)); } catch (Exception e) { return("get quote fail : " + e.Message); } }
private void addUnderlying(string underCodes) { string[] underCodeList = underCodes.Split(',', '|'); foreach (var item2 in underCodeList) { bool existFlag = false; // ir part A foreach (var item in this.swapInterfaceVM_.Excel_swapLegViewModel_[0].getExcel_underlyingCalcInfoViewModel().Excel_underlyingInfoViewModel_) { if (item2.Trim().ToUpper() == item.KrCode_.ToUpper()) { existFlag = true; } } // hifive part B foreach (var item in this.swapInterfaceVM_.Excel_swapLegViewModel_[1].getExcel_underlyingCalcInfoViewModel().Excel_underlyingInfoViewModel_) { if (item2.Trim().ToUpper() == item.KrCode_.ToUpper()) { existFlag = true; } } if (!existFlag) { Excel_underlyingInfoViewModel e_uivm = Excel_loaderViewModel.loadUnderInfoWithoutBasePrice(item2); this.InstVM_.Excel_interfaceViewModel_.Excel_underlyingCalcInfoViewModel_. Excel_underlyingInfoViewModel_.Add(e_uivm); Excel_standardSwapParaViewModel e_sspvm = this.InstVM_.Excel_parameterViewModel_ as Excel_standardSwapParaViewModel; Excel_underlyingInfo_paraViewModel e_ui_pvm = new Excel_underlyingInfo_paraViewModel(); e_ui_pvm.buildParaSetting(e_uivm); e_sspvm.Excel_underlyingCalcInfo_paraViewModel_.Excel_underlyingInfo_paraViewModel_.Add(e_ui_pvm); e_sspvm.Excel_underlyingCalcInfo_paraViewModel_.Excel_correlationInfo_paraViewModel_.addDiagonal(e_ui_pvm); } } return; }