void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.AlumnosMatricularWindow1 = ((CUADERNODELPROFESOR.AlumnosMatricularWindow)(target)); return; case 2: this.txtAsignaturaMatricular = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.cbAlumnoMatricula = ((System.Windows.Controls.ComboBox)(target)); return; case 4: #line 26 "..\..\..\ui\AlumnosMatricularWindow.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.matricularAlumno); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.AlumnosMatricularWindow1 = ((CUADERNODELPROFESOR.AlumnosMatricularWindow)(target)); return; case 2: this.txtNombreMatriculaAlumno = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.cbAlumnoMatricula = ((System.Windows.Controls.ComboBox)(target)); return; } this._contentLoaded = true; }
private void matricularAlumnos(object sender, RoutedEventArgs e) { if (!ventanaAbierta()) { // RECOGEMOS LA ASIGNATURA SELECCIONADA DEL COMBOBOX int numAsignaturaSeleccionada = cbAsignaturasClases.SelectedIndex; if (numAsignaturaSeleccionada != -1) { // CON EL INDEX ACCEDEMOS A LA LISTA DE OBJETOS ASIGNATURA Y COGEMOS LA ASIGNATURA Asignatura asignaturaSeleccionada = listaAsignaturas.ElementAt(numAsignaturaSeleccionada); // ABRIMOS LA VENTANA MATRICULAR ALUMNO PASÁNDOLE EL OBJETO DE LA ASIGNATURA TANTO PARA // MOSTRAR EL NOMBRE DE LA MISMA COMO PARA TENER EL ID PARA MATRICULAR AL ALUMNO AlumnosMatricularWindow alumnosMatricular = new AlumnosMatricularWindow(asignaturaSeleccionada); alumnosMatricular.Owner = this; alumnosMatricular.Show(); } else { Utils.msgBox("No ha seleccionado ninguna asignatura, use las listas superiores para ello", "ok", "warning"); } } }