public SessionInfoController() { repo = new SessionInfoRepository(); registrantRepo = new SessionRegistrationInfoController(); speakerRepo = new SpeakerInfoController(); //sessionSpeakerRepo = new SessionSpeakerInfoController(); timeSlotRepo = new TimeSlotInfoController(); }
public ServiceBase() { CodeCampDataAccess = new CodeCampInfoController(); RegistrationDataAccess = new RegistrationInfoController(); RoomDataAccess = new RoomInfoController(); SessionDataAccess = new SessionInfoController(); SessionRegistrationDataAccess = new SessionRegistrationInfoController(); SessionSpeakerDataAccess = new SessionSpeakerInfoController(); SpeakerDataAccess = new SpeakerInfoController(); TrackDataAccess = new TrackInfoController(); TimeSlotDataAccess = new TimeSlotInfoController(); VolunteerDataAccess = new VolunteerInfoController(); VolunteerTaskDataAccess = new VolunteerTaskInfoController(); }
public void UpdateItemSortOrder(int sessionId, int codeCampId, int newPosition) { // get the time slots that aren't full span var availableTimeSlots = timeSlotRepo.GetItems(codeCampId).Where(t => !t.SpanAllTracks); // re-order timeslots by time only var timeSlots = TimeSlotInfoController.SortTimeSlots(availableTimeSlots).ToList(); // get the time slot matching the index var slot = timeSlots[newPosition]; // get the session var session = repo.GetItem(sessionId, codeCampId); session.TimeSlotId = slot.TimeSlotId; repo.UpdateItem(session); }