private bool EditAvailableParticipants(ContestBindingModel model, Contest contest)
        {
            contest.RegisteredParticipants.Clear();

            if (model.ParticipationStrategyEnum == ParticipationStrategyEnum.Closed)
            {
                if (model.Participants == null || !model.Participants.Any())
                {
                    this.AddNotification("Please select participants.", NotificationType.ERROR);
                    return false;
                }

                var participants =
                    this.Data.Users.GetAll().Where(u => model.Participants.Contains(u.UserName)).ToList();

                contest.RegisteredParticipants = new List<User>(participants);
                contest.IsOpen = false;
            }
            else
            {
                contest.IsOpen = true;
            }

            contest.ParticipationStrategyEnum = model.ParticipationStrategyEnum;
            return true;
        }
        private bool EditDeadlineStartegy(ContestBindingModel model, Contest contest)
        {
            if (model.DeadlineStrategyEnum == DeadlineStrategyEnum.EndDate)
            {
                contest.EndDate = model.EndDate;
                contest.ParticipantsLimit = null;
            }
            else
            {
                contest.ParticipantsLimit = model.ParticipantsLimit;
                contest.EndDate = null;
            }

            contest.DeadlineStrategyEnum = model.DeadlineStrategyEnum;

            return true;
        }
        private bool EditRewardStrategy(ContestBindingModel model, Contest contest)
        {
            if (model.RewardStrategyEnum == RewardStrategyEnum.MultipleWinners)
            {
                if (model.NumberOfWinners != null)
                {
                    contest.NumberOfWinners = (int)model.NumberOfWinners;
                }
            }
            else
            {
                contest.NumberOfWinners = 1;
            }

            contest.RewardStrategyEnum = model.RewardStrategyEnum;

            return true;
        }
        private bool EditAvailableVoters(ContestBindingModel model, Contest contest)
        {
            contest.RegisteredVoters.Clear();

            if (model.VotingStrategyEnum == VotingStrategyEnum.Closed)
            {
                if (model.Voters == null || !model.Voters.Any())
                {
                    this.AddNotification("Please select voters.", NotificationType.ERROR);
                    return false;
                }

                var voters = this.Data.Users.GetAll().Where(u => model.Voters.Contains(u.UserName)).ToList();

                contest.RegisteredVoters = new List<User>(voters);
            }

            contest.VotingStrategyEnum = model.VotingStrategyEnum;
            return true;
        }