public void GetTimeSlotMappedToCalendarTimeFrame_Returns_A_New_TimeSlot_Mapped_To_Calendar_Time()
        {
            var calendar = new Calendar(DateTime.Now.AddHours(1), DateTime.Now.AddHours(3));

            var meeting1 = new MeetingInfo(DateTime.Now.AddMinutes(75), DateTime.Now.AddMinutes(105));              //T	T
            var meeting2 = new MeetingInfo(DateTime.Now.AddMinutes(75), DateTime.Now.AddHours(4));                  //T	F
            var meeting3 = new MeetingInfo(DateTime.Now.AddHours(-1), DateTime.Now.AddMinutes(105));                //F	T
            var meeting4 = new MeetingInfo(DateTime.Now.AddHours(-1), DateTime.Now.AddHours(4));                    //F	F

            var mappedTime = meeting1.GetTimeSlotMappedToCalendarTimeFrame(calendar.StartTime, calendar.EndTime);

            Assert.That(mappedTime.StartTime, Is.EqualTo(meeting1.StartTime));
            Assert.That(mappedTime.EndTime, Is.EqualTo(meeting1.EndTime));

            mappedTime = meeting2.GetTimeSlotMappedToCalendarTimeFrame(calendar.StartTime, calendar.EndTime);
            Assert.That(mappedTime.StartTime, Is.EqualTo(meeting2.StartTime));
            Assert.That(mappedTime.EndTime, Is.EqualTo(calendar.EndTime));

            mappedTime = meeting3.GetTimeSlotMappedToCalendarTimeFrame(calendar.StartTime, calendar.EndTime);
            Assert.That(mappedTime.StartTime, Is.EqualTo(calendar.StartTime));
            Assert.That(mappedTime.EndTime, Is.EqualTo(meeting3.EndTime));

            mappedTime = meeting4.GetTimeSlotMappedToCalendarTimeFrame(calendar.StartTime, calendar.EndTime);
            Assert.That(mappedTime.StartTime, Is.EqualTo(calendar.StartTime));
            Assert.That(mappedTime.EndTime, Is.EqualTo(calendar.EndTime));
        }
