示例#1
0
        private static ClassResultRow CreateClassResultRow(int correct, int incorrect)
        {
            var classResultRow = new ClassResultRow();

            classResultRow.Correct           = correct;
            classResultRow.Incorrect         = incorrect;
            classResultRow.Count             = correct + incorrect;
            classResultRow.LearningObjective = "xyz";
            classResultRow.Subject           = "aabbcc";
            classResultRow.PercentCorrect    = (correct * 100) / (correct + incorrect);
            return(classResultRow);
        }
 private TableRowViewModel CreateTableRow(ClassResultRow row)
 {
     return(new TableRowViewModel()
     {
         Subject = row.Subject,
         LearningObjective = row.LearningObjective,
         Count = row.Count.ToString(),
         Correct = row.Correct.ToString(),
         Incorrect = row.Incorrect.ToString(),
         PercentCorrect = row.PercentCorrect.ToString(),
         PercentCssClass = GetCssClass(row.PercentCorrect)
     });
 }