/// <summary> /// This function returns the score type (Above Cutoff, Monitor, Typical, or Error) /// based on the passed values /// </summary> /// <param name="totalScore">The ASQSE total score</param> /// <param name="scoreASQSE">The scoreASQSE object</param> /// <returns>A string with one of the following values: (Above Cutoff, Monitor, Typical, or Error)</returns> public static string GetASQSEScoreType(int totalScore, ScoreASQSE scoreASQSE) { string scoreType = ""; //Check to see how the score relates to the cutoff score if (totalScore > scoreASQSE.CutoffScore) { scoreType = "Above Cutoff"; } else if (totalScore >= scoreASQSE.MonitoringScoreStart && totalScore <= scoreASQSE.MonitoringScoreEnd) { scoreType = "Monitor"; } else if (totalScore >= 0 && totalScore < scoreASQSE.MonitoringScoreStart) { scoreType = "Well Below"; } else { scoreType = "Error!"; } //Return the score type return(scoreType); }
/// <summary> /// This method updates the cutoff score label using the passed parameters /// </summary> /// <param name="scoreASQSE">The ScoreASQSE object</param> private void UpdateCutoffAndMonitoringLabels(ScoreASQSE scoreASQSE) { //Set the monitoring zone label lblMonitoringZone.Text = scoreASQSE.MonitoringScoreStart.ToString() + " - " + scoreASQSE.MonitoringScoreEnd.ToString(); //Set the cutoff score label lblCutoffScore.Text = scoreASQSE.CutoffScore.ToString(); }
/// <summary> /// This method updates the score type label using the passed parameters /// </summary> /// <param name="totalScore">The total ASQSE score</param> /// <param name="scoreASQSE">The ScoreASQSE object</param> private void UpdateScoreType(int totalScore, ScoreASQSE scoreASQSE) { lblScoreType.Text = Utilities.GetASQSEScoreType(totalScore, scoreASQSE); }