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); } }
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); } }
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); } }
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; }
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); } }