Exemplo n.º 1
0
        private string GetRiskRatingText(IssueRiskConsequence issueConsequence, IssueRiskLikelihood issueLikelihood)
        {
            if (issueConsequence != null && issueLikelihood != null)
            {
                IssueRiskMatrix riskMatrix = GetRiskMatrix(issueConsequence.ConsequenceRatingId, issueLikelihood.Id);

                if (riskMatrix != null)
                {
                    return String.Format("{0} - {1}", riskMatrix.RiskRatingNumber, riskMatrix.IssueRiskRating.Name);
                }
            }
            return null;
        }
Exemplo n.º 2
0
 private Brush GetRiskRatingColour(IssueRiskConsequence issueConsequence, IssueRiskLikelihood issueLikelihood)
 {
     if (issueConsequence != null && issueLikelihood != null)
     {
         IssueRiskMatrix riskMatrix = GetRiskMatrix(issueConsequence.ConsequenceRatingId, issueLikelihood.Id);
         if (riskMatrix != null)
         {
             SolidColorBrush solidColorBrush = new SolidColorBrush();
             solidColorBrush.Color = Color.FromArgb(255, (byte)riskMatrix.IssueRiskRating.ColourRed, (byte)riskMatrix.IssueRiskRating.ColourGreen, (byte)riskMatrix.IssueRiskRating.ColourBlue);
             return solidColorBrush;
         }
     }
     return null;
 }