/// <summary>
        /// Gets the meeting details.
        /// </summary>
        /// <param name="startDate">The start date.</param>
        /// <returns></returns>
        private List <CalendarEvent> GetMeetingDetails(DateTime startDate)
        {
            var events         = new List <CalendarEvent>();
            var itemCollection = SharePointRepository.GetOnlineMeetingDetails(startDate);

            if (itemCollection == null)
            {
                return(events);
            }

            foreach (var item in itemCollection)
            {
                var event1 = new CalendarEvent();
                var id     = Convert.ToInt32(item["ID"]);
                event1.Attendees   = Convert.ToString(item["Attendees"]);
                event1.Subject     = ConfigurationManager.AppSettings["ida:MeetingSubject"];
                event1.EventId     = Convert.ToString(item["MeetingId"]);
                event1.Organizer   = Convert.ToString(item["Organizer"]);
                event1.PatientName = Convert.ToString(item["PatientName"]);
                event1.DoctorName  = Convert.ToString(item["Title"]);
                event1.MeetingUrl  = ConfigurationManager.AppSettings["ida:HealthCarePortal"] + "/HealthCare/ConferenceDemo?meetingId=" + id;
                var dateEvent = new DateEvent {
                    DateTimeValue = Convert.ToDateTime(item["StartTime"])
                };
                event1.StartDate = dateEvent;
                var dateEvent1 = new DateEvent {
                    DateTimeValue = Convert.ToDateTime(item["EndTime"])
                };
                event1.EndDate = dateEvent1;
                events.Add(event1);
            }

            return(events);
        }
        /// <summary>
        /// Gets the meeting details.
        /// </summary>
        /// <param name="startDate">The start date.</param>
        /// <returns></returns>
        private IEnumerable <CalendarEvent> GetMeetingDetails(DateTime startDate)
        {
            var events         = new List <CalendarEvent>();
            var itemCollection = SharePointRepository.GetOnlineMeetingDetails(startDate);

            if (itemCollection == null)
            {
                return(events);
            }

            events.AddRange(itemCollection.Select(item => new CalendarEvent
            {
                Attendees   = Convert.ToString(item["Attendees"]),
                Subject     = ConfigurationManager.AppSettings["ida:MeetingSubject"],
                EventId     = Convert.ToString(item["MeetingId"]),
                Organizer   = Convert.ToString(item["Organizer"]),
                PatientName = Convert.ToString(item["PatientName"]),
                DoctorName  = Convert.ToString(item["Title"]),
                MeetingUrl  = ConfigurationManager.AppSettings["ida:HealthCarePortal"] + "/HealthCare/ConferenceDemo?meetingId=" + Convert.ToInt32(item["ID"]),
                StartDate   = new DateEvent {
                    DateTimeValue = Convert.ToDateTime(item["StartTime"])
                },
                EndDate = new DateEvent {
                    DateTimeValue = Convert.ToDateTime(item["EndTime"])
                }
            }));

            return(events);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets the meeting details from share point.
        /// </summary>
        /// <param name="startDate">The start date.</param>
        /// <returns>calendar event object.</returns>
        public static List <CalendarEvent> GetMeetingDetailsFromSharePoint(DateTime startDate)
        {
            List <CalendarEvent> events = new List <CalendarEvent>();

            try
            {
                ListItemCollection itemCollection = SharePointRepository.GetOnlineMeetingDetails(startDate);
                if (itemCollection != null)
                {
                    foreach (ListItem item in itemCollection)
                    {
                        CalendarEvent event1 = new CalendarEvent();
                        int           id     = Convert.ToInt32(item["ID"]);
                        event1.Attendees   = Convert.ToString(item["Attendees"]);
                        event1.Subject     = ConfigValues.MeetingSubject;
                        event1.EventId     = Convert.ToString(item["MeetingId"]);
                        event1.Organizer   = Convert.ToString(item["Organizer"]);
                        event1.PatientName = Convert.ToString(item["PatientName"]);
                        event1.DoctorName  = Convert.ToString(item["Title"]);
                        event1.MeetingUrl  = ConfigValues.HealthCarePortal + "/HealthCare/ConferenceDemo?meetingId=" + id;
                        DateEvent dateEvent = new DateEvent();
                        dateEvent.DateTimeValue = Convert.ToDateTime(item["StartTime"]);
                        event1.StartDate        = dateEvent;
                        DateEvent dateEvent1 = new DateEvent();
                        dateEvent1.DateTimeValue = Convert.ToDateTime(item["EndTime"]);
                        event1.EndDate           = dateEvent1;
                        events.Add(event1);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(events);
        }