Exemplo n.º 1
0
        public Excel_instrument_fxForwardViewModel(bool bookingMode = false)
            : base(bookingMode)
        {
            this.booking_type_ = "fxForward";

            if (bookingMode)
            {
                this.bookingModelSetting();

                this.masterInformationViewModel_.Underlying_type_ =
                    UnderlyingComboViewModel.CreateContractComboViewModel("Foreign");

                this.masterInformationViewModel_.Contract_subtype_
                    = ContractSubComboViewModel.CreateContractSubComboViewModel("Forward");
            }

            this.Excel_interfaceViewModel_ = Excel_InterfaceLoader.Load(this.booking_type_);
            this.Excel_parameterViewModel_ = Excel_parameterLoader.Load(this.booking_type_);

            EngineType engineType = ProgramVariable.CurrenctPricingMethodSettingManager_.FxForwardEnginType_;

            //this.linkEventPass();

            //this.view_.DataContext = this;
        }
        public static UnderlyingComboViewModel CreateContractComboViewModel(string type)
        {
            //Dictionary<string, string> contractMap = new Dictionary<string, string>();

            UnderlyingComboViewModel ucvm = new UnderlyingComboViewModel(type, "Unkown");

            foreach (var item in ProgramVariable.UnderlyingComboDisplayStrList_)
            {
                if (item.UnderlyingComboCode_ == type)
                {
                    ucvm = item;
                }
            }

            return(ucvm);
        }
        public static UnderlyingComboViewModel CreateContractComboViewModel(string type)
        {
            //Dictionary<string, string> contractMap = new Dictionary<string, string>();

            UnderlyingComboViewModel ucvm = new UnderlyingComboViewModel(type, "Unkown");

            foreach (var item in ProgramVariable.UnderlyingComboDisplayStrList_)
            {
                if (item.UnderlyingComboCode_ == type)
                {
                    ucvm = item;
                }
            }

            return ucvm;
        }
Exemplo n.º 4
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_;
 }
Exemplo n.º 5
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_;
 }
 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_;
     
 }