1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
| dim rst
dim cnn
set cnn = server.CreateObject("ADODB.CONNECTION")
set rst= Server.CreateObject("ADODB.Recordset")
Session("Choix")= request.form("radiobutton")
cnn.open "delibes"
'rst.cursorlocation = aduseclient
rst.cachesize = 5
mysql = "select * FROM [BA2_S1] WHERE [CHIMJ201BA2THs1numero] <> '""' ORDER BY [NomBA2s1]"
rst.open mysql, "delibes"
%>
</p>
<!--Calque qui contient l'image quitter, la page se ferme en cliquant dessus-->
<div id="Layer6"><img src="../../../../../../../Images/quitter02.jpg" alt="Quitter (sans fermer la session utilisateur)" width="75" height="50" style="cursor:pointer" onclick ="window.close();"/></div>
<p align="center"> </p>
<form action="recupba2CHIMJ201THS1.asp?Str_NbLignes=<%=Str_Compteur %>" method="post" name="frmSaisie" id="frmSaisie">
<p>
<input type="hidden" name="txtCompteur" />
<%
if not rst.EOF then
rst.movefirst
%></p>
<table align="center" border="1" width="88%">
<tr>
<th width="7%" scope="col"><a href="#bas"></a></th>
<th width="12%" scope="col">Matricule</th>
<th width="41%" scope="col">Nom</th>
<th width="22%" scope="col">Prénom</th>
<th width="18%" scope="col">Th/Ex.</th>
</tr>
<!--Gestion de la couleur-->
<%Str_Compteur = 0
DO while not rst.EOF
Str_Compteur = Str_Compteur + 1
' Gestion de la couleur de la ligne
If Bln_Row_Color Then
Str_Row_Color = "#BAE2E3"
Else
Str_Row_Color = ""
End If
' Affectation du complément pour changer la couleur de la prochaine ligne
Bln_Row_Color = Not Bln_Row_Color %>
<tr bgcolor="<%=Str_Row_Color %>">
<td><div align="center"><font face="Arial" color="#0099CC" size="3"><strong><a href="#bouton"></a></strong></font> <font face="Arial" color="#0099CC" size="3"><strong><%=rst("CHIMJ201BA2THs1numero")%>
<input name="txtnumero<%=Str_Compteur%>" type="hidden" id="txtnumero<%=Str_Compteur%>" value="<%=rst("CHIMJ201BA2THs1numero")%>" />
</strong></font></div></td>
<td><div align="center"><font face="Arial" color="#0099CC" size="3"> <strong><a href="#bouton"></a> <%=rst("MatriculeBA2s1")%>
<input name="txtMatriculeBA2<%=Str_Compteur%>" type="hidden" id="txtMatriculeBA2<%=Str_Compteur%>" value="<%=rst("MatriculeBA2s1")%>" />
</strong> </font> </div></td>
<%'collone Statique des noms%>
<td><div align="center"><font face="Arial" color="#0099CC" size="3"> <strong> <%=rst("NomBA2s1")%>
<input type="hidden" name="txtNomBA1<%=Str_Compteur%>" value="<%=rst("NomBA2s1")%>" />
</strong> </font> </div></td>
<!-- collone Statique des prenoms-->
<td><div align="center"><font face="Arial" color="#0099CC" size="3"> <strong> <%=rst("PrenomBA2s1")%>
<input type="hidden" name="txtPrenomBA1<%=Str_Compteur%>" value="<%=rst("PrenomBA2s1")%>" />
</strong> </font> </div></td>
<!--collone dynamique des cotes IL EST IMPORTANT DE METTRE tabindex="1" CAR CA PERMET DE DESCENDRE DE 1 A CHAQUE CLIQUE DE LA TOUCHE TAB DU CLAVIER-->
<td><div align="center">
<input name="txtCHIMJ201<%=Str_Compteur%>" type="text" id="txtCHIMJ201<%=Str_Compteur%>" style="text-align:center" tabindex="1" title="Modifier" value="<%=rst("CHIMJ201BA2THs1")%>" maxlength="5" align="middle"/>
</div>
<div align="center"></div></td>
<%
rst.MoveNext
loop
'le code ci-dessous permet de faire un backup des données actuellement dans la bd avant la mise à jour
'cela permet d'aller revoir des cotes en cas de contestation.
rst.MoveFirst
Dim rs, nRecords
Set rs = CreateObject("ADODB.Recordset")
if not rst.eof then
Const ForReading = 1, ForWriting = 2
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile ("C:\DATA\CotesCHIMJ201.txt", ForWriting, false)
do while not rst.eof
f.Write rst("MatriculeBA2s1") & " " & rst("NomBA2s1") & " " & rst("PrenomBA2s1") & " " & rst("CHIMJ201BA2THs1") & chr(13) & chr(10)
rst.movenext
loop
f.close
set fso = Nothing
end if
%>
</tr>
</table>
<p> </p>
<div align="center">
<p align="left">
<%
end if
rst.Close
set rst = Nothing
%> |