コード例 #1
0
        private void Monitor_AppointmentDeleting(object sender, CancelEventArgs <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)
            {
                e.Cancel = !OutlookManager.RemoveReservation(e.Value);
            }
        }
コード例 #2
0
        private void Appt_BeforeDelete(object Item, ref bool Cancel)
        {
            AppointmentItem appt    = Item 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 (appt.UserProperties.Find("MJ-MRBS-ID") != null)
            {
                Cancel = !OutlookManager.RemoveReservation(appt);
            }
        }