Merge origin/master

Conflicts:
	src/java/bdd/PompierMySql.java
	src/java/com/test/servlets/authentifServlet.java
	web/WEB-INF/CreaPompier.jsp
This commit is contained in:
funcha.ahamadi
2021-10-21 17:51:15 +02:00
parent 7b3fd1e8e3
commit b78f08f25e
8 changed files with 92 additions and 11 deletions

View File

@@ -162,8 +162,8 @@ public class PompierMySql {
resultQ.getInt("bip"),
resultQ.getInt("nbGardes"),
resultQ.getInt("grade"),
resultQ.getString("commentaire"),
resultQ.getInt("idEmployeur")
resultQ.getString("commentaire")
);
@@ -178,6 +178,25 @@ public class PompierMySql {
}
return resultat;
}
public int update(HttpServletRequest request){
Statement stmt = theConnection.createStatement();
ResultSet resultQ = null;
resultQ = stmt.executeQuery(sql);
resultat = (resultQ.next());
if (resultat) {
}
}
private void setResultat(String pompier) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.

View File

@@ -69,6 +69,26 @@ public class Pompier {
this.idEmployeur = idEmployeur;
}
public Pompier(int id, int idCaserne, String nom, String prenom, int statut, int typePers, String mail, String login, String mdp, String adresse, String cp, String ville, int bip, int nbGardes, int grade, String commentaire) {
this.id = id;
this.idCaserne = idCaserne;
this.nom = nom;
this.prenom = prenom;
this.statut = statut;
this.typePers = typePers;
this.mail = mail;
this.login = login;
this.mdp = mdp;
this.adresse = adresse;
this.cp = cp;
this.ville = ville;
this.bip = bip;
this.nbGardes = nbGardes;
this.grade = grade;
this.commentaire = commentaire;
}
public int getId() {
return id;
}

View File

@@ -0,0 +1,34 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.test.forms;
import bdd.PompierMySql;
import jakarta.servlet.http.HttpServletRequest;
/**
*
* @author funcha.ahamadi
*/
public class ModifPompierForm {
private String resultat;
public String getResultat() {
return resultat;
}
public void setResultat(String resultat) {
this.resultat = resultat;
}
public int Modif(HttpServletRequest request) {
PompierMySql p = new PompierMySql();
boolean resul = p.Update(request);
}
}

View File

@@ -94,6 +94,9 @@ public class authentifServlet extends HttpServlet {
getServletContext().getRequestDispatcher("/WEB-INF/accueilJSP.jsp")
.forward(request, response);
}
}