/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.yuntong.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.yuntong.service.M_IRegisterManagerService;

/** 
 * MyEclipse Struts
 * Creation date: 04-11-2007
 * 
 * XDoclet definition:
 * @struts.action
 * @struts.action-forward name="fingok" path="/SCGL/M_scgl_2.jsp"
 */
public class FindByIdAction extends Action {
	M_IRegisterManagerService managerService;

	/*
	 * Generated Methods
	 */

	public M_IRegisterManagerService getManagerService() {
		return managerService;
	}

	public void setManagerService(M_IRegisterManagerService managerService) {
		this.managerService = managerService;
	}

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		String ID=request.getParameter("seltype");
		long value=Long.parseLong(request.getParameter("inputID").trim());
		
	
		
//		得到所有的少收信息
		List list=managerService.findRegisterInfoByInputID(ID,value);
			
			
			

			if(list.size()<=0){
				return mapping.findForward("error");
			}
			 
		
		request.getSession().setAttribute("findlist",list);
	
		return mapping.findForward("findok");
	}
}