Ejemplo n.º 1
0
        private void DataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            Student tmp           = (Student)DataGrid.SelectedItem;
            Window  dodajStudenta = new StudentWindow(tmp);

            dodajStudenta.ShowDialog();
            new DB().EditStudent(tmp);

            SetDataGrid();
        }
Ejemplo n.º 2
0
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            Student tmp = new Student();

            Window dodajStudenta = new StudentWindow(tmp);

            dodajStudenta.ShowDialog();

            if (!string.IsNullOrWhiteSpace(tmp.LastName))
            {
                list.Add(tmp);
                new DB().AddStudent(tmp);
            }
            SetDataGrid();
        }