Inheritance: ConferenceBase
 public ActionResult Edit(int conferenceId)
 {
     var conference = _repository.GetConference(PortalSettings.PortalId, conferenceId);
     if (conference == null) { conference = new Connect.Conference.Core.Models.Conferences.Conference() { PortalId = PortalSettings.PortalId }; }
     DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxAntiForgerySupport();
     return View(conference.GetConferenceBase());
 }
Exemple #2
0
        public ActionResult Attendees(int conferenceId)
        {
            var conference = _repository.GetConference(PortalSettings.PortalId, conferenceId);

            if (conference == null)
            {
                conference = new Connect.Conference.Core.Models.Conferences.Conference()
                {
                    PortalId = PortalSettings.PortalId
                };
            }
            DotNetNuke.Framework.ServicesFramework.Instance.RequestAjaxAntiForgerySupport();
            return(View(conference));
        }
Exemple #3
0
        public static Schedule Create(Conferences.Conference conference)
        {
            var res          = new Schedule(conference);
            var locations    = LocationRepository.Instance.GetLocationsByConference(conference.ConferenceId).OrderBy(l => l.Sort);
            var sessions     = SessionRepository.Instance.GetSessionsByConference(conference.ConferenceId).Where(s => s.Status > 2 && s.SlotId > 0 && s.DayNr > 0);
            var locationList = new List <Locations.Location>();

            foreach (var location in locations)
            {
                if (sessions.Where(s => s.LocationId == location.LocationId).Count() > 0)
                {
                    locationList.Add(location);
                }
            }
            res.Locations = locationList;
            var slots  = SlotRepository.Instance.GetSlotsByConference(conference.ConferenceId).OrderBy(s => s.StartMinutes);
            var nrDays = (conference.EndDate != null ? ((int)((DateTime)conference.EndDate).Subtract((DateTime)conference.StartDate).TotalDays) : 1);

            for (int dayNr = 0; dayNr < nrDays; dayNr++)
            {
                var ds         = new DaySchedule(((DateTime)conference.StartDate).AddDays(dayNr).Date, dayNr + 1);
                var nrSessions = 0;
                foreach (var slot in slots.Where(s => s.DayNr == dayNr + 1 | s.DayNr == null))
                {
                    var ts = new DaySchedule.TimeSlot(slot);
                    if (slot.SlotType == (int)SlotType.Session)
                    {
                        foreach (var session in sessions.Where(s => s.DayNr == dayNr + 1 & s.SlotId == slot.SlotId))
                        {
                            if (session.LocationId == null)
                            {
                                ts.Sessions.Add(-1, session);
                            }
                            else
                            {
                                ts.Sessions.Add((int)session.LocationId, session);
                            }
                            nrSessions++;
                        }
                    }
                    ds.Slots.Add(slot.StartMinutes, ts);
                }
                ds.TotalSessions = nrSessions;
                res.Days.Add(dayNr, ds);
            }
            return(res);
        }
Exemple #4
0
 public Schedule(Conferences.Conference conference)
 {
     Conference = conference;
     Days       = new Dictionary <int, DaySchedule>();
 }
 public ActionResult Edit(int conferenceId)
 {
     var conference = _repository.GetConference(PortalSettings.PortalId, conferenceId);
     if (conference == null) { conference = new Connect.Conference.Core.Models.Conferences.Conference() { PortalId = PortalSettings.PortalId }; }
     return View(conference.GetConferenceBase());
 }