📄 backtjpicturecontentaction.java
字号:
// Created by Xslt generator for Eclipse.// XSL : not found (java.io.FileNotFoundException: (Bad file descriptor))// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xslpackage struts.action;import java.sql.ResultSet;import javabean.PubDate;import javabean.dbconnect;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.apache.struts.action.Action;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionForward;import org.apache.struts.action.ActionMapping;import struts.form.BacktjpicturecontentForm;/** * BacktjpicturecontentAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 10-01-2004 * * XDoclet definition: * @struts:action path="/backtjpicturecontent" name="backtjpicturecontentForm" input="/form/backtjpicturecontent.jsp" validate="true" */public class BacktjpicturecontentAction extends Action { // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods /** * Method execute * @param ActionMapping mapping * @param ActionForm form * @param HttpServletRequest request * @param HttpServletResponse response * @return ActionForward * @throws Exception */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { BacktjpicturecontentForm backtjpicturecontentForm = (BacktjpicturecontentForm) form; int count=0; String title1=(backtjpicturecontentForm.gettitle1()).trim(); title1=new String(title1.getBytes("ISO-8859-1")); String title2=backtjpicturecontentForm.gettitle2().trim(); title2=new String(title2.getBytes("ISO-8859-1")); String titles=title1+title2; String sql; String content=backtjpicturecontentForm.getcontents().trim(); String contents="Table_Picture/"+content; PubDate pb=new PubDate(); String times=pb.getshortPubdate(); String table="SCTJ"; int id=0; String[] strArray=backtjpicturecontentForm.getstrArray(); for(count=0;count<strArray.length;count++) { strArray[count]=new String(strArray[count].getBytes("ISO-8859-1")); if(strArray[count].equalsIgnoreCase("生产统计")) { table="SCTJ"; } else if(strArray[count].equalsIgnoreCase("进出口统计")) { table="JCKTJ"; } else if(strArray[count].equalsIgnoreCase("经济效益")) { table="JJXY"; } else if(strArray[count].equalsIgnoreCase("综合统计")) { table="ZHTJ"; } ResultSet rs; dbconnect db=new dbconnect(); sql="select max(ID) as Count from "+table+""; rs=db.executeQuery(sql); if(rs.next()) { id=rs.getInt("Count"); } rs.close(); sql="insert into "+table+" values('"+titles+"','"+times+"','"+contents+"','"+(id+1)+"')"; rs=db.executeQuery(sql); rs.close(); //request.setAttribute("table",table); //request.setAttribute("titles",titles); //request.setAttribute("times",times); //request.setAttribute("contents",contents); } return mapping.findForward("BackSuccess"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -