LastTermResult.cshtml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.Common;
  7. @using LotteryWebApp.Service;
  8. @model LastTermResult_ViewModel
  9. @{
  10. Term termNotDrawn = Model.listTermNotDrawn != null ? Model.listTermNotDrawn.Find(x => x.status == "1") : null;
  11. List<Term> d6 = new List<Term>();
  12. d6.Add(termNotDrawn);
  13. }
  14. <div>
  15. @if (termNotDrawn != null)
  16. {
  17. @await Component.InvokeAsync("TicketForm", new { data = d6, type = Constants.GameId.Direct4D, })
  18. @await Component.InvokeAsync("TicketForm", new { data = d6, type = Constants.GameId.Direct3D, })
  19. @await Component.InvokeAsync("TicketForm", new { data = d6, type = Constants.GameId.Direct2D, })
  20. // List<Term> all = new List<Term>();
  21. // if (Model.termType == Constants.GameGroup.Singapore)
  22. // {
  23. // if (Model.listTermNotDrawn != null && Model.listTermNotDrawn.Count > 0)
  24. // {
  25. // Term termNotDrawn = Model.listTermNotDrawn.Find(x => x.status == "1");
  26. // Term termWaitingDrawn = Model.listTermNotDrawn.Find(x => x.status == "2");
  27. // if (termNotDrawn != null)
  28. // {
  29. // all.Add(termNotDrawn);
  30. // }
  31. // if (termWaitingDrawn != null)
  32. // {
  33. // all.Add(termWaitingDrawn);
  34. // }
  35. // }
  36. // all.AddRange(Model.listTerm);
  37. // for (int i = 0; i < all.Count; i++)
  38. // {
  39. // List<Term> d6 = new List<Term>();
  40. // d6.Add(all[i]);
  41. // @await Component.InvokeAsync("TicketForm", new { data = d6, type = Constants.GameId.Direct4D, })
  42. // }
  43. // }
  44. }
  45. </div>