From cfeb8d56ab4d111c78ae98eee811a068a4934a16 Mon Sep 17 00:00:00 2001
From: Ethanell
Date: Thu, 30 Jun 2022 22:05:00 +0200
Subject: [PATCH] Add constraint check on save/update
---
.../WEB-INF/classes/DAO/MagasinHelper.class | Bin 15615 -> 15615 bytes
.../classes/controller/BddController$1.class | Bin 828 -> 828 bytes
.../classes/controller/BddController.class | Bin 11909 -> 15396 bytes
build/web/WEB-INF/classes/jsp/confirm.jsp | 2 +-
build/web/WEB-INF/classes/jsp/detail.jsp | 8 +-
build/web/WEB-INF/classes/jsp/resultat.jsp | 2 +-
build/web/WEB-INF/jsp/confirm.jsp | 2 +-
build/web/WEB-INF/jsp/detail.jsp | 4 +-
src/java/DAO/MagasinHelper.java | 4 +-
src/java/Exceptions/InvalidParameter.java | 16 ++
src/java/controller/BddController.java | 215 +++++++++++++-----
web/WEB-INF/jsp/confirm.jsp | 2 +-
web/WEB-INF/jsp/detail.jsp | 4 +-
13 files changed, 184 insertions(+), 75 deletions(-)
create mode 100644 src/java/Exceptions/InvalidParameter.java
diff --git a/build/web/WEB-INF/classes/DAO/MagasinHelper.class b/build/web/WEB-INF/classes/DAO/MagasinHelper.class
index 59fc643a20b3b0a9e406327b65bf1dff477d2a4b..6acfb5c20da8088beec040a2c53e8b97e1b9fb08 100644
GIT binary patch
delta 986
zcmX}nYiNxD9LMqBe~m0*W_IitX6){9JPl(<*qZxgTWzUr?6}J%m&}Z@HMw6pdKOVi
zA#%y;DTOT5q`V+bx(^cP9-+C*-26}A?k^aewRf6Ia
zP@;lL)nG3);FB{{F&f4{!8vaRi$4OC^lyitOm9iwgk2eww%3{EUss94RkGw>sj2?z34@Qncmdo4rdFx
z4qcDlhHgObK<`BFK{um!q4%KocWXZy9Axfc=n-fXdKBtGTj)JT?{UgcX_ZcBwN5g9
zN@sN1TR0@wk4?!k_bl`r^gQ$e^dj^U^fL4c)Q4V$wnBaAHGkm{KJ^CdChQih4R#xL
zhuFKs-Y2%5*n7m@r{lr@*uXF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qf$Iso@`H!C)d-z
z18YPrG@Tf@p}kHBmgjZBt``61b>LRTUg5R!Lqf%2KaKctH>|DpxMh!6ew*5pSZqzQ
zCU1vlX7LtJ^cG2@D5xUcEkjRQ0pg@Zn~XvyWAFlF@rKm+e#$Rc2IHhuT0xb1U=pU{J%JMGk*m!6
z0wr+(#)zmkB(p>=A|D9UhvlNs0Xg1cgG~Al1xnGXg9
z8Gk`P8KFyXRQ6_S1vn3X#owf+M#x?4Gm(<5sk_+cas|neYf-*feGIwUZ1K$BMP7d`
zc!%8oz7)nh)sZ3%QJ~1sJ?iv64RP9`a6dG)1NaL6kdCDWi!*f3JU&a*eM-mIKfP5w
z(2b?tSX)x|tvLQ!*%i4{ePczYuIL}_48fUpSJALwk=GO5f!~zJbfK`i1A{y<+i|-m
z+PcEJL#25r$u%d*^Chg{>4@Q2iB^TUs}jYm!Y~;DV|WH8@JyV?vz*31CUiu^PRxwh
zDNy+Kh_l4b5zh5d!X28kV`TCulVg6O{6GH>-S2dCU-$F6PZHfHi|$iI_j5(}siONd
g(S5q;K0|b$`G4tN^51pWWO7Qp@g45AV@GHI8-9RA$p8QV
diff --git a/build/web/WEB-INF/classes/jsp/confirm.jsp b/build/web/WEB-INF/classes/jsp/confirm.jsp
index 23837a2..5233c5f 100644
--- a/build/web/WEB-INF/classes/jsp/confirm.jsp
+++ b/build/web/WEB-INF/classes/jsp/confirm.jsp
@@ -14,7 +14,7 @@
<%@include file="header.jsp" %>
- ${confirm}
+ ${error != null ? error : confirm}
@@ -175,7 +175,7 @@
@@ -189,7 +189,7 @@
-
+
@@ -199,8 +199,6 @@
-
-