private void btnConsultarID_Click_1(object sender, EventArgs e) { if (txtNoIdentidadEstudiante.Text != string.Empty && txtNoIdentidadEstudiante.TextLength == 13 && utilidades.isNumeric(txtNoIdentidadEstudiante.Text) == true) { if (dbConn.obtenerVariableString("SELECT id_Estudiante FROM detalleMensualidades WHERE id_Estudiante = '" + txtNoIdentidadEstudiante.Text + "'") != null) { dbConn.llenarDGV(dgvHistorialPagos, "Select id_Mensualidad as 'ID', fechaFacturacion as 'FECHA DE FACTURACION', fechaPago as 'FECHA DE PAGO', deudaPendiente as 'DEUDA', " + "saldoDisponible as 'SALDO', descuentoMensualidad as 'DESCUENTO' from detalleMensualidades WHERE id_Estudiante = '" + txtNoIdentidadEstudiante.Text + "'"); dbConn.llenarTextBox(txtNombreEstudiante, "SELECT concat(primerNombre, ' ', segundoNombre, ' ', primerApellido, ' ', segundoApellido) FROM datosEstudiante WHERE identidadEstudiante = " + txtNoIdentidadEstudiante.Text); dbConn.llenarTextBox(txtNombrePadre, "SELECT concat(primerNombre, ' ', segundoNombre, ' ', primerApellido, ' ', segundoApellido) " + "FROM datosEncargado de inner join matricula m on de.identidadEncargado = m.id_EncargadoAlumno WHERE m.id_Estudiante = " + txtNoIdentidadEstudiante.Text); lblPendientePago.Text = "Pendiente de Pago: Lps. " + dbConn.obtenerVariableDouble("SELECT TOP 1(deudaPendiente) FROM detalleMensualidades WHERE id_Estudiante = '" + txtNoIdentidadEstudiante.Text + "' ORDER BY id_Mensualidad DESC"); } else { boxError.lblError.Text = "NUMERO DE IDENTIDAD \r\n INEXISTENTE"; boxError.lblError.Location = new Point(115, 74); boxError.lblError.TextAlign = ContentAlignment.MiddleCenter; boxError.ShowDialog(); txtNoIdentidadEstudiante.Focus(); } } else { boxError.lblError.Text = "VERIFIQUE LOS VALORES"; boxError.lblError.Location = new Point(130, 82); boxError.ShowDialog(); txtNoIdentidadEstudiante.Focus(); } }