@* 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.Components; @using LotteryWebApp.Common; @using LotteryWebApp.Service; @using System.Globalization; @model TicketFormModel @{ string ticketType = null; string drawnDate = Lang.draw_date; string dateEnd = Lang.draw_date; if (Model.data != null && Model.data.Count > 0) { drawnDate = DateTime.ParseExact(Model.data[0].date_random, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy"); dateEnd = DateTime.ParseExact(Model.data[0].date_random, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToString("dd/MM/yyyy HH:mm"); } }
@{ if (Model.type == Constants.NEW_YORK_BOLET_CODE || Model.type == Constants.FLORIDA_BOLET_CODE) { ticketType = Constants.BOLET_CODE; } else if (Model.type == Constants.NEW_YORK_MAYRAJ_CODE || Model.type == Constants.FLORIDA_MAYRAJ_CODE) { ticketType = Constants.MAYRAJ_CODE; } else if (Model.type == Constants.NEW_YORK_LOTTO3_CODE || Model.type == Constants.FLORIDA_LOTTO3_CODE) { ticketType = Constants.LOTTO3_CODE; } else if (Model.type == Constants.BOULCHANS_CODE) { ticketType = Constants.BOULCHANS_CODE; //
BOULCHANS
} } @{ if (Model.type == Constants.BOULCHANS_CODE) {
#@Model.data[0].id
} else {
@drawnDate
} }
@{ if (Model.type != Constants.BOULCHANS_CODE) {
@{ for (int i = 0; i < Model.data.Count; i++) { if (Model.data[i].isEvening == Constants.MORNING_CODE || Model.data[i].isEvening == Constants.MIDDAY_CODE) {
} else {
} } }
} else {
@dateEnd
} }
@{ for (int i = 0; i < Model.data.Count; i++) { Term term = Model.data[i]; if (term.result == "" && term.status == "1") {
@Lang.buying ...
} else if (term.result == "" && term.status == "2") {
@Lang.waiting_for_result ...
} else {
@{ string[] listBall = new string[] { }; if (Model.type == Constants.NEW_YORK_BOLET_CODE || Model.type == Constants.FLORIDA_BOLET_CODE) { listBall = term.bolet.Split(term.split); } else if (Model.type == Constants.NEW_YORK_MAYRAJ_CODE || Model.type == Constants.FLORIDA_MAYRAJ_CODE) { listBall = term.mariaj.Split(term.split); } else if (Model.type == Constants.NEW_YORK_LOTTO3_CODE || Model.type == Constants.FLORIDA_LOTTO3_CODE) { listBall = term.lotto3.Split(term.split); } else if (Model.type == Constants.BOULCHANS_CODE) { var myList = new List(); myList.Add(term.result); var myArray = myList.ToArray(); listBall = term.result.Split("-"); } for (int j = 0; j < listBall.Length; j++) {
@{ if (Model.type == Constants.NEW_YORK_BOLET_CODE || Model.type == Constants.FLORIDA_BOLET_CODE) { } else if (Model.type == Constants.NEW_YORK_MAYRAJ_CODE || Model.type == Constants.FLORIDA_MAYRAJ_CODE) { } else if (Model.type == Constants.NEW_YORK_LOTTO3_CODE || Model.type == Constants.FLORIDA_LOTTO3_CODE) { } else if (Model.type == Constants.BOULCHANS_CODE) { if (j == 0) { } else { } } }
@listBall[j]
} }
} } }