Bueno primaramente un saludo, soy nuevo aca estoy queriendo aprender .net pues lo necesito urgente .
quisiera saber como haria un navegar (ABM) el boton back y next
yo urgando urgando hice un codigo re largo usando variables globales pero alfinal me funko jejeje
pero quisiera algo mas limpio q lo mio ,
aqui se va la montonera de lineas no me traten pero lo asi pude hacerlo funcionar el boton atras, el sgte es lo mismo casi :
Cita:
If aux > 0 Then
Dim i AsInteger
Dim r As OleDb.OleDbDataReader
Dim em As Alumno
r = MD.LeerAlumnos
em = New Alumno
If turno = 0 Then
aux = aux - 2
turno = 1 - turno
EndIf
i = 1
While i <= aux
r.Read()
em.IDAlumno = r.GetValue(0)
em.Nombre = r.GetValue(1)
em.ApellidoPaterno = r.GetValue(2)
em.ApellidoMaterno = r.GetValue(3)
em.Direccion = r.GetValue(4)
em.Telf = r.GetValue(5)
em.IDCursoA = r.GetValue(6)
i = i + 1
EndWhile
txtidalumno.Text = CStr(em.IDAlumno)
txtNombre.Text = CStr(em.Nombre)
txtapp.Text = CStr(em.ApellidoPaterno)
txtapm.Text = CStr(em.ApellidoMaterno)
txtdireccion.Text = CStr(em.Direccion)
txttelf.Text = CStr(em.Telf)
cbx1.Text = CStr(em.IDCursoA)
aux = aux - 1
EndIf
MD.CerrarConexion()
MD.AbrirConexion("Provider=SQLOLEDB;Data Source=jp;Initial Catalog=gestion; Integrated Security=SSPI")
EndSub
|
no me critiquen mucho porfavor , un pokito de ayuda mas bien