Exemplo n.º 1
0
 public LeaderboardResult(RawResult input)
 {
     result_id    = Convert.ToInt32(input.result_id);
     student_name = input.student_name;
     time         = GetResultsHelper.FormatTime(Convert.ToDecimal(input.time));
     school_name  = input.school_name;
     ranked       = Convert.ToBoolean(Convert.ToInt32(input.ranked)); //input can be 0 or 1
 }
Exemplo n.º 2
0
 public AdminResult(RawResult input)
 {
     //TODO: display formatting
     result_id    = Convert.ToInt32(input.result_id);
     student_name = input.student_name;
     date         = input.date;
     time         = GetResultsHelper.FormatTime(Convert.ToDecimal(input.time));
     school_name  = input.school_name;
     sortableDate = input.date; //this may change
     sortableTime = Convert.ToDouble(input.time);
 }
Exemplo n.º 3
0
 public PrivateResult(Result input, List <string> missedObstacles)
 {
     result_id    = Convert.ToInt32(input.result_id);
     student_name = input.student_name;
     date         = input.date;
     time         = GetResultsHelper.FormatTime(input.time);
     sortableDate = input.date;
     sortableTime = Convert.ToDouble(input.time);
     if (missedObstacles == null || missedObstacles.Count == 0)
     {
         missedObstacle = false;
     }
     else
     {
         missedObstacle       = true;
         this.missedObstacles = missedObstacles;
     }
 }