Пример #1
0
 public SML_Stu_Add(Semester sems, MenuLecturerLogic.SectionDisplay selected_sec, int studentinsecnumber)
 {
     InitializeComponent();
     this.semester           = sems;
     this.selected_sec       = selected_sec;
     free_space              = selected_sec.Max_User - studentinsecnumber;
     StudentGrid.ItemsSource = MenuLecturerLogic.getFreeStudentInSem(semester, selected_sec.ID_sekcji);
 }
Пример #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (sectionsgrid.SelectedItem == null)
            {
                MessageBox.Show("Wynierz sekcje!");
                return;
            }

            int current_user_number = StuSecGrid.Items.Count;

            if (max_user == current_user_number)
            {
                MessageBox.Show("Ta sekcja jest pełna");
                return;
            }

            MenuLecturerLogic.SectionDisplay selected_secion = (MenuLecturerLogic.SectionDisplay)sectionsgrid.SelectedItem;
            SML_Stu_Add stu_add_window = new SML_Stu_Add(semestr, selected_secion, current_user_number);

            stu_add_window.Show();
        }