예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 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)));
 }
예제 #4
0
 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)));
 }
예제 #5
0
 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)));
 }
예제 #6
0
 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)));
 }
예제 #7
0
 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)));
 }
예제 #8
0
 public static void UpdateDataReady(int gameId, DataReady dataReady)
 {
     DataHandlerSina.UpdateDataReady(gameId, dataReady, "FootballSina");
 }
예제 #9
0
 public static List <GameInfo> GetGameInfosByPeriod(string period)
 {
     return(DataHandlerSina.GetGameInfosBySQL(string.Format("SELECT * FROM GameInfo_Daily WHERE periods='{0}' order by serial;", (object)period)));
 }
예제 #10
0
 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)));
 }
예제 #11
0
 public static List <GameInfo> GetGameInfosByDate(DateTime gameTime, string tableName)
 {
     return(DataHandlerSina.GetGameInfosByDate(gameTime.ToString("yyyy-MM-dd"), tableName));
 }
예제 #12
0
 public static List <string> GetAllLeagues(DateTime date)
 {
     return(DataHandlerSina.GetAllLeagues(date, "GameInfo"));
 }
예제 #13
0
 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)));
 }
예제 #14
0
 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)));
 }
예제 #15
0
 public static void UpdateDailyGameInfo(GameInfo game)
 {
     DataHandlerSina.UpdateDailyGameInfo(game, "FootballSina");
 }
예제 #16
0
 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)));
 }
예제 #17
0
 public static void SaveDailyGameInfo(GameInfo game, string leagueId)
 {
     DataHandlerSina.SaveDailyGameInfo(game, leagueId, "FootballSina");
 }
예제 #18
0
 public static void SaveGameCompanyMap(int gameId, string companyList)
 {
     DataHandlerSina.SaveGameCompanyMap(gameId, companyList, "FootballSina");
 }