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

📄 updatereturnmoneyaction.java

📁 关于网上汽车销售系统的详细编程项目实战实例
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.company.struts.action.returnmoney;

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.company.struts.action.basic.BaseAll;
import com.company.struts.form.XsReturnMoney;

/**
 * MyEclipse Struts Creation date: 03-03-2008
 * 
 * XDoclet definition:
 * 
 * @struts.action validate="true"
 * @struts.action-forward name="success" path="/ReturnMoneyList.jsp"
 */
public class UpdateReturnMoneyAction extends BaseAll {
	/*
	 * Generated Methods
	 */

	/**
	 * Method execute
	 * 
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		XsReturnMoney xsreturnmoeny = (XsReturnMoney) form;
		String id = request.getParameter("id");
		try {
			xsreturnmoeny = (XsReturnMoney) this.getDao().findById(
					Integer.parseInt(id));
		} catch (Exception e) {
			e.printStackTrace();
		}
		if(xsreturnmoeny!=null){
			if (xsreturnmoeny.getChecker().equals("")) {
				request.setAttribute("returnMoneyForm", xsreturnmoeny);
				return mapping.findForward("success");
			}else {
				System.out.println("checker1:"+xsreturnmoeny.getChecker());
				return mapping.findForward("error");	
			}
		}else{
			System.out.println("checker2:"+xsreturnmoeny.getChecker());
			return mapping.findForward("error");
		}
	}

}

⌨️ 快捷键说明

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