
28/06/2004, 12:38
|
| | Fecha de Ingreso: junio-2004
Mensajes: 1
Antigüedad: 20 años, 10 meses Puntos: 0 | |
' ----- Crea el RecordSet ----------------
Set rstDSN = Server.CreateObject("ADODB.RecordSet")
strSQL = Session("strSQL")
rstDSN.Cursorlocation = adUseClient
' ---- Abre el RecordSet con un cursor estatico ----
rstDSN.Open strSQL, cnnDSN, adOpenStatic, adLockReadOnly, adCmdText
' ---- Obtiene valores de Session ----------------
strUserName = Session("strLogin")
intNumReg = rstDSN.RecordCount
' ------ Registra la Transaccion ---------------------
'If Session("blnAuditoria") Then
Dim blnRegOK
blnRegOK = RegisTrans(MOD_LISTADOS_VARIOS, OPER_RPT_LISTADO_PARAMETROS, strSQL, cnnDSN, Session("strLogin"))
'End If
' -----------------------------------------------------
' ---- Determinación de la página actual ----
Select Case Request.QueryString("pag")
Case ""
Session("CurrentPage") = 1
Case "sig"
Session("CurrentPage") = Session("CurrentPage") + 1
Case "ant"
Session("CurrentPage") = Session("CurrentPage") - 1
End Select
' ---- Determina la página a la que se enlaza ----
If Request.QueryString("pagn") <> 0 Then
Session("CurrentPage") = Request.QueryString("pagn")
End If
If Not rstDSN.BOF And Not rstDSN.EOF Then
rstDSN.AbsolutePage = CLng(Session("CurrentPage"))
End If
" ********** codigo HTML QUE MUESTRA LOS REGISTROS**********
<table border="0" cellspacing="1" cellpadding="2">
<tr>
<td align="middle"><%
' ******** Enlace a la Primera Página ********
If CLng(Session("CurrentPage")) > 1 Then
Response.Write("<a href=""rptParametrosReport.asp?pagn=1""><img src=""../images/b_primero.gif"" alt=""Primera Página"" WIDTH=""22"" HEIGHT=""15"" border=""0""></a>")
End If
%>
</td>
<td align="middle"><%
' ******** Enlace a la Página Anterior ********
If CLng(Session("CurrentPage")) > 1 Then
Response.Write("<a href=""rptParametrosReport.asp?pag=ant""><img src=""../images/b_anterior.gif"" alt=""Página Anterior"" border=""0"" WIDTH=""22"" HEIGHT=""15""></a>")
End If
%>
</td>
<td align="middle"><strong><font face="Arial" size="2"><%
' ********* Muestra el Listado de todas las Páginas *********
Dim intPag, intInf, intSup
intInf= CLng(Session("CurrentPage"))
intSup= CLng(Session("CurrentPage")) + 9
If intInf < 10 Then
intInf = 1
If rstDSN.PageCount < 10 Then
intSup = rstDSN.PageCount
Else
intSup = 10
End If
Else
If intSup >= rstDSN.PageCount Then
intInf = rstDSN.PageCount - 9
intSup = rstDSN.PageCount
End if
End If
For intPag = intInf to intSup step 1
If intPag = CLng(Session("CurrentPage")) then
Response.Write " "
Response.Write intPag
Else
Response.Write " "
Response.Write("<a href=""rptParametrosReport.asp?pagn=" & intPag & """>" & intPag & "</a>")
End if
Next
%> </font></strong></td>
<td align="middle"><%
' ********* Enlace a la Página Siguiente **********
If CLng(Session("CurrentPage")) < rstDSN.PageCount Then
Response.Write("<a href=""rptParametrosReport.asp?pag=sig""><img src=""../images/b_siguiente.gif"" alt=""Página Siguiente"" border=""0"" WIDTH=""22"" HEIGHT=""15""></a>")
End If
%>
</td>
<td align="middle"><%
' ********* Enlace a la Ultima Página **********
If CLng(Session("CurrentPage")) < rstDSN.PageCount Then
Response.Write("<a href=""rptParametrosReport.asp?pagn=" & rstDSN.PageCount & """><img src=""../images/b_ultimo.gif"" alt=""Ultima Página"" border=""0"" WIDTH=""22"" HEIGHT=""15""></a>")
End If
%>
</td>
</tr>
</table> |