📄 backylhq_mjscaction.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.Backylhq_mjscForm;/** * Backylhq_mjscAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 10-27-2004 * * XDoclet definition: * @struts:action path="/backylhq_mjsc" name="backylhq_mjscForm" input="/form/backylhq_mjsc.jsp" validate="true" * @struts:action-forward name="/BackYLHQ_mjsc.jsp" path="/BackYLHQ_mjsc.jsp" */public class Backylhq_mjscAction 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 { Backylhq_mjscForm backylhq_mjscForm = (Backylhq_mjscForm) form; String sql; dbconnect db=new dbconnect(); ResultSet rs; int index1=backylhq_mjscForm.getindex1(); int index2=backylhq_mjscForm.getindex2(); int index3=backylhq_mjscForm.getindex3(); int index4=backylhq_mjscForm.getindex4(); int index5=backylhq_mjscForm.getindex5(); int index6=backylhq_mjscForm.getindex6(); int index7=backylhq_mjscForm.getindex7(); String type1="129"; String type2="229"; String type3="328"; String type4="428"; String type5="527"; String type6="棉短绒"; String type7="127"; String areas=backylhq_mjscForm.getareas(); areas=new String(areas.getBytes("ISO-8859-1")); PubDate pub=new PubDate(); int id=0; String pubdate=pub.getshortPubdate(); sql="select * from ylhq1_mjsc where pubdate='"+pubdate+"' and areas='"+areas+"'"; rs=db.executeQuery(sql); if(rs.next()) { return(new ActionForward(mapping.getInput())); } else { sql="select count(id) from ylhq1_mjsc"; rs=db.executeQuery(sql); if(rs.next()) { id=rs.getInt(1); } rs.close(); sql="insert into ylhq1_mjsc values('"+(id+1)+"','"+type1+"','"+type2+"','"+type3+"','"+type4+"','"+type5+"','"+type6+"','"+type7+"','"+index1+"','"+index2+"','"+index3+"','"+index4+"','"+index5+"','"+index6+"','"+index7+"','"+areas+"','"+pubdate+"')"; rs=db.executeQuery(sql); rs.close(); } return mapping.findForward("BackSuccess"); //throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented."); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -