public Excel_instrument_vanillaFloatingBondViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "vanillaFloatingBond";

            if (bookingMode)
            {
                this.bookingModelSetting();
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);


            this.Excel_interfaceViewModel_.Excel_issueInfoViewModel_.MaturityDate_
                = this.masterInformationViewModel_.Maturity_date_;

            this.masterInformationViewModel_.PropertyChanged +=
                this.Excel_interfaceViewModel_.Excel_issueInfoViewModel_.MaturityDateObserver;

            //this.maturityYear_ = 3.0;
            //this.maturityDate_ = this.effectiveDate_.AddYears(3);

            //this.view_.DataContext = this;
        }
Example #2
0
        public Excel_instrument_fxForwardViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "fxForward";

            if (bookingMode)
            {
                this.bookingModelSetting();

                this.masterInformationViewModel_.Underlying_type_ =
                    UnderlyingComboViewModel.CreateContractComboViewModel("Foreign");

                this.masterInformationViewModel_.Contract_subtype_
                    = ContractSubComboViewModel.CreateContractSubComboViewModel("Forward");
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);

            EngineType engineType = ProgramVariable.CurrenctPricingMethodSettingManager_.FxForwardEnginType_;

            //this.linkEventPass();

            //this.view_.DataContext = this;
        }
        public Excel_instrument_crsViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "crs";

            if (bookingMode)
            {
                this.bookingModelSetting();
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);

            //this.view_.DataContext = this;
        }
Example #4
0
        public virtual void buildParameterFromInstrumentWithOutData(DateTime refDate)
        {
            Excel_parameterViewModel e_pvm = Excel_parameterLoader.Load(this.booking_type_);

            e_pvm.IssueDate_ = this.excel_interfaceViewModel_.Excel_issueInfoViewModel_.EffectiveDate_;

            e_pvm.ItemCode_ = this.masterInformationViewModel_.Item_code_;

            //ParameterSettingManager parameterSettingManager = new ParameterSettingManager(refDate,this);
            ParameterSettingManager parameterSettingManager
                = ParameterSettingManagerBuilder.makeParaSettingManager("default", refDate, this);

            e_pvm.buildParaSetting(parameterSettingManager);

            this.excel_parameterViewModel_ = e_pvm;
        }
        public Excel_instrument_fxSwapViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "fxSwap";

            if (bookingMode)
            {
                this.bookingModelSetting();
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);

            EngineType engineType = ProgramVariable.CurrenctPricingMethodSettingManager_.FxSwapEnginType_;

            //this.view_.DataContext = this;
        }
Example #6
0
        public void loadDetailContext()
        {
            //try
            //{
            string type = this.masterInformationViewModel_.Booking_type_;

            this.excel_interfaceViewModel_           = Excel_InterfaceLoader.Load(type);
            this.excel_interfaceViewModel_.ItemCode_ = this.masterInformationViewModel_.Item_code_;
            //this.excel_interfaceViewModel_.TradeID_ = this.masterInformationViewModel_.Trade_id_;

            this.excel_parameterViewModel_           = Excel_parameterLoader.Load(type);
            this.excel_parameterViewModel_.ItemCode_ = this.masterInformationViewModel_.Item_code_;
            //this.excel_parameterViewModel_.TradeID_ = this.masterInformationViewModel_.Trade_id_;
            this.excel_parameterViewModel_.ReferenceDate_ = RootBookViewModel.rootBookReferenceDate();

            //링크
            //this.linkEventPass();

            this.excel_profitLossViewModel_                 = new Excel_profitLossViewModel();
            this.excel_profitLossViewModel_.ItemCode_       = this.masterInformationViewModel_.Item_code_;
            this.excel_profitLossViewModel_.TradeID_        = this.masterInformationViewModel_.Trade_id_;
            this.excel_profitLossViewModel_.ExportItemCode_ = this.masterInformationViewModel_.Export_itemcode_;

            this.loadInterfaceVMFromXml();
            this.loadParameterFromXml();

            // xml이 로드된 후에 setting 함.. xml로드할때 class가 생성되므로..
            this.excel_interfaceViewModel_.setUnderlying();

            //d 나중에 클릭 대면 로드함 왜냐면 DB접속이니까... 느릴까바.. 흐앙
            this.excel_profitLossViewModel_.ReferenceDate_ = RootBookViewModel.rootBookReferenceDate();
            this.excel_profitLossViewModel_.loadBookingInfo();
            //this.excel_profitLossViewModel_.loadNPV();
            //this.excel_profitLossViewModel_.loadTradeEvent();

            this.excel_eventManagerViewModel_           = new Excel_eventManagerViewModel();
            this.excel_eventManagerViewModel_.ItemCode_ = this.masterInformationViewModel_.Item_code_;
            this.excel_eventManagerViewModel_.dbLoad();
            //}
            //catch (Exception e)
            //{
            //    e.Source += "\n" + this.Item_code_;

            //    throw e;
            //}
        }
        public Excel_instrument_multiAssetCompositeOptionViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "multiAssetCompositeOption";

            if (bookingMode)
            {
                this.bookingModelSetting();
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);

            // 이걸 그냥 내부에서 딸 수도 있음..

            EngineType engineType = ProgramVariable.CurrenctPricingMethodSettingManager_.MultiAssetCompositeOptionEnginType_;

            //this.Excel_parameterViewModel_ = this.createParameterVM(engineType);
        }
Example #8
0
        public Excel_instrument_fixedBondViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "fixedBond";

            if (bookingMode)
            {
                this.bookingModelSetting();
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);


            this.Excel_interfaceViewModel_.Excel_issueInfoViewModel_.MaturityDate_
                = this.masterInformationViewModel_.Maturity_date_;

            this.masterInformationViewModel_.PropertyChanged +=
                this.Excel_interfaceViewModel_.Excel_issueInfoViewModel_.MaturityDateObserver;
        }
Example #9
0
        public Excel_instrument_hifiveViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "hifive";

            if (bookingMode)
            {
                this.bookingModelSetting();
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);

            //new Excel_hifiveViewModel();
            //this.Excel_parameterViewModel_ = new Excel_standardHifiveParaViewModel();

            //this.Excel_interfaceViewModel_.setUnderlying();

            //this.excel_interfaceViewModel_.Excel_underlyingCalcInfoViewModel_.PropertyChanged
            //    += this.excel_parameterViewModel_.instrumentEventObserver;
        }
Example #10
0
        public Excel_instrument_irsViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "irs";

            if (bookingMode)
            {
                this.masterInformationViewModel_.Booking_type_ = this.booking_type_;

                this.masterInformationViewModel_.Item_code_
                    = CodeClassificationGenerator.CreateItemCode(this.booking_type_);
            }

            // 메뉴 Booking
            // private void menuBookingItem_Click(object sender, RoutedEventArgs e)

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);

            //this.Excel_interfaceViewModel_.setUnderlying();

            this.excel_interfaceViewModel_.Excel_underlyingCalcInfoViewModel_.PropertyChanged
                += this.excel_parameterViewModel_.instrumentEventObserver;
        }