Exemplo n.º 1
0
        public ActionResult ModifyMeetingForm(string meetingId)
        {
            ViewBag.MeetingId = meetingId;
            bool canEditMeeting = _meetingService.CanEditMeeting(meetingId, User.Identity.GetUserId());

            ViewBag.CanEditMeeting = canEditMeeting;
            Meeting          meeting          = _context.Meetings.Find(new Guid(meetingId));
            MeetingViewModel meetingViewModel = new MeetingViewModel();

            meetingViewModel.OwnerEmail      = meeting.Owner.Email;
            meetingViewModel.MeetingRoomName = meeting.MeetingRoom.Name;
            meetingViewModel.StartDateTime   = meeting.BeginningTime;
            meetingViewModel.EndDateTime     = meeting.EndTime;
            meetingViewModel.MeetingSubject  = meeting.MeetingSubject;
            meetingViewModel.MeetingContent  = meeting.MeetingContent;
            meetingViewModel.AttendeeEmails  = meeting.Attendee.GetAttendeeMailAddresses();

            return(PartialView(meetingViewModel));
        }