Ejemplo n.º 1
0
 public UpdateReservationArgs CreateUpdateArgs(DateTime now, int reservationId, int?modifiedByClientId = null)
 {
     return(new UpdateReservationArgs
     {
         ReservationID = reservationId,
         AccountID = AccountID,
         AutoEnd = AutoEnd,
         KeepAlive = KeepAlive,
         HasInvitees = Invitees.Any(x => !x.Removed),
         HasProcessInfo = ProcessInfos.Any(),
         Notes = Notes,
         ChargeMultiplier = 1, // any update from Reservation.aspx occurs before a reservation would ever be forgiven
         Now = now,
         ModifiedByClientID = modifiedByClientId.GetValueOrDefault(ClientID)
     });
 }
Ejemplo n.º 2
0
        public List <ReservationProcessInfoItem> GetProcessInfos(int recurrenceId)
        {
            // get any process infos for the most recent recurrence reservation
            var prev = GetPreviousRecurrence(recurrenceId);

            List <ReservationProcessInfoItem> result;

            if (prev != null)
            {
                result = ProcessInfos.CreateReservationProcessInfoItems(Provider.Scheduler.ProcessInfo.GetReservationProcessInfos(prev.ReservationID));
            }
            else
            {
                result = new List <ReservationProcessInfoItem>();
            }

            return(result);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates an instance of InsertReservationArgs with the current ReservationData object. Nothing is done to the database.
 /// </summary>
 public InsertReservationArgs CreateInsertArgs(DateTime now, int linkedReservationId, int?modifiedByClientId = null)
 {
     return(new InsertReservationArgs
     {
         ClientID = ClientID,
         AccountID = AccountID,
         ResourceID = ResourceID,
         ActivityID = ActivityID,
         RecurrenceID = RecurrenceID.GetValueOrDefault(-1), //always -1 for non-recurring reservation
         BeginDateTime = Duration.BeginDateTime,
         EndDateTime = Duration.EndDateTime,
         ChargeMultiplier = 1,
         AutoEnd = AutoEnd,
         KeepAlive = KeepAlive,
         HasInvitees = Invitees.Any(x => !x.Removed),
         HasProcessInfo = ProcessInfos.Any(),
         Notes = Notes,
         Now = now,
         LinkedReservationID = linkedReservationId,
         ModifiedByClientID = modifiedByClientId.GetValueOrDefault(ClientID)
     });
 }