コード例 #1
0
        private void Monitor_AppointmentModified(object sender, EventArgs <AppointmentItem> e)
        {
            var creator = e.Value.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x0C1A001E");

            if ((e.Value.Organizer != Application.Session.CurrentUser.Name) && (creator != Application.Session.CurrentUser.Name))
            {
                return;
            }

            if (e.Value.UserProperties.Find("MJ-MRBS-ID") != null)
            {
                OutlookManager.SaveChangesToReservation(e.Value);
            }
        }
コード例 #2
0
        private void Appt_Write(ref bool Cancel)
        {
            Inspector       inspector = Globals.ThisAddIn.Application.ActiveInspector();
            AppointmentItem appt      = inspector.CurrentItem as AppointmentItem;
            var             creator   = appt.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x0C1A001E");

            if ((appt.Organizer != Globals.ThisAddIn.Application.Session.CurrentUser.Name) && (creator != Globals.ThisAddIn.Application.Session.CurrentUser.Name))
            {
                return;
            }
            if (!_processWrite)
            {
                return;
            }

            if (appt.UserProperties.Find("MJ-MRBS-ID") != null)
            {
                OutlookManager.SaveChangesToReservation(appt);
            }
        }