-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateorderprocess1.jsp
More file actions
269 lines (206 loc) · 7.89 KB
/
Updateorderprocess1.jsp
File metadata and controls
269 lines (206 loc) · 7.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Free Pharmaceutical Company Template- Download HTML Website Templates</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function ctck()
{
var sds = document.getElementById("dum");
if(sds == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");}
}
</script>
<SCRIPT LANGUAGE="JavaScript">
function dil(form)
{
for(var i=0; i<form.elements.length; i++)
{
if(form.elements[i].value == "")
{
alert("Fill out all Fields")
document.F1.accountno.focus()
return false
}
}
if(isNaN(document.F1.accountno.value))
{
alert("Accountno must be number & can't be null")
document.F1.accountno.value=""
document.F1.accountno.focus()
return false
}
if(!isNaN(document.F1.username.value))
{
alert("User Name must be char's & can't be null")
document.F1.username.value=""
document.F1.username.focus()
return false
}
if(!isNaN(document.F1.password.value))
{
alert("Password must be char's & can't be null")
document.F1.password.value=""
document.F1.password.focus()
return false
}
return true
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Global Banking ..</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function ctck()
{
var sds = document.getElementById("dum");
}
</script>
<body>
<div id="header">
<div id="navigation">
<ul>
<li><a href="index.jsp">Home</a></li>
<li><a href="about.jsp">About Us</a></li>
<li><a href="admin.jsp">ADMINISTRATOR </a></li>
<li><a href="customer.jsp">CUST0MER</a></li>
<li><a href="contactus.jsp">Contact Us</a></li>
</ul>
</div>
</div>
<table width="960" border="0" cellspacing="10" cellpadding="0" align="center">
<tr align="justify">
<td valign="top" width="220px">
<img src="images/hioxindia-pharmacy_08.jpg" alt="" border="0" /> <br />
<h1>Pharmaceutist</h1>
<p>Freedesignertemplates.com has a wide collection of HTML web design templates.</p>
<p align="right"><a href="#" class="more">View More</a></p>
</td> <td valign="top">
<%
%>
<table width="300" border="0" cellspacing="10" cellpadding="0" align="center"><%
double custid=(Double)session.getAttribute("custid");
//int a=Double.parseDouble(request.getAttribute("custid"));
String ProdCode=request.getParameter("ProdCode");
String productname=request.getParameter("productname");
String tx=request.getParameter("tax");
double tax=Double.parseDouble(tx);
String min=request.getParameter("minq");
double minq=Double.parseDouble(min);
String order=request.getParameter("orderq");
double orderq=Double.parseDouble(order);
String ds=request.getParameter("discount");
double discount=Double.parseDouble(ds);
String nst=request.getParameter("netcost");
double netcost=Double.parseDouble(nst);
String amoun=request.getParameter("amount");
double amount=Double.parseDouble(amoun);
String paymode=request.getParameter("r1");
boolean status=verifyLoginforcustadmin.checkLogin(custid);
if(status==true){
try
{
Connection con=GetCon.getCon();
PreparedStatement ps=con.prepareStatement("update neworder4 set ProdCode=?,productname=?,tax=?,minq=?,orderq=?,discount=?,netcost=?,amount=?,paymode=? where id =?");
//int custid=(Integer)custid;
ps.setDouble(10,custid);
ps.setString(1,ProdCode);
ps.setString(2,productname);
ps.setDouble(3,tax);
ps.setDouble(4,minq);
ps.setDouble(5,orderq);
ps.setDouble(6,discount);
ps.setDouble(7,netcost);
ps.setDouble(8,amount);
ps.setString(9,paymode);
ResultSet rs=ps.executeQuery();
if(rs.next()){
out.print("order has been updated");
request.setAttribute("order","order has been updated");
%>
<jsp:forward page="ordersadmin.jsp"></jsp:forward>
<%
}
/* else{
out.print("sorry try later");
%>
<jsp:forward page="index.php"></jsp:forward>
<%
}*/
} catch (SQLException e) {
e.printStackTrace();
}
}else{
out.println("your given id is wrong");
request.setAttribute("wrong","your given id is wrong");
%>
<jsp:forward page="Updateorders.jsp"></jsp:forward>
<%
}
%></table><%
%>
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*" %>
<%@ page import="javax.servlet.*"%>
<%@ page import="com.javatpoint.*" %>
<td valign="top">
<img src="images/hioxindia-pharmacy_10.jpg" alt="" border="0" />
<h1>Drug Store</h1>
<p>Anyone can use these HTML templates just by replacing the content to the pre-existing site designs.</p>
<p align="right"><a href="#" class="more">View More</a></p>
</td>
<td valign="top">
<img src="images/hioxindia-pharmacy_12.jpg" alt="" border="0" />
<h1>Tablets</h1>
<p>This high quality free pharmaceutical company template is built using XHTML and CSS..</p>
<p align="right"><a href="#" class="more">View More</a></p>
</td>
</tr>
<tr><td colspan="4" style="border-bottom:1px solid #CCCCCC;"></td></tr>
</table>
<div id="content">
<table width="960" border="0" cellspacing="0" cellpadding="0">
<tr align="justify">
<td width="200" valign="top">
<img src="images/hioxindia-pharmacy_19.jpg" alt="" border="0" /> </td>
<td width="760" valign="top">
<h1>Welcome to Pharmaceutical Company Template</h1>
<p>This is free Pharmaceutical Company Template for your online website, blog or web page which is under Health and Medicine category. Anyone wants good, professional, template for their pharmacy, drug store, medical store then this template would be the best one. This free pharmaceutical company template is designed by professional designers to make your task much easier to customize it.</p><br />
<p>There are many other template categories like Arts, Agriculture, Computers, Satellite, Cars, Finance, Nature, Music, Personal Website, Religious, Fashion, Furniture, Holiday, Travel, Night club are available in this site. Have a look at the collection of HTML templates, pick the right one, preview and download it easily.</p>
</td>
</tr>
</table>
</div>
<div id="footer">
<div id="footer_1">
<ul>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul> <br />
<span id="design">Designed by <a id="dum" href="http://www.javatpoint.com" target="_blank">www.javatpoint.com</a></span>
<script type="text/javascript">
document.onload = ctck();
</script>
</div>
</div>
</body>
</html>
</head>
<body>
<div id="footer_top">
<div id="footer_navigation">
</div>
<div id="footer_copyright" >
<center><img alt="business" width="196" height="106"></center><br>
<p>Each people plan their site layouts depending upon their business type. Here comes a free designer template which provides you with a selection of different kinds of webdesign starting from business template, fashion template, media template, Science template, Arts template and much more.</p>
Copyright © Your Company Name</div>
</div>
<script type="text/javascript">
document.onload = ctck();
</script>
</div>
</body>
</html>