forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathware_add.jsp
More file actions
48 lines (44 loc) · 1.1 KB
/
ware_add.jsp
File metadata and controls
48 lines (44 loc) · 1.1 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
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="electric.electricUtils.*"%>
<%@ page import="electric.dbs.*"%>
<%
String pageAction=ParamUtils.getEscapeHTMLParameter(request,"pageaction","goback");
String responsePage=ParamUtils.getEscapeHTMLParameter(request,"responsepage","");
pageAction=pageAction.trim().toUpperCase();
if(pageAction.equals("CREATE"))
{
Dbware ware=new Dbware(request);
}
else if(pageAction.equals("MODIFY"))
{
int id=ParamUtils.getIntParameter(request,"id",0);
if(id>0)
{
Dbware warea=new Dbware(id);
warea.modify(request);
}
}
else if(pageAction.equals("DELETE"))
{
int id2=ParamUtils.getIntParameter(request,"id",0);
if(id2>0)
{
Dbware wareb=new Dbware(id2);
wareb.setStatus(1);
}
}
if(!responsePage.trim().equals(""))
{
response.sendRedirect(responsePage);
}
else
{
%>
<SCRIPT Language="JavaScript">
<!--
history.go(-1);
//-->
</SCRIPT>
<%
}
%>