Exemplo n.º 1
0
        public static Excel_underlyingInfoViewModel loadUnderInfo(DateTime refDate, string nameTrans)
        {
            // nameTrans를 가지고 code를 찾음.

            MARKETDATA_SYMBOL_INFO_Table_DAO dao = new MARKETDATA_SYMBOL_INFO_Table_DAO();

            dao.NAME_KOR_ = (nameTrans.Trim()).ToUpper();

            dao.selectNAME_KOR(DataBaseConnectManager.ConnectionFactory("myDB"));

            // 코드를 찾아서 symbol을 로드함.

            // symbol을 통해서 type을 로드함

            // type을 통해서 symbolVM을 만들음

            string underType = dao.SYMBOL_TYPE_;

            Excel_marketDataSymbol e_mds = Excel_loaderViewModel.CreateSymbolViewModel(underType);

            e_mds.setFromDAO(dao);

            Excel_underlyingInfoViewModel e_uivm = e_mds.underlyingInfoVM();

            e_uivm.BasePrice_ = e_mds.dataLoad(Excel_loaderViewModel.availableMarketDataDate(refDate), e_mds.Symbol_);

            return(e_uivm);
        }
        public static Excel_marketDataSymbol getDefinedSymbol(string code)
        {
            MARKETDATA_SYMBOL_INFO_Table_DAO dao = new MARKETDATA_SYMBOL_INFO_Table_DAO();

            dao.SYMBOL_ = code.Trim();

            dao.select(DataBaseConnectManager.ConnectionFactory("myDB"));

            // 코드를 찾아서 symbol을 로드함.

            // symbol을 통해서 type을 로드함

            // type을 통해서 symbolVM을 만들음

            string underType = dao.SYMBOL_TYPE_;

            if (underType == null)
            {
                throw new Exception("symbol doesn't exist in symbolList : " + dao.SYMBOL_);
            }

            Excel_marketDataSymbol e_mds = Excel_loaderViewModel.CreateSymbolViewModel(underType);

            e_mds.setFromDAO(dao);

            return(e_mds);
        }
Exemplo n.º 3
0
        public static Excel_underlyingInfoViewModel loadUnderInfo2(DateTime refDate, string nameTrans)
        {
            // nameTrans를 가지고 code를 찾음.

            try
            {
                MARKETDATA_SYMBOL_INFO_Table_DAO dao = new MARKETDATA_SYMBOL_INFO_Table_DAO();

                dao.SYMBOL_ = nameTrans.Trim();

                dao.select(DataBaseConnectManager.ConnectionFactory("myDB"));

                // 코드를 찾아서 symbol을 로드함.

                // symbol을 통해서 type을 로드함

                // type을 통해서 symbolVM을 만들음

                string underType = dao.SYMBOL_TYPE_;

                if (underType == null)
                {
                    throw new Exception("symbol doesn't exist in symbolList : " + dao.SYMBOL_);
                }

                Excel_marketDataSymbol e_mds = Excel_loaderViewModel.CreateSymbolViewModel(underType);

                e_mds.setFromDAO(dao);

                Excel_underlyingInfoViewModel e_uivm = e_mds.underlyingInfoVM();

                e_uivm.BasePrice_ = e_mds.dataLoad(Excel_loaderViewModel.availableMarketDataDate(refDate), e_mds.Symbol_);

                return(e_uivm);
            }
            catch (Exception)
            {
                throw;
            }
        }