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_); }
public CurrencyViewModel Clone() { CurrencyViewModel clone = new CurrencyViewModel(this.currencyCode_, this.currencyString_); clone.SelectedIndex_ = this.SelectedIndex_; return(clone); }
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; }
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; }
public static CurrencyViewModel CreateCurrencyComboViewModel(string type) { //Dictionary<string, string> contractMap = new Dictionary<string, string>(); CurrencyViewModel cvm = new CurrencyViewModel(type, "Unkown"); foreach (var item in ProgramVariable.CurrencyStringList_) { if (item.currencyString_ == type) { cvm = item.Clone(); } } return(cvm); }
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_; }
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_; }
public void Copy(CurrencyViewModel copy) { this.selectedIndex_ = copy.SelectedIndex_; this.currencyCode_ = copy.currencyCode_; this.currencyString_ = copy.currencyString_; }
public CurrencyViewModel Clone() { CurrencyViewModel clone = new CurrencyViewModel(this.currencyCode_, this.currencyString_); clone.SelectedIndex_ = this.SelectedIndex_; return clone; }
public static CurrencyViewModel CreateCurrencyComboViewModel(string type) { //Dictionary<string, string> contractMap = new Dictionary<string, string>(); CurrencyViewModel cvm = new CurrencyViewModel(type, "Unkown"); foreach (var item in ProgramVariable.CurrencyStringList_) { if (item.currencyString_ == type) { cvm = item.Clone(); } } return cvm; }
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_; }
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_; }
public void Copy(CurrencyViewModel copy) { this.selectedIndex_ = copy.SelectedIndex_; this.currencyCode_ = copy.currencyCode_; this.currencyString_ = copy.currencyString_; }
public Excel_yieldCurveViewModel discountCurve(DateTime refDate, CurrencyViewModel cvm) { return(this.discountCurve(refDate, cvm.CurrencyCode_)); }