///
/// Loads the classes.
///
private void LoadLessons( List<Lesson> listCollection )
{
List<Lesson> checkedListCollection = new List<Lesson>();
#region Adequate LessonCollection
foreach ( Lesson model in listCollection )
{
if ( !checkedListCollection.Exists( delegate( Lesson t ) { return t.LessonId == model.LessonId; } ) )
{
checkedListCollection.Add( model );
}
}
lblNumberOfTotalLessons.Text = checkedListCollection.Count.ToString();
dgLessons.CurrentPageIndex = 0;
dgLessons.DataSource = checkedListCollection;
dgLessons.ItemDataBound += new DataGridItemEventHandler( dgLessons_ItemDataBound );
dgLessons.Columns[0].HeaderText = LocalizationUtility.GetText( "hdrName" );
dgLessons.Columns[1].HeaderText = LocalizationUtility.GetText( "hdrSchedule" );
dgLessons.Columns[2].HeaderText = LocalizationUtility.GetText( "hdrClass" );
dgLessons.Columns[3].HeaderText = LocalizationUtility.GetText( "hdrCourse" );
dgLessons.Columns[4].HeaderText = LocalizationUtility.GetText( "hdrClassRoom" );
dgLessons.Columns[5].HeaderText = LocalizationUtility.GetText( "hdrStatus" );
dgLessons.DataBind();
}
|