Beispiel #1
0
        public void cargarMatriculas()
        {
            // INSTANCIAMOS FUERA DEL CONDICIONAL PARA RECARGAR LAS MATRICULAS SI SE HA DESMATRICULADO DE ALGUNA EL ALUMNO
            var viewModel = new MatriculasVM();

            viewModel.MatriculasAdapterList.Clear();
            dgMatriculasPerfilAlumno.ItemsSource = null;
            WebService        webService = new WebService();
            MatriculaResponse response   = webService.getMatriculas(this.idAlumno);

            if (response.estado == 1)
            {
                viewModel = new MatriculasVM();
                foreach (Matricula matricula in response.matriculas)
                {
                    viewModel.MatriculasAdapterList.Add(matricula);
                }
                dgMatriculasPerfilAlumno.ItemsSource = viewModel.MatriculasAdapterList;
            }
        }