예제 #1
0
        public override void buildFromTradeString(TradeString tradeString)
        {
            string typeStr = tradeString.InstType_;

            //this.excel_issueInfoViewModel_.Notional_ = tradeString.Notional_;
            this.excel_issueInfoViewModel_.Notional_ = "10000";
            this.excel_issueInfoViewModel_.Currency_ = CurrencyViewModel.CreateCurrencyComboViewModel("KRW");

            this.excel_underlyingCalcInfoViewModel_.buildFromTradeString(tradeString);

            this.excel_hifive_subtypeViewModel_ = Excel_hifive_subtypeViewModel.CreateExcel_hifive_subtype(typeStr);

            this.excel_hifive_subtypeViewModel_.EffectiveDate_ = StringConverter.xmlDateToDateTime(tradeString.EffectiveDate_);

            this.excel_hifive_subtypeViewModel_.ProductString_ = tradeString.ProductString_;

            this.excel_hifive_subtypeViewModel_.scheduleDataGenerate();

            this.excel_hifive_subtypeViewModel_.Excel_underlyingCalcInfoViewModel_
                = this.Excel_underlyingCalcInfoViewModel_;

            //this.Excel_issueInfoViewModel_.EffectiveDate_ = this.excel_hifive_subtypeViewModel_.EffectiveDate_ = ;
            //this.excel_hifive_subtypeViewModel_.MaturityDate_ = this.Excel_issueInfoViewModel_.MaturityDate_;

            this.updateFromSubType(this.excel_hifive_subtypeViewModel_);
        }
예제 #2
0
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_issueInfo   serial_Excel_issueInfo   = serial_Class as FpmlSerializedCSharp.Excel_issueInfo;
            FpmlSerializedCSharp.Excel_swapLegInfo serial_Excel_swapLegInfo = serial_Excel_issueInfo.Excel_swapLegInfo_;

            this.notional_        = serial_Excel_swapLegInfo.Notional_.ValueStr;
            this.currency_        = CurrencyViewModel.CreateCurrencyComboViewModel(serial_Excel_swapLegInfo.Currency_.ValueStr);
            this.vba_description_ = serial_Excel_swapLegInfo.Vba_description_.ValueStr;
            //this.premium_ = serial_Excel_swapLegInfo.Premium_.ValueStr;
        }
        public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Fx_exchangeLeg serial_Fx_exchangeLeg = serial_Class as FpmlSerializedCSharp.Fx_exchangeLeg;

            this.targetNotional_  = serial_Fx_exchangeLeg.TargetNotional_.ValueStr;
            this.targetCurrency_  = CurrencyViewModel.CreateCurrencyComboViewModel(serial_Fx_exchangeLeg.TargetCurrency_.ValueStr);
            this.baseNotional_    = serial_Fx_exchangeLeg.BaseNotional_.ValueStr;
            this.baseCurrency_    = CurrencyViewModel.CreateCurrencyComboViewModel(serial_Fx_exchangeLeg.BaseCurrency_.ValueStr);
            this.exchangeType_    = serial_Fx_exchangeLeg.ExchangeType_.ValueStr;
            this.exchangeRate_    = serial_Fx_exchangeLeg.ExchangeRate_.ValueStr;
            this.calculationDate_ = StringConverter.dbDateToDateTime(serial_Fx_exchangeLeg.CalculationDate_.ValueStr);
            this.paymentDays_     = serial_Fx_exchangeLeg.PaymentDays_.ValueStr;
            this.paymentDate_     = StringConverter.dbDateToDateTime(serial_Fx_exchangeLeg.PaymentDate_.ValueStr);
            this.forwardPoint_    = serial_Fx_exchangeLeg.ForwardPoint_.ValueStr;
        }
