public async Task <IActionResult> FindEvents(int page = 1) { var Date = await FEventServices.GetAllEventAsync(); var Obj = new WebEvento.ViewModel.InformationViewModel(); Obj.EventList = Date.ToList(); var dt2 = DateTime.Now; foreach (var item in Obj.EventList) { var dt = item.EventNow.Date; TimeSpan ts = (dt2 - dt); Obj.PeriodEventTime = new List <string>(); Obj.PeriodEventTime.Add(ts.ToString(@"hh\:mm\:ss")); } var totalNumberInCollection = Obj.EventList.Count; var itemsPerPage = 5; ViewBag.PaginatedMeta = _paginatedMetaService.GetMetaData(totalNumberInCollection, page, itemsPerPage); return(View(Obj)); }
public async Task <IActionResult> SpecialEvent() { var Date = await FEventServices.GetAllEventListAsync(); var Obj = new WebEvento.ViewModel.InformationViewModel(); Obj.EventList = Date.ToList(); return(View(Obj)); }
public async Task <IActionResult> FindAddress() { var Date = await FAddressServices.GetAllAddressAsync(); var Obj = new WebEvento.ViewModel.InformationViewModel(); Obj.AddressList = Date.ToList(); return(View(Obj)); }
public async Task <IActionResult> FindExhibition(int page = 1) { var Date = await FExhibitionServices.GetAllExhibitionAsync(); var Obj = new WebEvento.ViewModel.InformationViewModel(); Obj.ExhibitionList = Date.ToList(); var totalNumberInCollection = Obj.ExhibitionList.Count; var itemsPerPage = 5; ViewBag.PaginatedMeta = _paginatedMetaService.GetMetaData(totalNumberInCollection, page, itemsPerPage); return(View(Obj)); }
public EventCountViewComponent(CacheManager cacheManager) { _cacheManager = cacheManager; vmodel = new ViewModel.InformationViewModel(); }