@model IEnumerable @{ ViewData["Title"] = "High Jump"; var telId = ViewBag.TournamentEventLevelId as int?; var eventName = ViewBag.EventName as string; var levelName = ViewBag.LevelName as string; var registrations = ViewBag.Registrations as IEnumerable; var results = registrations?.Where(r => r.Score != null && r.Score.Placement != null) .OrderBy(r => r.Score!.Placement) .ToList() ?? new List(); }

High Jump Scoring

@eventName - @levelName

@foreach (var height in Model.OrderBy(h => h.Height)) { } @if (registrations != null) { @foreach (var reg in registrations) { @foreach (var height in Model.OrderBy(h => h.Height)) { var attempt = height.Attempts.FirstOrDefault(a => a.EventRegistrationId == reg.EventRegistrationId); } } }
Student School @height.Height.ToString("0.00")m
@reg.StudentName @reg.SchoolName @* One control per attempt slot, pre-selected with the recorded result, so attempts 2 and 3 stay editable after attempt 1 is saved (and mistakes can be corrected). *@ @for (int i = 1; i <= 3; i++) { var current = i == 1 ? attempt?.Attempt1 : i == 2 ? attempt?.Attempt2 : attempt?.Attempt3;
} @if (attempt?.IsEliminated == true) {
OUT }
Results
Best cleared height ranks athletes; points use the World Athletics formula.
@if (results.Any()) { @foreach (var r in results) { }
Place Student School Best Height Points Placement Pts
#@r.Score!.Placement @r.StudentName @r.SchoolName @r.Score.RawPerformance.ToString("0.00")m @r.Score.CalculatedPoints @r.Score.PlacementPoints
} else {

No results yet. Record clearances above, then click Calculate Results to rank athletes and award points.

}