public string calendarReservationsJson() { List <Reservation> allReservations = Query.AllReservations(dbContext); string jsonEvents = QConvert.ReservationsToEvents(allReservations); return(jsonEvents); }
public string calendarJson() { List <Timeslot> allTimeslots = Query.AllTimeslots(dbContext); string jsonEvents = QConvert.TimeslotsToEvents(allTimeslots); return(jsonEvents); }
public IActionResult togglePracSched(ViewModel result, int id){ string[] check = AccessCheck(); if(check != null) return RedirectToAction(check[0], check[1]); Generate.CheckTimeslots(dbContext); // check if timeslots need to be generated System.Console.WriteLine($"####################################################{ result.PSDict.Keys}"); List<PSchedule> Schedules = QConvert.ScheduleToQuery(result.PSDict, id); Query.UpdateAllOfOnePsSchedules(id, Schedules, dbContext); return RedirectToAction("PractitionerProfile", new {PracId = id}); }
public IActionResult PractitionerProfile(int PracId) { string[] check = AccessCheck(); if(check != null) return RedirectToAction(check[0], check[1]); ViewModel vm = new ViewModel(); vm.CurrentUser = UserSession; vm.OneUser = Query.OnePractitioner(PracId, dbContext); vm.PSDict = QConvert.ScheduleFromQuery(Query.OnePsSchedules(UserSession.UserId, dbContext)); // vm.AllPSchedules = Query.OnePsSchedules(UserSession.UserId, dbContext); return PartialView(vm); }
public string calendarFilterJson(string body) { return(QConvert.FilteredEvents(body, dbContext)); }