Esempio n. 1
0
        public Instrument_hifive get_hifiveLeg(SwapSide swapSide)
        {
            Excel_hifiveSwapLegViewModel e_hifiveSwapLegVM = this.swapInterfaceVM_.Excel_swapLegViewModel_[1] as Excel_hifiveSwapLegViewModel;

            try
            {
                if (e_hifiveSwapLegVM != null)
                {
                    Instrument_hifive inst_hifive = new Instrument_hifive();

                    inst_hifive.InstVM_.Excel_interfaceViewModel_ = e_hifiveSwapLegVM.Excel_hifiveViewModel_;

                    return(inst_hifive);
                }
                else
                {
                    throw new Exception("type is not valid");
                }
            }
            catch (Exception e)
            {
                throw;
            }
        }
Esempio n. 2
0
        public string set_hifiveLeg(SwapSide swapSide, Instrument_hifive inst_hifive)
        {
            try
            {
                Excel_hifiveSwapLegViewModel e_hifiveSwapLegVM = new Excel_hifiveSwapLegViewModel();
                e_hifiveSwapLegVM.Excel_hifiveViewModel_ = inst_hifive.InstVM_.Excel_interfaceViewModel_ as Excel_hifiveViewModel;

                this.swapInterfaceVM_.Excel_swapLegViewModel_[1] = e_hifiveSwapLegVM;

                // para under add part
                Excel_standardSwapParaViewModel e_sspvm = this.InstVM_.Excel_parameterViewModel_ as Excel_standardSwapParaViewModel;

                foreach (var item in inst_hifive.InstVM_.Excel_interfaceViewModel_.Excel_underlyingCalcInfoViewModel_.Excel_underlyingInfoViewModel_)
                {
                    this.addUnderlying(item.KrCode_);
                }

                return("OK");
            }
            catch (Exception e)
            {
                return("set fail : " + e.Message);
            }
        }