List.cshtml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @model economy.Models.View<economy.Models.Price.Domestic.Item.List.Request, economy.Models.Price.Domestic.Item.List.Response>
  2. @{
  3. ViewData["Title"] = "품목별 시세";
  4. }
  5. <div class="container">
  6. <h3>품목별 시세</h3>
  7. <div class="row mt-3">
  8. <div class="col align-self-center">
  9. @((Model?.Response?.Body?.TotalCount ?? 0).ToString("N0")) 개
  10. </div>
  11. <div class="col-auto">
  12. <select name="perPage" id="perPage" class="form-select" asp-for="SelectedListPerPage" asp-items="Model.ListPerPage" form="fSearch"></select>
  13. </div>
  14. </div>
  15. <div class="table-responsive">
  16. <table id="priceItemList" class="table table-bordered table-hover">
  17. <caption class="caption-top">
  18. </caption>
  19. <colgroup>
  20. <col width="10%"/>
  21. <col width="30%"/>
  22. <col width="*"/>
  23. <col width="20%"/>
  24. </colgroup>
  25. <thead>
  26. <tr>
  27. <th>번호</th>
  28. <th>품목코드</th>
  29. <th>품목명</th>
  30. <th>비고</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. @if (Model.Response.Body != null)
  35. {
  36. @foreach (var row in Model.Response.Body.Items.ItemList)
  37. {
  38. <tr>
  39. <td>@row.Rn</td>
  40. <td>@row.Ic</td>
  41. <td>@row.In</td>
  42. <td>
  43. <a asp-area="" asp-controller="Item" asp-action="Detail" asp-route-item="@row.Ic" rel="search">[가격 정보]</a>
  44. </td>
  45. </tr>
  46. }
  47. }
  48. else
  49. {
  50. <tr>
  51. <td colspan="4">
  52. No data.
  53. </td>
  54. </tr>
  55. }
  56. </tbody>
  57. </table>
  58. </div>
  59. <form id="fSearch" method="get" accept-charset="UTF-8" rel="search" autocomplete="off" asp-controller="Price" asp-action="List">
  60. <input type="hidden" name="page" value="@Model.Request.PageNo" />
  61. </form>
  62. @await Html.PartialAsync("~/Views/Component/Pagination.cshtml", Model.Pagination)
  63. </div>
  64. @section Scripts {
  65. <script src="~/js/price.js" asp-append-version="true"></script>
  66. }
  67. @section Styles {
  68. <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
  69. }