TicketHistory.cshtml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. @*
  2. For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
  3. *@
  4. @using LotteryWebApp.Languages;
  5. @using LotteryWebApp.Controllers;
  6. @using LotteryWebApp.Components;
  7. @using System.Globalization;
  8. @using LotteryWebApp.Common;
  9. @model TicketHistoryModel
  10. @{
  11. string drawnDate = DateTime.ParseExact(Model.data.termRandomDate, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy");
  12. string drawnTime = DateTime.ParseExact(Model.data.termRandomDate, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("HH:mm");
  13. string endDate = DateTime.ParseExact(Model.data.termEndDate, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy");
  14. string endTime = DateTime.ParseExact(Model.data.termEndDate, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("HH:mm");
  15. }
  16. <div style=" margin:10px 0;">
  17. <div style="position:relative;">
  18. <img class="header-img-buy-ticket-retangle-above" src="~/img/Rectangle 132.png" />
  19. <div class="ticket-container">
  20. <div class="row">
  21. <div class="col-4 ticket-info history-ticket-box">
  22. @{
  23. if (Model.data.gameId == Constants.NEW_YORK_BOLET_CODE || Model.data.gameId == Constants.FLORIDA_BOLET_CODE)
  24. {
  25. <img class="image-w-78" src="~/img/Group 83775.png" />
  26. }
  27. else if (Model.data.gameId == Constants.NEW_YORK_MAYRAJ_CODE || Model.data.gameId == Constants.FLORIDA_MAYRAJ_CODE)
  28. {
  29. <img class="image-w-71" src="~/img/MARYAJ.png" />
  30. }
  31. else if (Model.data.gameId == Constants.NEW_YORK_LOTTO3_CODE || Model.data.gameId == Constants.FLORIDA_LOTTO3_CODE)
  32. {
  33. <img class="image-w-71" src="~/img/LOTTO3.png" />
  34. }
  35. else if (Model.data.gameId == Constants.BOULCHANS_CODE)
  36. {
  37. //<img class="image-w-71" src="~/img/LOTTO3.png" />
  38. <div style="color: #DA5C5C; font-weight: 900;">BOULCHANS</div>
  39. }
  40. }
  41. <h6>@Lang.type: @BaseController.ConvertGameIdToTerm(Model.data.gameId) </h6>
  42. </div>
  43. <div class="col-4 history-ticket-box">
  44. @{
  45. string[] number = Model.data.code.Split("-");
  46. }
  47. <div class="ball-container">
  48. @{
  49. for (int i = 0; i < number.Count(); i++)
  50. {
  51. if (i == 0)
  52. {
  53. <img src="~/img/Group 83766.png" />
  54. }
  55. else
  56. {
  57. <img src="~/img/Group 83782.png" />
  58. }
  59. <div class="ball-number">
  60. @Model.data.code
  61. </div>
  62. }
  63. }
  64. </div>
  65. <h6>@Lang.draw_date: </h6>
  66. @if (Model.data.gameId == Constants.BOULCHANS_CODE)
  67. {
  68. <h6>@endDate </h6>
  69. }
  70. else
  71. {
  72. <h6>@drawnDate </h6>
  73. }
  74. </div>
  75. <div class="col-4 history-ticket-box" style="margin: auto;">
  76. @{
  77. if (Model.winType == Constants.WIN_CODE)
  78. {
  79. <h5 class="text-bold" style="color:red;">@Model.data.moneyWin HTG</h5>
  80. }
  81. else
  82. {
  83. <h5 class="text-bold">@Model.data.money HTG</h5>
  84. }
  85. }
  86. <h6>@Lang.draw_time: </h6>
  87. @if (Model.data.gameId == Constants.BOULCHANS_CODE)
  88. {
  89. <h6>@endTime </h6>
  90. }
  91. else
  92. {
  93. <h6>@drawnTime </h6>
  94. }
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <div style="position:relative; top: -8px;">
  100. <img class="header-img-buy-ticket-retangle-above" src="~/img/Rectangle 133.png" />
  101. <div class="row history-ticket-detail-container">
  102. <div class="col-6 button-box-animation" style="border-right:1px solid #ECEFF1; margin-bottom: 10px;">
  103. <h5 class="text-bold" onclick="detailTicketHistoryButton_CLick(@Model.data.id)">@Lang.details.ToUpper()</h5>
  104. </div>
  105. <div class="col-6">
  106. <h5>@Lang.bill_order</h5>
  107. <h5 class="text-bold">#@Model.data.billCode</h5>
  108. </div>
  109. </div>
  110. </div>
  111. </div>