public SchedulingDateSearchAlgorithms( int CourseIDBookingFor, DateTime InitialDateToStartFrom, SearchTimeAhead AmountOfSearchTimeAhead, int CurriculumCourseID) { this.CourseIDBookingFor = CourseIDBookingFor; this.InitalDate = InitialDateToStartFrom; this.AmountOfSearchTimeAhead = AmountOfSearchTimeAhead; this.CurriculumCourseID = CurriculumCourseID; FacilitatorAvailableDateSets = new List <FacilitatorAvailableDateSet>(); FacilitatorBookedDateSets = new List <FacilitatorBookedDateSet>(); CourseAvailableDateSets = new List <CourseAvailableDateSet>(); SetBookedDatesForFacilitators(); SetAvailableDatesForFacilitators(); SetPossibleCurriculumCourseDates(); }
//public enum SearchTimeAhead : int //{ // OneMonth = 1, // ThreeMonths = 3, // SixMonth = 6, // NineMonths = 9, // TwelveMonths = 12, // TwentyFourMonths = 24 //} public SchedulingDateSearchAlgorithms( int CourseIDBookingFor, DateTime InitialDateToStartFrom, SearchTimeAhead AmountOfSearchTimeAhead, int CurriculumCourseID, EnumScheduleLocations ScheduleLocation) { this.CourseIDBookingFor = CourseIDBookingFor; this.InitalDate = InitialDateToStartFrom; this.AmountOfSearchTimeAhead = AmountOfSearchTimeAhead; this.CurriculumCourseID = CurriculumCourseID; FacilitatorBookedDateSets = new List <FacilitatorBookedDateSet>(); FacilitatorAvailableDateSets = new List <FacilitatorAvailableDateSet>(); VenueBookedDateSets = new List <VenueBookedDateSet>(); VenueAvailableDateSets = new List <VenueAvailableDateSet>(); //use this one for Off-Site CourseByFacilitatorAvailableDateSets = new List <CourseByFacilitatorAvailableDateSet>(); CourseByFacilitatorAndVenueAvailableDateSets = new List <CourseByFacilitatorAndVenueAvailableDateSet>(); SetBookedDatesForFacilitators(); SetBookedDatesForVenues(); SetAvailableDatesForFacilitators(); SetAvailableDatesForVenues(); switch (ScheduleLocation) { case EnumScheduleLocations.Onsite: SetPossibleCurriculumCourseDatesWithFacilitatorOnly(); SetPossibleCurriculumCourseDatesWithFacilitatorAndVenue(); break; case EnumScheduleLocations.OffSite: SetPossibleCurriculumCourseDatesWithFacilitatorOnly(); break; } }