public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_eventCalcInfo serial_Excel_eventCalcInfo = serial_Class as FpmlSerializedCSharp.Excel_eventCalcInfo; FpmlSerializedCSharp.Excel_singleBarrierEventCal serial_Excel_singleBarrierEventCal = serial_Excel_eventCalcInfo.Excel_singleBarrierEventCal_; this.lowerTrigger_ = serial_Excel_singleBarrierEventCal.LowerTrigger_.ValueStr; this.upperTrigger_ = serial_Excel_singleBarrierEventCal.UpperTrigger_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_excel_underlyingCalcID = serial_Excel_singleBarrierEventCal.Excel_underlyingCalcID_; string excel_underlyingCalcIDtype = serial_excel_underlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(excel_underlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_excel_underlyingCalcID); this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_singleBarrierEventCal.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_singleBarrierEventCal.ObservationEndDate_.ValueStr); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_upInOutCall serial_Excel_multiAsset_upInOutCall = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_upInOutCall_; this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.PayoffDate_.ValueStr); this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ExerciseDate_.ValueStr); this.inOut_ = serial_Excel_multiAsset_upInOutCall.InOut_.ValueStr; this.baseUnderlyingValue_ = serial_Excel_multiAsset_upInOutCall.BaseUnderlyingValue_.ValueStr; this.baseCoupon_ = serial_Excel_multiAsset_upInOutCall.BaseCoupon_.ValueStr; this.strike_ = serial_Excel_multiAsset_upInOutCall.Strike_.ValueStr; this.strikeValue_ = serial_Excel_multiAsset_upInOutCall.StrikeValue_.ValueStr; this.partiRate_ = serial_Excel_multiAsset_upInOutCall.PartiRate_.ValueStr; this.barrier_ = serial_Excel_multiAsset_upInOutCall.Barrier_.ValueStr; this.barrierValue_ = serial_Excel_multiAsset_upInOutCall.BarrierValue_.ValueStr; this.rebateCoupon_ = serial_Excel_multiAsset_upInOutCall.RebateCoupon_.ValueStr; this.rebateCouponValue_ = serial_Excel_multiAsset_upInOutCall.RebateCouponValue_.ValueStr; List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiAsset_upInOutCall.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); } this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationEndDate_.ValueStr); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_upInOutCall serial_Excel_multiAsset_upInOutCall = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_upInOutCall_; this.inOut_ = Enum.Parse(typeof(InOutEnum), serial_Excel_multiAsset_upInOutCall.InOut_.ValueStr) as InOutEnum?; this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ExerciseDate_.ValueStr); //this.baseUnderlyingValue_ = serial_Excel_multiAsset_upInOutCall.BaseUnderlyingValue_.DoubleValue(); this.baseCoupon_ = (serial_Excel_multiAsset_upInOutCall.BaseCoupon_.DoubleValue() * 100.0).ToString(); this.strike_ = (serial_Excel_multiAsset_upInOutCall.Strike_.DoubleValue() * 100.0).ToString(); //this.strikeValue_ = serial_Excel_multiAsset_upInOutCall.StrikeValue_.ValueStr; this.partiRate_ = (serial_Excel_multiAsset_upInOutCall.PartiRate_.DoubleValue() * 100.0).ToString(); this.barrier_ = (serial_Excel_multiAsset_upInOutCall.Barrier_.DoubleValue() * 100.0).ToString(); //this.barrierValue_ = serial_Excel_multiAsset_upInOutCall.BarrierValue_.ValueStr; this.rebateCoupon_ = (serial_Excel_multiAsset_upInOutCall.RebateCoupon_.DoubleValue() * 100.0).ToString(); this.rebateCouponValue_ = serial_Excel_multiAsset_upInOutCall.RebateCouponValue_.ValueStr; List <FpmlSerializedCSharp.Excel_underlyingCalcID> serial_excel_underlyingCalcID = serial_Excel_multiAsset_upInOutCall.Excel_underlyingCalcID_; //this.excel_underlyingCalcIDViewModel_ = new ObservableCollection<Excel_underlyingCalcIDViewModel>(); string barrierType = serial_excel_underlyingCalcID[0].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel barrier_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(barrierType); barrier_viewModel.setFromSerial(serial_excel_underlyingCalcID[0]); //this.excel_underlyingCalcIDViewModel_.Add(barrier_viewModel); barrierUnderlyingCalcIDViewModel_ = barrier_viewModel; //returnCalcID string returnType = serial_excel_underlyingCalcID[1].Excel_type_.ValueStr; Excel_underlyingCalcIDViewModel return_viewModel = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(returnType); return_viewModel.setFromSerial(serial_excel_underlyingCalcID[1]); //this.excel_underlyingCalcIDViewModel_.Add(return_viewModel); returnUnderlyingCalcIDViewModel_ = return_viewModel; this.observationStartDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationStartDate_.ValueStr); this.observationEndDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_upInOutCall.ObservationEndDate_.ValueStr); this.descriptionUpdate(); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype serial_Excel_multiAsset_compositeOption_subtype = serial_Class as FpmlSerializedCSharp.Excel_multiAsset_compositeOption_subtype; FpmlSerializedCSharp.Excel_multiAsset_vanillaCallPut serial_Excel_multiAsset_vanillaCallPut = serial_Excel_multiAsset_compositeOption_subtype.Excel_multiAsset_vanillaCallPut_; this.exerciseDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.ExerciseDate_.ValueStr); this.payoffDate_ = StringConverter.xmlDateToDateTime(serial_Excel_multiAsset_vanillaCallPut.PayoffDate_.ValueStr); //this.baseUnderlyingValue_ = serial_Excel_multiAsset_vanillaCallPut.BaseUnderlyingValue_.DoubleValue(); this.callPut_ = Enum.Parse(typeof(CallPutEnum), serial_Excel_multiAsset_vanillaCallPut.CallPut_.ValueStr) as CallPutEnum?; this.baseCoupon_ = (serial_Excel_multiAsset_vanillaCallPut.BaseCoupon_.DoubleValue() * 100.0).ToString(); this.strike_ = (serial_Excel_multiAsset_vanillaCallPut.Strike_.DoubleValue() * 100.0).ToString(); //this.strikeValue_ = serial_Excel_multiAsset_vanillaCallPut.StrikeValue_.DoubleValue(); this.partiRate_ = (serial_Excel_multiAsset_vanillaCallPut.PartiRate_.DoubleValue() * 100.0).ToString(); //this.underlyingCalcType_ = serial_Excel_multiAsset_vanillaCallPut.UnderlyingCalcType_.ValueStr; FpmlSerializedCSharp.Excel_underlyingCalcID serial_returnUnderlyingCalcID = serial_Excel_multiAsset_vanillaCallPut.Excel_underlyingCalcID_; string returnUnderlyingCalcIDtype = serial_returnUnderlyingCalcID.Excel_type_.ValueStr; this.excel_underlyingCalcIDViewModel_ = Excel_underlyingCalcIDViewModel.CreateExcel_underlyingCalcID(returnUnderlyingCalcIDtype); this.excel_underlyingCalcIDViewModel_.setFromSerial(serial_returnUnderlyingCalcID); }