forked from Bryan3214-aiz/PRY_Preguntados
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrmBuscarPerfilProfesor.vb
31 lines (30 loc) · 1.49 KB
/
FrmBuscarPerfilProfesor.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Public Class FrmBuscarPerfilProfesor
Dim ID As Integer = 0 'CODIGO SELECCIONADO
Friend Sub INICIALIZAR()
comando = "SELECT ID_PROFESOR, NOMBRE_COMPLETO, CORREO_ELECTRONICO, IDENTIFICACION,CONTRASENA, PATRON FROM PROFESOR"
BUSCAR(comando)
ID = 0
End Sub
Friend Sub BUSCAR(ByVal SQL As String)
ds.Tables.Clear()
L.Items.Clear()
CARGAR_TABLA(ds, SQL)
If ds.Tables(0).Rows.Count > 0 Then
For I = 0 To ds.Tables(0).Rows.Count - 1
L.Items.Add(ds.Tables(0).Rows(I).Item(0))
L.Items(L.Items.Count - 1).SubItems.Add(ds.Tables(0).Rows(I).Item(1))
L.Items(L.Items.Count - 1).SubItems.Add(ds.Tables(0).Rows(I).Item(2))
L.Items(L.Items.Count - 1).SubItems.Add(ds.Tables(0).Rows(I).Item(3))
L.Items(L.Items.Count - 1).SubItems.Add(ds.Tables(0).Rows(I).Item(4))
L.Items(L.Items.Count - 1).SubItems.Add(ds.Tables(0).Rows(I).Item(5))
Next
End If
End Sub
Private Sub TXTNOMBREPROFESOR_TextChanged(sender As Object, e As EventArgs) Handles TXTNOMBREPROFESOR.TextChanged
comando = "SELECT ID_PROFESOR, NOMBRE_COMPLETO, CORREO_ELECTRONICO, IDENTIFICACION, CONTRASENA, PATRON FROM PROFESOR WHERE NOMBRE_COMPLETO LIKE '%" & TXTNOMBREPROFESOR.Text & "%'"
BUSCAR(comando)
End Sub
Private Sub FrmBuscarPerfilProfesor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
INICIALIZAR()
End Sub
End Class