示例#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;
            }
        }
示例#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);
            }
        }
示例#3
0
        public Instrument_structuredBond get_structuredBondLeg(SwapSide swapSide)
        {
            Excel_structuredSwapLegViewModel structuredSwapLegViewModel = this.swapInterfaceVM_.Excel_swapLegViewModel_[0] as Excel_structuredSwapLegViewModel;

            try
            {
                if (structuredSwapLegViewModel != null)
                {
                    Instrument_structuredBond inst_structuredBond = new Instrument_structuredBond();

                    inst_structuredBond.InstVM_.Excel_interfaceViewModel_ = structuredSwapLegViewModel.Excel_interfaceViewModel_;

                    return(inst_structuredBond);
                }
                else
                {
                    throw new Exception("type is not valid");
                }
            }
            catch (Exception e)
            {
                throw;
            }
        }
        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;
            }

        }
        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;
            }

        }
        public Instrument_structuredBond get_structuredBondLeg(SwapSide swapSide)
        {
            Excel_structuredSwapLegViewModel structuredSwapLegViewModel = this.swapInterfaceVM_.Excel_swapLegViewModel_[0] as Excel_structuredSwapLegViewModel;

            try
            {
                if (structuredSwapLegViewModel != null)
                {
                    Instrument_structuredBond inst_structuredBond = new Instrument_structuredBond();

                    inst_structuredBond.InstVM_.Excel_interfaceViewModel_ = structuredSwapLegViewModel.Excel_interfaceViewModel_;

                    return inst_structuredBond;

                }
                else
                {
                    throw new Exception("type is not valid");
                }
            }
            catch (Exception e)
            {
                throw;
            }
        }