Пример #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (semester.Text == "")
     {
         a1.Visibility = Visibility.Visible;
         p.Visibility  = Visibility.Visible;
         if (type.Text == "")
         {
             a2.Visibility = Visibility.Visible;
         }
         if (group.Text == "")
         {
             a3.Visibility = Visibility.Visible;
         }
         if (Discipline.Text == "")
         {
             a4.Visibility = Visibility.Visible;
         }
         if (student.Text == "")
         {
             a5.Visibility = Visibility.Visible;
         }
         if (mark.Text == "")
         {
             a6.Visibility = Visibility.Visible;
         }
     }
     else
     {
         if (type.Text == "")
         {
             a2.Visibility = Visibility.Visible;
             p.Visibility  = Visibility.Visible;
             if (group.Text == "")
             {
                 a3.Visibility = Visibility.Visible;
             }
             if (Discipline.Text == "")
             {
                 a4.Visibility = Visibility.Visible;
             }
             if (student.Text == "")
             {
                 a5.Visibility = Visibility.Visible;
             }
             if (mark.Text == "")
             {
                 a6.Visibility = Visibility.Visible;
             }
         }
         else
         {
             if (group.Text == "")
             {
                 a3.Visibility = Visibility.Visible;
                 p.Visibility  = Visibility.Visible;
                 if (Discipline.Text == "")
                 {
                     a4.Visibility = Visibility.Visible;
                 }
                 if (student.Text == "")
                 {
                     a5.Visibility = Visibility.Visible;
                 }
                 if (mark.Text == "")
                 {
                     a6.Visibility = Visibility.Visible;
                 }
             }
             else
             {
                 if (Discipline.Text == "")
                 {
                     a4.Visibility = Visibility.Visible;
                     p.Visibility  = Visibility.Visible;
                     if (student.Text == "")
                     {
                         a5.Visibility = Visibility.Visible;
                     }
                     if (mark.Text == "")
                     {
                         a6.Visibility = Visibility.Visible;
                     }
                 }
                 else
                 {
                     if (student.Text == "")
                     {
                         a5.Visibility = Visibility.Visible;
                         p.Visibility  = Visibility.Visible;
                         if (mark.Text == "")
                         {
                             a6.Visibility = Visibility.Visible;
                         }
                     }
                     else
                     {
                         if (mark.Text == "")
                         {
                             a6.Visibility = Visibility.Visible;
                             p.Visibility  = Visibility.Visible;
                         }
                         else
                         {
                             ListInterface a = new ClassList();
                             a.AddMark(semester.Text, type.Text, group.Text, Discipline.Text, student.Text, mark.Text);
                             mark.SelectedIndex    = -1;
                             student.SelectedIndex = -1;
                         }
                     }
                 }
             }
         }
     }
 }