private void eliminarAlumno(object sender, RoutedEventArgs e) { MessageBoxResult messageBoxResult = Utils.msgBox("¿Desea eliminar el alumno? Se eliminarán también sus matrículas, notas y faltas", "yesno", "question"); if (messageBoxResult == MessageBoxResult.Yes) { WebService webService = new WebService(); EstadoMensajeResponse response = webService.eliminarAlumno(this.idAlumno); if (response.estado == 1) { Utils.msgBox(response.mensaje, "ok", "info"); ((MainWindow)this.Owner).cargarAlumnos(); this.Close(); } else { Utils.msgBox(response.mensaje, "ok", "error"); } } }