Index.cshtml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. @{
  2. ViewData["Title"] = "Index";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using LotteryWebApp.Languages;
  6. @using LotteryWebApp.Controllers;
  7. @using LotteryWebApp.Common;
  8. @model History_ViewModel
  9. <div class="app-content content" style="position:relative">
  10. <div class="card-title text-center ">
  11. <div class="news-button-header-container" style="text-align: start; margin: 0 10px;">
  12. @await Component.InvokeAsync("SmallHeader", new { title = Lang.history.ToUpper()})
  13. </div>
  14. </div>
  15. <div class="content-wrapper buy-ticket-container" style="margin-top:50px;">
  16. <div class="content-body">
  17. <section class="flexbox-container">
  18. <div class="wrapper-style-3">
  19. <div class="row tabs-style-3">
  20. <div class="col-4 tab-style-3" style="padding:0px; text-align: center;">
  21. <input type="radio" name="css-tabs" id="tab-style-3-1" class="tab-switch-style-3" @(Model.winType == Constants.NOT_DRAW_CODE ? "checked" : "")>
  22. <label for="tab-style-3-1" class="tab-label-style-3" onclick="actionButton_Click('/History?gameId=@Model.gameId&winType=@Constants.NOT_DRAW_CODE')">
  23. <a class="@(Model.gameId == Constants.NEW_YORK_BOLET_CODE ? "active-tab" : "")">
  24. @Lang.not_draw
  25. </a>
  26. </label>
  27. </div>
  28. <div class="col-4 tab-style-3" style="padding:0px; text-align: center;">
  29. <input type="radio" name="css-tabs" id="tab-style-3-2" class="tab-switch-style-3" @(Model.winType == Constants.WIN_CODE ? "checked" : "")>
  30. <label for="tab-style-3-2" class="tab-label-style-3" onclick="actionButton_Click('/History?gameId =@Model.gameId&winType=@Constants.WIN_CODE')">
  31. <a class="@(Model.gameId == Constants.NEW_YORK_MAYRAJ_CODE ? "active-tab" : "")">@Lang.win</a>
  32. </label>
  33. </div>
  34. <div class="col-4 tab-style-3" style="padding:0px; text-align: center;">
  35. <input type="radio" name="css-tabs" id="tab-style-3-3" class="tab-switch-style-3" @(Model.winType == Constants.DRAWN_CODE ? "checked" : "")>
  36. <label for="tab-style-3-3" class="tab-label-style-3" onclick="actionButton_Click('/History?gameId =@Model.gameId&winType=@Constants.DRAWN_CODE')">
  37. <a class="@(Model.gameId == Constants.NEW_YORK_LOTTO3_CODE ? "active-tab" : "")">@Lang.not_win</a>
  38. </label>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="row tabs-style" style=" margin-top: 30px !important;">
  43. <div class="col-3 tab-style">
  44. <input type="radio" id="tab-1" name="tab-group-1" @(Model.gameId == Constants.NEW_YORK_BOLET_CODE ? "checked" : "")>
  45. <label for="tab-1">
  46. <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/History?gameId=@Constants.NEW_YORK_BOLET_CODE&winType=@Model.winType"
  47. class="@(Model.gameId == Constants.NEW_YORK_BOLET_CODE ? "active-tab" : "")">
  48. BOLET
  49. </a>
  50. </label>
  51. </div>
  52. <div class="col-3 tab-style">
  53. <input type="radio" id="tab-2" name="tab-group-1" @(Model.gameId == Constants.NEW_YORK_MAYRAJ_CODE ? "checked" : "")>
  54. <label for="tab-2">
  55. <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/History?gameId=@Constants.NEW_YORK_MAYRAJ_CODE&winType=@Model.winType"
  56. class="@(Model.gameId == Constants.NEW_YORK_MAYRAJ_CODE ? "active-tab" : "")">
  57. MARYAJ
  58. </a>
  59. </label>
  60. </div>
  61. <div class="col-3 tab-style">
  62. <input type="radio" id="tab-2" name="tab-group-1" @(Model.gameId == Constants.NEW_YORK_LOTTO3_CODE ? "checked" : "")>
  63. <label for="tab-2">
  64. <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/History?gameId=@Constants.NEW_YORK_LOTTO3_CODE&winType=@Model.winType"
  65. class="@(Model.gameId == Constants.NEW_YORK_LOTTO3_CODE ? "active-tab" : "")">
  66. LOTTO3
  67. </a>
  68. </label>
  69. </div>
  70. <div class="col-3 tab-style">
  71. <input type="radio" id="tab-2" name="tab-group-1" @(Model.gameId == Constants.BOULCHANS_CODE ? "checked" : "")>
  72. <label for="tab-2">
  73. <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/History?gameId=@Constants.BOULCHANS_CODE&winType=@Model.winType"
  74. class="@(Model.gameId == Constants.BOULCHANS_CODE ? "active-tab" : "")">
  75. BOULCHANS
  76. </a>
  77. </label>
  78. </div>
  79. </div>
  80. <div id="user-ticket-data">
  81. </div>
  82. <script>
  83. var countPage = 1;
  84. getUserTicketData(@Model.winType, @Model.gameId, countPage);
  85. $(window).scroll(function() {
  86. if ($(window).scrollTop() == $(document).height() - $(window).height()) {
  87. // ajax call get data from server and append to the div
  88. console.log("next " + countPage);
  89. getUserTicketData(@Model.winType, @Model.gameId, countPage += 1);
  90. }
  91. });
  92. </script>
  93. </section>
  94. </div>
  95. </div>
  96. </div>
  97. <script>
  98. stopLoading();
  99. </script>