public void PopulateScoreDisplay(int pintScore)
        {
            SurveyScoreCardRange rngMatch = new SurveyScoreCardRange();
            SurveyScoreCard sscThis = new SurveyScoreCard(); // FTKHandler.GetScoreCard();

            foreach (SurveyScoreCardRange rngThis in sscThis.Ranges)
            {
                //From x --> infinity
                if (pintScore >= rngThis.LowerBound && rngThis.UpperBound == null)
                {
                    rngMatch = rngThis;
                    break;
                }
                //From x --> -infinity
                else if (pintScore <= rngThis.UpperBound && rngThis.LowerBound == null)
                {
                    rngMatch = rngThis;
                    break;
                }
                else if (pintScore >= rngThis.LowerBound && pintScore <= rngThis.UpperBound)
                {
                    rngMatch = rngThis;
                    break;
                }
            }

            //ScoreDescription = rngMatch.Message;
            //ScoreColor = rngMatch.RAGRating.ToString();
            RAGRating = rngMatch.RAGRating;
        }
Beispiel #2
0
        public void PopulateScoreDisplay(int pintScore)
        {
            SurveyScoreCardRange rngMatch = new SurveyScoreCardRange();
            SurveyScoreCard      sscThis  = new SurveyScoreCard(); // FTKHandler.GetScoreCard();

            foreach (SurveyScoreCardRange rngThis in sscThis.Ranges)
            {
                //From x --> infinity
                if (pintScore >= rngThis.LowerBound && rngThis.UpperBound == null)
                {
                    rngMatch = rngThis;
                    break;
                }
                //From x --> -infinity
                else if (pintScore <= rngThis.UpperBound && rngThis.LowerBound == null)
                {
                    rngMatch = rngThis;
                    break;
                }
                else if (pintScore >= rngThis.LowerBound && pintScore <= rngThis.UpperBound)
                {
                    rngMatch = rngThis;
                    break;
                }
            }

            //ScoreDescription = rngMatch.Message;
            //ScoreColor = rngMatch.RAGRating.ToString();
            RAGRating = rngMatch.RAGRating;
        }