billaddaction.java
来自「一个基于j2ee的超市管理系统」· Java 代码 · 共 52 行
JAVA
52 行
package org.yeeku.action;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import java.util.*;
import org.yeeku.service.*;
import org.yeeku.factory.*;
/**
* @author yeeku.H.lee kongyeeku@163.com
* @version 1.0
* <br>Copyright (C), 2005-2008, yeeku.H.Lee
* <br>This program is protected by copyright laws.
* <br>Program Name:
* <br>Date:
*/
public class BillAddAction extends Action
{
public ActionForward execute(ActionMapping mapping , ActionForm form ,
HttpServletRequest request , HttpServletResponse response)throws Exception
{
System.out.println("@$%#%^$^*&^&*^^%^");
DynaActionForm deptAddform = (DynaActionForm)form;
String billDate = (String)deptAddform.get("billDate");
String billDueDate = (String)deptAddform.get("billDueDate");
String vendor = (String)deptAddform.get("vendor");
WebService ds = (WebService)AppFactory.instance().getApp("web");
boolean c = ds.createBill(billDate , billDueDate , vendor);
if (c)
{
System.out.println("c=" + c);
System.out.println("DEPT添加成功");
request.setAttribute("billDate" , billDate);
request.setAttribute("vendor" , vendor);
return mapping.findForward("success");
}
else
{
System.out.println("c=" + c);
return mapping.findForward("index");
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?