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 = ""; }
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); }
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); }
public ScorableCriterion(ScoreCriterion scoreCriterion) { Init(0, scoreCriterion); }
public ScorableCriterion(int id, ScoreCriterion scoreCriterion) { Init(id, scoreCriterion); }
private string GetScoreCriterionDescriptionText(TalentShow.ScoreCriterion scoreCriterion) { return("Min: " + scoreCriterion.ScoreRange.Min + " Max: " + scoreCriterion.ScoreRange.Max); }
private string GetScoreCriterionHeadingText(TalentShow.ScoreCriterion scoreCriterion) { return(scoreCriterion.CriterionDescription); }