public static PublicItemCollection GetDefault()
 {
     var sharingOptions = new PublicItemCollection();
     sharingOptions.Items.Add(new PublicItemWrapper(
         new ASC.Web.Core.Calendars.SharingOptions.PublicItem()
             {
                 Id = SecurityContext.CurrentAccount.ID,
                 IsGroup = false
             },
     "0", SecurityContext.CurrentAccount.ID));
     return sharingOptions;
 }
Exemplo n.º 2
0
        public static PublicItemCollection GetDefault()
        {
            var sharingOptions = new PublicItemCollection();

            sharingOptions.Items.Add(new PublicItemWrapper(
                                         new ASC.Web.Core.Calendars.SharingOptions.PublicItem()
            {
                Id      = SecurityContext.CurrentAccount.ID,
                IsGroup = false
            },
                                         "0", SecurityContext.CurrentAccount.ID));
            return(sharingOptions);
        }
 public static PublicItemCollection GetForCalendar(ICalendar calendar)
 {
     var sharingOptions = new PublicItemCollection();
     sharingOptions.Items.Add(new PublicItemWrapper(new ASC.Web.Core.Calendars.SharingOptions.PublicItem()
            {
                Id = calendar.OwnerId,
                IsGroup = false
            },
           calendar.Id.ToString(), calendar.OwnerId));
     foreach (var item in calendar.SharingOptions.PublicItems)            
         sharingOptions.Items.Add(new PublicItemWrapper(item, calendar.Id.ToString(), calendar.OwnerId));
     
     return sharingOptions;
 }
        public static PublicItemCollection GetForEvent(IEvent calendarEvent)
        {
            var sharingOptions = new PublicItemCollection();
            sharingOptions.Items.Add(new PublicItemWrapper(new ASC.Web.Core.Calendars.SharingOptions.PublicItem()
            {
                Id = calendarEvent.OwnerId,
                IsGroup = false
            },

            calendarEvent.CalendarId, calendarEvent.Id, calendarEvent.OwnerId));

            foreach (var item in calendarEvent.SharingOptions.PublicItems)
                sharingOptions.Items.Add(new PublicItemWrapper(item, calendarEvent.CalendarId, calendarEvent.Id, calendarEvent.OwnerId));

            return sharingOptions;
        }
Exemplo n.º 5
0
        public static PublicItemCollection GetForCalendar(ICalendar calendar)
        {
            var sharingOptions = new PublicItemCollection();

            sharingOptions.Items.Add(new PublicItemWrapper(new ASC.Web.Core.Calendars.SharingOptions.PublicItem()
            {
                Id      = calendar.OwnerId,
                IsGroup = false
            },
                                                           calendar.Id.ToString(), calendar.OwnerId));
            foreach (var item in calendar.SharingOptions.PublicItems)
            {
                sharingOptions.Items.Add(new PublicItemWrapper(item, calendar.Id.ToString(), calendar.OwnerId));
            }

            return(sharingOptions);
        }
Exemplo n.º 6
0
        public static PublicItemCollection GetForEvent(IEvent calendarEvent)
        {
            var sharingOptions = new PublicItemCollection();

            sharingOptions.Items.Add(new PublicItemWrapper(new ASC.Web.Core.Calendars.SharingOptions.PublicItem()
            {
                Id      = calendarEvent.OwnerId,
                IsGroup = false
            },

                                                           calendarEvent.CalendarId, calendarEvent.Id, calendarEvent.OwnerId));

            foreach (var item in calendarEvent.SharingOptions.PublicItems)
            {
                sharingOptions.Items.Add(new PublicItemWrapper(item, calendarEvent.CalendarId, calendarEvent.Id, calendarEvent.OwnerId));
            }

            return(sharingOptions);
        }
Exemplo n.º 7
0
 public new static object GetSample()
 {
     return(new { data = PublicItemCollection.GetSample() });
 }