CapitalGroupOperation.jsp
1.55 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="Util" class="weaver.general.Util" scope="page" />
<jsp:useBean id="CapitalGroupComInfo" class="weaver.cpt.maintenance.CapitalGroupComInfo" scope="page" />
<%
char separator = Util.getSeparator() ;
String operation = Util.null2String(request.getParameter("operation"));
String id = Util.null2String(request.getParameter("id"));
String name = Util.fromScreen(request.getParameter("name"),user.getLanguage());
String description = Util.fromScreen(request.getParameter("description"),user.getLanguage());
String parentid = Util.null2String(request.getParameter("parentid"));
if (parentid.equals("")){
parentid = "0";
}
if (operation.equals("add"))
{
RecordSet.executeProc("CptCapitalGroup_Insert",name+separator+description+separator+parentid);
CapitalGroupComInfo.removeCapitalGroupCache();
}
else if (operation.equals("edit"))
{
RecordSet.executeProc("CptCapitalGroup_Update",id+separator+name+separator+description+separator+parentid);
CapitalGroupComInfo.removeCapitalGroupCache();
}
else if (operation.equals("delete"))
{
RecordSet.executeProc("CptCapitalGroup_Delete",id);
RecordSet.next();
int returnval = RecordSet.getInt(1);
if(returnval==-1){
response.sendRedirect("CptCapitalGroupEdit.jsp?id="+id+"&msgid=20");
return ;
}
CapitalGroupComInfo.removeCapitalGroupCache();
}
response.sendRedirect("/cpt/maintenance/CptCapitalGroup.jsp?parentid="+parentid);
%>