//private void loadBookItemList()
        //{
        //    // selected book

        //    // load item in book

        //    BookViewModel bvm = new BookViewModel();

        //    //bvm.addTestInstrumentLoad();

        //    this.instrumentListListView_.ItemsSource = bvm.InstrumentList_;
        //}

        //private void TreeViewItem_Selected(object sender, RoutedEventArgs e)
        //{

        //}

        #region MenuEvent

        private void menuBookingItem_Click(object sender, RoutedEventArgs e)
        {
            MenuItem mi = e.Source as MenuItem;

            switch (mi.Name.ToUpper())
            {
            case "FIXEDBOND":
            {     //do something;
                Excel_instrumentViewModel e_instVM = new Excel_instrument_fixedBondViewModel(true);
                this.menuBooking(e_instVM);
                break;
            }

            case "IRS":
            {     //do something;
                Excel_instrumentViewModel e_instVM = new Excel_instrument_irsViewModel(true);
                this.menuBooking(e_instVM);
                break;
            }

            case "CRS":
            {     //do something;
                Excel_instrumentViewModel e_instVM = new Excel_instrument_crsViewModel(true);
                this.menuBooking(e_instVM);
                break;
            }

            case "CDS":
            {     //do something;
                Excel_instrumentViewModel e_instVM = new Excel_instrument_cdsViewModel(true);
                this.menuBooking(e_instVM);
                break;
            }

            case "TWO":
            {     //do something else
                Excel_instrumentViewModel e_instVM = new Excel_instrument_hifiveViewModel(true);
                this.menuBooking(e_instVM);
                break;
            }

            case "HIFIVE":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_hifiveViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "STEPDOWN2":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_stepDownKICustomViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "COMPOSITEOPTION":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_compositeOptionViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "MULTIASSETCOMPOSITEOPTION":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_multiAssetCompositeOptionViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "GENERAL":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_generalViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "VANILLAFLOATINGBOND":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_vanillaFloatingBondViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "FXFORWARD":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_fxForwardViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "FXSWAP":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_fxSwapViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }

            case "FXEXCHANGE":
            {     //something else again
                Excel_instrumentViewModel e_instVM = new Excel_instrument_fxSpotViewModel(true);

                this.menuBooking(e_instVM);
                break;
            }
            }
        }
        //private void loadBookItemList()
        //{ 
        //    // selected book

        //    // load item in book

        //    BookViewModel bvm = new BookViewModel();

        //    //bvm.addTestInstrumentLoad();

        //    this.instrumentListListView_.ItemsSource = bvm.InstrumentList_;
        //}

        //private void TreeViewItem_Selected(object sender, RoutedEventArgs e)
        //{

        //}

        #region MenuEvent

        private void menuBookingItem_Click(object sender, RoutedEventArgs e)
        {
            MenuItem mi = e.Source as MenuItem;

            switch (mi.Name.ToUpper())
            {
                case "FIXEDBOND":
                { //do something;
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_fixedBondViewModel(true);
                    this.menuBooking(e_instVM);
                    break;
                }

                case "IRS":
                { //do something;
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_irsViewModel(true);
                    this.menuBooking(e_instVM);
                    break;
                }

                case "CRS":
                { //do something;
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_crsViewModel(true);
                    this.menuBooking(e_instVM);
                    break;
                }

                case "CDS":
                { //do something;
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_cdsViewModel(true);
                    this.menuBooking(e_instVM);
                    break;
                }

                case "TWO":
                { //do something else
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_hifiveViewModel(true);
                    this.menuBooking(e_instVM);
                    break;
                }

                case "HIFIVE":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_hifiveViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }

                case "STEPDOWN2":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_stepDownKICustomViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }

                case "COMPOSITEOPTION":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_compositeOptionViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }
                case "MULTIASSETCOMPOSITEOPTION":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_multiAssetCompositeOptionViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }
                case "GENERAL":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_generalViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }
                case "VANILLAFLOATINGBOND":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_vanillaFloatingBondViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }
                case "FXFORWARD":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_fxForwardViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }
                case "FXSWAP":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_fxSwapViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }
                case "FXEXCHANGE":
                { //something else again
                    Excel_instrumentViewModel e_instVM = new Excel_instrument_fxSpotViewModel(true);

                    this.menuBooking(e_instVM);
                    break;
                }

            }

            
        }