public async Task <ActionResult> Event(ToastModel tm = null) { ViewBag.msg = TempData["msg"] as string; if (!string.IsNullOrEmpty(tm.Message)) { ViewBag.tm = tm; } MainEventModel mainEventModel = new MainEventModel(); mainEventModel.currentEventModel = await _common.GetEvents(); foreach (var item in mainEventModel.currentEventModel) { if (item.Amount != null) { item.ChangeAmount = (int)item.Amount; } else { item.ChangeAmount = 0; } } mainEventModel.events.weekday = await _common.GetWeekdayData(); mainEventModel.events.frequencies = await _common.GetFrequencyData(); mainEventModel.events.sessions = await _common.GetSessionData(); ViewBag.CountryList = await _common.GetCountryData(); return(View("Event", mainEventModel)); }
public async Task<ActionResult> Event() { MainEventModel mainEventModel = new MainEventModel(); mainEventModel.currentEventModel = await _common.GetEvents(); foreach (var item in mainEventModel.currentEventModel) { item.ChangeAmount = (int)item.Amount; } mainEventModel.weekday = await _common.GetWeekdayData(); mainEventModel.frequencies = await _common.GetFrequencyData(); mainEventModel.sessions = await _common.GetSessionData(); return View("Event", mainEventModel); }