<%
'
'    Filename: transfert_Grid.asp
'    Generated with CodeCharge 2.0.5
'    ASP 2.0.ccp build 01/22/2002
'

'-------------------------------
' transfert_Grid CustomIncludes begin
%>

<!-- #INCLUDE FILE="Common.asp" -->
<!-- #INCLUDE FILE="menuAgenda.asp" -->

<%
' transfert_Grid CustomIncludes end
'-------------------------------

'===============================
' Save Page and File Name available into variables
'-------------------------------
sFileName = "transfert_Grid.asp"
'===============================


'===============================
' transfert_Grid PageSecurity begin
CheckSecurity(1)
' transfert_Grid PageSecurity end
'===============================

'===============================
' transfert_Grid Open Event start
' transfert_Grid Open Event end
'===============================

'===============================
' transfert_Grid OpenAnyPage Event start
' transfert_Grid OpenAnyPage Event end
'===============================

'===============================
' Save the name of the form and type of action into the variables
'-------------------------------
sAction = GetParam("FormAction")
sForm = GetParam("FormName")
'===============================

' transfert_Grid Show begin

'===============================
' Page execution
'-------------------------------
'===============================

'===============================
' HTML Page layout
'-------------------------------
%><html>
<head>
<title>EB Agenda</title>
<meta name="GENERATOR" content="YesSoftware CodeCharge v.2.0.5 build 01/22/2002">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></head>
<body style="background-color: #FFFFFF; color: #000000;">

 <table>
  <tr>
   <td valign="top">
 <% EBMenu_Show %>
   
   </td>
  </tr>
 </table>

 <table>
  <tr>
   
   <td valign="top">
<% reldatelieupers_2_Show %>
    
   </td>
  </tr>
 </table>


</body>
</html>
<%
' transfert_Grid Show end

' transfert_Grid Close Event start
' transfert_Grid Close Event end

'-------------------------------
' Destroy connection object
'-------------------------------
cn.close
Set cn = nothing
'===============================


'********************************************************************************


'===============================
' Display Grid Form
'-------------------------------
Sub reldatelieupers_2_Show()
'-------------------------------
' Initialize variables  
'-------------------------------
  Dim rs
  Dim sWhere : sWhere = ""
  Dim sOrder : sOrder = ""
  Dim sSQL : sSQL = ""
  Dim sFormTitle: sFormTitle = "reldatelieupers_2"
  Dim HasParam : HasParam = false
  Dim iSort : iSort = ""
  Dim iSorted : iSorted = ""
  Dim sDirection : sDirection = ""
  Dim form_sorting : form_sorting = ""
  Dim sSortParams : sSortParams = ""
  Dim form_action : form_action = ""
  Dim iRecordsPerPage : iRecordsPerPage = 200
  Dim iCounter : iCounter = 0
  Dim iPage : iPage = 0
  Dim bEof : bEof = False
  Dim sActionFileName : sActionFileName = "transfert_Record.asp"

  Dim transit_params : transit_params = ""
  Dim form_params : form_params = ""

'-------------------------------
' Build ORDER BY statement
'-------------------------------
  sOrder = " order by r.DateInt Asc"
  iSort = GetParam("Formreldatelieupers_2_Sorting")
  iSorted = GetParam("Formreldatelieupers_2_Sorted")
  sDirection = ""
  if IsEmpty(iSort) then
    form_sorting = ""
  else
    if iSort = iSorted then 
      form_sorting = ""
      sDirection = " DESC"
      sSortParams = "Formreldatelieupers_2_Sorting=" & iSort & "&Formreldatelieupers_2_Sorted=" & iSort & "&"
    else
      form_sorting = iSort
      sDirection = " ASC"
      sSortParams = "Formreldatelieupers_2_Sorting=" & iSort & "&Formreldatelieupers_2_Sorted=" & "&"
    end if
    if iSort = 1 then sOrder = " order by r.DateInt" & sDirection
    if iSort = 2 then sOrder = " order by r.IdTime" & sDirection
    if iSort = 3 then sOrder = " order by r.CustInt" & sDirection
    if iSort = 4 then sOrder = " order by r.idEmpl" & sDirection
    if iSort = 5 then sOrder = " order by r.IdInt" & sDirection
  end if

'-------------------------------
' HTML column headers
'-------------------------------
%>
     <table style="border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080">
      <tr>
       <td style="background-color: #14B0E4; text-align: center; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080" colspan="5"><a name="reldatelieupers_2"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; font-size: 12pt; color: #FFFFFF; font-weight: bold; text-align: center"><%=sFormTitle%></font></a></td>
      </tr>
      <tr>
       <td style="background-color: #B7E9F9; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><a href="<%=sFileName%>?<%=form_params%>Formreldatelieupers_2_Sorting=1&Formreldatelieupers_2_Sorted=<%=form_sorting%>&"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">DateInt</font></a></td>
       <td style="background-color: #B7E9F9; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><a href="<%=sFileName%>?<%=form_params%>Formreldatelieupers_2_Sorting=2&Formreldatelieupers_2_Sorted=<%=form_sorting%>&"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">IdTime</font></a></td>
       <td style="background-color: #B7E9F9; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><a href="<%=sFileName%>?<%=form_params%>Formreldatelieupers_2_Sorting=3&Formreldatelieupers_2_Sorted=<%=form_sorting%>&"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">CustInt</font></a></td>
       <td style="background-color: #B7E9F9; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><a href="<%=sFileName%>?<%=form_params%>Formreldatelieupers_2_Sorting=4&Formreldatelieupers_2_Sorted=<%=form_sorting%>&"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">idEmpl</font></a></td>
       <td style="background-color: #B7E9F9; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><a href="<%=sFileName%>?<%=form_params%>Formreldatelieupers_2_Sorting=5&Formreldatelieupers_2_Sorted=<%=form_sorting%>&"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">IdInt</font></a></td>
      </tr>
