public ActionResult Edit_organizor(int agendaID) { AgendaService agendaService = new AgendaService(); AgendaInfo agenda = null; Status status = agendaService.getOne(agendaID, out agenda); DelegateService delegateService = new DelegateService(); List <SpeakerForAgenda> speakersForAgenda = null; status = delegateService.getSpeakerForAgenda(agenda.meetingID, out speakersForAgenda); Session["meetingID"] = agenda.meetingID; return(View(Tuple.Create(agenda, speakersForAgenda))); }
public HttpResponseMessage GetAgenda(int codeCampId) { try { var agenda = new AgendaInfo(); agenda.CodeCamp = CodeCampDataAccess.GetItem(codeCampId, ActiveModule.ModuleID); if (agenda.CodeCamp != null) { var slotsToOrder = TimeSlotDataAccess.GetItems(codeCampId); var timeSlots = TimeSlotInfoController.SortTimeSlots(slotsToOrder); var timeSlotCount = timeSlots.Count(); // determine how many days the event lasts for agenda.NumberOfDays = (int)(agenda.CodeCamp.EndDate - agenda.CodeCamp.BeginDate).TotalDays + 1; // iterate through each day agenda.EventDays = new List <EventDayInfo>(); var dayCount = 0; while (dayCount <= agenda.NumberOfDays - 1) { var eventDate = agenda.CodeCamp.BeginDate.AddDays(dayCount); var eventDay = new EventDayInfo() { Index = dayCount, Day = eventDate.Day, Month = eventDate.Month, Year = eventDate.Year, TimeStamp = eventDate }; eventDay.TimeSlots = new List <AgendaTimeSlotInfo>(); // iterate through each timeslot foreach (var timeSlot in timeSlots) { var slot = new AgendaTimeSlotInfo(timeSlot); if (!timeSlot.SpanAllTracks) { // iterate through each session slot.Sessions = SessionDataAccess.GetItemsByTimeSlotIdByPage(slot.TimeSlotId, codeCampId, dayCount + 1, timeSlotCount).ToList(); // iterate through each speaker foreach (var session in slot.Sessions) { session.Speakers = SpeakerDataAccess.GetSpeakersForCollection(session.SessionId, codeCampId); } } else { // add the full span session item // TODO: allow for items to be added to full span timeslots } eventDay.TimeSlots.Add(slot); } agenda.EventDays.Add(eventDay); dayCount++; } } var response = new ServiceResponse <AgendaInfo> { Content = agenda }; if (agenda.CodeCamp == null) { ServiceResponseHelper <AgendaInfo> .AddNoneFoundError("AgendaInfo", ref response); } return(Request.CreateResponse(HttpStatusCode.OK, response.ObjectToJson())); } catch (Exception ex) { Exceptions.LogException(ex); return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ERROR_MESSAGE)); } }
/// <summary> /// Return a proper agenda object for this entry in the MRU. /// </summary> /// <returns>A agenda object that can be used with the rest of the indico system</returns> /// <remarks>If and when we include more than just Indico, this will have to be improved so it can tell what sort fo thing it is!</remarks> public IMeetingRef ToAgendaInfo() { var ai = AgendaInfo.FromShortString(IDRef); return(new IWalker.DataModel.Inidco.IndicoMeetingRef(ai.ConferenceUrl)); }
/// <summary> /// Return true if this is a valid meeting reference /// </summary> /// <param name="url"></param> /// <returns></returns> internal static bool IsValid(string url) { return(AgendaInfo.IsValid(url)); }
public IndicoMeetingRef(AgendaInfo ag) { _info = ag; }
/// <summary> /// Initialize with a URL /// </summary> /// <param name="url"></param> public IndicoMeetingRef(string url) { _info = new AgendaInfo(url); }
/// <summary> /// Given a MRU, convert it to a meeting. /// </summary> /// <param name="mru">The MRU.</param> /// <returns></returns> private IMeetingRef ConvertToIMeeting(MRU mru) { var ag = AgendaInfo.FromShortString(mru.IDRef); return(new IndicoMeetingRef(ag)); }