Professional Documents
Culture Documents
MANUAL DE PROGRAMACIO
GRUPO: 5102-I
MATRICULA: 090260177-2
25/NOVIEMBRE/2011
Manual de programacion
Botn alumnus
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Hide() menualumnos.Show() End Sub
Botn Asignatura
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click menuasignaturas.Show() Me.Hide() End Sub
Botn grupos
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click menugrupos.Show() Me.Hide() End Sub
Botn Maestros
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click menu_maestros.Show() Me.Hide() End Sub
Botn materias
Botn salir
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Hide() End Sub
ALUMNOS
Botn Altas
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() Altas.Show() End Sub
Botn bajas
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If ((MsgBox("Desea Eliminar un Registro ? " + CStr(TextBoxpaola1.Text), MsgBoxStyle.OkCancel, "Mensaje")) = 1) Then Dim strSQL As String = "DELETE FROM Alumnos WHERE Matricula='" & CStr(TextBoxpaola1.Text) & "';" Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn)
dataAdapter.Fill(dt) Refrescar() Actualiza() dataAdapter.Dispose() Else MsgBox("No se ha Seleccionado Registro a Eliminar") End If End Sub
Botn consultas
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Close() Consultas.Show()
Botn modificar
End Sub
Boton buscar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim strSQL As String = "Select * From Alumnos Where Matricula='" & CStr(TextBoxpaola1.Text()) & "';" Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dt.Reset() dataAdapter.Fill(dt) fila = 0 Actualiza() dataAdapter.Dispose() cn.Close() End Sub
Botn Anterior
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If (fila > 0 And fila <= dt.Rows.Count - 1) Then
fila = fila - 1 Actualiza() Else MsgBox("Primer Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
Botn Siguiente
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If (fila >= 0 And fila < dt.Rows.Count - 1) Then fila = fila + 1 Actualiza() Else MsgBox("Ultimo Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.Close() Form1.Show()
End Sub
MAESTROS
Botn altas
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() altasmaestros.Show() End Sub
Botn Bajas
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If ((MsgBox("Desea Eliminar un Registro ? " + CStr(TextBoxpaola1.Text), MsgBoxStyle.OkCancel, "Mensaje")) = 1) Then Dim strSQL As String = "DELETE FROM Maestros WHERE Claveprofe= " & CInt(TextBoxpaola1.Text) Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dataAdapter.Fill(dt) Refrescar() Actualiza() dataAdapter.Dispose() Else MsgBox("No se ha Seleccionado Registro a Eliminar") End If End Sub
Botn Consultas
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Close() consultasmaestros.Show() End Sub
Botn modificaciones
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Me.Close() modificacionesmaestros.Show() End Sub
Botn anterior
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If (fila > 0 And fila <= dt.Rows.Count - 1) Then fila = fila - 1 Actualiza() Else MsgBox("Primer Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
Botn siguiente
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If (fila >= 0 And fila < dt.Rows.Count - 1) Then fila = fila + 1 Actualiza() Else MsgBox("Ultimo Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.Close() Form1.Show() End Sub
ASIGNATURAS
Botn altas
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim GuardarDatos As String = " Insert into Asignatura(Clavemat,Claveprofe,Numgrupo)" & "Values(" & CInt(TextBoxpaola1.Text) & "," & CInt(TextBoxpaola2.Text) & "," & CInt(TextBoxpaola3.Text)) Dim dataAdapter As New OleDb.OleDbDataAdapter(GuardarDatos, cn) dataAdapter.Fill(dt) MsgBox("Se Agrego registro Correctamente", MsgBoxStyle.Information, "Mensaje") ' Limpiar() dataAdapter.Dispose() cn.Close() End Sub
Botn bajas
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If ((MsgBox("Desea Eliminar un Registro ? " + CStr(TextBoxpaola1.Text), MsgBoxStyle.OkCancel, "Mensaje")) = 1) Then Dim strSQL As String = "DELETE FROM Asignatura WHERE Clavemat=" & CInt(TextBoxpaola1.Text) Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dataAdapter.Fill(dt) Refrescar() Actualiza() dataAdapter.Dispose() Else MsgBox("No se ha Seleccionado Registro a Eliminar") End If
End Sub
Botn consultas
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim strSQL As String = "Select * From Asignatura Where Clavemat=" & CInt(TextBoxpaola1.Text()) & ";" Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dt.Reset() dataAdapter.Fill(dt) ' Limpiar() fila = 0 Actualiza() dataAdapter.Dispose() cn.Close() End Sub
Botn modificacion
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click cn.Open() Dim ModificaDatos As String = "Update Asignatura Set Clavemat= " & CInt(TextBoxpaola1.Text) & ", Claveprofe = " & CInt(TextBoxpaola2.Text) & " , Numgrupo =" & CInt(TextBoxpaola3.Text) & " Where Clavemat=" & CInt(TextBoxpaola1.Text()) & ";" Dim dataAdapter As New OleDb.OleDbDataAdapter(ModificaDatos, cn) dataAdapter.Fill(dt) dataAdapter.Dispose() MsgBox("Registro Modificado", MsgBoxStyle.Information, "Mensaje") cn.Close() End Sub End Class
Botn buscar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open()
Dim strSQL As String = "Select * From Asignatura Where Clavemat=" & CInt(TextBoxpaola1.Text()) & ";" Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dt.Reset() dataAdapter.Fill(dt) fila = 0 Actualiza() dataAdapter.Dispose() cn.Close()
Botn anterior
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If (fila > 0 And fila <= dt.Rows.Count - 1) Then fila = fila - 1 Actualiza() Else MsgBox("Primer Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
Botn siguiente
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If (fila >= 0 And fila < dt.Rows.Count - 1) Then fila = fila + 1 Actualiza() Else MsgBox("Ultimo Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
GRUPOS
Botn altas
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim GuardarDatos As String = " Insert into Grupos(Numgrupos,Cantidadalumnos,Clavemat)" & "Values('" & TextBoxpaola1.Text & "','" & TextBoxpaola2.Text & "','" & TextBoxpaola3.Text & "')" Dim dataAdapter As New OleDb.OleDbDataAdapter(GuardarDatos, cn) dataAdapter.Fill(dt) MsgBox("Se Agrego registro Correctamente", MsgBoxStyle.Information, "Mensaje") ' Limpiar() dataAdapter.Dispose() cn.Close() End Sub
Botn bajas
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If ((MsgBox("Desea Eliminar un Registro ? " + CStr(TextBoxpaola1.Text), MsgBoxStyle.OkCancel, "Mensaje")) = 1) Then Dim strSQL As String = "DELETE FROM Grupos WHERE Numgrupos=" & CInt(TextBoxpaola1.Text) Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dataAdapter.Fill(dt)
Botn consultas
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim strSQL As String = "Select * From Grupos Where Numgrupos=" & CInt(TextBoxpaola1.Text()) Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dt.Reset() dataAdapter.Fill(dt) ' Limpiar() fila = 0 Actualiza() dataAdapter.Dispose() cn.Close() End Sub
Botn modificaciones
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click cn.Open() Dim ModificaDatos As String = "Update Grupos set Numgrupos= " & CInt(TextBoxpaola1.Text) & ", cantidadalumnos = " & CInt(TextBoxpaola2.Text) & " , Clavemat =" & CInt(TextBoxpaola3.Text) & " where Numgrupos= " & CInt(TextBoxpaola1.Text) Dim dataAdapter As New OleDb.OleDbDataAdapter(ModificaDatos, cn) dataAdapter.Fill(dt) dataAdapter.Dispose() MsgBox("Registro Modificado", MsgBoxStyle.Information, "Mensaje") cn.Close() End Sub End Class
Botn buscar
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim strSQL As String = "Select * from Grupos where Numgrupos= " & CInt(TextBoxpaola1.Text) Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dt.Reset() dataAdapter.Fill(dt) fila = 0 Actualiza() dataAdapter.Dispose() cn.Close()
End Sub
Botn anterior
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If (fila > 0 And fila <= dt.Rows.Count - 1) Then fila = fila - 1 Actualiza() Else MsgBox("Primer Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
Botn siguiente
If (fila >= 0 And fila < dt.Rows.Count - 1) Then fila = fila + 1 Actualiza() Else MsgBox("Ultimo Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
MATERIAS
Botn altas
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim GuardarDatos As String = " Insert into Materias(Clavemat,Nombre,Horastotales,Horasp,Horast)" & "Values('" & TextBoxpaola1.Text & "','" & TextBoxpaola2.Text & "','" & TextBoxpaola3.Text & "','" & TextBoxpaola4.Text & "','" & TextBoxpaola4.Text & "')" Dim dataAdapter As New OleDb.OleDbDataAdapter(GuardarDatos, cn) dataAdapter.Fill(dt)
MsgBox("Se Agrego registro Correctamente", MsgBoxStyle.Information, "Mensaje") ' Limpiar() dataAdapter.Dispose() cn.Close() End Sub
Botn bajas
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If ((MsgBox("Desea Eliminar un Registro ? " + CStr(TextBoxpaola1.Text), MsgBoxStyle.OkCancel, "Mensaje")) = 1) Then Dim strSQL As String = "DELETE FROM Materias WHERE Clavemat=" & CInt(TextBoxpaola1.Text) Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dataAdapter.Fill(dt) Refrescar() Actualiza() dataAdapter.Dispose() Else MsgBox("No se ha Seleccionado Registro a Eliminar") End If
Botn consultas
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cn.Open() Dim strSQL As String = "Select * From Materias Where Clavemat=" & CInt(TextBoxpaola1.Text())
Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dt.Reset() dataAdapter.Fill(dt) ' Limpiar() fila = 0 Actualiza() dataAdapter.Dispose() cn.Close() End Sub
Botn modificaciones
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click cn.Open() Dim ModificaDatos As String = "Update Materias set Clavemat= " & TextBoxpaola1.Text & ", Nombre = '" & TextBoxpaola2.Text & "' , Horastotales = " & TextBoxpaola3.Text & ", Horasp =" & TextBoxpaola4.Text & ", Horast = " & TextBoxpaola5.Text & " where Clavemat= " & CInt(TextBoxpaola1.Text) Dim dataAdapter As New OleDb.OleDbDataAdapter(ModificaDatos, cn) dataAdapter.Fill(dt) dataAdapter.Dispose() MsgBox("Registro Modificado", MsgBoxStyle.Information, "Mensaje") cn.Close() End Sub
Botn buscar
Private Sub Buscar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Buscar.Click cn.Open()
Dim strSQL As String = "Select * From Materias Where Clavemat=" & CInt(TextBoxpaola1.Text()) Dim dataAdapter As New OleDb.OleDbDataAdapter(strSQL, cn) dt.Reset() dataAdapter.Fill(dt) ' Limpiar() fila = 0 Actualiza() dataAdapter.Dispose() cn.Close() End Sub
Botn anterior
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If (fila > 0 And fila <= dt.Rows.Count - 1) Then fila = fila - 1 Actualiza() Else MsgBox("Primer Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If End Sub
Botn siguiente
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If (fila >= 0 And fila < dt.Rows.Count - 1) Then fila = fila + 1 Actualiza() Else MsgBox("Ultimo Registro Encontrado", MsgBoxStyle.Information, "Mensaje") End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Me.Close() Form1.Show() End Sub