Пример #1
0
        public static bool ScoutedMatch(Data.ApplicationDbContext context, string ScoutedMatchID, string Username)
        {
            IList <ScoutedMatch> ScoutedMatches = new List <ScoutedMatch>();

            ScoutedMatches = context.ScoutedMatch.AsNoTracking().ToList();
            foreach (var ScoutedMatch in ScoutedMatches)
            {
                if (ScoutedMatch.ID == ScoutedMatchID && AuthorizationCheck.Team(context, ScoutedMatch.TeamID, Username))
                {
                    return(true);
                }
            }
            return(false);
        }
Пример #2
0
        public static bool Team(SkystoneScouting.Data.ApplicationDbContext context, string TeamID, string Username)
        {
            IList <Team> Teams = new List <Team>();

            Teams = context.Team.AsNoTracking().ToList();
            foreach (var Team in Teams)
            {
                if (Team.ID == TeamID && AuthorizationCheck.Event(context, Team.EventID, Username))
                {
                    return(true);
                }
            }
            return(false);
        }
Пример #3
0
        public static bool OfficialMatch(SkystoneScouting.Data.ApplicationDbContext context, string OfficialMatchID, string Username)
        {
            IList <OfficialMatch> OfficialMatches = new List <OfficialMatch>();

            OfficialMatches = context.OfficialMatch.AsNoTracking().ToList();
            foreach (var OfficialMatch in OfficialMatches)
            {
                if (OfficialMatch.ID == OfficialMatchID && AuthorizationCheck.Event(context, OfficialMatch.EventID, Username))
                {
                    return(true);
                }
            }
            return(false);
        }