public void addConditionMultiRangAccrualFixedCoupon(DateTime calculationStartDate, 
                                                DateTime calculationEndDate, 
                                                DateTime payoffDate, 
                                                List<double> lowerRngList,
                                                List<string> referenceUnderCodeList,
                                                List<double> upperRngList,
                                                double fixedRate)
        {
            Excel_multiCondi_structuredAccrualCouponScheduleViewModel e_mc_sacsvm
                = new Excel_multiCondi_structuredAccrualCouponScheduleViewModel();

            e_mc_sacsvm.EventDate_ = payoffDate;

            e_mc_sacsvm.CalculationStartDate_ = calculationStartDate;
            e_mc_sacsvm.CalculationEndDate_ = calculationEndDate;
            e_mc_sacsvm.PaymentDate_ = payoffDate;

            int rangeCount = lowerRngList.Count;

            for (int i = 0; i < rangeCount; i++)
            {
                Range1DViewModel accRng1D = new Range1DViewModel();

                accRng1D.LowerBound_ = lowerRngList[i].ToString();

                DateTime effDate = this.instVM_.Excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;
                //this.addUnderlying(Excel_loaderViewModel.loadUnderInfo2(effDate, referenceUnderCodeList[i]));
                this.addUnderlying(effDate, referenceUnderCodeList[i]);

                Excel_choiceUnderlyingCalcIDViewModel choiceUnderCalcIDVM = new Excel_choiceUnderlyingCalcIDViewModel();
                
                choiceUnderCalcIDVM.EventDate_ = payoffDate;

                Excel_selectedUnderlyingViewModel selectedUnder = new Excel_selectedUnderlyingViewModel();
                selectedUnder.Code_ = referenceUnderCodeList[i];
                selectedUnder.NameTrans_ = new NameTrans(referenceUnderCodeList[i]);
                selectedUnder.Checked_ = true;

                choiceUnderCalcIDVM.Excel_selectedUnderlyingViewModel_.Add(selectedUnder);

                accRng1D.UpperBound_ = upperRngList[i].ToString();

                e_mc_sacsvm.Range1DViewModel_.Add(accRng1D);
                e_mc_sacsvm.Excel_underlyingCalcIDViewModel_.Add(choiceUnderCalcIDVM);
            }
                

            Excel_constReturnCalViewModel e_crcvm = new Excel_constReturnCalViewModel();

            e_crcvm.ConstReturn_ = fixedRate.ToString();

            e_mc_sacsvm.Excel_returnCalcInfoViewModel_.Add(e_crcvm);

            //e_mc_sacsvm.FixedRate_ = fixedRate.ToString();

            Excel_structuredBondViewModel e_sbvm = this.instVM_.Excel_interfaceViewModel_ as Excel_structuredBondViewModel;

            e_sbvm.Excel_couponScheduleListViewModel_.Excel_couponScheduleViewModel_.Add(e_mc_sacsvm);

            //this.instVM_.Excel_interfaceViewModel_ = e_sbvm;

        }
        public void addConditionMultiRangAccrualFixedCoupon(DateTime calculationStartDate,
                                                            DateTime calculationEndDate,
                                                            DateTime payoffDate,
                                                            List <double> lowerRngList,
                                                            List <string> referenceUnderCodeList,
                                                            List <double> upperRngList,
                                                            double fixedRate)
        {
            Excel_multiCondi_structuredAccrualCouponScheduleViewModel e_mc_sacsvm
                = new Excel_multiCondi_structuredAccrualCouponScheduleViewModel();

            e_mc_sacsvm.EventDate_ = payoffDate;

            e_mc_sacsvm.CalculationStartDate_ = calculationStartDate;
            e_mc_sacsvm.CalculationEndDate_   = calculationEndDate;
            e_mc_sacsvm.PaymentDate_          = payoffDate;

            int rangeCount = lowerRngList.Count;

            for (int i = 0; i < rangeCount; i++)
            {
                Range1DViewModel accRng1D = new Range1DViewModel();

                accRng1D.LowerBound_ = lowerRngList[i].ToString();

                DateTime effDate = this.instVM_.Excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;
                //this.addUnderlying(Excel_loaderViewModel.loadUnderInfo2(effDate, referenceUnderCodeList[i]));
                this.addUnderlying(effDate, referenceUnderCodeList[i]);

                Excel_choiceUnderlyingCalcIDViewModel choiceUnderCalcIDVM = new Excel_choiceUnderlyingCalcIDViewModel();

                choiceUnderCalcIDVM.EventDate_ = payoffDate;

                Excel_selectedUnderlyingViewModel selectedUnder = new Excel_selectedUnderlyingViewModel();
                selectedUnder.Code_      = referenceUnderCodeList[i];
                selectedUnder.NameTrans_ = new NameTrans(referenceUnderCodeList[i]);
                selectedUnder.Checked_   = true;

                choiceUnderCalcIDVM.Excel_selectedUnderlyingViewModel_.Add(selectedUnder);

                accRng1D.UpperBound_ = upperRngList[i].ToString();

                e_mc_sacsvm.Range1DViewModel_.Add(accRng1D);
                e_mc_sacsvm.Excel_underlyingCalcIDViewModel_.Add(choiceUnderCalcIDVM);
            }


            Excel_constReturnCalViewModel e_crcvm = new Excel_constReturnCalViewModel();

            e_crcvm.ConstReturn_ = fixedRate.ToString();

            e_mc_sacsvm.Excel_returnCalcInfoViewModel_.Add(e_crcvm);

            //e_mc_sacsvm.FixedRate_ = fixedRate.ToString();

            Excel_structuredBondViewModel e_sbvm = this.instVM_.Excel_interfaceViewModel_ as Excel_structuredBondViewModel;

            e_sbvm.Excel_couponScheduleListViewModel_.Excel_couponScheduleViewModel_.Add(e_mc_sacsvm);

            //this.instVM_.Excel_interfaceViewModel_ = e_sbvm;
        }