Пример #1
0
        public ListItemCollection AcademmicYearList()
        {
            var academicYearList = new ListItemCollection();
            var academicYears    = PageDataService.GetAllAcademicYearsAdoNet();

            foreach (var academicYear in academicYears)
            {
                academicYearList.Add(new ListItem(
                                         academicYear.AcademicYearStart.ToString("dd/MM/yyyy") + "--" +
                                         academicYear.AcademicYearEnd.ToString("dd/MM/yyyy"), Convert.ToString(academicYear.AcademicYearId)));
            }
            return(academicYearList);
        }