public static ContractComboViewModel CreateContractComboViewModel(string type) { //Dictionary<string, string> contractMap = new Dictionary<string, string>(); ContractComboViewModel ccvm = new ContractComboViewModel(type, "Unkown"); foreach (var item in ProgramVariable.ContractComboDisplayStrList_) { if (item.ContractComboCode_ == type) { ccvm = item; } } return(ccvm); }
public static ContractComboViewModel CreateContractComboViewModel(string type) { //Dictionary<string, string> contractMap = new Dictionary<string, string>(); ContractComboViewModel ccvm = new ContractComboViewModel(type, "Unkown"); foreach (var item in ProgramVariable.ContractComboDisplayStrList_) { if (item.ContractComboCode_ == type) { ccvm = item; } } return ccvm; }
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_; }