2. BUSCAR
Este código, realiza la acción de encontrar los datos pedidos por el programa y
visualizarlos en la depuración del mismo.
Codigo.
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
REM CONSULTAS
Dim mitabla AsDataTable =
CODREP_________________________________DataSet.ALUMNO
Dim cfilas AsDataRowCollection = mitabla.Rows
Dim nuevafila AsDataRow
Dim i AsInteger
Dim n AsInteger
n = ALUMNOBindingSource.Count()
Dim bandera AsBoolean
bandera = True
Dim tamaño AsInteger
tamaño = ALUMNOBindingSource.Count()
i = 1
If (tamaño = 0) Then
Else
Do
If (Trim(MATRICULATextBox.Text) = Trim(TextBox1.Text)) Then
bandera = False
Else
ALUMNOBindingSource.MoveNext()
i = i + 1
EndIf
LoopWhile (bandera = TrueAnd i <= tamaño)
EndIf
If (bandera = False) Then
ID_ALUMNOTextBox.Enabled = False
ID_ALUMNOTextBox.Visible = False
NOMBRETextBox.Enabled = False
NOMBRETextBox.Visible = False
APELLIDOSTextBox.Enabled = False
APELLIDOSTextBox.Visible = False
MATRICULATextBox.Enabled = False
5. EndIf
EndSub
ELIMINAR
Suprime datos no deseados .
Codigo.
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
REM CONSULTAS
Dim mitabla AsDataTable =
CODREP_________________________________DataSet.ALUMNO
Dim cfilas AsDataRowCollection = mitabla.Rows
Dim nuevafila AsDataRow
Dim i AsInteger
Dim n AsInteger
n = ALUMNOBindingSource.Count()
Dim bandera AsBoolean
bandera = True
Dim tamaño AsInteger
tamaño = ALUMNOBindingSource.Count()
i = 1
If (tamaño = 0) Then
Else
Do
If (Trim(MATRICULATextBox.Text) = Trim(TextBox1.Text)) Then
bandera = False
Else
ALUMNOBindingSource.MoveNext()
i = i + 1
EndIf
LoopWhile (bandera = TrueAnd i <= tamaño)
EndIf
If (bandera = False) Then
ID_ALUMNOTextBox.Enabled = False
ID_ALUMNOTextBox.Visible = False