public static Stack <OddsInfo> GetOddsInfo(string sql) { Stack <OddsInfo> stack = new Stack <OddsInfo>(); using (IDataReader reader = (IDataReader)SqlServerHelper.ExecuteReader(CommandType.Text, sql, new SqlParameter[0])) { while (reader.Read()) { OddsInfo oddsInfo = DataHandlerSina.RetrieveOddsInfo(reader); stack.Push(oddsInfo); } return(stack); } }
private static List <GameInfo> GetGameInfosBySQL2(string sql) { List <GameInfo> list = new List <GameInfo>(); using (IDataReader reader = (IDataReader)SqlServerHelper.ExecuteReader(CommandType.Text, sql, new SqlParameter[0])) { while (reader.Read()) { GameInfo gameInfo = DataHandlerSina.RetrieveGameInfo2(reader); list.Add(gameInfo); } return(list); } }
public static Stack <OddsInfo> GetCustomOddsInfoByGame(int gameId, string tableName, int idType) { return(DataHandlerSina.GetOddsInfo(string.Format("SELECT * FROM {1} WHERE game_id='{0}' AND company_id IN (SELECT company_id FROM CustomCompanyList WHERE id = {2}) order by update_time desc;", (object)gameId, (object)tableName, (object)idType))); }
public static Stack <OddsInfo> GetNotExchangeOddsInfoByGame(int gameId, string tableName) { return(DataHandlerSina.GetOddsInfo(string.Format("SELECT * FROM {1} WHERE game_id='{0}' AND company_id IN (SELECT company_id FROM CompanyInfo WHERE is_leading != 2) order by update_time desc;", (object)gameId, (object)tableName))); }
public static Stack <OddsInfo> GetAllOddsInfoByGame(int gameId, string tableName) { return(DataHandlerSina.GetOddsInfo(string.Format("SELECT * FROM {1} WHERE game_id='{0}' order by update_time desc;", (object)gameId, (object)tableName))); }
public static List <GameInfo> GetGameInfosByPeriodAndLeague(string period, string League) { return(DataHandlerSina.GetGameInfosBySQL(string.Format("SELECT * FROM GameInfo_Daily WHERE periods='{0}' AND league_name='{1}' order by serial;", (object)period, (object)League))); }
public static List <GameInfo> GetGameInfosByDateAndLeague(DateTime gameTime, string League, string tableName) { return(DataHandlerSina.GetGameInfosBySQL(string.Format("SELECT * FROM {2} WHERE CAST(game_time as date)='{0}' AND league_name='{1}';", (object)gameTime.ToString("yyyy-MM-dd"), (object)League, (object)tableName))); }
public static void UpdateDataReady(int gameId, DataReady dataReady) { DataHandlerSina.UpdateDataReady(gameId, dataReady, "FootballSina"); }
public static List <GameInfo> GetGameInfosByPeriod(string period) { return(DataHandlerSina.GetGameInfosBySQL(string.Format("SELECT * FROM GameInfo_Daily WHERE periods='{0}' order by serial;", (object)period))); }
public static List <GameInfo> GetGameInfosByDate(string gameTime, string tableName) { return(DataHandlerSina.GetGameInfosBySQL(string.Format("SELECT * FROM {1} WHERE CAST(game_time as date)='{0}';", (object)gameTime, (object)tableName))); }
public static List <GameInfo> GetGameInfosByDate(DateTime gameTime, string tableName) { return(DataHandlerSina.GetGameInfosByDate(gameTime.ToString("yyyy-MM-dd"), tableName)); }
public static List <string> GetAllLeagues(DateTime date) { return(DataHandlerSina.GetAllLeagues(date, "GameInfo")); }
public static List <GameInfo> GetDailyGameInfos(DataReady dataReady) { return(DataHandlerSina.GetGameInfosBySQL2(string.Format("SELECT * FROM FootballSinaDaily.dbo.GameInfo_Daily g left join FootballSinaDaily.dbo.GameCompanyMap c on g.id=c.game_id WHERE data_ready={0};", (object)dataReady))); }
public static List <GameInfo> GetGameInfos(DataReady dataReady) { return(DataHandlerSina.GetGameInfosBySQL(string.Format("SELECT * FROM GameInfo g left join GameCompanyMap c on g.id=c.game_id WHERE data_ready={0};", (object)dataReady))); }
public static void UpdateDailyGameInfo(GameInfo game) { DataHandlerSina.UpdateDailyGameInfo(game, "FootballSina"); }
public static List <GameInfo> GetGameInfosByPeriod(string period, string tableName) { return(DataHandlerSina.GetGameInfosBySQL(string.Format("SELECT * FROM {1} WHERE periods='{0}' order by serial;", (object)period, (object)tableName))); }
public static void SaveDailyGameInfo(GameInfo game, string leagueId) { DataHandlerSina.SaveDailyGameInfo(game, leagueId, "FootballSina"); }
public static void SaveGameCompanyMap(int gameId, string companyList) { DataHandlerSina.SaveGameCompanyMap(gameId, companyList, "FootballSina"); }