NaturalGas.cshtml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. @await Html.PartialAsync("~/Views/Component/Chart.cshtml", Model.Chart)
  20. <div class="table-responsive">
  21. <table id="globalPriceList" class="table table-bordered table-hover">
  22. <caption class="caption-top">
  23. </caption>
  24. <thead>
  25. <tr>
  26. <th>번호</th>
  27. <th>날짜</th>
  28. <th>달러($)</th>
  29. <th>원화(\)</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. @if (Model.Response.Data != null && Model.Response.Data?.Count > 0)
  34. {
  35. @foreach (var row in Model.Response.Data)
  36. {
  37. <tr>
  38. <td>@row.Num</td>
  39. <td>@row.Date</td>
  40. <td>@row.Value</td>
  41. <td>@row.KRW</td>
  42. </tr>
  43. }
  44. }
  45. else
  46. {
  47. <tr>
  48. <td colspan="4">
  49. No data.
  50. </td>
  51. </tr>
  52. }
  53. </tbody>
  54. </table>
  55. </div>
  56. @await Html.PartialAsync("~/Views/Component/Pagination.cshtml", Model.Pagination)
  57. </div>
  58. @section Scripts {
  59. <script src="~/js/oil.js" asp-append-version="true"></script>
  60. }
  61. @section Styles {
  62. <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
  63. }