示例#1
0
        private void AddNewStudentButton_Click(object sender, RoutedEventArgs e)
        {
            var addStudnetWindow = new AddStudentWindow(Studies);

            addStudnetWindow.AddStudent += new AddStudentHandler(AddStudentHandler);
            addStudnetWindow.ShowDialog();
        }
示例#2
0
        private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var dg       = sender as DataGrid;
            var selected = dg.SelectedItem;

            if (selected != null)
            {
                var student = selected as Student;
                connection.context.Students.Attach(student);
                var addWindow = new AddStudentWindow(student, Studies);
                addWindow.ShowDialog();
            }
        }