备份会议的时间、主题等
示例#1
0
        /// <summary>
        /// 会议修改失败,会议属性回滚 2014/11/6
        /// </summary>
        /// <param name="ai"></param>
        /// <param name="bak_appointment"></param>
        private void ValueBackAppointMent(ref AppointmentItem ai, BackUpAppointment bak_appointment)
        {
            try
            {
                ai.Subject = bak_appointment.bak_subject;
                ai.RequiredAttendees = bak_appointment.bak_attdences;
                ai.Resources = "";
                ai.Resources = bak_appointment.bak_resources;
                ai.Location = "";
                ai.Location = bak_appointment.bak_location;
                try
                {
                    UserProperty up = ai.UserProperties.Find(ThisAddIn.PROPERTY_CONFERENCE_PASSWORD, Type.Missing);
                    up.Value = bak_appointment.bak_confPwd;

                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_VIDEO_SITES_COUNT, Type.Missing);
                    up.Value = bak_appointment.bak_videoCount;

                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_VOICE_SITES_COUNT, Type.Missing);
                    up.Value = bak_appointment.bak_voiceCount;

                    //is recording
                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_IS_RECORDING, Type.Missing);
                    up.Value = bak_appointment.bak_record;

                    //is living
                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_IS_LIVING, Type.Missing);
                    up.Value = bak_appointment.bak_liveBoradcast;

                    //site rate
                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_SITE_RATE, Type.Missing);
                    up.Value = bak_appointment.bak_siteRate;

                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_SECURITY_LEVEL, Type.Missing);
                    up.Value = bak_appointment.bak_securityLevel;

                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_BILL_CODE, Type.Missing);
                    up.Value = bak_appointment.bak_billCode;

                    up = ai.UserProperties.Find(ThisAddIn.PROPERTY_CPRESOURCE, Type.Missing);
                    up.Value = bak_appointment.bak_cpResource;

                    ThisAddIn.g_log.Info(string.Format("Set AppointmentItem properties back end"));
                }
                catch (System.Exception ex)
                {
                    ThisAddIn.g_log.Error(string.Format("Set AppointmentItem properties Exception. because {0}", ex.Message));
                }

                //2014/11/10 测试
                if (ai.RecurrenceState == OlRecurrenceState.olApptMaster)
                {
                    RecurrencePattern rPattern = ai.GetRecurrencePattern();
                    rPattern.StartTime = bak_appointment.bak_recurrencePattern.StartTime;
                    rPattern.EndTime = bak_appointment.bak_recurrencePattern.EndTime;
                    rPattern.Duration = bak_appointment.bak_recurrencePattern.Duration;
                    rPattern.PatternStartDate = bak_appointment.bak_recurrencePattern.PatternStartDate;
                    rPattern.PatternEndDate = bak_appointment.bak_recurrencePattern.PatternEndDate;

                    rPattern.Interval = bak_appointment.bak_recurrencePattern.Interval;
                    rPattern.NoEndDate = bak_appointment.bak_recurrencePattern.NoEndDate;
                    rPattern.Occurrences = bak_appointment.bak_recurrencePattern.Occurrences;
                    rPattern.RecurrenceType = (OlRecurrenceType)bak_appointment.bak_recurrencePattern.RecurrenceType;
                }
                else
                {
                    ai.Start = bak_appointment.bak_start;
                    ai.End = bak_appointment.bak_end;
                }
                ThisAddIn.g_log.Info(string.Format("Set AppointmentItem time back end"));
            }
            catch (System.Exception ex)
            {
                ThisAddIn.g_log.Info(string.Format("Set AppointmentItem back comes Exception {0}", ex.ToString()));
            }
        }
