コード例 #1
0
        public string booking_structuredBond(Instrument_structuredBond inst_structuredBond)
        {
            try
            {
                bvm_.booking(inst_structuredBond.InstVM_);
                this.bvm_.saveBookXml();

                return("booking complete , code : " + inst_structuredBond.InstVM_.Item_code_);
            }
            catch (Exception e)
            {
                return("booking fail : " + e.Message);
            }
        }
コード例 #2
0
        public string booking_structuredBond(Instrument_structuredBond inst_structuredBond)
        {
            try
            {
                bvm_.booking(inst_structuredBond.InstVM_);
                this.bvm_.saveBookXml();

                return "booking complete , code : " + inst_structuredBond.InstVM_.Item_code_;
            }
            catch (Exception e)
            {
                return "booking 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;
            }
        }
コード例 #4
0
        // Leg ------------------------------------------------------------------------------------

        public string set_structuredBondLeg(SwapSide swapSide, Instrument_structuredBond inst_structuredBond)
        {
            try
            {
                Excel_structuredSwapLegViewModel e_structuredSwapLegVM = new Excel_structuredSwapLegViewModel();
                e_structuredSwapLegVM.Excel_interfaceViewModel_ = inst_structuredBond.InstVM_.Excel_interfaceViewModel_;// as Excel_structuredBondViewModel;

                this.swapInterfaceVM_.Excel_swapLegViewModel_[0] = e_structuredSwapLegVM;

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

                foreach (var item in inst_structuredBond.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;
            }
        }
        // Leg ------------------------------------------------------------------------------------

        public string set_structuredBondLeg(SwapSide swapSide, Instrument_structuredBond inst_structuredBond)
        {
            try
            {
                Excel_structuredSwapLegViewModel e_structuredSwapLegVM = new Excel_structuredSwapLegViewModel();
                e_structuredSwapLegVM.Excel_interfaceViewModel_ = inst_structuredBond.InstVM_.Excel_interfaceViewModel_;// as Excel_structuredBondViewModel;

                this.swapInterfaceVM_.Excel_swapLegViewModel_[0] = e_structuredSwapLegVM;

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

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

                return "OK";
            }
            catch (Exception e)
            {

                return "set fail : " + e.Message;
            }
        }