Brandon rojas

4

Click here to load reader

Transcript of Brandon rojas

Page 1: Brandon rojas

Colegio de Educación Profesional

Técnica Del Estado de Tlaxcala.

Plantel CONALEP Zacualpan 101

Módulo de Elaboración y

Mantenimientos de Sistemas de

Información.

Presenta: Brandon Rojas Chaparro

P.T.B. en Informática Grupo: 606

Page 2: Brandon rojas

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Public Class Form1 Private Sub DatosBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Validate() Me.DatosBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.SipretDataSet) End Sub Private Sub DatosBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DatosBindingNavigatorSaveItem.Click Me.Validate() Me.DatosBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.SipretDataSet) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: esta línea de código carga datos en la tabla 'SipretDataSet.Datos' Puede moverla o quitarla según sea necesario. Me.DatosTableAdapter.Fill(Me.SipretDataSet.Datos) End Sub BOTON SALIR Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click End End Sub BOTON BUSCAR Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim mitabla As DataTable = SipretDataSet.Datos Dim cfila As DataRowCollection = mitabla.Rows Dim nuevafila As DataRow Dim bandera As Boolean bandera = True Dim i, n As Integer Dim resu As Boolean Dim c1 As String Dim c2 As String n = DatosBindingSource.Count() i = 1 DatosBindingSource.MoveFirst() c1 = UCase(RTrim(TextBox1.Text)) c2 = UCase(RTrim(PrefichaTextBox.Text)) Do resu = c1 Like c2 If (resu = True) Then bandera = False Else DatosBindingSource.MoveNext() c2 = UCase(RTrim(PrefichaTextBox.Text)) i = i + 1 End If Loop While (bandera = True And i <= n)

Page 3: Brandon rojas

If (bandera = False) Then Else MsgBox("introduce") nuevafila = mitabla.NewRow() cfila.Add(nuevafila) DatosBindingSource.MoveLast() NombreTextBox.Visible = True NombreTextBox.Enabled = True Apellido_PaternoTextBox.Visible = True Apellido_PaternoTextBox.Enabled = True Apellido_MaternoTextBox.Visible = True Apellido_MaternoTextBox.Enabled = True MatriculaTextBox.Visible = True MatriculaTextBox.Enabled = True Codigo_PostalTextBox.Visible = True Codigo_PostalTextBox.Enabled = True CorreoTextBox.Visible = True CorreoTextBox.Enabled = True NombreTextBox.Visible = True Apellido_MaternoTextBox.Visible = True Apellido_PaternoTextBox.Visible = True MatriculaTextBox.Visible = True Codigo_PostalTextBox.Visible = True CorreoTextBox.Visible = True nuevafila(1) = UCase(NombreTextBox.Text) nuevafila(2) = UCase(Apellido_MaternoTextBox.Text) nuevafila(3) = UCase(Apellido_PaternoTextBox.Text) nuevafila(4) = UCase(MatriculaTextBox.Text) nuevafila(5) = UCase(Codigo_PostalTextBox.Text) nuevafila(6) = UCase(CorreoTextBox.Text) End If End Sub SE MUESTRA LA PANTALLA DE LA DEPURACION

Page 4: Brandon rojas

CODIGO PARA GUARDAR:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If (SipretDataSet.HasChanges) Then Me.Validate() Me.DatosBindingSource.EndEdit() Me.DatosTableAdapter.Update(Me.SipretDataSet.Datos) End If End Sub