示例#1
0
        public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_multi_rangeND serial_Excel_multi_rangeND = serial_Class as FpmlSerializedCSharp.Excel_multi_rangeND;

            this.joint_type_ = serial_Excel_multi_rangeND.Joint_type_.ValueStr;

            List <FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multi_rangeND.Range1D_;

            this.range1DViewModel_ = new ObservableCollection <Range1DViewModel>();
            foreach (var item in serial_range1D)
            {
                string           type      = item.Excel_type_.ValueStr;
                Range1DViewModel viewModel = Range1DViewModel.CreateRange1D(type);
                viewModel.setFromSerial(item);
                this.range1DViewModel_.Add(viewModel);
            }

            List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multi_rangeND.Excel_underlyingCalcID_;

            this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>();
            foreach (var item in serial_excel_underlyingCalcID)
            {
                string type = item.Excel_type_.ValueStr;
                Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type);
                viewModel.setFromSerial(item);
                this.excel_underlyingCalcIDViewModel_.Add(viewModel);
            }
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_couponSchedule serial_Excel_couponSchedule = serial_Class as FpmlSerializedCSharp.Excel_couponSchedule;
            FpmlSerializedCSharp.Excel_multiCondi_structuredAccrualCouponSchedule serial_Excel_multiCondi_structuredAccrualCouponSchedule = serial_Excel_couponSchedule.Excel_multiCondi_structuredAccrualCouponSchedule_;

            this.eventDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.EventDate_.ValueStr);

            this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.PayoffDate_.ValueStr);

            this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationStartDate_.ValueStr);

            this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationEndDate_.ValueStr);

            this.description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Description_.ValueStr;

            this.vba_description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Vba_description_.ValueStr;

            List <FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Range1D_;

            this.range1DViewModel_ = new ObservableCollection <Range1DViewModel>();
            foreach (var item in serial_range1D)
            {
                string           type      = item.Excel_type_.ValueStr;
                Range1DViewModel viewModel = Range1DViewModel.CreateRange1D(type);
                viewModel.setFromSerial(item);
                this.range1DViewModel_.Add(viewModel);
            }

            List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_underlyingCalcID_;

            this.excel_underlyingCalcIDViewModel_ = new ObservableCollection <Excel_underlyingCalcIDViewModel>();
            foreach (var item in serial_excel_underlyingCalcID)
            {
                string type = item.Excel_type_.ValueStr;
                Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type);
                viewModel.setFromSerial(item);
                this.excel_underlyingCalcIDViewModel_.Add(viewModel);
            }

            List <FpmlSerializedCSharp.Excel_returnCalcInfo> serial_excel_returnCalcInfo = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_returnCalcInfo_;

            this.excel_returnCalcInfoViewModel_ = new ObservableCollection <Excel_returnCalcInfoViewModel>();
            foreach (var item in serial_excel_returnCalcInfo)
            {
                string type = item.Excel_type_.ValueStr;
                Excel_returnCalcInfoViewModel viewModel = Excel_returnCalcInfoViewModel.CreateExcel_returnCalcInfo(type);
                viewModel.setFromSerial(item);
                this.excel_returnCalcInfoViewModel_.Add(viewModel);
            }

            this.dayCounter_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DayCounter_.ValueStr;

            this.detailScheduleType_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DetailScheduleType_.ValueStr;
        }
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_couponSchedule serial_Excel_couponSchedule = serial_Class as FpmlSerializedCSharp.Excel_couponSchedule;
            FpmlSerializedCSharp.Excel_multiCondi_structuredAccrualCouponSchedule serial_Excel_multiCondi_structuredAccrualCouponSchedule 
                = serial_Excel_couponSchedule.Excel_multiCondi_structuredAccrualCouponSchedule_;

            base.setFromSerial(serial_Excel_couponSchedule.Excel_additionalOption_);

            this.eventDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.EventDate_.ValueStr);
            this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.PayoffDate_.ValueStr);
            this.calculationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationStartDate_.ValueStr);
            this.calculationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiCondi_structuredAccrualCouponSchedule.CalculationEndDate_.ValueStr);
            this.description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Description_.ValueStr;
            this.vba_description_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Vba_description_.ValueStr;

            List<FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Range1D_;
            this.range1DViewModel_ = new ObservableCollection<Range1DViewModel>();
            foreach (var item in serial_range1D)
            {
                Range1DViewModel viewModel = new Range1DViewModel();
                viewModel.setFromSerial(item);
                this.range1DViewModel_.Add(viewModel);
            }

            List<FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_underlyingCalcID_;
            this.excel_underlyingCalcIDViewModel_ = new ObservableCollection<Excel_underlyingCalcIDViewModel>();
            foreach (var item in serial_excel_underlyingCalcID)
            {
                string type = item.Excel_type_.ValueStr;
                Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type);
                viewModel.setFromSerial(item);
                this.excel_underlyingCalcIDViewModel_.Add(viewModel);
            }
            
            List<FpmlSerializedCSharp.Excel_returnCalcInfo> serial_excel_returnCalcInfo = serial_Excel_multiCondi_structuredAccrualCouponSchedule.Excel_returnCalcInfo_;
            this.excel_returnCalcInfoViewModel_ = new ObservableCollection<Excel_returnCalcInfoViewModel>();
            foreach (var item in serial_excel_returnCalcInfo)
            {
                string type = item.Excel_type_.ValueStr;
                Excel_returnCalcInfoViewModel viewModel = Excel_returnCalcInfoViewModel.CreateExcel_returnCalcInfo(type);
                viewModel.setFromSerial(item);
                this.excel_returnCalcInfoViewModel_.Add(viewModel);
            }
            
            this.dayCounter_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DayCounter_.ValueStr;
            this.detailScheduleType_ = serial_Excel_multiCondi_structuredAccrualCouponSchedule.DetailScheduleType_.ValueStr;
        }
 public  void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
 {
     FpmlSerializedCSharp.Excel_multi_rangeND serial_Excel_multi_rangeND = serial_Class as FpmlSerializedCSharp.Excel_multi_rangeND;
 
     this.joint_type_ = serial_Excel_multi_rangeND.Joint_type_.ValueStr;
     
     List<FpmlSerializedCSharp.Range1D> serial_range1D = serial_Excel_multi_rangeND.Range1D_;
     this.range1DViewModel_ = new ObservableCollection<Range1DViewModel>();
     foreach (var item in serial_range1D)
     {
         Range1DViewModel viewModel = new Range1DViewModel();
         viewModel.setFromSerial(item);
         this.range1DViewModel_.Add(viewModel);
     }
     
     List<FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multi_rangeND.Excel_underlyingCalcID_;
     this.excel_underlyingCalcIDViewModel_ = new ObservableCollection<Excel_underlyingCalcIDViewModel>();
     foreach (var item in serial_excel_underlyingCalcID)
     {
         string type = item.Excel_type_.ValueStr;
         Excel_underlyingCalcIDViewModel viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(type);
         viewModel.setFromSerial(item);
         this.excel_underlyingCalcIDViewModel_.Add(viewModel);
     }
     
 }