Пример #1
0
        void LoadProductInfoFromCorrel(String strTicker)
        {
            DBManager dbManager = new DBManager();
            MySqlConnection con = null;

            try
            {
                String ip = CommonConfig.DB_SERVER_IP;
                con = dbManager.CreateConnection(ip, CommonConfig.DATABASE_CORREL);
                con.Open();

                LoadProductInfoFromCorrel_Raw(con, strTicker);
                LoadCombFutureMappingFromCorre_Raw(con, strTicker);

                Write("상품정보를 읽어오기를 실행하였습니다.");
            }
            catch (System.Exception e)
            {
                Error(e.ToString());
            }
            finally
            {
                dbManager.Close(con);
            }
        }
Пример #2
0
        void LoadProductInfoFromComdty()
        {
            DBManager dbManager = new DBManager();
            MySqlConnection con = null;

            try
            {
                String ip = CommonConfig.DB_SERVER_IP;
                con = dbManager.CreateConnection(ip, CommonConfig.DATABASE_COMDTY);
                con.Open();

                LoadProductInfoFromComdty_Raw(con);

                Write("상품정보를 읽어오기를 실행하였습니다.");
            }
            catch (System.Exception e)
            {
                Error(e.ToString());
            }
            finally
            {
                dbManager.Close(con);
            }
        }
Пример #3
0
        void FeedHistoryData(String strTicker)
        {
            DBManager dbManager = new DBManager();
            MySqlConnection con = null;
            MySqlTransaction trans = null;

            try
            {
                String ip = CommonConfig.DB_SERVER_IP;
                con = dbManager.CreateConnection(ip, CommonConfig.DATABASE_CORREL);
                con.Open();
                trans = con.BeginTransaction();

                DeleteHistoryData_Raw(con, strTicker);
                FeedHistoryData_Raw(con);

                trans.Commit();
                Write("Feed History Data is success...");
            }
            catch (System.Exception e)
            {
                trans.Rollback();
                Error(e.ToString());
            }
            finally
            {
                dbManager.Close(con);
            }
        }
Пример #4
0
        Boolean FeedProductInfo(String strTicker, String strDescription, String strBaseCurncy, double dOnePointAmount)
        {
            // 상품 정보를 입력한다.
            DBManager dbManager = new DBManager();
            MySqlConnection con = null;

            try
            {
                String ip = CommonConfig.DB_SERVER_IP;
                con = dbManager.CreateConnection(ip, CommonConfig.DATABASE_CORREL);
                con.Open();

                return FeedProductInfo_Raw(con, strTicker, strDescription, strBaseCurncy, dOnePointAmount);
            }
            catch (System.Exception e)
            {
                Error(e.ToString());
            }
            finally
            {
                dbManager.Close(con);
            }
            return false;
        }
Пример #5
0
        void UpdateComdty_Book()
        {
            DBManager dbManager = new DBManager();
            MySqlConnection con = null;
            MySqlTransaction trans = null;

            try
            {
                String ip = CommonConfig.DB_SERVER_IP;
                con = dbManager.CreateConnection(ip, CommonConfig.DATABASE_COMDTY);
                con.Open();
                trans = con.BeginTransaction();

                DeleteComdty_BookCodeTable_Raw(con);
                FeedComdty_BookCodeTable_Raw(con);

                trans.Commit();
                Write("Feed Product Data is success...");
            }
            catch (System.Exception e)
            {
                trans.Rollback();
                Error(e.ToString());
            }
            finally
            {
                dbManager.Close(con);
            }
        }