예제 #1
0
        private void Init(int id, ScoreCriterion scoreCriterion)
        {
            if (scoreCriterion == null)
            {
                throw new ApplicationException("Scorable score criterion cannot be created without score criterion.");
            }

            Id             = id;
            ScoreCriterion = scoreCriterion;
            Score          = scoreCriterion.ScoreRange.Min;
            Comment        = "";
        }
예제 #2
0
        protected string GetComment(TalentShow.ScoreCard scoreCard, TalentShow.ScoreCriterion scoreCriterion)
        {
            string comment = "";

            if (scoreCard != null)
            {
                var scorableCriterion = scoreCard.ScorableCriteria.FirstOrDefault(s => s.ScoreCriterion.Id == scoreCriterion.Id);

                if (scorableCriterion != null)
                {
                    comment = scorableCriterion.Comment;
                }
            }

            return(comment);
        }
예제 #3
0
        protected double GetScore(TalentShow.ScoreCard scoreCard, TalentShow.ScoreCriterion scoreCriterion)
        {
            double score = 0;

            if (scoreCard != null)
            {
                var scorableCriterion = scoreCard.ScorableCriteria.FirstOrDefault(s => s.ScoreCriterion.Id == scoreCriterion.Id);

                if (scorableCriterion != null)
                {
                    score = scorableCriterion.Score;
                }
            }

            return(score);
        }
예제 #4
0
 public ScorableCriterion(ScoreCriterion scoreCriterion)
 {
     Init(0, scoreCriterion);
 }
예제 #5
0
 public ScorableCriterion(int id, ScoreCriterion scoreCriterion)
 {
     Init(id, scoreCriterion);
 }
예제 #6
0
 private string GetScoreCriterionDescriptionText(TalentShow.ScoreCriterion scoreCriterion)
 {
     return("Min: " + scoreCriterion.ScoreRange.Min + " Max: " + scoreCriterion.ScoreRange.Max);
 }
예제 #7
0
 private string GetScoreCriterionHeadingText(TalentShow.ScoreCriterion scoreCriterion)
 {
     return(scoreCriterion.CriterionDescription);
 }