public IEnumerable <SchedulerResource> GetSchedulerResources([FromBody] SchedulerResourceParameters schedulerResourceParameters) { var rockContext = new RockContext(); var attendanceService = new AttendanceService(rockContext); return(attendanceService.GetSchedulerResources(schedulerResourceParameters)); }
/// <summary> /// Copies the base properties from a source SchedulerResourceParameters object /// </summary> /// <param name="source">The source.</param> public void CopyPropertiesFrom(SchedulerResourceParameters source) { this.AttendanceOccurrenceGroupId = source.AttendanceOccurrenceGroupId; this.AttendanceOccurrenceScheduleId = source.AttendanceOccurrenceScheduleId; this.AttendanceOccurrenceSundayDate = source.AttendanceOccurrenceSundayDate; this.GroupMemberFilterType = source.GroupMemberFilterType; this.ResourceAdditionalPersonIds = source.ResourceAdditionalPersonIds; this.ResourceDataViewId = source.ResourceDataViewId; this.ResourceGroupId = source.ResourceGroupId; }
public SchedulerResource GetSchedulerResource([FromBody] SchedulerResourceParameters schedulerResourceParameters, int personId) { var rockContext = new RockContext(); var attendanceService = new AttendanceService(rockContext); schedulerResourceParameters.LimitToPersonId = personId; var result = attendanceService.GetSchedulerResources(schedulerResourceParameters).FirstOrDefault(); return(result); }
/// <summary> /// Copies the base properties from a source SchedulerResourceParameters object /// </summary> /// <param name="source">The source.</param> public void CopyPropertiesFrom(SchedulerResourceParameters source) { this.AttendanceOccurrenceGroupId = source.AttendanceOccurrenceGroupId; #pragma warning disable 612, 618 this.AttendanceOccurrenceScheduleId = source.AttendanceOccurrenceScheduleId; #pragma warning restore 612, 618 this.AttendanceOccurrenceScheduleIds = source.AttendanceOccurrenceScheduleIds; this.AttendanceOccurrenceSundayDate = source.AttendanceOccurrenceSundayDate; this.GroupMemberFilterType = source.GroupMemberFilterType; this.LimitToPersonId = source.LimitToPersonId; this.ResourceAdditionalPersonIds = source.ResourceAdditionalPersonIds; this.ResourceDataViewId = source.ResourceDataViewId; this.ResourceGroupId = source.ResourceGroupId; }