catalogmodifyaction.java

来自「一个完整的网络订餐系统」· Java 代码 · 共 26 行

JAVA
26
字号
package com.catalog.web.action;

import org.apache.struts.action.ActionForward;
import com.common.struts.*;
import com.catalog.dao.CatalogDao;
import com.catalog.form.Catalog;

public class CatalogModifyAction extends AbstractAction{
  public CatalogModifyAction() {
  }
  public ActionForward execute(ActionContext actionContext) throws java.lang.Exception {
   String catalogID = actionContext.getParameter("catalogID");
   String catalogname = actionContext.getParameter("catalogname");
   String pararentID = actionContext.getParameter("pararentID");
   String catlogPhoto = actionContext.getParameter("foodImage");
   if("0".equals(pararentID)) pararentID = null;

   Catalog model = new Catalog(catalogID,catalogname,pararentID,catlogPhoto);
   CatalogDao dao = new CatalogDao();
   dao.updatCatalogToDb(model);

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

}

⌨️ 快捷键说明

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