Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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);
        }