stocktuneaction.java

来自「一个汽车售后服务站的典型的进销管理系统,B/S模式的」· Java 代码 · 共 62 行

JAVA
62
字号
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.xfaccp.struts.action.store;

import java.util.Date;
import java.util.List;

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

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.StocktuneTable;

/** 
 * MyEclipse Struts
 * Creation date: 11-01-2007
 * 
 * XDoclet definition:
 * @struts.action
 */
public class StocktuneAction extends BaseAction {
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	
	public ActionForward createStocktune(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		StocktuneTable stocktuneTable=(StocktuneTable)form;
		Date nowTime=new Date();
		String stockTuneDate = nowTime.toLocaleString();
		stocktuneTable.setStockTuneDate(stockTuneDate);
		stocktuneTable.setIfAgree(new Integer(0));
		try {
			this.idao.create(stocktuneTable);
			request.setAttribute("success", "success");
		}
		catch(Exception ex)
		{
			request.setAttribute("error", "error");
			ex.printStackTrace();
			
		}
		return mapping.findForward("createStocktunePart");
		
	}
}

⌨️ 快捷键说明

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