| | 1 | | @model WeeklyPartChanges |
| | 2 | |
|
| | 3 | | @{ |
| 0 | 4 | | ViewData["Title"] = "Weekly Part Changes | Mesa Reporting Services"; |
| | 5 | | } |
| | 6 | |
|
| | 7 | | <div aria-label="breadcrumb"> |
| | 8 | | <ol class="breadcrumb"> |
| | 9 | | <li class="breadcrumb-item"><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li> |
| | 10 | | <li class="breadcrumb-item"><a asp-area="" asp-controller="PlanningReport" asp-action="Index">Planning Reports</ |
| | 11 | | <li class="breadcrumb-item active" aria-current="page">Weekly Part Changes Report</li> |
| | 12 | | </ol> |
| | 13 | | </div> |
| | 14 | | <br /> |
| | 15 | |
|
| | 16 | | <h1 class="text-center">Weekly Part Changes</h1> |
| | 17 | |
|
| | 18 | | <div> |
| | 19 | | <div class="row"> |
| | 20 | | <div class="col-6"> |
| 0 | 21 | | <p>Number of Part Changes: @Model.TotalPartChanges</p> |
| | 22 | | </div> |
| | 23 | | <div class="col-6"> |
| 0 | 24 | | <p class="text-end">@Model.StartDate - @Model.EndDate</p> |
| | 25 | | </div> |
| | 26 | | </div> |
| | 27 | | <div> |
| | 28 | | <table class="table"> |
| | 29 | | <thead> |
| | 30 | | <tr> |
| | 31 | | <th scope="col">Reactor</th> |
| | 32 | | <th scope="col">PSN</th> |
| | 33 | | <th scope="col">WO_COUNT</th> |
| | 34 | | </tr> |
| | 35 | | </thead> |
| | 36 | | <tbody> |
| 0 | 37 | | @for (int i = 0; i < Model.ReactorPSNWORuns.Count; i++) |
| 0 | 38 | | { |
| 0 | 39 | | int count = 1; |
| 0 | 40 | | bool doesMatch = false; |
| | 41 | |
|
| 0 | 42 | | if (i + count < Model.ReactorPSNWORuns.Count) |
| 0 | 43 | | doesMatch = Model.ReactorPSNWORuns[i].REACTOR == Model.ReactorPSNWORuns[i + count].REACTOR; |
| | 44 | |
|
| 0 | 45 | | while (doesMatch) |
| 0 | 46 | | { |
| 0 | 47 | | count++; |
| 0 | 48 | | if (i + count < Model.ReactorPSNWORuns.Count) |
| 0 | 49 | | doesMatch = Model.ReactorPSNWORuns[i].REACTOR == Model.ReactorPSNWORuns[i + count].REACTOR; |
| | 50 | | else |
| 0 | 51 | | doesMatch = false; |
| 0 | 52 | | } |
| | 53 | |
|
| 0 | 54 | | for (int j = 0; j < count; j++) |
| 0 | 55 | | { |
| 0 | 56 | | string tableColor = ""; |
| | 57 | |
|
| 0 | 58 | | if (count > 1) |
| 0 | 59 | | tableColor = "table-info"; |
| | 60 | |
|
| 0 | 61 | | <tr class="align-middle @tableColor"> |
| 0 | 62 | | @if (j == 0) |
| 0 | 63 | | { |
| 0 | 64 | | <td rowspan="@(count)">@Model.ReactorPSNWORuns[i].REACTOR</td> |
| 0 | 65 | | <td>@Model.ReactorPSNWORuns[i].PSN</td> |
| 0 | 66 | | <td>@Model.ReactorPSNWORuns[i].WO_COUNT</td> |
| 0 | 67 | | } |
| | 68 | | else |
| 0 | 69 | | { |
| 0 | 70 | | <td>@Model.ReactorPSNWORuns[i + j].PSN</td> |
| 0 | 71 | | <td>@Model.ReactorPSNWORuns[i + j].WO_COUNT</td> |
| 0 | 72 | | } |
| | 73 | | </tr> |
| 0 | 74 | | } |
| 0 | 75 | | i = i + (count - 1); |
| 0 | 76 | | } |
| | 77 | | </tbody> |
| | 78 | | </table> |
| | 79 | | </div> |
| | 80 | | </div> |