📄 template_control.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ijipin.tool.*" %>
<%@ page import="com.ijipin.database.*" %>
<%@ page import="com.ijipin.property.*" %>
<%@ include file="/userinfor.jsp" %>
<%@ page import="com.ijipin.oa.document.*" %>
<%
final String strLevel = Template.strLevel; //本页所在的层次
final int iModuleID = Template.iModuleID;
String strLink_action = Template.strLink_list;
%>
<%@ include file="/share/page/page_request_upload.jsp" %>
<%@include file="/share/page/page_form_upload.jsp"%>
<%
String strMessage = "操作出现异常!";
boolean flag = false;
if (strACTION.equals("ADD")) {
strACTION = "UPDATE";
}
%>
<%
DataConn dataConn = new DataConn();
try {
String sCond = "";
String key_field = "";
String key_value = "0";
String MBMC = Convert.uploadGBK(mySmartUpload.getRequest().getParameter("MBMC")).trim();
String MBSM = Convert.uploadGBK(mySmartUpload.getRequest().getParameter("MBSM")).trim();
key_field = "RECORDID";
key_value = Convert.uploadGBK(mySmartUpload.getRequest().getParameter("RECORDID")).trim();
int iFieldCount = 3;
Module module = new Module(dataConn);
moduleInfor_session = (ModuleInfor)module.getInfor(iModuleID);
String sTable = moduleInfor_session.getSXBM();
String field_str[] = {
"MBMC","MBSM","RECORDID"
};
String value_str[] = {
"'" + MBMC + "'",
"'" + MBSM + "'",
"'" + key_value + "'"
};
iFieldCount = 0;
String idArray[] = mySmartUpload.getRequest().getParameterValues("C_ID");
DataAction dataAction = new DataAction(dataConn);
try {
if (strACTION.equals("ADD")) {
flag = dataAction.add(sTable, field_str, value_str);
} else if (strACTION.equals("UPDATE")) {
sCond = key_field + "='" + key_value + "'";
flag = dataAction.update(sTable, field_str, value_str, sCond);
} else if (strACTION.equals("DELETE")) {
flag = dataAction.delete(sTable, key_field, idArray);
}
strMessage = dataAction.getMessage();
}
catch(Exception e) {
System.out.println("Error="+e);
}
}
catch(java.lang.Exception ex) {
System.out.println("错误信息:" + ex.getMessage());
}
finally {
if (dataConn != null) {
dataConn.close();
}
}
%>
<%
if (!flag) {
out.println("<Script Language='javaScript'>");
out.println("alert('" + strMessage + "');");
out.println("history.go(-1);");
out.println("</Script>");
} else {
out.println("<Script Language='javaScript'>");
out.println("formPage.action='" + strLink_action + "'");
out.println("formPage.submit();");
out.println("</Script>");
}
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -