From b2526d763aa104787be0e85955a696fc4fc1f468 Mon Sep 17 00:00:00 2001 From: Sasankavikum Date: Tue, 12 Apr 2022 14:11:38 +0530 Subject: [PATCH] java class added --- .../vaccination/inventory/dbconnect.class | Bin 0 -> 1238 bytes .../vaccination/inventory/inventory.class | Bin 0 -> 1212 bytes .../inventory/inventoryDBUtil.class | Bin 0 -> 1786 bytes .../inventory/inventory_insert.class | Bin 0 -> 2054 bytes .../java/vaccination/inventory/inventory.java | 45 ++++++++++++++++ .../inventory/inventoryDBUtil.java | 48 ++++++++++++++++++ .../inventory/inventory_insert.java | 45 ++++++++++++++++ 7 files changed, 138 insertions(+) create mode 100644 build/classes/vaccination/inventory/dbconnect.class create mode 100644 build/classes/vaccination/inventory/inventory.class create mode 100644 build/classes/vaccination/inventory/inventoryDBUtil.class create mode 100644 build/classes/vaccination/inventory/inventory_insert.class create mode 100644 src/main/java/vaccination/inventory/inventory.java create mode 100644 src/main/java/vaccination/inventory/inventoryDBUtil.java create mode 100644 src/main/java/vaccination/inventory/inventory_insert.java diff --git a/build/classes/vaccination/inventory/dbconnect.class b/build/classes/vaccination/inventory/dbconnect.class new file mode 100644 index 0000000000000000000000000000000000000000..d2edf57cf2f851e429c9c55363e08ba62d1a8f69 GIT binary patch literal 1238 zcmZuxT~pIQ6g|sFQ)2iE6bgROs+AVCK~dDU0$RWa3p!H=ecgt&1k*aNk;2esx;J}w@44sRJ)1v&fBgnf!Yc&>3=3^;nwG-@%XJLPX$vQCy<=m) zX1b0e%s{~q!^9zPbHnCN-FQa$x1;emiliLTb z9~4$rmRF5)>_@;bsbLtgIHm}|bKOAt5*ifgn`MBU&uNGw#xP#79I@MK)P(nr*KA^| zS0wlz_bfS&oUu~KOT{2=Xt)NApo0U;XGmAhW$)KJs%x|^f?lBvv)NqV4#aVrn3`@Q z9~PRIHRm@yt1UbgcaT-ENQ`^UF5A>t4LK|^C?DOZ-I?s=^N8|=hZjZ_Rop{f!F`6A z5Ktb*X{sIW@Vf9cq+u}Z^g+9ff7#Q&LfQHU8l8YTf)zYg@aTfBs>gmH8X8vdge2g$ zNMeyzEZ2BT$_hwdf;WnBJY&dg@_^U4FH(_ANku8kPdRRo@>`}Ud_SE|t0>~Rf)c}2 zSm;G04Qp7Z?lmR2Ew$OF-rSyo7yskK9&R0(qA70+10&5uBrh(>gRchM{ItWHk&M); z+wx4YZAqbxon5cIBu4F~n(0ywL6!QYH&tpjw4~M0Qsc-Dl6J2^qy3{aE0LAI34N?f zgWkooKGQ|=JNX7MPoqwlpqOFVczVVu`f9ieiX}BiNCsJnHN5l_*L&fy&>0Iu9NMeJ+ vB**!%!buvZkf0}t8O&jp63m|^o}(IGqD;Ft=}%v-4+=Ko1hqxe0c`&RFDD%h literal 0 HcmV?d00001 diff --git a/build/classes/vaccination/inventory/inventory.class b/build/classes/vaccination/inventory/inventory.class new file mode 100644 index 0000000000000000000000000000000000000000..be19b2cb5b5a632d3f392ca5f4d6952420b7d8f2 GIT binary patch literal 1212 zcmb_aU2hUW6g|WD$CgqkBCSY26k*%S53upUMq?AA(Hb5l!*)Wap|iRU#Qq~6e9%N< z;)6fHA7#8V3$)TreDP)Pxp(H=d*__}_4~(90Eak8BgW8}aL<#9Yw4?wR1=}JA6#Cc zG!hKOb3Wmn5m&>`%fY$uG(%>j#1|oRF2P1lQ zsq1@u)Z>9P`K*}GXYvEXcK07fkf!;e&`%b!ueaJaC7`i%sb@W%Yi}yA|B^pPm7}=> z1xlV?H^Gc~weW$2ASZGs{y6Z&GilyYSo|jsjq}(hb>j3-r4Tb>5sDe9Y$TyqPsUm+1;O_;vP&<&yk~Fi{{iSc%C`Uj literal 0 HcmV?d00001 diff --git a/build/classes/vaccination/inventory/inventoryDBUtil.class b/build/classes/vaccination/inventory/inventoryDBUtil.class new file mode 100644 index 0000000000000000000000000000000000000000..496fa2644294300af49207cd9c7c99bb60656373 GIT binary patch literal 1786 zcmb_cTXWk)7(Ht{maQm>F>y;uA?YQxolDKF2I5d4X-flc3w07`V93bwHdU)gj=T=Z z3p4p6y!M3`+L@HX3_pM$RX8hOfiS}Z9!vY_yYD&Q?(Z*t`3=A_zA+FJnBBJ>$MtRH z27bx)_oc6b@NghqTiH;qXCNVvd1&w3CC~PEN_XlHrK1GWZmZUI9NB6Kh%JG*6ZitT zYUJ74^Gd6M@6(gXD*}m@+GWt>z+6+dlDn))Yb<1vA=_QqYI~|CwJo*mc&_iNt1M9{ zZZg$s(2!{eykx;ZN=q+WNW;`p&cY}xfr+Z?%iHbUx(wItx+ev))xfd6O*?e;cUPHQ zj#8V5V%TK^~n=B zHJq-muNYWhslnKEfLLj}UPFc{To$;{!EMIn*zwgJzir#|X7+8bEn72%yoq_dp^15u z)SiHAaZ`J|ZQ&hU5lGt2rt}*Eizm7MgM)4}l@#9PY~>fCYVYe@O9E#LYh9RzcpOA5 zb7=ELUHqzr5AhM_R0W+qa*}(H422Tj6tpx~-fC+kT+W!rzJE99!K9 z-uCTXx?7=iq`NP-JFOT_(Dqe$C@?Aynr_(Br}o;muUtigU`KJDd`i0ap&I?>^l^!L zx@9+`BWU2>Uv8Hkgk~*hhmO4A>Z3c^pN`IzbXj+gb3E>GUS|oI7(tSfsqcemO{U`W!g{%IJiKoc$$?}=}iHaCb@jV_THJNslVHQqD7BGm{LpMcj`3c$!p~!Tuw*`MrrC20=PDzt?gfA#1BIzz_BrwiQn#Lq6p20e; v2J4QKg&KJ{q-_J6)P2dAONhU~o-pv0_=5(6!th^^9RoKt9b5E{;p;yEwuGe# literal 0 HcmV?d00001 diff --git a/build/classes/vaccination/inventory/inventory_insert.class b/build/classes/vaccination/inventory/inventory_insert.class new file mode 100644 index 0000000000000000000000000000000000000000..ce2d14a7b8ed83f3c1f44c5d8fb45a04eb88d51b GIT binary patch literal 2054 zcmbVNYg-#d6n-ZpY)DethEkeVTCrTaEi2Wcl1eYo+F(kN099(mB}`#3?54Yu6nx}| z_zV2(CyO8a0sbiU-QAc7LE({yojG&n%(=YhlHdRM^)~=_@wI`Nz;N9zmz85{eA7!x7VW9l;cZJ8;A>B-L~uYuEle`BDJ-pb=7*pr4%s)&hbjwl@;mvRJUB16%ca* zXJ%Z-*S4cq>`F~0Xg&B70-bl2qx7^u$LQFKKzzpCkSTPaJA)L`0%wcLk@K~kb?GhH z>lG=GExKhIuxW^CF2W0?Bn-m$%j&H;sN=GjLU4=u|Fe z@Gb@fGMiE_*q*&3we*vQ%}s zwqa{>Mg)wqTXVFxm&BMrTJBbr_xG(y=U>;DcBS`HxCP6=xWM@^(9nFr(Q;FI8N81P z%2sX9m*ffb9_M5sg%5DYz=s6jghbCiT-K_R!6ZIn^+grjh(+L=W0bc8@c%f4vDG9# zVVO2NX|1m0oAGVG8l*3uVc&f!aDh2#6xOWrt3iT;+}t_FvnV&MrfYkaPvagQ7`QKR z?QmVRiDvK+Gfdel*L!1o8v^$ugDvfi()^dAZ{9X*J&8vGeXU??j$bR6rSAt3(~=i; zkHE-@{S&nr%fOS7`kB?X7YMdNmm1AZjm=gm>)VAS7 zeQ`?OX6=-;UH<#Rks?Nrs0YKA{nj?iF#tjlOki9_0-f9q zo?=MyqlZXy&5&bp7u*v!e!-caLy@ywg9ku2&T-8|0yvK>PjU3%0+sZJQZZb_r9hGJ z`6f-?zL~vzfOle;H?!}B#8lkO4n|bM%nnCXrk3aym^4>4*Z0RW_I={Hwd5uK>$;99(1yc4)&mrjd=+p z$YFwbOmk|^<2p(h#7hj}6^5aB>thr@zzl=_K164~5j4ZXV|*3@v5zMx5P&XdT)`ae z^Iq4e)D+7jQFG$Lh1{8 tK8V<#bSh;)80a^!Xkh7||NLcTI%2dEWc4|| 0) { + isSuccess = true; + } else { + isSuccess = false; + } + + } + catch (Exception e) { + e.printStackTrace(); + } + + return isSuccess; + } + +} diff --git a/src/main/java/vaccination/inventory/inventory_insert.java b/src/main/java/vaccination/inventory/inventory_insert.java new file mode 100644 index 0000000..1416638 --- /dev/null +++ b/src/main/java/vaccination/inventory/inventory_insert.java @@ -0,0 +1,45 @@ +package vaccination.inventory; + +import java.io.IOException; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + + +@WebServlet("/inventory_insert") +public class inventory_insert extends HttpServlet { + private static final long serialVersionUID = 1L; + + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + + String batch_no = request.getParameter("batch_no"); + String vaccine_name = request.getParameter("vaccine_name"); + String receive_date = request.getParameter("receive_date"); + String country = request.getParameter("country"); + String expire_date = request.getParameter("expire_date"); + int quantity = Integer.parseInt(request.getParameter("quantity")); + + + boolean isTrue; + + + isTrue = inventoryDBUtil.insertvaccine(batch_no, vaccine_name, receive_date, country, expire_date, quantity); + + + if(isTrue == true) { + RequestDispatcher dis = request.getRequestDispatcher("inventory_view.jsp"); + dis.forward(request, response); + } else { + RequestDispatcher dis2 = request.getRequestDispatcher("inventory_unsuccess.jsp"); + dis2.forward(request, response); + } + + } + +}