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; }
public string get_underlyingInfo(string code, InfoType infoType) { try { Excel_marketDataSymbol e_mds = Excel_marketDataSymbol.getDefinedSymbol(code); Excel_underlyingInfoViewModel e_uivm = e_mds.underlyingInfoVM(); string vba_desc = e_uivm.vba_desciption(); return(this.infoParsing(vba_desc, infoType)); } catch (Exception e) { return("add fail : " + e.Message); } }