73 lines
2.5 KiB
Plaintext
73 lines
2.5 KiB
Plaintext
@model WeeklyPartChanges
|
|
|
|
@{
|
|
ViewData["Title"] = "Weekly Part Changes | Mesa Reporting Services";
|
|
}
|
|
|
|
<partial name="_BreadCrumbs" />
|
|
|
|
<h1 class="text-center">Weekly Part Changes</h1>
|
|
|
|
<div>
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<p>Number of Part Changes: @Model.TotalPartChanges</p>
|
|
</div>
|
|
<div class="col-6">
|
|
<p class="text-end">@Model.StartDate - @Model.EndDate</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Reactor</th>
|
|
<th scope="col">PSN</th>
|
|
<th scope="col">WO_COUNT</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@for (int i = 0; i < Model.ReactorPSNWORuns.Count; i++)
|
|
{
|
|
int count = 1;
|
|
bool doesMatch = false;
|
|
|
|
if (i + count < Model.ReactorPSNWORuns.Count)
|
|
doesMatch = Model.ReactorPSNWORuns[i].REACTOR == Model.ReactorPSNWORuns[i + count].REACTOR;
|
|
|
|
while (doesMatch)
|
|
{
|
|
count++;
|
|
if (i + count < Model.ReactorPSNWORuns.Count)
|
|
doesMatch = Model.ReactorPSNWORuns[i].REACTOR == Model.ReactorPSNWORuns[i + count].REACTOR;
|
|
else
|
|
doesMatch = false;
|
|
}
|
|
|
|
for (int j = 0; j < count; j++)
|
|
{
|
|
string tableColor = "";
|
|
|
|
if (count > 1)
|
|
tableColor = "table-info";
|
|
|
|
<tr class="align-middle @tableColor">
|
|
@if (j == 0)
|
|
{
|
|
<td rowspan="@(count)">@Model.ReactorPSNWORuns[i].REACTOR</td>
|
|
<td>@Model.ReactorPSNWORuns[i].PSN</td>
|
|
<td>@Model.ReactorPSNWORuns[i].WO_COUNT</td>
|
|
}
|
|
else
|
|
{
|
|
<td>@Model.ReactorPSNWORuns[i + j].PSN</td>
|
|
<td>@Model.ReactorPSNWORuns[i + j].WO_COUNT</td>
|
|
}
|
|
</tr>
|
|
}
|
|
i = i + (count - 1);
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |