private void Click_Add(object sender, RoutedEventArgs e)
        {
            AddStudent window1 = new AddStudent(new Student(), true, connection, factory);

            if (window1.ShowDialog() == true)
            {
                UpdateCollection();
            }
        }
        private void Click_Add(object sender, RoutedEventArgs e)
        {
            AddStudent windowAddStudent = new AddStudent(new Student(), true, connection);

            if (windowAddStudent.ShowDialog() == true)
            {
                sqlExpression = "Select * from Student";
            }
            SqlCommand sqlCommand = new SqlCommand(sqlExpression, connection);

            UpdateCollection();
        }
        private void Click_Update(object sender, RoutedEventArgs e)
        {
            // //Якщо немає виділеного стурента
            if (lb_students.SelectedIndex == -1)
            {
                return;
            }

            //інакше
            AddStudent window1 = new AddStudent(students[lb_students.SelectedIndex], false, connection, factory);

            if (window1.ShowDialog() == true)
            {
                UpdateCollection();
            }
        }