示例#2
0
 /// <summary>
 /// 避免与SMC交互两次
 /// </summary>
 /// <param name="meetingItem"></param>
 /// <param name="ai"></param>
 /// <param name="bak_appointment"></param>
 /// <returns> True与SMC操作,false仅发送邮件不操作</returns>
 private bool EditConferenceCompare(MeetingItem meetingItem, AppointmentItem ai, BackUpAppointment bak_appointment)
 {
     if (meetingItem.Class == OlObjectClass.olMeetingCancellation)
     {
         if (bak_appointment != null)
         {
             return true;
         }
         else
         {
             ThisAddIn.g_log.Info("Cancel Recepients just send Mail not to SMC");
             sendMailNotifications(ai, OperatorType.Cancel, meetingItem.Recipients);
             return false;
         }
     }
     else if (meetingItem.Class == OlObjectClass.olMeetingRequest) //发送的是会议增加人员
     {
         if (bak_appointment != null)
         {
             if (bak_appointment.editEnd)
             {
                 if (bak_appointment.editException)
                 {
                     ThisAddIn.g_log.Info("Cancel Recepients Comes Exception,Request Recepients stop");
                     //AppSubjectDic[ai].editEnd = false;
                     //AppSubjectDic[ai].editException = false;
                     //Cancel = true;
                     return false;
                 }
                 else
                 {
                     ThisAddIn.g_log.Info("Request Recepients just send Mail not to SMC");
                     sendMailNotifications(ai, OperatorType.Modify, meetingItem.Recipients);
                     AppSubjectDic[ai].editEnd = false;
                     return false;
                 }
             }
             else
             {
                 return true;
             }
         }
         else
         {
             return true;
         }
     }
     else
     {
         ThisAddIn.g_log.Info("Edit Conference Enter into other state " + meetingItem.Class.ToString());
         return false;
     }
 }
示例#3
0
        private bool CompareUserProperty(BackUpAppointment bak_appointment, AppointmentItem ai)
        {
            //保存智真会议属性
            BackUpAppointment bak_Property = new BackUpAppointment();

            UserProperty up = ai.UserProperties.Find(ThisAddIn.PROPERTY_CONFERENCE_PASSWORD, Type.Missing);
            bak_Property.bak_confPwd = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_VIDEO_SITES_COUNT, Type.Missing);
            bak_Property.bak_videoCount = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_VOICE_SITES_COUNT, Type.Missing);
            bak_Property.bak_voiceCount = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_IS_RECORDING, Type.Missing);
            bak_Property.bak_record = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_IS_LIVING, Type.Missing);
            bak_Property.bak_liveBoradcast = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_SITE_RATE, Type.Missing);
            bak_Property.bak_siteRate = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_SECURITY_LEVEL, Type.Missing);
            bak_Property.bak_securityLevel = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_BILL_CODE, Type.Missing);
            bak_Property.bak_billCode = up.Value;

            up = ai.UserProperties.Find(ThisAddIn.PROPERTY_CPRESOURCE, Type.Missing);
            bak_Property.bak_cpResource = up.Value.ToString();

            if (bak_appointment.bak_confPwd == bak_Property.bak_confPwd && bak_appointment.bak_videoCount == bak_Property.bak_videoCount &&
               bak_appointment.bak_voiceCount == bak_Property.bak_voiceCount && bak_appointment.bak_record == bak_Property.bak_record &&
               bak_appointment.bak_liveBoradcast == bak_Property.bak_liveBoradcast && bak_appointment.bak_siteRate == bak_Property.bak_siteRate &&
               bak_appointment.bak_securityLevel == bak_Property.bak_securityLevel && bak_appointment.bak_billCode == bak_Property.bak_billCode &&
               bak_appointment.bak_cpResource == bak_Property.bak_cpResource)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        /// <summary>
        /// 备份会议
        /// </summary>
        /// <param name="bak_subject"></param>
        /// <param name="bak_start"></param>
        /// <param name="bak_end"></param>
        /// <param name="bak_location"></param>
        /// <returns></returns>
        public static BackUpAppointment backUp(string bak_subject, DateTime bak_start, DateTime bak_end, string bak_location, string bak_resources, string bak_attdences,string bak_body)
        {
            BackUpAppointment app = new BackUpAppointment();
            app.bak_subject = bak_subject;
            app.bak_start = bak_start;
            app.bak_end = bak_end;
            app.bak_location = bak_location;
            app.bak_resources = bak_resources;
            app.bak_attdences = bak_attdences;
            app.bak_body = bak_body;

            app.scheduledEnd = false;
            app.editEnd = false;
            app.editException = false;
            return app;
        }