際際滷

際際滷Share a Scribd company logo
COLEGIO DE EDUCACION PROFESIONAL
TECNICA DEL ESTADO DE TLAXCALA
INTEGRANTES:
ESPINOSA SANCHEZ MIRIAM
Docente: ING. AGUSTN HERNNDEZ DELGADO
PROYECTO: CONTROL DE PARAESCOLAR
MODULO: ELABORACIN Y MANTENIMIENTO DE SISTEMAS DE
INFORMACIN
ESPECIALIDAD: INFORMTICA
GRADO: 6尊 SEMESTREGRUPO: 603
C坦digo para b炭squeda de datos existentes
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
Dim mitabla As DataTable = ParaescolarDataSet.altas
Dim cfilas As DataRowCollection = mitabla.Rows
Dim nuevafila As DataRow
Dim i As Integer
Dim bandera As Boolean
bandera = True
Dim tamano As Integer
AltasBindingSource.MoveFirst()
tamano = AltasBindingSource.Count()
Dim res As Boolean
Dim a As String
Dim b As String
a = UCase(Trim(MatriculaTextBox.Text))
b = UCase(Trim(TextBox1.Text))
If (tamano = 0) Then
MsgBox("Tabla Vacia")
Else
AltasBindingSource.MoveFirst()
a = UCase(Trim(MatriculaTextBox.Text))
Do
res = a Like b
If (res = True) Then
bandera = False
Else
AltasBindingSource.MoveNext()
a = UCase(Trim(MatriculaTextBox.Text))
i = i + 1
End If
Loop While (bandera = True And i <= tamano)
End If
If (bandera = False) Then
IdTextBox.Visible = True
MatriculaTextBox.Visible = True
Nombre_compTextBox1.Visible = True
GrupoTextBox.Visible = True
EspecialidadTextBox.Visible = True
Nom_paraescolarTextBox.Visible = True
Nom_profTextBox.Visible = True
Fech_inicioDateTimePicker.Visible = True
IdTextBox.Enabled = True
MatriculaTextBox.Enabled = True
Nombre_compTextBox1.Enabled = True
GrupoTextBox.Enabled = True
EspecialidadTextBox.Enabled = True
Nom_paraescolarTextBox.Enabled = True
Nom_profTextBox.Enabled = True
Fech_inicioDateTimePicker.Enabled = True
MsgBox("Existen datos")
Else
MsgBox("Introduce datos")
nuevafila = mitabla.NewRow
cfilas.Add(nuevafila)
AltasBindingSource.MoveLast()
IdTextBox.Visible = True
MatriculaTextBox.Visible = True
Nombre_compTextBox1.Visible = True
GrupoTextBox.Visible = True
EspecialidadTextBox.Visible = True
Nom_paraescolarTextBox.Visible = True
Nom_profTextBox.Visible = True
Fech_inicioDateTimePicker.Visible = True
IdTextBox.Enabled = True
MatriculaTextBox.Enabled = True
Nombre_compTextBox1.Enabled = True
GrupoTextBox.Enabled = True
EspecialidadTextBox.Enabled = True
Nom_paraescolarTextBox.Enabled = True
Nom_profTextBox.Enabled = True
Fech_inicioDateTimePicker.Enabled = True
nuevafila(1) = MatriculaTextBox
nuevafila(2) = Nombre_compTextBox1
nuevafila(3) = GrupoTextBox
nuevafila(4) = EspecialidadTextBox
nuevafila(5) = Nom_paraescolarTextBox
nuevafila(6) = Nom_profTextBox
nuevafila(7) = Fech_inicioDateTimePicker
End If
End Sub
C坦digo para el bot坦n grabar
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If (ParaescolarDataSet.HasChanges) Then
Me.Validate()
Me.AltasBindingSource.EndEdit()
Me.AltasTableAdapter.Update(Me.ParaescolarDataSet.altas)
MsgBox("Grabado")
IdTextBox.Enabled = False
MatriculaTextBox.Enabled = False
Nombre_compTextBox1.Enabled = False
GrupoTextBox.Enabled = False
EspecialidadTextBox.Enabled = False
Nom_paraescolarTextBox.Enabled = False
Nom_profTextBox.Enabled = False
Fech_inicioDateTimePicker.Enabled = False
End If
End Sub
Controldepracticas

