📄 tf_info_java.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.util.*" errorPage="../../pub_include/ErrPage.jsp" %>
<%request.setCharacterEncoding("gb2312");%>
<jsp:include page="../../pub_include/pub_function_javascript.html" flush="true"/>
<%@ page import="jinLing.pub.*,jinLing.info.*,jinLing.department.*,jinLing.accept.*"%>
<%
String Src_para = "";
Info info=new Info();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../pub_include/hosc.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
Hashtable lists = new Hashtable();
int iRes = 0;
String INFO_ID = Util.getNulltoStr(request.getParameter("INFO_ID")); //ID
String INFO_TYPE = Util.getNulltoStr(request.getParameter("INFO_TYPE")); // INFO_TYPE
if(!INFO_TYPE.equals(""))
lists.put("INFO_TYPE",INFO_TYPE);
String INFO_CONTENT = Util.getNulltoStr(request.getParameter("INFO_CONTENT")); // INFO_CONTENT
if(!INFO_CONTENT.equals(""))
lists.put("INFO_CONTENT",INFO_CONTENT);
String INFO_REMARK = Util.getNulltoStr(request.getParameter("INFO_REMARK")); //
if(!INFO_REMARK.equals(""))
lists.put("INFO_REMARK",INFO_REMARK);
//操作类型
String op=request.getParameter("optype");
int type=Integer.parseInt(op);
//增加
if(type==1)
{
// 审阅流程
if(INFO_TYPE.equals("8"))
{
//增加主信息
iRes = info.addRec(lists);
INFO_ID = info.getIdValue();
Util.debug("INFO_ID"+INFO_ID);
//增加从信息
Collection col = null;
Hashtable list = new Hashtable();
Department department=new Department();
Accept accept =new Accept();
col = department.execSel(list);
Iterator it = col.iterator();
while (it.hasNext())
{
Hashtable rs = (Hashtable) it.next();
Hashtable ls = new Hashtable();
Util.debug("ls"+ls);
ls.put("DEPARTMENT_ID",rs.get("DEPARTMENT_ID").toString());
ls.put("INFO_ID",INFO_ID);
Util.debug("ls"+ls);
accept.addRec(ls);
}
}
// 增加文字或图片信息
else
{
iRes = info.addRec(lists);
}
}
//修改
if(type==2)
{
iRes = info.setRec(INFO_ID,lists);
}
String iRecSult = "数据提交失败";
switch (iRes)
{
case 1: //成功
iRecSult = "成功!谢谢使用!";
break;
case 0: //
iRecSult = "对不起,失败!";
break;
case 2: //信息已存在
iRecSult = "对不起,信息已存在!请重新输入。";
break;
}
%>
<script language=javascript>
iRes=<%=iRes%>;
iRecSult="<%=iRecSult%>";
if (iRes==1)
{
window.location.href='tf_info_update.jsp?INFO_TYPE=<%=INFO_TYPE%>';
}
else
{
alert(iRecSult);
history.back();
}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -