Esempio n. 1
0
        private void type_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (group.Text != "" && semester.Text != "")
            {
                Discipline.SelectedItem = null;
                ListInterface a = new ClassList();
                switch (type.SelectedIndex)
                {
                case 0: Discipline.ItemsSource = a.GetDisciplineGroup(group.Text, "Зачет", semester.Text); break;

                case 1: Discipline.ItemsSource = a.GetDisciplineGroup(group.Text, "Экзамен", semester.Text); break;

                case 2: Discipline.ItemsSource = a.GetDisciplineGroup(group.Text, "Дифференцированный зачет", semester.Text); break;
                }
            }
            mark.SelectedItem = null;
            if (type.SelectedIndex == 0)
            {
                string[] mas = { "зачтено", "не зачтено" };
                mark.ItemsSource = mas;
            }
            else
            {
                string[] mas = { "отлично", "хорошо", "удовлетворительно", "неудовлетворительно" };
                mark.ItemsSource = mas;
            }
            a2.Visibility = Visibility.Hidden;
            if (semester.Text != "" && group.Text != "" && Discipline.Text != "" && student.Text != "" && mark.Text != "")
            {
                p.Visibility = Visibility.Hidden;
            }
        }
Esempio n. 2
0
 private void semester_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (type.Text != "" && group.Text != "")
     {
         ListInterface a = new ClassList();
         Discipline.SelectedItem = null;
         Discipline.ItemsSource  = a.GetDisciplineGroup(group.Text, type.Text, semester.SelectedItem.ToString());
     }
     a1.Visibility = Visibility.Hidden;
     if (type.Text != "" && group.Text != "" && Discipline.Text != "" && student.Text != "" && mark.Text != "")
     {
         p.Visibility = Visibility.Hidden;
     }
 }
Esempio n. 3
0
 private void type_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (group.Text != "" && semester.Text != "")
     {
         disc.SelectedItem = null;
         ListInterface a = new ClassList();
         disc.ItemsSource = a.GetDisciplineGroup(group.Text, type.SelectedItem.ToString(), semester.Text);
     }
     a3.Visibility = Visibility.Hidden;
     if (semester.Text != "" && group.Text != "" && (disc.Text != "" || disc.Text != "..выберете тип, семестр и группу"))
     {
         p.Visibility = Visibility.Hidden;
     }
 }
Esempio n. 4
0
        private void group_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            student.SelectedItem = null;
            StudentInterface s = new ClassStudent();
            ListInterface    d = new ClassList();

            student.ItemsSource = s.GetStudents(group.SelectedItem.ToString());
            if (type.Text != "" && semester.Text != "")
            {
                Discipline.SelectedItem = null;
                Discipline.ItemsSource  = d.GetDisciplineGroup(group.SelectedItem.ToString(), type.Text, semester.Text);
            }
            a3.Visibility = Visibility.Hidden;
            if (type.Text != "" && semester.Text != "" && Discipline.Text != "" && student.Text != "" && mark.Text != "")
            {
                p.Visibility = Visibility.Hidden;
            }
        }