public List <MeetingResult> GetAllMeetings()
        {
            List <IMeetingMaster> results  = _meetingRetriever.GetAllMeetings();
            List <MeetingResult>  meetings = new List <MeetingResult>();

            foreach (IMeetingMaster result in results)
            {
                MeetingResult meeting = new MeetingResult();

                meeting.AgendaURL             = result.AgendaURL;
                meeting.IsAVRequired          = result.IsAVRequired;
                meeting.IsPhoneRequired       = result.IsPhoneRequired;
                meeting.IsVideoConfRequired   = result.IsVideoConfRequired;
                meeting.PreferredLocation     = _locationRetriever.GetLocationByLocationId(result.PreferredLocationId).LocationName;
                meeting.ActualLocation        = _locationRetriever.GetLocationByLocationId(result.ActualLocationId).LocationName;
                meeting.MeetingDesc           = result.MeetingDesc;
                meeting.MeetingEndTime        = result.MeetingEndTime;
                meeting.MeetingPriority       = result.MeetingPriority;//todo
                meeting.MeetingStartTime      = result.MeetingStartTime;
                meeting.MinutesURL            = result.MinutesURL;
                meeting.PhoneBridge           = result.PhoneBridge;
                meeting.PhoneBridgeAccessCode = result.PhoneBridgeAccessCode;
                meeting.ScheduledBy           = _userRetriever.GetUserFullNameByUserId(result.MeetingCalledBy);
                meeting.Title = result.MeetingDesc;

                meetings.Add(meeting);
            }

            return(meetings);
        }
Esempio n. 2
0
        public void GetMeetingsForUser(int userId)
        {
            IUser  user                          = _userRetriever.GetUserById(userId);
            string userFullName                  = _userRetriever.GetUserFullNameByUserId(userId);
            List <MeetingResult>  meetings       = new List <MeetingResult>();
            List <IMeetingMaster> meetingMasters = _meetingRetriever.GetAllMeetingsByUser(user);

            foreach (IMeetingMaster meeting in meetingMasters)
            {
                MeetingResult meetingResult = new MeetingResult();

                meetingResult.MeetingId        = meeting.MeetingId;
                meetingResult.ActualLocationId = meeting.ActualLocationId;
                meetingResult.Date             = meeting.MeetingStartTime.ToString();
                meetingResult.ActualLocation   = _locationRetriever.GetLocationByLocationId(meeting.ActualLocationId).LocationName;
                meetingResult.ScheduledBy      = _userRetriever.GetUserFullNameByUserId(meeting.MeetingCalledBy);
                meetingResult.Title            = meeting.MeetingDesc;

                meetings.Add(meetingResult);
            }
            _view.PopulateMeetings(meetings, userFullName);
        }
        public MeetingResult GetEventInformationById(int scheduleEntryId)
        {
            MeetingResult meetingResult = new MeetingResult();
            IUserSchedule userSchedule  = _meetingRetriever.GetUserBusyTime(scheduleEntryId);

            if (userSchedule.MeetingId == 0)
            {
                meetingResult.UserScheduleIndexId = userSchedule.IndexId;
                meetingResult.Title            = userSchedule.ScheduleEntryDescription;
                meetingResult.MeetingStartTime = userSchedule.FromTime;
                meetingResult.MeetingEndTime   = userSchedule.ToTime;
                meetingResult.MeetingId        = userSchedule.MeetingId;
            }
            else
            {
                IMeetingMaster result = _meetingRetriever.GetMeetingByMeetingId(userSchedule.MeetingId);

                meetingResult.AgendaURL             = result.AgendaURL;
                meetingResult.IsAVRequired          = result.IsAVRequired;
                meetingResult.IsPhoneRequired       = result.IsPhoneRequired;
                meetingResult.IsVideoConfRequired   = result.IsVideoConfRequired;
                meetingResult.PreferredLocation     = _locationRetriever.GetLocationByLocationId(result.PreferredLocationId).LocationName;
                meetingResult.ActualLocation        = _locationRetriever.GetLocationByLocationId(result.ActualLocationId).LocationName;
                meetingResult.MeetingDesc           = result.MeetingDesc;
                meetingResult.MeetingEndTime        = result.MeetingEndTime;
                meetingResult.MeetingPriority       = result.MeetingPriority;//todo
                meetingResult.MeetingStartTime      = result.MeetingStartTime;
                meetingResult.MinutesURL            = result.MinutesURL;
                meetingResult.PhoneBridge           = result.PhoneBridge;
                meetingResult.PhoneBridgeAccessCode = result.PhoneBridgeAccessCode;
                meetingResult.ScheduledBy           = _userRetriever.GetUserFullNameByUserId(result.MeetingCalledBy);
                meetingResult.Title     = result.MeetingDesc;
                meetingResult.MeetingId = userSchedule.MeetingId;
            }

            return(meetingResult);
        }