public Excel_fxSwapViewModel() 
        {
            this.fx_exchangeLegViewModel_ = new ObservableCollection<Fx_exchangeLegViewModel>();

            Fx_exchangeLegViewModel firstLeg = new Fx_exchangeLegViewModel();
            firstLeg.ExchangeType_ = "Buy";

            Fx_exchangeLegViewModel secondLeg = new Fx_exchangeLegViewModel();
            firstLeg.ExchangeType_ = "Sell";

            this.fx_exchangeLegViewModel_.Add(firstLeg);
            this.fx_exchangeLegViewModel_.Add(secondLeg);
        }
        public Excel_fxSwapViewModel()
        {
            this.fx_exchangeLegViewModel_ = new ObservableCollection <Fx_exchangeLegViewModel>();

            Fx_exchangeLegViewModel firstLeg = new Fx_exchangeLegViewModel();

            firstLeg.ExchangeType_ = "Buy";

            Fx_exchangeLegViewModel secondLeg = new Fx_exchangeLegViewModel();

            firstLeg.ExchangeType_ = "Sell";

            this.fx_exchangeLegViewModel_.Add(firstLeg);
            this.fx_exchangeLegViewModel_.Add(secondLeg);
        }
        private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            this.viewModel_ = this.DataContext as Fx_exchangeLegViewModel;
            this.bindingPanel_.DataContext = this.viewModel_;

            this.baseCurrencyCombo_.DataContext   = this.viewModel_.BaseCurrency_;
            this.targetCurrencyCombo_.DataContext = this.viewModel_.TargetCurrency_;

            //this.currencyCombo_.DataContext = this.viewModel_.Currency_;

            //this.underlyingCombo_.DataContext = this.viewModel_.Underlying_type_;
            //this.contractCombo_.DataContext = this.viewModel_.Contract_type_;
            //this.contractSubCombo_.DataContext = this.viewModel_.Contract_subtype_;

            //this.Contract_detail_type_Combo_.SelectedItem_.Copy(this.viewModel_.Contract_detail_type_);
            //this.Contract_detail_type_Combo_.refreshComboBox();
        }
Пример #4
0
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_interface serial_Excel_interface = serial_Class as FpmlSerializedCSharp.Excel_interface;
            FpmlSerializedCSharp.Excel_fxForward serial_Excel_fxForward = serial_Excel_interface.Excel_fxForward_;

            FpmlSerializedCSharp.Excel_issueInfo serial_excel_issueInfo = serial_Excel_fxForward.Excel_issueInfo_;
            string excel_issueInfotype = serial_excel_issueInfo.Excel_type_.ValueStr;

            this.excel_issueInfoViewModel_ = Excel_issueInfoViewModel.CreateExcel_issueInfo(excel_issueInfotype);
            this.excel_issueInfoViewModel_.setFromSerial(serial_excel_issueInfo);

            FpmlSerializedCSharp.Fx_exchangeLeg serial_fx_exchangeLeg = serial_Excel_fxForward.Fx_exchangeLeg_;
            string fx_exchangeLegtype = serial_fx_exchangeLeg.Excel_type_.ValueStr;

            this.fx_exchangeLegViewModel_ = Fx_exchangeLegViewModel.CreateFx_exchangeLeg(fx_exchangeLegtype);
            this.fx_exchangeLegViewModel_.setFromSerial(serial_fx_exchangeLeg);
        }
        private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            this.viewModel_ = this.DataContext as Fx_exchangeLegViewModel;
            this.bindingPanel_.DataContext = this.viewModel_;

            this.baseCurrencyCombo_.DataContext = this.viewModel_.BaseCurrency_;
            this.targetCurrencyCombo_.DataContext = this.viewModel_.TargetCurrency_;

            //this.currencyCombo_.DataContext = this.viewModel_.Currency_;

            //this.underlyingCombo_.DataContext = this.viewModel_.Underlying_type_;
            //this.contractCombo_.DataContext = this.viewModel_.Contract_type_;
            //this.contractSubCombo_.DataContext = this.viewModel_.Contract_subtype_;

            //this.Contract_detail_type_Combo_.SelectedItem_.Copy(this.viewModel_.Contract_detail_type_);
            //this.Contract_detail_type_Combo_.refreshComboBox();


        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_interface serial_Excel_interface = serial_Class as FpmlSerializedCSharp.Excel_interface;
            FpmlSerializedCSharp.Excel_fxSwap    serial_Excel_fxSwap    = serial_Excel_interface.Excel_fxSwap_;

            FpmlSerializedCSharp.Excel_issueInfo serial_excel_issueInfo = serial_Excel_fxSwap.Excel_issueInfo_;
            string excel_issueInfotype = serial_excel_issueInfo.Excel_type_.ValueStr;

            this.excel_issueInfoViewModel_ = Excel_issueInfoViewModel.CreateExcel_issueInfo(excel_issueInfotype);
            this.excel_issueInfoViewModel_.setFromSerial(serial_excel_issueInfo);

            List <FpmlSerializedCSharp.Fx_exchangeLeg> serial_fx_exchangeLeg = serial_Excel_fxSwap.Fx_exchangeLeg_;

            this.fx_exchangeLegViewModel_ = new ObservableCollection <Fx_exchangeLegViewModel>();
            foreach (var item in serial_fx_exchangeLeg)
            {
                string type = item.Excel_type_.ValueStr;
                Fx_exchangeLegViewModel viewModel = Fx_exchangeLegViewModel.CreateFx_exchangeLeg(type);
                viewModel.setFromSerial(item);
                this.fx_exchangeLegViewModel_.Add(viewModel);
            }
        }
 public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.Excel_interface serial_Excel_interface = serial_Class as FpmlSerializedCSharp.Excel_interface;
     FpmlSerializedCSharp.Excel_fxForward serial_Excel_fxForward = serial_Excel_interface.Excel_fxForward_;
 
     FpmlSerializedCSharp.Excel_issueInfo serial_excel_issueInfo = serial_Excel_fxForward.Excel_issueInfo_;
     string excel_issueInfotype = serial_excel_issueInfo.Excel_type_.ValueStr;
     this.excel_issueInfoViewModel_ = Excel_issueInfoViewModel.CreateExcel_issueInfo(excel_issueInfotype);
     this.excel_issueInfoViewModel_.setFromSerial(serial_excel_issueInfo);
     
     FpmlSerializedCSharp.Fx_exchangeLeg serial_fx_exchangeLeg = serial_Excel_fxForward.Fx_exchangeLeg_;
     string fx_exchangeLegtype = serial_fx_exchangeLeg.Excel_type_.ValueStr;
     this.fx_exchangeLegViewModel_ = Fx_exchangeLegViewModel.CreateFx_exchangeLeg(fx_exchangeLegtype);
     this.fx_exchangeLegViewModel_.setFromSerial(serial_fx_exchangeLeg);
     
 }