Example #1
0
        // GET: Schedule
        public ActionResult Index(int pageNumber = 1, int pageSize = 10, bool showPastSchedules = false, Guid?personId = null)
        {
            var schedules = _scheduleManager.GetAll(showPastSchedules, personId).OrderBy(s => s.StartAt).ThenBy(s => s.EndAt);

            var viewModel = new ScheduleListViewModel {
                Page              = pageNumber,
                PageSize          = pageSize,
                ShowPastSchedules = showPastSchedules,
                PersonId          = personId,
                People            = _personManager.GetPersonList().OrderBy(p => p.Name).ToList(),
                Schedules         = new PagedList <Schedule>(schedules, pageNumber, pageSize)
            };

            return(View(viewModel));
        }
Example #2
0
 // GET: Schedules
 public IActionResult Index()
 {
     return(View(_iScheduleManager.GetAll().ToList()));
 }
        public ActionResult <IEnumerable <EventModel> > GetAll()
        {
            var result = _scheduleManager.GetAll();

            return(Ok(result));
        }