public Accept ( int revisingUserId ) : void | ||
revisingUserId | int | The ID of the user accepting the |
return | void |
/// <summary> /// Attempts to accept the appointment /// </summary> /// <param name="revisingUserId">The revising user's id.</param> /// <param name="apt">The appointment to accept.</param> /// <returns><c>true</c> if an <see cref="Appointment"/> can be accepted. Else, <c>false</c>.</returns> private bool TryAcceptAppointment(int revisingUserId, Appointment apt) { var canCreate = Appointment.CanCreateAt( this.ModuleId, apt.StartDateTime, apt.EndDateTime, ModuleSettings.MaximumConcurrentAppointments.GetValueAsInt32For(this).Value); if (!canCreate) { return(false); } apt.Accept(revisingUserId); return(true); }
/// <summary> /// Attempts to accept the appointment /// </summary> /// <param name="revisingUserId">The revising user's id.</param> /// <param name="apt">The appointment to accept.</param> /// <returns><c>true</c> if an <see cref="Appointment"/> can be accepted. Else, <c>false</c>.</returns> private bool TryAcceptAppointment(int revisingUserId, Appointment apt) { var canCreate = Appointment.CanCreateAt( this.ModuleId, apt.StartDateTime, apt.EndDateTime, ModuleSettings.MaximumConcurrentAppointments.GetValueAsInt32For(this).Value); if (!canCreate) { return false; } apt.Accept(revisingUserId); return true; }