More Related Content

Controldepracticas

  • 1. COLEGIO DE EDUCACION PROFESIONAL TECNICA DEL ESTADO DE TLAXCALA INTEGRANTES: ESPINOSA SANCHEZ MIRIAM Docente: ING. AGUSTN HERNNDEZ DELGADO PROYECTO: CONTROL DE PARAESCOLAR MODULO: ELABORACIN Y MANTENIMIENTO DE SISTEMAS DE INFORMACIN ESPECIALIDAD: INFORMTICA GRADO: 6尊 SEMESTREGRUPO: 603
  • 2. C坦digo para b炭squeda de datos existentes Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim mitabla As DataTable = ParaescolarDataSet.altas Dim cfilas As DataRowCollection = mitabla.Rows Dim nuevafila As DataRow Dim i As Integer Dim bandera As Boolean bandera = True Dim tamano As Integer AltasBindingSource.MoveFirst() tamano = AltasBindingSource.Count() Dim res As Boolean Dim a As String Dim b As String a = UCase(Trim(MatriculaTextBox.Text)) b = UCase(Trim(TextBox1.Text)) If (tamano = 0) Then MsgBox("Tabla Vacia") Else AltasBindingSource.MoveFirst() a = UCase(Trim(MatriculaTextBox.Text)) Do res = a Like b If (res = True) Then bandera = False Else AltasBindingSource.MoveNext() a = UCase(Trim(MatriculaTextBox.Text)) i = i + 1 End If Loop While (bandera = True And i <= tamano) End If If (bandera = False) Then IdTextBox.Visible = True MatriculaTextBox.Visible = True Nombre_compTextBox1.Visible = True GrupoTextBox.Visible = True EspecialidadTextBox.Visible = True Nom_paraescolarTextBox.Visible = True Nom_profTextBox.Visible = True
  • 3. Fech_inicioDateTimePicker.Visible = True IdTextBox.Enabled = True MatriculaTextBox.Enabled = True Nombre_compTextBox1.Enabled = True GrupoTextBox.Enabled = True EspecialidadTextBox.Enabled = True Nom_paraescolarTextBox.Enabled = True Nom_profTextBox.Enabled = True Fech_inicioDateTimePicker.Enabled = True MsgBox("Existen datos") Else MsgBox("Introduce datos") nuevafila = mitabla.NewRow cfilas.Add(nuevafila) AltasBindingSource.MoveLast() IdTextBox.Visible = True MatriculaTextBox.Visible = True Nombre_compTextBox1.Visible = True GrupoTextBox.Visible = True EspecialidadTextBox.Visible = True Nom_paraescolarTextBox.Visible = True Nom_profTextBox.Visible = True Fech_inicioDateTimePicker.Visible = True IdTextBox.Enabled = True MatriculaTextBox.Enabled = True Nombre_compTextBox1.Enabled = True GrupoTextBox.Enabled = True EspecialidadTextBox.Enabled = True Nom_paraescolarTextBox.Enabled = True Nom_profTextBox.Enabled = True Fech_inicioDateTimePicker.Enabled = True nuevafila(1) = MatriculaTextBox nuevafila(2) = Nombre_compTextBox1 nuevafila(3) = GrupoTextBox nuevafila(4) = EspecialidadTextBox nuevafila(5) = Nom_paraescolarTextBox nuevafila(6) = Nom_profTextBox nuevafila(7) = Fech_inicioDateTimePicker
  • 4. End If End Sub C坦digo para el bot坦n grabar Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If (ParaescolarDataSet.HasChanges) Then Me.Validate() Me.AltasBindingSource.EndEdit() Me.AltasTableAdapter.Update(Me.ParaescolarDataSet.altas) MsgBox("Grabado") IdTextBox.Enabled = False MatriculaTextBox.Enabled = False Nombre_compTextBox1.Enabled = False GrupoTextBox.Enabled = False EspecialidadTextBox.Enabled = False Nom_paraescolarTextBox.Enabled = False Nom_profTextBox.Enabled = False Fech_inicioDateTimePicker.Enabled = False End If End Sub