This commit is contained in:
clementine.desrucques 2021-10-18 15:51:58 +02:00
parent 3a4053e079
commit 9c8ff01a79
3 changed files with 39 additions and 4 deletions

View File

@ -44,7 +44,8 @@ public class NouveauPompForm {
if (erreur > 0) return -1;
// Creation d'un objet de type Client avec les données transmises
Pompier unPompier = new Pompier(request.getParameter("idCaserne"),
Pompier unPompier = new Pompier(request.getParameter("id"),
// request.getParameter("idCaserne"),
request.getParameter("ztNom"),
request.getParameter("ztPrenom"),
request.getParameter("statut"),
@ -57,11 +58,11 @@ public class NouveauPompForm {
request.getParameter("ztVille"),
request.getParameter("grade"));
ClientMysql cm = new ClientMysql();
int idClient = cm.createRP(unPompier); // Requête préparée
if (idClient == -1) {
int id = cm.createRP(unPompier); // Requête préparée
if (id == -1) {
message = "Erreur lors de la création du client";
}
return idClient;
return id;
}

View File

@ -0,0 +1,17 @@
<%--
Document : CreaPompier
Created on : 18 oct. 2021, 15:49:36
Author : clementine.desrucques
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>

View File

@ -0,0 +1,17 @@
<%--
Document : ModifPompier
Created on : 18 oct. 2021, 15:49:00
Author : clementine.desrucques
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>