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

📄 createoutlistaction.java

📁 一个汽车售后服务站的典型的进销管理系统,B/S模式的
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.xfaccp.struts.action.store;

import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.xfaccp.base.BaseAction;
import com.xfaccp.form.OrderTable;
import com.xfaccp.form.OutputTable;

/**
 * MyEclipse Struts Creation date: 10-31-2007
 * 
 * XDoclet definition:
 * 
 * @struts.action validate="true"
 */
public class CreateOutListAction extends BaseAction {
	/*
	 * Generated Methods
	 */

	/**
	 * Method execute
	 * 
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward createOutList(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		OutputTable outPut = (OutputTable) form;
		try {
			OrderTable order = new OrderTable();
			order.setId(outPut.getSellId());
			outPut.setOrderTable(order);
			command.create(outPut);
			List list = command.findByExample(outPut);
			Iterator it = list.iterator();
			if (it.hasNext()) {
				OutputTable out = (OutputTable) it.next();
				request.getSession().setAttribute("outputTable", out);
				OutputTable o = (OutputTable) request.getSession()
						.getAttribute("outputTable");
				System.out.println("入库单Id:" + o.getId());
			}
			return mapping.findForward("createOutMidList");
		} catch (Exception e) {
			e.printStackTrace();
			return mapping.findForward("error");
		}
	}

	public ActionForward findAllOrder(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		// OutputTable outPut = (OutputTable) form;
		try {
			OrderTable order = new OrderTable(); 
			order.setOrderState(0);
			order.setIsGiven(0);
			List orders = command.findByExample(order);			
			request.getSession().setAttribute("order", orders);			
			return mapping.findForward("createOutList");
		} catch (Exception e) {
			e.printStackTrace();
			return mapping.findForward("error");
		}

	}
}

⌨️ 快捷键说明

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