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

            if (window1.ShowDialog() == true)
            {
                UpdateCollection();
            }
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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();
            }
        }