Example #1
0
        public List <Invitee> GetInvitees(int recurrenceId)
        {
            // get any invitees for the most recent recurrence reservation
            var prev = GetPreviousRecurrence(recurrenceId);

            List <Invitee> result;

            if (prev != null)
            {
                result = ReservationInvitees.Create(Provider).SelectInvitees(prev.ReservationID);
            }
            else
            {
                result = new List <Invitee>();
            }

            return(result);
        }
Example #2
0
        public void Delete(IReservationItem rsv, int?modifiedByClientId)
        {
            Provider.Scheduler.Reservation.CancelReservation(rsv.ReservationID, string.Empty, modifiedByClientId);

            // Send email to reserver and invitees
            var invitees = ReservationInvitees.Create(Provider).SelectInvitees(rsv.ReservationID);

            Provider.Scheduler.Email.EmailOnUserDelete(rsv.ReservationID, modifiedByClientId.GetValueOrDefault());
            Provider.Scheduler.Email.EmailOnUninvited(rsv.ReservationID, invitees, modifiedByClientId.GetValueOrDefault());

            // Send email notifications to all clients want to be notified of open reservation slots
            Provider.Scheduler.Email.EmailOnOpenSlot(rsv.ReservationID, rsv.BeginDateTime, rsv.EndDateTime, EmailNotify.Always, modifiedByClientId.GetValueOrDefault());

            // Check for other open reservation slots between now and the reservation fence and Get the next reservation start time
            DateTime?nextBeginDateTime = OpenResSlot(rsv.ResourceID, TimeSpan.FromMinutes(rsv.ReservFence), TimeSpan.FromMinutes(rsv.MinReservTime), rsv.EndDateTime);

            if (nextBeginDateTime.HasValue)
            {
                Provider.Scheduler.Email.EmailOnOpenSlot(rsv.ReservationID, rsv.BeginDateTime, nextBeginDateTime.Value, EmailNotify.OnOpening, modifiedByClientId.GetValueOrDefault());
            }
        }