﻿@model IEnumerable<APFT>

<div class="page-header">
    <h1>APFT @Html.ActionLink("Add New", "New", "APFT", null, new { @class = "btn btn-default" })</h1>
</div>

<table class="table table-striped" id="dt">
    <thead>
        <tr>
            <th>Soldier</th>
            <th>Date</th>
            <th>Score</th>
            <th>Result</th>
            <th>Details</th>
        </tr>
    </thead>

    <tbody>
        @foreach (var model in Model)
        {
            <tr>
                <td>@Html.DisplayFor(_ => model.Soldier)</td>
                <td>
                    <a href="@Url.Action("Index", new { date = model.Date })">
                        @Html.DisplayFor(_ => model.Date)
                    </a>
                </td>
                <td>
                    @Html.DisplayFor(_ => model.TotalScore)
                    @if(model.IsAlternateAerobicEvent)
                    {
                        <span class="label">Alt. Aerobic</span>
                    }
                </td>
                <td>
                    @if (model.IsPassing)
                    {
                        <span class="label label-success">Passing</span>
                    }
                    else
                    {
                        <span class="label label-danger">Failure</span>
                    }
                </td>
                <td>@Html.ActionLink("Details", "Details", new { model.Id })</td>
            </tr>
        }
    </tbody>
</table>
﻿@model IEnumerable<APFT>

<div class="page-header">
    <h1>APFT @Html.ActionLink("Add New", "New", "APFT", null, new { @class = "btn btn-default" })</h1>
</div>

<table class="table table-striped" id="dt">
    <thead>
        <tr>
            <th>Soldier</th>
            <th>Date</th>
            <th>Score</th>
            <th>Result</th>
            <th>Details</th>
        </tr>
    </thead>

    <tbody>
        @foreach (var model in Model)
        {
            <tr>
                <td>@Html.DisplayFor(_ => model.Soldier)</td>
                <td>
                    <a href="@Url.Action("Index", new { date = model.Date })">
                        @Html.DisplayFor(_ => model.Date)
                    </a>
                </td>
                <td data-sort="@model.TotalScore">
                    @Html.DisplayFor(_ => model.TotalScore)
                    @if(model.IsAlternateAerobicEvent)
                    {
                        <span class="label">Alt. Aerobic</span>
                    }
                </td>
                <td>
                    @if (model.IsPassing)
                    {
                        <span class="label label-success">Passing</span>
                    }
                    else
                    {
                        <span class="label label-danger">Failure</span>
                    }
                </td>
                <td>@Html.ActionLink("Details", "Details", new { model.Id })</td>
            </tr>
        }
    </tbody>
</table>
Fix APFT list sort by score
Fix APFT list sort by score
