}//BuildTypicalWeek() // Method to fill in the collection for the years // // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 10/19/06 KRC 7.36.00 N/A Creation of class // private void BuildYears() { //Initialize the year collection m_colYears = new CYearCollection(); //Year Data will be added by ANSIDevice }//BuildYears()
}// UsedByTypicalWeek /// <summary> /// This method looks to see if this day type is being used in a /// holiday within the given TOU Schedule /// </summary> /// <param name="sched"> /// Represents the TOU Schedule to search within. /// </param> /// <returns> /// Returns true if this day type is used in a holiday and /// false otherwise. /// </returns> /// Revision History /// MM/DD/YY who Version Issue# Description /// -------- --- ------- ------ --------------------------------------- /// 06/28/06 ach N/A N/A Moved method from Day Types Form.cs public Boolean UsedByHoliday(CTOUSchedule sched) { // Local Variables CYearCollection years = sched.Years; CEventCollection events; String name = sched.Holidays[Index]; Boolean result = false; // If this day type is not a holiday then stop // and return false if (eDayType.NORMAL == Type) { return(false); } // Search through all the years within the schedule foreach (CYear year in years) { events = year.Events; // Search each event in the year foreach (CEvent yearEvent in events) { if (eEventType.HOLIDAY == yearEvent.Type && name == yearEvent.Name) { result = true; } } } return(result); }// UsedByHoliday