Beispiel #2
0
 /// <summary>
 /// 更新会议信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateMeetInfo(MeetingInfo model)
 {
     try
     {
         MeetingInfo models = context.MeetingInfo.FindById(model.Id);
         if (models != null)
         {
             models.Title          = model.Title;
             models.MeetingTime    = model.MeetingTime;
             models.MeetingPlace   = model.MeetingPlace;
             models.MeetingContent = model.MeetingContent;
             models.CreatDate      = DateTime.Now;
             models.ContinueTime   = model.ContinueTime;
             models.LanguageType   = model.LanguageType;
             int i = context.SaveChanges();
             if (i > 0)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Beispiel #3
0
        public MeetingInfo NotifyEmailEmployee(MeetingInfo notifyemployee)
        {
            ResponseData response    = meetingservice.SendEmail(notifyemployee);
            MeetingInfo  meetinginfo = response.meetinginfo;

            return(meetinginfo);
        }
Beispiel #4
0
        public ActionResult Add_organizor()
        {
            MeetingPlaceService           meetingPlaceService = new MeetingPlaceService();
            List <MeetingPlaceForMeeting> meetingPlaces       = null;

            meetingPlaceService.getAllForMeeting(out meetingPlaces);

            MeetingInfo meeting = new MeetingInfo();

            meeting.meetingToStartTime = DateTime.Now.AddDays(1);
            meeting.meetingStartedTime = DateTime.Now.AddDays(2);

            UserService            userService = new UserService();
            List <UserForDelegate> users       = new List <UserForDelegate>();

            userService.getAllForDelegate(out users);

            ShowMeetingModel model = new ShowMeetingModel
            {
                meeting       = meeting,
                meetingPlaces = meetingPlaces,
                users         = users
            };

            return(View(model));
        }
Beispiel #5
0
        private Meeting BuildMeeting(Appointment i, MeetingInfo meetingInfo)
        {
            var fields = i.GetLoadedPropertyDefinitions().OfType <PropertyDefinition>().ToLookup(x => x.Name);

            var externalAttendees = fields.Contains("RequiredAttendees") && fields.Contains("OptionalAttendees") ?
                                    i.RequiredAttendees.Concat(i.OptionalAttendees).Count(IsExternalAttendee) : 0;

            return(new Meeting()
            {
                UniqueId = i.Id.UniqueId,
                Subject = fields.Contains("Sensitivity") && fields.Contains("Subject") ? (
                    i.Sensitivity != Sensitivity.Normal ? i.Sensitivity.ToString() :
                    i.Subject != null && i.Subject.Trim() == i.Organizer.Name.Trim() ? null : i.Subject
                    ) : null,
                Start = i.Start,
                End = i.End,
                Organizer = fields.Contains("Organizer") ? i.Organizer.Name : string.Empty,
                RequiredAttendees = fields.Contains("RequiredAttendees") ? i.RequiredAttendees.Count : 0,
                OptionalAttendees = fields.Contains("OptionalAttendees") ? i.OptionalAttendees.Count : 0,
                ExternalAttendees = externalAttendees,
                IsStarted = meetingInfo.IsStarted,
                IsEndedEarly = meetingInfo.IsEndedEarly,
                IsCancelled = meetingInfo.IsCancelled,
                IsNotManaged = i.IsAllDayEvent || Math.Abs(i.End.Subtract(i.Start).TotalHours) > 6, // all day events and events longer than 6 hours won't be auto-cancelled
            });
        }
Beispiel #6
0
        private void EditMenuItem_Click(object sender, RoutedEventArgs e)
        {
            MenuItem menuItem = sender as MenuItem;

            if (menuItem == null)
            {
                return;
            }

            StackPanel meeting = menuItem.CommandTarget as StackPanel;

            if (meeting == null)
            {
                return;
            }

            MeetingInfo meetingInfo = new MeetingInfo();

            meetingInfo.Meeting     = App.Repository.GetMeetingsTable().GetMeeting((int)meeting.Tag);
            meetingInfo.MeetingType = MeetingInfo.TYPE.EDIT_MEETING;

            if (meetingInfo.ShowDialog() == true)
            {
                if (App.Repository.GetMeetingsTable().ChangeMeeting(meetingInfo.Meeting))
                {
                    RefillMeetings();
                    MessageBox.Show(Properties.Resources.SuccessDescription, Properties.Resources.SuccessTitle, MessageBoxButton.OK);
                }
                else
                {
                    MessageBox.Show(Properties.Resources.ErrorDescription, Properties.Resources.ErrorTitle, MessageBoxButton.OK);
                }
            }
        }
Beispiel #7
0
        /// <summary>
        /// Check the DiScribe bot email inbox for Webex invite emails created by scheduling
        /// from Webex.com or from DiScribe web.
        /// </summary>
        /// <param name="appConfig"></param>
        /// <returns></returns>
        private static async Task <object?> CheckForEmails(IConfigurationRoot appConfig)
        {
            MeetingInfo meetingInfo = null;


            try
            {
                var email = await EmailListener.GetEmailAsync();

                meetingInfo = MeetingController.HandleEmail(email.Body.Content.ToString(), email.Subject, "", appConfig);
                await EmailListener.DeleteEmailAsync(email);
            }
            catch (Exception emailEx)
            {
                Console.Error.WriteLine($">\tCould not read bot invite email. Reason: {emailEx.Message}");
                return(null);
            }

            if (meetingInfo != null)
            {
                Console.WriteLine($">\tNew Meeting Found at: {meetingInfo.StartTime.ToLocalTime()}");

                /*Send an audio registration email enabling all unregistered users to enroll on DiScribe website */
                MeetingController.SendEmailsToAnyUnregisteredUsers(meetingInfo.AttendeesEmails, appConfig["DB_CONN_STR"]);


                Console.WriteLine($">\tScheduling dialer to dial in to meeting at {meetingInfo.StartTime}");

                //Kay: According to Oloff, this should not have an "await" in front, otherwise it will wait until the meeting finish before checking the inbox again.
                SchedulerController.Schedule(Run, meetingInfo, appConfig, meetingInfo.StartTime);//Schedule dialer-transcriber workflow as separate task
            }

            return(meetingInfo);
        }
Beispiel #8
0
        public void Delete(int id)
        {
            MeetingInfo meetingInfo = new MeetingInfo();

            meetingInfo.id = id;
            this.control.DeleteEntity(meetingInfo);
        }
Beispiel #9
0
        public MeetingInfo NewMeeting(MeetingInfo createmeeting)
        {
            ResponseData response    = meetingservice.CreateMeeting(createmeeting);
            MeetingInfo  meetinginfo = response.meetinginfo;

            return(meetinginfo);
        }
        static MeetingInfo InputMeetingInfo()
        {
            MeetingInfo meeting = new MeetingInfo();

            Console.WriteLine("Input description");
            meeting.Descript = Console.ReadLine();
            Console.WriteLine("Input Year");
            meeting.Year = int.Parse(Console.ReadLine());
            do
            {
                Console.WriteLine("Input Month");
                meeting.Month = int.Parse(Console.ReadLine());
            }   while (meeting.Month > 12 || meeting.Month < 1);
            do
            {
                Console.WriteLine("Input Day");
                meeting.Day = int.Parse(Console.ReadLine());
            }   while (meeting.Day > 31);
            do
            {
                Console.WriteLine("Input Hour");
                meeting.Hour = int.Parse(Console.ReadLine());
            }   while (meeting.Hour > 24);
            do
            {
                Console.WriteLine("Input Minute");
                meeting.Minute = int.Parse(Console.ReadLine());
            } while (meeting.Minute > 59);
            do
            {
                Console.WriteLine("Input Seconds");
                meeting.Seconds = int.Parse(Console.ReadLine());
            } while (meeting.Seconds > 59);
            return(meeting);
        }
Beispiel #11
0
        public JsonResult UpdateMeetingInfo(MeetingInfoModifyQuery json)
        {
            bool        flag  = false;
            MeetingInfo model = ServiceHelper.Create <IMeetInfoService>().GetMeetInfo(json.Id);

            if (model != null)
            {
                model.Title          = json.Title;
                model.MeetingTime    = json.MeetingTime;
                model.MeetingPlace   = json.MeetingPlace;
                model.MeetingContent = json.MeetingContent;
                model.CreatDate      = DateTime.Now;
                model.ContinueTime   = json.ContinueTime;
                model.UserId         = base.CurrentManager.Id;
                model.LanguageType   = json.LanguageType;
                flag = ServiceHelper.Create <IMeetInfoService>().UpdateMeetInfo(model);
            }
            else
            {
                flag = false;
            }
            if (flag)
            {
                return(Json(new { success = true }));
            }
            else
            {
                return(Json(new { success = false }));
            }
        }
Beispiel #12
0
 public JsonResult Add_organizor(AddMeetingModel addMeetingModel)
 {
     if (ModelState.IsValid)
     {
         MeetingInfo     meeting         = addMeetingModel.meeting;
         MeetingService  service         = new MeetingService();
         DelegateService delegateService = new DelegateService();
         Status          status          = Status.SUCCESS;
         //调用服务
         if ((status = service.create(ref meeting)) == Status.SUCCESS)
         {
             DeviceService            deviceService = new DeviceService();
             List <DeviceForDelegate> devices       = null;
             status = deviceService.getAllForDelegate(
                 meeting.meetingToStartTime,
                 meeting.meetingStartedTime,
                 out devices);
             status = delegateService.createMultiple(devices, meeting.meetingID, addMeetingModel.delegates);
             if (status != Status.SUCCESS)
             {
                 service.deleteMultipe(meeting.meetingID);
             }
         }
         return(Json(new RespondModel(status, ""), JsonRequestBehavior.AllowGet));
     }
     else
     {
         return(Json(
                    new RespondModel(
                        Status.ARGUMENT_ERROR,
                        ModelStateHelper.errorMessages(ModelState)),
                    JsonRequestBehavior.AllowGet));
     }
 }
Beispiel #13
0
        public void OpenMeeting(IUserInterface userInterface, MeetingArgs args)
        {
            m_title.text    = "MEETING";
            m_meetingInfo   = args.MeetingInfo;
            m_userInterface = userInterface;

            switch (args.MeetingInfo.meetingType)
            {
            case MeetingCategory.CREATED:
                m_roomButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();
                if (Array.FindIndex(Fordi.Networking.Network.Rooms, item => item.Name == m_meetingInfo.MeetingNumber) != -1)
                {
                    m_roomButton.GetComponentInChildren <TextMeshProUGUI>().text = "Join";
                    m_roomButton.onClick.AddListener(() => Join());
                }
                else
                {
                    m_meetingButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();
                    m_meetingButton.GetComponentInChildren <TextMeshProUGUI>().text = "Cancel";
                    m_meetingButton.onClick.AddListener(() => Cancel());
                    m_roomButton.GetComponentInChildren <TextMeshProUGUI>().text = "Host";
                    m_roomButton.onClick.AddListener(() => Host());
                }
                break;

            case MeetingCategory.INVITED:
                m_meetingButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();
                m_meetingButton.GetComponentInChildren <TextMeshProUGUI>().text = "Accept";
                m_meetingButton.onClick.AddListener(() => Accept());
                m_secondMeetingButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();
                m_secondMeetingButton.GetComponentInChildren <TextMeshProUGUI>().text = "Ignore";
                m_secondMeetingButton.onClick.AddListener(() => Ignore());
                break;

            case MeetingCategory.REJECTED:
                m_meetingButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();
                m_meetingButton.GetComponentInChildren <TextMeshProUGUI>().text = "Accept";
                m_meetingButton.onClick.AddListener(() => Accept());
                break;

            case MeetingCategory.ACCEPTED:
                m_meetingButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();
                m_meetingButton.GetComponentInChildren <TextMeshProUGUI>().text = "Reject";
                m_meetingButton.onClick.AddListener(() => Reject());
                if (Array.FindIndex(Fordi.Networking.Network.Rooms, item => item.Name == m_meetingInfo.MeetingNumber) != -1)
                {
                    Debug.LogError(Fordi.Networking.Network.Rooms.Length);
                    m_roomButton = Instantiate(m_actionButtonPrefab, m_contentRoot).GetComponentInChildren <Button>();;
                    m_roomButton.GetComponentInChildren <TextMeshProUGUI>().text = "Join";
                    m_roomButton.onClick.AddListener(() => Join());
                }
                break;

            default:
                break;
            }

            m_description.text = args.MeetingInfo.MeetingNumber + "\n\n" + (string.IsNullOrEmpty(args.MeetingInfo.Description) ? "" : string.IsNullOrEmpty(args.MeetingInfo.Description) + "\n\n") + args.MeetingInfo.MeetingTime + "\n\n" + args.MeetingInfo.MeetingDurationInMinutes / 60 + " Hours, " + args.MeetingInfo.MeetingDurationInMinutes % 60 + " Minutes";
        }
Beispiel #14
0
        public MeetingInfo SearchingMeeting(MeetingInfo requestmeetinginfo)
        {
            ResponseData response = meetingservice.SearchMeeting(requestmeetinginfo);

            MeetingInfo meetinginfo = response.meetinginfo;

            return(meetinginfo);
        }
        public void Constructor_With_TimesSlot()
        {
            var timeSlot    = new TimeSlot(DateTime.Now, DateTime.Now.AddDays(1));
            var meetingInfo = new MeetingInfo(timeSlot);

            Assert.That(meetingInfo.StartTime, Is.EqualTo(timeSlot.StartTime));
            Assert.That(meetingInfo.EndTime, Is.EqualTo(timeSlot.EndTime));
        }
 public void DeleteMeetingById(MeetingInfo meeting)
 {
     using (var context = new RepoDemo.MeetingDemoEntities())
     {
         context.MeetingDetails.Remove(context.MeetingDetails.Single(x => x.MeetingId == meeting.MeetingId));
         context.SaveChanges();
     }
 }
Beispiel #17
0
 /// <summary>
 /// Sends an email with the specified meeting info, subject, (optional) html content and (optional) attachement
 /// </summary>
 /// <param name="meetingInfo"></param>
 /// <param name="subject"></param>
 /// <param name="htmlContent"></param>
 /// <param name="file"></param>
 public static void SendEmail(MeetingInfo meetingInfo, string subject, string htmlContent = "", FileInfo file = null)
 {
     if (htmlContent.Equals(""))
     {
         htmlContent = $"<h2>Meeting information</h2>\n<h4>Meeting Number: {meetingInfo.AccessCode}</h4>\n";
     }
     SendEmailHelper(OfficialEmail, meetingInfo.AttendeesEmails, subject, htmlContent, file).Wait();
 }
Beispiel #18
0
        public ActionResult Edit(long Id)
        {
            MeetingInfo           model  = ServiceHelper.Create <IMeetInfoService>().GetMeetInfo(Id);
            List <AttachmentInfo> models = ServiceHelper.Create <IMeetInfoService>().GetAttachmentInfosById(Id);

            ViewBag.attachmentCount = models.Count;
            ViewBag.LanguageType    = model.LanguageType;
            return(View(model));
        }
 public void Clear()
 {
     UserInfo      = new UserInformation();
     EventSource   = EventSource.Other;
     InitialIntent = CalendarLuis.Intent.None;
     MeetingInfo.Clear();
     ShowMeetingInfo.Clear();
     UpdateMeetingInfo.Clear();
 }
        static void Main(string[] args)
        {
            MeetingInfo meeting     = InputMeetingInfo();
            DateTime    CurrentTime = DateTime.Now;
            DateTime    MeetingTime = new DateTime(meeting.Year, meeting.Month, meeting.Day, meeting.Hour, meeting.Minute, meeting.Seconds);

            Console.WriteLine("{0}", CurrentTime > MeetingTime ? "YOU ARE LATE" : "YOU AREN'T LATE");
            return;
        }
Beispiel #21
0
        public ActionResult Detail(long Id)
        {
            MeetingInfo           model  = ServiceHelper.Create <IMeetInfoService>().GetMeetInfo(Id);
            List <AttachmentInfo> models = ServiceHelper.Create <IMeetInfoService>().GetAttachmentInfosById(Id);

            ViewBag.attachmentInfo  = models;
            ViewBag.attachmentCount = models.Count;
            ViewBag.parentId        = Id;
            return(View(model));
        }
Beispiel #22
0
        private void GetMeetingsCallBackMethod(List <MeetingInfo> val)
        {
            MeetingList = new ObservableCollection <MeetingInfo>(val.Where(mi => mi.MeetingClosedDateTime >= DateTime.Now).OrderBy(mi => mi.MeetingDateTime).ToList());

            try { SelectedMeeting = MeetingList.Where(mi => mi.MeetingDateTime == _presentationDate).FirstOrDefault(); }
            catch (InvalidOperationException) { }

            cmbBoxMeetingDate.ItemsSource  = MeetingList;
            cmbBoxMeetingDate.SelectedItem = SelectedMeeting;
        }
        public void Constructor_Sets_Properties()
        {
            var meetingStartTime = DateTime.Now.AddMinutes(15);
            var meetingEndTime   = DateTime.Now.AddMinutes(45);

            var meetingDetails = new MeetingInfo(meetingStartTime, meetingEndTime);

            Assert.That(meetingDetails.StartTime, Is.EqualTo(meetingStartTime.CalibrateToMinutes()));
            Assert.That(meetingDetails.StartTime, Is.EqualTo(meetingStartTime.CalibrateToMinutes()));
        }
Beispiel #24
0
        public bool SendMeeting(Guid transactionid, MeetingInfo meeting, out ErrorCodeInfo error)
        {
            bool result = true;

            error = new ErrorCodeInfo();

            string paramstr = string.Empty;

            paramstr  = $"Sender:{meeting.Sender}";
            paramstr += $"||Subject:{meeting.Subject}";
            paramstr += $"||Body:{meeting.Body}";
            paramstr += $"||Start:{meeting.Start}";
            paramstr += $"||End:{meeting.End}";
            paramstr += $"||Attendees:";
            foreach (string Attendee in meeting.Attendees)
            {
                paramstr += Attendee + ",";
            }
            string funname = "SendMeeting";

            try
            {
                do
                {
                    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
                    service.Credentials        = new WebCredentials(ConfigHelper.ConfigInstance["AD_Admin"], ConfigHelper.ConfigInstance["AD_Password"]);
                    service.Url                = new Uri(ConfigHelper.ConfigInstance["EWS_Uri"]);
                    service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, meeting.Sender);

                    Appointment appointment = new Appointment(service);
                    // Set the properties on the meeting object to create the meeting.
                    appointment.Subject  = meeting.Subject;
                    appointment.Body     = meeting.Body;
                    appointment.Start    = meeting.Start;
                    appointment.End      = meeting.End;
                    appointment.Location = meeting.Location;
                    foreach (string Attendee in meeting.Attendees)
                    {
                        appointment.RequiredAttendees.Add(Attendee);
                    }
                    appointment.ReminderMinutesBeforeStart = 15;
                    appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);
                    // Verify that the meeting was created.
                    Item item = Item.Bind(service, appointment.Id, new PropertySet(ItemSchema.Subject));
                } while (false);
            }
            catch (Exception ex)
            {
                error.Code = ErrorCode.Exception;
                LoggerHelper.Error("SendMeeting异常", paramstr, ex.ToString(), transactionid);
                result = false;
            }
            return(result);
        }
        public IActionResult GetMeetingInfo(string meetingId)
        {
            var meetingInfo = new MeetingInfo
            {
                Author       = "Jan Novák",
                MeetingStart = DateTime.Now,
                MeetingEnd   = DateTime.Now.AddHours(1)
            };

            return(Ok(meetingInfo));
        }
        public void GetTimeSlotMappedToCalendarTimeFrame_Returns_Null_When_TimeSlot_Is_Outside_Of_Calendar_TimeFrame()
        {
            var calendar = new Calendar(DateTime.Now.AddHours(2), DateTime.Now.AddHours(6));

            var meeting1 = new MeetingInfo(DateTime.Now.AddHours(1), DateTime.Now.AddHours(2));
            var meeting2 = new MeetingInfo(DateTime.Now.AddHours(7), DateTime.Now.AddHours(8));

            var mappedTime = meeting1.GetTimeSlotMappedToCalendarTimeFrame(calendar.StartTime, calendar.EndTime);

            Assert.That(mappedTime, Is.Null);
            mappedTime = meeting2.GetTimeSlotMappedToCalendarTimeFrame(calendar.StartTime, calendar.EndTime);
            Assert.That(mappedTime, Is.Null);
        }
        public ResponseData SearchMeeting(MeetingInfo MeetingInfo)
        {
            try
            {
                var Meetings = db.Meetings
                               .Include("EmployeeMeetings.Employee")
                               .Include("VisitorMeetings.Visitor")
                               .Where(x => x.MeetingPin == MeetingInfo.MeetingPin && x.MeetingKey == MeetingInfo.MeetingKey).FirstOrDefault();

                MeetingInfo = new MeetingInfo();

                MeetingInfo.Purpose    = Meetings.Purpose;
                MeetingInfo.StartTime  = Meetings.StartTime;
                MeetingInfo.EndTime    = Meetings.EndTime;
                MeetingInfo.MeetingPin = Meetings.MeetingPin;

                MeetingInfo.Employees = new List <EmployeeInfo>();
                MeetingInfo.Visitors  = new List <VisitorInfo>();

                foreach (var employee in Meetings.EmployeeMeetings)
                {
                    EmployeeInfo employeeInfo = new EmployeeInfo();
                    employeeInfo.Name = employee.Employee.Name;
                    //employeeInfo.Email = employee.Employee.Email;
                    employeeInfo.Phone = employee.Employee.Phone;

                    MeetingInfo.Employees.Add(employeeInfo);
                }

                foreach (var visitor in Meetings.VisitorMeetings)
                {
                    VisitorInfo visitorinfo = new VisitorInfo();
                    visitorinfo.Name  = visitor.Visitor.Name;
                    visitorinfo.Email = visitor.Visitor.Email;
                    visitorinfo.Phone = visitor.Visitor.Phone;

                    MeetingInfo.Visitors.Add(visitorinfo);
                }
                return(new ResponseData()
                {
                    meetinginfo = MeetingInfo
                });
            }
            catch (Exception ex)
            {
                return(new ResponseData()
                {
                    ErrorMessage = ex.Message
                });
            }
        }
Beispiel #28
0
        /// <summary>
        /// Sends a meeting minutes file to all attendees.
        /// </summary>
        /// <param name="meetingInfo"></param>
        /// <param name="file"></param>
        public static void SendMinutes(MeetingInfo meetingInfo, FileInfo file)
        {
            Console.WriteLine(">\tSending the Transcription Results to users...");
            foreach (var email in meetingInfo.AttendeesEmails)
            {
                Console.WriteLine(">\t-\t" + email.Email);
            }
            string subject = $"Meeting minutes of {meetingInfo.Subject}";

            // TODO need the infos
            var htmlContent = $"<h2>Meeting information</h2>\n<h4>Meeting Number: {meetingInfo.AccessCode}</h4>\n";

            SendEmail(meetingInfo.AttendeesEmails, subject, htmlContent, file);
        }
Beispiel #29
0
        /// <summary>
        /// 新增会议信息
        /// </summary>
        /// <param name="title"></param>
        /// <param name="time"></param>
        /// <param name="place"></param>
        /// <param name="content"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public MeetingInfo AddMeetInfo(MeetingInfo meetInfo)
        {
            MeetingInfo meetInfos;

            using (TransactionScope transactionScope = new TransactionScope())
            {
                meetInfo.CreatDate = DateTime.Now;
                meetInfos          = meetInfo;
                meetInfos          = context.MeetingInfo.Add(meetInfos);
                context.SaveChanges();
                transactionScope.Complete();
            }
            return(meetInfos);
        }
 public void SetMeeting(MeetingInfo meeting)
 {
     using (var context = new RepoDemo.MeetingDemoEntities())
     {
         var meetingInfo = new MeetingDetail
         {
             MeetingAgenda    = meeting.MeetingAgenda,
             MeetingAttendees = meeting.MeetingAttendees,
             MeetingDateTime  = meeting.MeetingDateTime,
             MeetingSubject   = meeting.MeetingSubject
         };
         context.MeetingDetails.Add(meetingInfo);
         context.SaveChanges();
     }
 }