First Commit
This commit is contained in:
@ -0,0 +1,82 @@
|
||||
@using ReportingServices.Models.PlanningReport
|
||||
@using ReportingServices.HelperClasses
|
||||
@model List<ReportingServices.Models.PlanningReport.WeeklyPartChanges>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Weekly Part Changes | Mesa Reporting Services";
|
||||
}
|
||||
|
||||
<div aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
|
||||
<li class="breadcrumb-item"><a asp-area="" asp-controller="PlanningReport" asp-action="Index">Planning Reports</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Weekly Part Changes Report</li>
|
||||
</ol>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<h1 class="text-center">Weekly Part Changes</h1>
|
||||
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<p>Number of Part Changes: @ViewBag.NumberOfPartChanges</p>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<p class="text-end">@ViewBag.StartDate - @ViewBag.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.Count; i++)
|
||||
{
|
||||
int count = 1;
|
||||
bool doesMatch = false;
|
||||
|
||||
if (i + count < Model.Count)
|
||||
doesMatch = Model[i].REACTOR == Model[i + count].REACTOR;
|
||||
|
||||
while (doesMatch)
|
||||
{
|
||||
count++;
|
||||
if (i + count < Model.Count)
|
||||
doesMatch = Model[i].REACTOR == Model[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[i].REACTOR</td>
|
||||
<td>@Model[i].PSN</td>
|
||||
<td>@Model[i].WO_COUNT</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>@Model[i + j].PSN</td>
|
||||
<td>@Model[i + j].WO_COUNT</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
i = i + (count - 1);
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user