/// <summary>Actualiza el grid si contiene datos.</summary>
        private void UpdateGrid()
        {
            AlumnoController alumnoController = new AlumnoController();

            gridAlumno.ItemsSource = null;
            if (alumnoController.GetAlumno().Any())
            {
                gridAlumno.ItemsSource = alumnoController.GetAlumno();
            }
            else
            {
                this.Close();
            }
        }
Пример #2
0
        private void UpdateGrid()
        {
            AlumnoController alumnoController = new AlumnoController();

            gridAlumno.ItemsSource = null;
            if (alumnoController.GetAlumno().Any())
            {
                gridAlumno.ItemsSource = alumnoController.GetAlumno();
            }
            else
            {
                MessageBox.Show("No se encuentran alumnos registrados");
                this.Close();
            }
        }