⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 informationaddaction.java

📁 一个完整的网络订餐系统
💻 JAVA
字号:
package com.information.web.action;

import org.apache.struts.action.ActionForward;
import com.common.*;
import com.common.struts.*;
import com.information.dao.InformationDao;
import com.information.form.Information;

public class InformationAddAction extends AbstractAction {
  public InformationAddAction() {
  }

  public ActionForward execute(ActionContext actionContext) throws java.lang.Exception
  {
     SessionContext ctx = (SessionContext) actionContext.getSession().getAttribute(Globals.SESSION_CONTEXT);
     String storeID = null;
     if(null!=ctx) storeID = ctx.getStoreID();
     String systemmanager = (String)actionContext.getSession().getAttribute("systemmanager");
     if(null!=systemmanager) storeID = "kc0305155587174";

     String informationID = actionContext.getParameter("informationID");
     String infoTitle = actionContext.getParameter("infoTitle");
     String infotype = actionContext.getParameter("infotype");
     String infoabstract = actionContext.getParameter("infoabstract");
     String keywords = actionContext.getParameter("keywords");
     String comefrom = actionContext.getParameter("comefrom");
     String author = actionContext.getParameter("author");
     String content = actionContext.getParameter("docContent");


     Information info = new Information(informationID,infoTitle,infotype, infoabstract,
                                        keywords, comefrom, author, content,storeID);

    InformationDao dao = new InformationDao();

    int nRet = dao.inserInformationToDb(info);

    return actionContext.getMapping().findForward("informationAdd");
 }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -