% ' Path long de la base de données dbPath = Server.MapPath("../../base/bdc.mdb") ' Création de l'objet permettant la connexion Set Conn = Server.CreateObject("ADODB.Connection") ' Connexion Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & " DBQ=" & dbPath if Len(Trim(request.form("departement"))) <> 0 then dept = request.form("departement") nom = Session("login") 'Sélection du signataire du départememnt choisit sql = "SELECT SIGNATAIRES.SIGNATAIRE_NAME, DEPARTEMENT.DEPT_DES FROM SIGNATAIRES INNER JOIN DEPARTEMENT ON (SIGNATAIRES.ID_SIGNATAIRE = DEPARTEMENT.ID_SIGNATAIRE) WHERE (((DEPARTEMENT.DEPT_DES)='" & dept & "'));" Set selection_sign = Server.CreateObject("ADODB.RecordSet") Set selection_sign = Conn.Execute(sql) signataire = selection_sign(0) Session("signataire") = signataire selection_sign.close else nom = request.querystring("nom") Session("login") = request.querystring("nom") end if %>
BON DE COMMANDE - PURCHASE ORDER | |
> Création d'un nouveau bon de commande |
<%=nom%> |
<%
if Len(Trim(request.form("departement"))) <> 0 then
%>
Département <%=dept%> |
Signataire <%=signataire%> |
<%
else
%>
Département |
Signataire |
<%
end if
%>
<% if Len(Trim(request.form("departement"))) <> 0 then 'on fait rien else 'Sélection des départemements sql = "SELECT DEPARTEMENT.DEPT_DES FROM DEPARTEMENT GROUP BY DEPARTEMENT.DEPT_DES;" Set selection_dept = Server.CreateObject("ADODB.RecordSet") Set selection_dept = Conn.Execute(sql) departement = selection_dept(0) %> <% end if %> |