ActivEarth.DAO.TeamDAO.LockTeam C# (CSharp) Метод

LockTeam() публичный статический Метод

Notes each user's state at the beginning of a contest so that the delta score can be calculated. Sets the initialized flag to true, allowing the calculation of delta scores.
public static LockTeam ( ContestTeam team ) : void
team ActivEarth.Objects.Competition.Contests.ContestTeam
Результат void
        public static void LockTeam(ContestTeam team)
        {
            Statistic statistic = ContestDAO.GetStatisticFromContestId(team.ContestId);

            foreach (ContestTeamMember user in team.Members)
            {
                UserStatistic userStat = UserStatisticDAO.GetStatisticFromUserIdAndStatType(user.UserId, statistic);
                user.InitialScore = (userStat != null ? userStat.Value : 0);
                user.Initialized = true;
            }

            team.IsLocked = true;
            TeamDAO.UpdateTeam(team);
        }