예제 #4
0
        public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class)
        {
            FpmlSerializedCSharp.Excel_issueInfo serial_Excel_issueInfo = serial_Class as FpmlSerializedCSharp.Excel_issueInfo;
            FpmlSerializedCSharp.Excel_swapInfo  serial_Excel_swapInfo  = serial_Excel_issueInfo.Excel_swapInfo_;

            //this.tradeDate_ = DateTime.ParseExact(serial_Excel_swapInfo.TradeDate_.ValueStr, StringFormat.XmlDateFormat_, null);
            this.effectiveDate_ = DateTime.ParseExact(serial_Excel_swapInfo.EffectiveDate_.ValueStr, StringFormat.XmlDateFormat_, null);
            this.maturityDate_  = DateTime.ParseExact(serial_Excel_swapInfo.MaturityDate_.ValueStr, StringFormat.XmlDateFormat_, null);

            this.notional_ = serial_Excel_swapInfo.Notional_.ValueStr;
            this.premium_  = serial_Excel_swapInfo.Premium_.ValueStr;

            this.currency_        = CurrencyViewModel.CreateCurrencyComboViewModel(serial_Excel_swapInfo.Currency_.ValueStr);
            this.vba_description_ = serial_Excel_swapInfo.Vba_description_.ValueStr;
        }
예제 #5
0
 private void defaultPropertiesLoad()
 {
     // bussiness logic here
     //this.item_code_ = dao.ITEM_CODE_;
     this.item_name_       = "Input Name";
     this.notional_        = "100,000,000";
     this.remain_notional_ = "100,000,000";
     this.currency_        = CurrencyViewModel.CreateCurrencyComboViewModel("KRW");
     this.Trade_date_      = DateTime.Now;
     this.Maturity_date_   = DateTime.Now.AddYears(1);
     this.counterparty_    = "Other CounterParty";
     this.export_itemcode_ = "export_itemCode";
     //this.trade_id_ = dao.TRADE_ID_;
     //this.trade_status_ = dao.TRADE_STATUS_;
     //this.instrument_type_ = dao.INSTRUMENT_TYPE_;
     this.underlying_type_ = UnderlyingComboViewModel.CreateContractComboViewModel("IR");
     //this.underlying_detail_type_ = UnderlyingComboViewModel.CreateContractComboViewModel("");
     this.contract_type_    = ContractComboViewModel.CreateContractComboViewModel("OTCContract");
     this.contract_subtype_ = ContractSubComboViewModel.CreateContractSubComboViewModel("Option");
     //this.contract_detail_type_ = "";
     //this.booking_type_ = dao.BOOKING_TYPE_;
 }
예제 #6
0
 public void setFromDAO(MATSER_INFO_Table_DAO dao)
 {
     // bussiness logic here
     this.item_code_              = dao.ITEM_CODE_;
     this.item_name_              = dao.ITEM_NAME_;
     this.notional_               = dao.NOTIONAL_;
     this.remain_notional_        = dao.REMAIN_NOTIONAL_;
     this.currency_               = CurrencyViewModel.CreateCurrencyComboViewModel(dao.CURRENCY_);
     this.Trade_date_             = DateTime.ParseExact(dao.TRADE_DATE_, "yyyyMMdd", null);
     this.Maturity_date_          = DateTime.ParseExact(dao.MATURITY_DATE_, "yyyyMMdd", null);
     this.counterparty_           = dao.COUNTERPARTY_;
     this.export_itemcode_        = dao.EXPORT_ITEMCODE_;
     this.trade_id_               = dao.TRADE_ID_;
     this.trade_status_           = dao.TRADE_STATUS_;
     this.instrument_type_        = dao.INSTRUMENT_TYPE_;
     this.underlying_type_        = UnderlyingComboViewModel.CreateContractComboViewModel(dao.UNDERLYING_TYPE_);
     this.underlying_detail_type_ = dao.UNDERLYING_DETAIL_TYPE_;
     this.contract_type_          = ContractComboViewModel.CreateContractComboViewModel(dao.CONTRACT_TYPE_);
     this.contract_subtype_       = ContractSubComboViewModel.CreateContractSubComboViewModel(dao.CONTRACT_SUBTYPE_);
     this.contract_detail_type_   = dao.CONTRACT_DETAIL_TYPE_;
     this.booking_type_           = dao.BOOKING_TYPE_;
 }