@* For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 *@ @using LotteryWebApp.Languages; @using LotteryWebApp.Controllers; @using LotteryWebApp.Common; @using LotteryWebApp.Service; @model LastTermResult_ViewModel
@{ List all = new List(); List d3 = new List(); List d4 = new List(); List d5 = new List(); for (int i = 0; i < (Model.listTerm.Count > 2 ? 2 : Model.listTerm.Count); i++) { d3.Add(Model.listTerm[i]); d4.Add(Model.listTerm[i]); d5.Add(Model.listTerm[i]); } if (Model.termType == Constants.BOULCHANS_CODE) { if (Model.listTermNotDrawn != null && Model.listTermNotDrawn.Count > 0) { Term termNotDrawn = Model.listTermNotDrawn.Find(x => x.status == "1"); Term termWaitingDrawn = Model.listTermNotDrawn.Find(x => x.status == "2"); if (termNotDrawn != null) { all.Add(termNotDrawn); } if (termWaitingDrawn != null) { all.Add(termWaitingDrawn); } } all.AddRange(Model.listTerm); for (int i = 0; i < all.Count; i++) { List d6 = new List(); d6.Add(all[i]); @await Component.InvokeAsync("TicketForm", new {data= d6, type = Constants.BOULCHANS_CODE,}) } } else if (Model.termType == Constants.NEW_YORK_BOLET_CODE) { @await Component.InvokeAsync("TicketForm", new {data= d3, type = Constants.NEW_YORK_BOLET_CODE,}) @await Component.InvokeAsync("TicketForm", new {data= d4, type = Constants.NEW_YORK_MAYRAJ_CODE,}) @await Component.InvokeAsync("TicketForm", new {data= d5, type = Constants.NEW_YORK_LOTTO3_CODE,}) } else { @await Component.InvokeAsync("TicketForm", new {data= d3, type = Constants.FLORIDA_BOLET_CODE,}) @await Component.InvokeAsync("TicketForm", new {data= d4, type = Constants.FLORIDA_MAYRAJ_CODE,}) @await Component.InvokeAsync("TicketForm", new {data= d5, type = Constants.FLORIDA_LOTTO3_CODE,}) } }