Example #1
0
        public static DataTable GetVideos()
        {
            var sql = "SELECT * FROM Arsenal_Video ORDER BY GoalYear DESC, GoalRank DESC, TeamworkRank DESC";

            var ds = SqlHelper.ExecuteDataset(SQLConn.GetConnection(), CommandType.Text, sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            return(ds.Tables[0]);
        }
Example #2
0
        public static DataTable GetPlayers()
        {
            var sql = "SELECT * FROM Arsenal_Player ORDER BY IsLegend, IsLoan, SquadNumber, LastName";

            var ds = SqlHelper.ExecuteDataset(SQLConn.GetConnection(), CommandType.Text, sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            return(ds.Tables[0]);
        }
Example #3
0
        public static DataTable GetMatches()
        {
            var sql = "SELECT * FROM Arsenal_Match ORDER BY PlayTime DESC";

            var ds = SqlHelper.ExecuteDataset(SQLConn.GetConnection(), CommandType.Text, sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            return(ds.Tables[0]);
        }
Example #4
0
        //public static DataRow GetTeamByID(Guid teamGuid)
        //{
        //    string sql = "SELECT * FROM dbo.Arsenal_Team WHERE TeamGuid = @guid";

        //    DataSet ds = SqlHelper.ExecuteDataset(SQLConn.GetConnection(), CommandType.Text, sql, new SqlParameter("@guid", teamGuid));

        //    if (ds.Tables[0].Rows.Count == 0)
        //        return null;
        //    else
        //        return ds.Tables[0].Rows[0];
        //}

        public static DataTable GetTeams()
        {
            var sql = "SELECT * FROM Arsenal_Team ORDER BY TeamEnglishName";

            var ds = SqlHelper.ExecuteDataset(SQLConn.GetConnection(), CommandType.Text, sql);

            if (ds.Tables[0].Rows.Count == 0)
            {
                return(null);
            }
            return(ds.Tables[0]);
        }
Example #5
0
        public static bool ExistRelationLeagueTeam(Guid teamGuid, Guid leagueGuid)
        {
            var sql = "SELECT * FROM Arsenal_RelationLeagueTeam WHERE TeamGuid = @teamGuid AND LeagueGuid = @leagueGuid";

            SqlParameter[] para =
            {
                new SqlParameter("@teamGuid",   teamGuid),
                new SqlParameter("@leagueGuid", leagueGuid)
            };

            var ds = SqlHelper.ExecuteDataset(SQLConn.GetConnection(), CommandType.Text, sql, para);

            return(ds.Tables[0].Rows.Count > 0);
        }