COLEGIO NACIONAL DE EDUCACIÓN PROFESIONAL TÉCNICA
ELABORACION Y MANTENIMIENTODE UN SISTEMA
PRACTICA 6
RODRIGUEZ GONZALEZ FRANCISCO
Manual del sistema
1.1. Plataforma tecnológica
1.1.1. Sistema operativo
Windows 7
Profesional
1.1.2. Base de datos
La base de datos se creara y actualizara en acces 2007
1.1.3. Equipo de procesamiento
Intel celeron
2 GB de RAM
Imports System.Data.OleDb
Public Class Form1
Dim dt As New DataTable
Dim cn As New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\PACO\practica1rocio.mdb")
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Hide()
Form3.Show()
End Sub
End Class
Public Class Form2
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Hide()
Form5.Show()
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Me.Hide()
Form4.Show()
End Sub
End Class
Imports System.Data.OleDb
Public Class Form4
Public fila As Integer = 0
Dim dt As New DataTable
Dim cn As New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\PACO\practica1rocio.mdb")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
cn.Open()
Dim ConsultarDatos As String = "Select * From Tablalibros
Where nombrelibro"
Dim dataAdapter As New OleDb.OleDbDataAdapter(ConsultarDatos,
cn)
dataAdapter.Fill(dt)
fila = 1
TextBox3.Text = CStr(dt.Rows(fila)("nombrelibro"))
TextBox4.Text = CStr(dt.Rows(fila)("idlibro"))
TextBox5.Text = CStr(dt.Rows(fila)("usos"))
TextBox6.Text = CStr(dt.Rows(fila)("clasificacion"))
TextBox7.Text = CStr(dt.Rows(fila)("autor"))
MsgBox("se encontro el registro correctamente",
MsgBoxStyle.Information, "mensaje")
dataAdapter.Dispose()
If (TextBox2.Text = "4900") Then
MsgBox("YEA")
Else
MsgBox("contrasenia incorrecta")
End If
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label3.Click
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Hide()
Form1.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
End Sub
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class
Public Class Form5
Private Sub TextBox2_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
If (TextBox1.Text = "admin") Then
Else
MsgBox("la herraste ecribe otra ves tu usuario")
End If
If (TextBox2.Text = "biblioteca") Then
MsgBox("bienvenido")
Else
MsgBox("la herraste ecribelo otra ves")
End If
Me.Hide()
Form6.Show()
End Sub
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class
Imports System.Data.OleDb
Public Class Form6
Public fila As Integer = 0
Dim dt As New DataTable
Dim cn As New
OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\PACO\practica1rocio.mdb")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
If (TextBox1.Text = "4900") Then
MsgBox("la herraste ecribe otra ves tu codigo de
administrador")
Else
MsgBox("error de sistema, error, desea reiniciar la
computadora")
End If
cn.Open()
Dim GuardarDatos As String = "Insert into
tablausuario(nombreusuario,apellido,edad,sexo,domisilio,telefono,id,ad
minco)" & "Values('" & TextBox1.Text & "','" & TextBox2.Text & "','" &
TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','"
& TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "')"
Dim dataAdapter As New OleDbDataAdapter(GuardarDatos, cn)
dataAdapter.Fill(dt)
MsgBox("jaja mentira, Se agrego registro correctamente",
MsgBoxStyle.Information, "Mensaje")
dataAdapter.Dispose()
cn.Close()
End Sub
Private Sub TextBox7_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox7.TextChanged
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
Me.Hide()
Form1.Show()
End Sub
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class