WorkflowbrowserOperation.jsp
4.32 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
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.systeminfo.workflowbill.WorkFlowBillUtil"%>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="bci" class="weaver.workflow.field.BrowserComInfo" scope="page" />
<%
WorkFlowBillUtil wf = new WorkFlowBillUtil();
char separator = Util.getSeparator();
String operation = Util.null2String(request.getParameter("operation"));
String sql = "";
String para="";
//serach
if(operation.equalsIgnoreCase("search")){
String indexdesc = Util.fromScreen(request.getParameter("searchcon"),user.getLanguage());
para = indexdesc;
rs.executeProc("WorkFlow_Browser_Search",para);
int id = 0;
while(rs.next()){
id = Util.getIntValue(rs.getString("id"),0);
}
bci.removeBrowserCache();
response.sendRedirect("ViewWorkflowbrowser.jsp?id="+id);
return;
}
//add browser
if(operation.equalsIgnoreCase("addWorkflowbrowser")){
int id = Util.getIntValue(Util.fromScreen(request.getParameter("id"),user.getLanguage()),0);
String label = Util.fromScreen(request.getParameter("label"),user.getLanguage());
// int labelid = wf.getLabelIdbyLabelName(label);
int labelid = Util.getIntValue(Util.fromScreen(request.getParameter("labelid"),user.getLanguage()),0);
/* if(labelidget != labelid&&labelidget > 0&&labelid > 0){
bci.removeBrowserCache();
response.sendRedirect("ManageWorkflowbrowser.jsp");
return;
}
if(labelid == 0 && labelidget >0){
labelid = labelidget;
} */
String dbtype = Util.fromScreen(request.getParameter("dbtype"),user.getLanguage());
String url = Util.fromScreen(request.getParameter("url"),user.getLanguage());
String table = Util.fromScreen(request.getParameter("table"),user.getLanguage());
String colum = Util.fromScreen(request.getParameter("colum"),user.getLanguage());
String keycolum = Util.fromScreen(request.getParameter("keycolum"),user.getLanguage());
String linkurl = Util.fromScreen(request.getParameter("linkurl"),user.getLanguage());
para=""+id+separator +labelid+separator+dbtype+separator+url+separator+table+separator+colum+separator+keycolum+separator+linkurl;
out.println(para);
rs.executeProc("WorkFlow_BrowserUrl_Insert",para);
bci.removeBrowserCache();
response.sendRedirect("ManageWorkflowbrowser.jsp");
return;
}
//edit
if(operation.equalsIgnoreCase("editWorkflowbrowser")){
int id = Util.getIntValue(Util.fromScreen(request.getParameter("id"),user.getLanguage()),0);
String label = Util.fromScreen(request.getParameter("label"),user.getLanguage());
int labelid = wf.getLabelIdbyLabelName(label);
int labelidget = Util.getIntValue(Util.fromScreen(request.getParameter("labelid"),user.getLanguage()),0);
if(labelidget != labelid&&labelidget > 0&&labelid > 0){
bci.removeBrowserCache();
response.sendRedirect("ManageWorkflowbrowser.jsp");
return;
}
if(labelid == 0 && labelidget >0){
labelid = labelidget;
}
String dbtype = Util.fromScreen(request.getParameter("dbtype"),user.getLanguage());
String url = Util.fromScreen(request.getParameter("url"),user.getLanguage());
String table = Util.fromScreen(request.getParameter("table"),user.getLanguage());
String colum = Util.fromScreen(request.getParameter("colum"),user.getLanguage());
String keycolum = Util.fromScreen(request.getParameter("keycolum"),user.getLanguage());
String linkurl = Util.fromScreen(request.getParameter("linkurl"),user.getLanguage());
para=""+id+separator+labelid+separator+dbtype+separator+url+separator+table+separator+colum+separator+keycolum+separator+linkurl;
rs.executeProc("WorkFlow_BrowserUrl_Update",para);
bci.removeBrowserCache();
response.sendRedirect("ManageWorkflowbrowser.jsp");
return;
}
//delete
if(operation.equalsIgnoreCase("delete")){
int id = Util.getIntValue(request.getParameter("id"),0);
para = ""+id;
out.println(para);
out.println(rs.executeProc("WorkFlow_BrowserUrl_Delete",para));
bci.removeBrowserCache();
response.sendRedirect("Manageworkflowbrowser.jsp");
return;
}
%>