LotoNumber.cshtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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.Components;
  6. @using LotteryWebApp.Common;
  7. @using System.Globalization;
  8. @model LotoNumberModel
  9. @{
  10. string endDate = DateTime.ParseExact(Model.data.date_end, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy");
  11. string endTime = DateTime.ParseExact(Model.data.date_end, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("HH:mm");
  12. string drawnDate = DateTime.ParseExact(Model.data.date_random, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy");
  13. }
  14. <div class="loto-container">
  15. <div class="row ">
  16. <div class="col-3 loto-image" style="margin: auto;">
  17. @{
  18. if (Model.type == Constants.NEW_YORK_NUMBERS_CODE)
  19. {
  20. <img class="image-w-80" src="~/img/lg-numbers 1.png" />
  21. }
  22. else if (Model.type == Constants.NEW_YORK_WIN4_CODE)
  23. {
  24. <img class="image-w-80" src="~/img/lg-win4 1.png" />
  25. }
  26. else if (Model.type == Constants.NEW_YORK_BOLET_CODE)
  27. {
  28. <img class="image-w-78" src="~/img/Group 83775.png" />
  29. }
  30. else if (Model.type == Constants.NEW_YORK_MAYRAJ_CODE)
  31. {
  32. <img class="image-w-71" src="~/img/MARYAJ.png" />
  33. }
  34. else if (Model.type == Constants.NEW_YORK_LOTTO3_CODE)
  35. {
  36. <img class="image-w-71" src="~/img/LOTTO3.png" />
  37. }
  38. else if (Model.type == Constants.FLORIDA_PICK3_CODE)
  39. {
  40. <img class="image-w-80" src="~/img/Pick3Logo.png" />
  41. }
  42. else if (Model.type == Constants.FLORIDA_PICK4_CODE)
  43. {
  44. <img class="image-w-80" src="~/img/Pick4Logo.png" />
  45. }
  46. else if (Model.type == Constants.FLORIDA_BOLET_CODE)
  47. {
  48. <img class="image-w-78" src="~/img/Group 83775.png" />
  49. }
  50. else if (Model.type == Constants.FLORIDA_MAYRAJ_CODE)
  51. {
  52. <img class="image-w-71" src="~/img/MARYAJ.png" />
  53. }
  54. else if (Model.type == Constants.FLORIDA_LOTTO3_CODE)
  55. {
  56. <img class="image-w-71" src="~/img/LOTTO3.png" />
  57. }
  58. else if (Model.type == Constants.BOULCHANS_CODE)
  59. {
  60. <div class="text-w-80-main-color">#@Model.data.id</div>
  61. }
  62. }
  63. </div>
  64. <div class="col-3 loto-date" style="margin: auto; padding:0px;">
  65. @if (Model.type != Constants.BOULCHANS_CODE)
  66. {
  67. if (Model.data.isEvening == Constants.EVENING_CODE)
  68. {
  69. <img style="width:20px;" src="~/img/moon-lg 7.png" />
  70. }
  71. else
  72. {
  73. <img style="width:20px;" src="~/img/ico-sun 1.png" />
  74. }
  75. }
  76. @if (Model.type == Constants.BOULCHANS_CODE)
  77. {
  78. <div class="text-main-color">@endDate</div>
  79. <div class="text-main-color">@endTime</div>
  80. }
  81. else
  82. {
  83. <div>@drawnDate</div>
  84. }
  85. </div>
  86. <div class="col-6 loto-number" style="margin: auto; padding-left: 0px;">
  87. <div class="scroll-item-container" style="@(Model.type == Constants.NEW_YORK_LOTTO3_CODE || Model.type == Constants.FLORIDA_LOTTO3_CODE ? "display: inline-block;vertical-align: middle;" : "")">
  88. @{
  89. string[] number = new String[] { };
  90. if (Model.type == Constants.NEW_YORK_NUMBERS_CODE || Model.type == Constants.FLORIDA_PICK3_CODE)
  91. {
  92. number = Model.data.numberGame.Split(Model.data.split);
  93. }
  94. else if (Model.type == Constants.NEW_YORK_WIN4_CODE || Model.type == Constants.FLORIDA_PICK4_CODE)
  95. {
  96. number = Model.data.win4Game.Split(Model.data.split);
  97. }
  98. else if (Model.type == Constants.NEW_YORK_BOLET_CODE || Model.type == Constants.FLORIDA_BOLET_CODE)
  99. {
  100. number = Model.data.bolet.Split(Model.data.split);
  101. }
  102. else if (Model.type == Constants.NEW_YORK_MAYRAJ_CODE || Model.type == Constants.FLORIDA_MAYRAJ_CODE)
  103. {
  104. number = Model.data.mariaj.Split(Model.data.split);
  105. }
  106. else if (Model.type == Constants.NEW_YORK_LOTTO3_CODE || Model.type == Constants.FLORIDA_LOTTO3_CODE)
  107. {
  108. number = Model.data.lotto3.Split(Model.data.split);
  109. }
  110. else if (Model.type == Constants.BOULCHANS_CODE)
  111. {
  112. var myList = new List<string>();
  113. myList.Add(Model.data.result);
  114. var myArray = myList.ToArray();
  115. number = Model.data.result.Split("-");
  116. }
  117. for (int i = 0; i < number.Length; i++)
  118. {
  119. <div class="ball-container">
  120. @{
  121. if (Model.type == Constants.NEW_YORK_NUMBERS_CODE)
  122. {
  123. <img class="image-w-35" src="~/img/Group 83766.png" />
  124. }
  125. else if (Model.type == Constants.NEW_YORK_WIN4_CODE)
  126. {
  127. <img class="image-w-35" src="~/img/Group 83774.png" />
  128. }
  129. else if (Model.type == Constants.NEW_YORK_BOLET_CODE)
  130. {
  131. <img class="image-w-35" src="~/img/Group 83776.png" />
  132. }
  133. else if (Model.type == Constants.NEW_YORK_MAYRAJ_CODE)
  134. {
  135. <img class="image-w-35" src="~/img/Group 83779.png" />
  136. }
  137. else if (Model.type == Constants.NEW_YORK_LOTTO3_CODE)
  138. {
  139. <img class="image-w-35" src="~/img/Group 83782.png" />
  140. }
  141. else if (Model.type == Constants.FLORIDA_PICK3_CODE)
  142. {
  143. <img class="image-w-35" src="~/img/Group 83766.png" />
  144. }
  145. else if (Model.type == Constants.FLORIDA_PICK4_CODE)
  146. {
  147. <img class="image-w-35" src="~/img/Group 83774.png" />
  148. }
  149. else if (Model.type == Constants.FLORIDA_BOLET_CODE)
  150. {
  151. <img class="image-w-35" src="~/img/Group 83776.png" />
  152. }
  153. else if (Model.type == Constants.FLORIDA_MAYRAJ_CODE)
  154. {
  155. <img class="image-w-35" src="~/img/Group 83779.png" />
  156. }
  157. else if (Model.type == Constants.FLORIDA_LOTTO3_CODE)
  158. {
  159. <img class="image-w-35" src="~/img/Group 83782.png" />
  160. }
  161. else if (Model.type == Constants.BOULCHANS_CODE)
  162. {
  163. if (i == 0)
  164. {
  165. <img class="image-w-35" src="~/img/Group 83774.png" />
  166. }
  167. else
  168. {
  169. <img class="image-w-35" src="~/img/Group 83782.png" />
  170. }
  171. }
  172. }
  173. <div class="ball-number">
  174. @number[i]
  175. </div>
  176. </div>
  177. }
  178. }
  179. <div style="width:20px;">
  180. </div>
  181. </div>
  182. @{
  183. if (Model.type == Constants.FLORIDA_LOTTO3_CODE || Model.type == Constants.NEW_YORK_LOTTO3_CODE)
  184. {
  185. //<i class="" style="color:red;display: inline-block;">* X from 0 to 9</i>
  186. }
  187. }
  188. </div>
  189. </div>
  190. @{
  191. if (Model.type == Constants.NEW_YORK_NUMBERS_CODE || Model.type == Constants.NEW_YORK_WIN4_CODE ||
  192. Model.type == Constants.FLORIDA_PICK3_CODE || Model.type == Constants.FLORIDA_PICK4_CODE)
  193. {
  194. }
  195. else
  196. {
  197. string ticketType = null;
  198. if (Model.type == Constants.NEW_YORK_BOLET_CODE || Model.type == Constants.FLORIDA_BOLET_CODE)
  199. {
  200. ticketType = Constants.BOLET_CODE;
  201. }
  202. else if (Model.type == Constants.NEW_YORK_MAYRAJ_CODE || Model.type == Constants.FLORIDA_MAYRAJ_CODE)
  203. {
  204. ticketType = Constants.MAYRAJ_CODE;
  205. }
  206. else if (Model.type == Constants.NEW_YORK_LOTTO3_CODE || Model.type == Constants.FLORIDA_LOTTO3_CODE)
  207. {
  208. ticketType = Constants.LOTTO3_CODE;
  209. }
  210. else if (Model.type == Constants.BOULCHANS_CODE)
  211. {
  212. ticketType = Constants.BOULCHANS_CODE;
  213. }
  214. <div class="buy-container" onclick="actionButton_Click('/BuyTicket/Choose?termType=@Model.type&ticketType=@ticketType')">
  215. <img src="~/img/Group.png" />
  216. </div>
  217. }
  218. }
  219. </div>
  220. <hr class="line2">