📄 dms_0002fsystem_0002fphrasetype_0002ejsp_jsp.java
字号:
package DMS.system;
import com.jasson.business.system.*;
import com.jasson.common.ExtendString;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class DMS_0002fsystem_0002fPhraseType_0002ejsp_jsp extends HttpJspBase {
static {
}
public DMS_0002fsystem_0002fPhraseType_0002ejsp_jsp( ) {
}
private static boolean _jspx_inited = false;
public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
String _value = null;
try {
if (_jspx_inited == false) {
synchronized (this) {
if (_jspx_inited == false) {
_jspx_init();
_jspx_inited = true;
}
}
}
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=big5");
pageContext = _jspxFactory.getPageContext(this, request, response,
"", true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(1,48);to=(2,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(2,50);to=(3,0)]
out.write("\r\n");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(3,2);to=(35,0)]
ExtendString ExStr=new ExtendString();
request.setCharacterEncoding("ISO8859-1");
String PhraseType=request.getParameter("PhraseType");
String Phrase="";
String action=null;
int iPhraseType=0;
if(PhraseType!=null)
iPhraseType=java.lang.Integer.parseInt(PhraseType);
Phrase=request.getParameter("Phrase");
//out.println(iPhraseType+":"+Phrase);
action=request.getParameter("Action");
if(action!=null&&action.equals("Add")){
DocPhraseCategoryDAO phraseType=new DocPhraseCategoryDAO();
phraseType.setPhraseType(iPhraseType);
phraseType.setPhrase(ExStr.paraDecode(Phrase));
phraseType.insertPhraseCategory();
}
if(action!=null&&action.equals("Edit")){
DocPhraseCategoryDAO phraseType=new DocPhraseCategoryDAO();
phraseType.setPhraseType(iPhraseType);
phraseType.setPhrase(ExStr.paraDecode(Phrase));
phraseType.updatePhraseCategory();
}
if(action!=null&&action.equals("Delete")){
DocPhraseCategoryDAO phraseType=new DocPhraseCategoryDAO();
//phraseType.setPhraseType(iPhraseType);
//phraseType.setPhrase(Phrase);
phraseType.deletePhraseType(iPhraseType);
}
DocPhraseCategoryDAO[] allPhraseType=DocPhraseCategoryDAO.findAllPhraseCategory();
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(35,2);to=(99,2)]
out.write("\r\n<html> \r\n<head>\r\n<meta http-equiv=\"Content-Language\" content=\"zh-tw\">\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=big5\">\r\n\r\n<link rel=\"stylesheet\" href=\"/WebAgenda/workflow/css/co-css.css\" type=\"text/css\"> \r\n<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\">\r\n<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">\r\n<title>詞庫類別維護</title>\r\n</head>\r\n<script>\r\nfunction btnAddClick(Action){\r\n//alert(\"Action:\"+Action);\r\n\tindex=form1.num.value;\r\n\tPhraseType=\"\";\r\n\tflag=false;\r\n\tif(index==1){\r\n\t\tif(form1.PhraseType.checked){\r\n\t\t\tPhraseType=form1.PhraseType.value \r\n\t\t\tflag=true;\r\n\t\t}\r\n\t}\r\n\tif(index>1){\r\n\t\tfor(i=0;i<index;i++){\r\n\t\t\tif(form1.PhraseType[i].checked){\r\n\t\t\t\tPhraseType=form1.PhraseType[i].value \r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}\r\n\tif(!flag&&Action!=\"Add\"){\r\n\t\talert(\"請選擇.\");\r\n\t\treturn;\r\n\t}\r\n\tstrType=form1.strType.value;\r\n\t//alert(strType);\r\n\tvar strPath = \"PhraseTypeEdit.jsp?Action=\"+Action+\"&PhraseType=\"+PhraseType+\"&index=\"+index+\"&strType=\"+strType; \r\n\treturnValue=\"\";\r\n\tif(Action!=\"Delete\"){\r\n\t\t var strFeatures = \"dialogWidth=320px;dialogHeight=180px;center=yes;help=no;status=no\";\r\n\t\t returnValue= showModalDialog(strPath, 0, strFeatures);\t\r\n\t} \r\n\tif(returnValue==null) return;\r\n\tform1.method=\"post\";\r\n\tform1.action=\"PhraseType.jsp?Action=\"+Action+returnValue; \r\n\tform1.submit(); \r\n}\r\n</script>\r\n<body> \r\n<form name=\"form1\" >\r\n <input type=\"button\" value=\"新增\" name=\"B1\" onclick=\"btnAddClick('Add')\">\r\n <input type=\"button\" value=\"修改\" name=\"B2\" onclick=\"btnAddClick('Edit')\"> \r\n <input type=\"button\" value=\"刪除\" name=\"B3\" onclick=\"btnAddClick('Delete')\"> \r\n<table width=\"100%\" border=\"0\" cellspacing=\"4\" cellpadding=\"2\"> \r\n <tr class=\"item_col_1\"> \r\n <td width=\"100%\"class=\"bgcoblue4\" colspan=\"3\" align=\"center\">詞庫類別維護</td> \r\n </tr> \r\n <tr class=\"item_col_1\"> \r\n <td width=\"5%\" class=\"bgcoblue1\" align=\"center\">選項</td> \r\n <td width=\"32%\" class=\"bgcoblue1\" align=\"center\">詞庫類別代碼</td> \r\n <td width=\"51%\" class=\"bgcoblue1\" align=\"center\">詞庫類別名稱</td> \r\n </tr> \r\n ");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(99,4);to=(105,2)]
int i=0;
String strType="";
if(allPhraseType!=null)
for(i=0;i<allPhraseType.length;i++){
strType=strType+allPhraseType[i].getPhraseType()+":";
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(105,4);to=(107,80)]
out.write(" \r\n <tr> \r\n <td width=\"5%\" class=\"task_col_1\" align=\"center\"><input type=\"radio\" value=\"");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(107,83);to=(107,115)]
out.print(allPhraseType[i].getPhraseType());
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(107,117);to=(108,53)]
out.write("\" name=\"PhraseType\"></td> \r\n <td width=\"32%\" class=\"bgcogray1\" align=\"center\">");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(108,56);to=(108,88)]
out.print(allPhraseType[i].getPhraseType());
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(108,90);to=(109,87)]
out.write("</td> \r\n <td width=\"51%\" class=\"bgcogray1\" align=\"center\"><a href=\"PhraseContext.jsp?Phrase=");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(109,90);to=(109,118)]
out.print(allPhraseType[i].getPhrase());
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(109,120);to=(109,132)]
out.write("&PhraseType=");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(109,135);to=(109,167)]
out.print(allPhraseType[i].getPhraseType());
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(109,169);to=(109,171)]
out.write("\">");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(109,174);to=(109,202)]
out.print(allPhraseType[i].getPhrase());
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(109,204);to=(111,2)]
out.write("</a></td> \r\n </tr> \r\n ");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(111,4);to=(111,5)]
}
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(111,7);to=(113,28)]
out.write(" \r\n</table> \r\n<input type=\"hidden\" value=\"");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(113,31);to=(113,32)]
out.print(i);
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(113,34);to=(114,28)]
out.write("\" name=\"num\"> \r\n<input type=\"hidden\" value=\"");
// end
// begin [file="/DMS/system/PhraseType.jsp";from=(114,31);to=(114,38)]
out.print(strType);
// end
// HTML // begin [file="/DMS/system/PhraseType.jsp";from=(114,40);to=(118,0)]
out.write("\" name=\"strType\"> \r\n</form> \r\n</body> \r\n</html> \r\n");
// end
} catch (Throwable t) {
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -