コード例 #1
0
 public SessionInfoController()
 {
     repo = new SessionInfoRepository();
     registrantRepo = new SessionRegistrationInfoController();
     speakerRepo = new SpeakerInfoController();
     //sessionSpeakerRepo = new SessionSpeakerInfoController();
     timeSlotRepo = new TimeSlotInfoController();
 }
コード例 #2
0
 public SessionInfoController()
 {
     repo           = new SessionInfoRepository();
     registrantRepo = new SessionRegistrationInfoController();
     speakerRepo    = new SpeakerInfoController();
     //sessionSpeakerRepo = new SessionSpeakerInfoController();
     timeSlotRepo = new TimeSlotInfoController();
 }
コード例 #3
0
 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();
 }
コード例 #4
0
        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);
        }