e; .IsEnabled=false;
}
}
} void ComboBoxGroup_SelectionChanged (object sender, SelectionChangedEventArgs e)
{(ComboBoxGroup.SelectedItem!=null)
{. IsEnabled=true; .IsEnabled=true;
}
{. IsEnabled=false; .IsEnabled=false;
} groupName=string.Empty; {groupName=ComboBoxGroup.SelectedItem.ToString (); } Catch {} (groupName); str=String.Empty; {str=ComboBoxSpeciality.SelectedItem.ToString (); } {} .ItemsSource=_dataManager.GetDaysList () ;. SelectedIndex=0; .ItemsSource=_dataManager.GetSubjectsList (str) ;. SelectedIndex=0; .ItemsSource=_dataManager.GetClassesList () ;. SelectedIndex=0; .ItemsSource=MainWindow.weekNum.Values; .SelectedIndex=0; .Content=_LessonNum; .ItemsSource=new string [] { Лекційне raquo ;, Практичне raquo ;, Лабораторне } ;. SelectedIndex=0;
} void SetComboInstitutes ()
{. ItemsSource=_dataManager.GetInstituteList () ;. SelectedIndex=0;
} void SetComboSpecialities ()
{. ItemsSource=_dataManager.GetSpecialityList (ComboBoxInstitute.SelectedItem.ToString ()) ;. SelectedIndex=0;
} void SetComboGroups ()
{specialityName=string.Empty; (ComboBoxSpeciality.SelectedItem!=null) specialityName=ComboBoxSpeciality.SelectedItem.ToString () ;. ItemsSource=_dataManager.GetGroupList (specialityName) ;. SelectedIndex=0;
} void buttonAddGroup_Click (object sender, RoutedEventArgs e)
{(ComboBoxInstitute.SelectedItem!=null amp; amp; ComboBoxSpeciality!=null)
{addGroup=new AddGroup (ComboBoxInstitute.SelectedItem.ToString (), ComboBoxSpeciality.SelectedItem.ToString ()) ;. Show ();
}
} void buttonDeleteGroup_Click (object sender, RoutedEventArgs e)
{(ComboBoxGroup.SelectedItem!=null)
{
_ dataManager.DropGroup (ComboBoxGroup.SelectedItem.ToString ()); ();
}
}
void buttonEditSubject_Click (object sender, RoutedEventArgs e)
{(ComboBoxSpeciality.Items.Count gt; 0)
{editSub=new EditSubject (ComboBoxSpeciality.SelectedItem.ToString ()) ;. Show ();
}
} void buttonEditTeachers_Click (object sender, RoutedEventArgs e)
{(ComboBoxSpeciality.Items.Count gt; 0)
{editTeacher=new EditTeachers (ComboBoxSpeciality.SelectedItem.ToString ()) ;. Show ();
}
} void buttonCancel_Click (object sender, RoutedEventArgs e)
{
_ dataManager.EventChangedGroups -=new MyEventHandler (GetInstance_EventChangedGroups);
_ dataManager.EventChangeLessons -=new MyEventHandler (GetInstance_EventChangeLessons); ();
} void buttonEditClasses_Click (object sender, RoutedEventArgs e)
{editClasses=new EditClasses ();
} void gridContent_SelectionChanged (object sender, SelectionChangedEventArgs e)
{
} void buttonDeleteLesson_Click (object sender, RoutedEventArgs e)
{(gridContent.SelectedItem!=null)
{item=(Shedule) gridContent.SelectedItem; week=0; (KeyValuePair lt; int, string gt; pair in MainWindow.weekNum)
{(pair.Value == item.WeekNum) week=pair.Key;
}
_ dataManager.DropLesson (ComboBoxGroup.SelectedItem.ToString (), item.DayName, item.LessonNum, week);
}
} void comboBoxSubject_SelectionChanged (object sender, SelectionChangedEventArgs e)
{str=String.Empty; {str=comboBoxSubject.SelectedItem.ToString (); } {} .ItemsSource=_dataManager.GetTeachersList (Str) ;. SelectedIndex=0;
} void buttonAdd_Click (object sender, RoutedEventArgs e)
{
{(ComboBoxGroup.SelectedItem!=null)
{numOFWeek=0; (KeyValuePair lt; int, string gt; pair in MainWindow.weekNum)
{(pair.Value == comboBoxWeek.SelectedItem.ToString ()) numOFWeek=pair.Key;
} (_ dataManager.AddNewLesson (ComboBoxGroup.SelectedItem.ToString (), comboBoxDay.SelectedItem.ToString (), comboBoxSubject.SelectedItem.ToString () ,, comboBoxTeacher.SelectedItem.ToString (), Convert.ToInt32 (comboBoxClass.SelectedItem), Convert.ToIn...