NaturalGas.cshtml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. @model economy.Models.View<economy.Models.Price.Global.NaturalGas.Request, economy.Models.Price.Global.NaturalGas.Response>
  2. @{
  3. ViewData["Title"] = "천연가스 시세";
  4. }
  5. <div class="container">
  6. <h3>@ViewData["Title"]</h3>
  7. <div class="row mt-3">
  8. <div class="col align-self-center">
  9. @((Model?.Response?.Data?.Count ?? 0).ToString("N0")) 개
  10. </div>
  11. <div class="col-auto">
  12. <div class="row g-2">
  13. <div class="col">
  14. <select name="perPage" id="perPage" class="form-select" asp-for="SelectedListPerPage" asp-items="Model.ListPerPage" form="fSearch"></select>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="table-responsive">
  20. <table id="globalPriceList" class="table table-bordered table-hover">
  21. <caption class="caption-top">
  22. </caption>
  23. <thead>
  24. <tr>
  25. <th>번호</th>
  26. <th>날짜</th>
  27. <th>달러($)</th>
  28. <th>원화(\)</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. @if (Model.Response.Data != null && Model.Response.Data?.Count > 0)
  33. {
  34. @foreach (var row in Model.Response.Data)
  35. {
  36. <tr>
  37. <td>@row.Num</td>
  38. <td>@row.Date</td>
  39. <td>@row.Value</td>
  40. <td>@row.KRW</td>
  41. </tr>
  42. }
  43. }
  44. else
  45. {
  46. <tr>
  47. <td colspan="4">
  48. No data.
  49. </td>
  50. </tr>
  51. }
  52. </tbody>
  53. </table>
  54. </div>
  55. @await Html.PartialAsync("~/Views/Component/Pagination.cshtml", Model.Pagination)
  56. </div>
  57. @section Scripts {
  58. <script src="~/js/oil.js" asp-append-version="true"></script>
  59. }
  60. @section Styles {
  61. <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
  62. }