<%



'-------------------------------
' Build base SQL statement
'-------------------------------
  sSQL = "select r.CustInt as r_CustInt, " & _
    "r.DateInt as r_DateInt, " & _
    "r.IdInt as r_IdInt, " & _
    "r.IdTime as r_IdTime, " & _
    "r.id as r_id, " & _
    "r.idEmpl as r_idEmpl " & _
    " from reldatelieupers r "
'-------------------------------

'-------------------------------
' reldatelieupers_2 Open Event start
' reldatelieupers_2 Open Event end
'-------------------------------

'-------------------------------
' Assemble full SQL statement
'-------------------------------
  sSQL = sSQL & sWhere & sOrder
'-------------------------------

'-------------------------------
' Process the link to the record page
'-------------------------------
form_action = sActionFileName
'-------------------------------


'-------------------------------
' Open the recordset
'-------------------------------
  openrs rs, sSQL
'-------------------------------

'-------------------------------
' Process empty recordset
'-------------------------------
  if rs.eof then
%>
     <tr>
      <td colspan="5" style="background-color: #EAF9FD; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt">No records</font></td>
     </tr>
<%
  end if
'-------------------------------

'-------------------------------
'Initialize page counter and records per page
'-------------------------------
  iRecordsPerPage = 200
  iCounter = 0

'-------------------------------
' Process page scroller
'-------------------------------
  iPage = GetParam("Formreldatelieupers_2_Page")
  if IsEmpty(iPage) then iPage = 1 else iPage = CLng(iPage)
  while not rs.eof and iCounter < (iPage-1)*iRecordsPerPage
    rs.movenext
		iCounter = iCounter + 1
  wend
  iCounter = 0
'-------------------------------

'-------------------------------
' Display grid based on recordset
'-------------------------------
  while not rs.EOF  and iCounter < iRecordsPerPage
'-------------------------------
' Create field variables based on database fields
'-------------------------------
    fldCustInt = GetValue(rs, "r_CustInt")
    fldDateInt_URLLink = "transfert_Record.asp"
    fldDateInt_id = GetValue(rs, "r_id")
    fldDateInt = GetValue(rs, "r_DateInt")
    fldid = GetValue(rs, "r_id")
    fldidEmpl = GetValue(rs, "r_idEmpl")
    fldIdInt = GetValue(rs, "r_IdInt")
    fldIdTime = GetValue(rs, "r_IdTime")
'-------------------------------
' reldatelieupers_2 Show begin
'-------------------------------

'-------------------------------
' reldatelieupers_2 Show Event start
' reldatelieupers_2 Show Event end
'-------------------------------

'-------------------------------
' Process the HTML controls
'-------------------------------
%>
      <tr>
       <td style="background-color: #EAF9FD; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt"><a href="<%=fldDateInt_URLLink%>?id=<%=fldDateInt_id%>&<%=transit_params%>"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt"><%=fldDateInt%></font></a>&nbsp;</font></td>
       <td style="background-color: #EAF9FD; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt"><%=ToHTML(fldIdTime)%>&nbsp;</font></td>
       <td style="background-color: #EAF9FD; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt"><%=ToHTML(fldCustInt)%>&nbsp;</font></td>
       <td style="background-color: #EAF9FD; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt"><%=ToHTML(fldidEmpl)%>&nbsp;</font></td>
       <td style="background-color: #EAF9FD; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt"><%=ToHTML(fldIdInt)%>&nbsp;</font></td>
      </tr><%

'-------------------------------
' reldatelieupers_2 Show end
'-------------------------------

'-------------------------------
' Move to the next record and increase record counter
'-------------------------------
    rs.MoveNext
    iCounter = iCounter + 1
  wend
'-------------------------------

 
'-------------------------------
' Process the bottom on the Grid. The insert link and record navigator.
'-------------------------------
%>
    <tr>
     <td colspan="5" style="background-color: #B7E9F9; border-top: 1px solid #000080; border-bottom: 1px solid #000080; border-right: 1px solid #000080; border-left: 1px solid #000080"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold"><a href="<%= form_action %>?<%= transit_params %>"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">Insert</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<%

'-------------------------------
' reldatelieupers_2 Navigation begin
'-------------------------------
  bEof = rs.eof
  if not(rs.EOF and iPage=1) then
    if iPage = 1 then
%>
        <font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">Previous</font>
<%
    else
%>
        <a href="<%=sFileName%>?<%=form_params%><%=sSortParams%>Formreldatelieupers_2_Page=<%=iPage - 1%>#reldatelieupers_2"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">Previous</font></a>
<%
    end if
    response.write "&nbsp;[&nbsp;" & iPage & "&nbsp;]&nbsp;"
    
    if bEof then
%>
        <font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">Next</font>
<%
    else
%>
        <a href="<%=sFileName%>?<%=form_params%><%=sSortParams%>Formreldatelieupers_2_Page=<%=iPage + 1%>#reldatelieupers_2"><font style="font-family: Arial, Tahoma, Verdana, Helvetica; color: #000000; font-size: 10pt; font-weight: bold">Next</font></a>
<%
    end if
  end if
'-------------------------------
' reldatelieupers_2 Navigation end
'-------------------------------
  
'-------------------------------
' Finish form processing
'-------------------------------  
  set rs = nothing

  %>
      </font></td></tr>
    </table>
  <%

'-------------------------------
' reldatelieupers_2 Close Event start
' reldatelieupers_2 Close Event end
'-------------------------------
end sub
'===============================
%>