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

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

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
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.hibernate.database.dao.TCueDAO;
import com.yuntong.service.Y_IUserManagerService;

/** 
 * MyEclipse Struts
 * Creation date: 04-11-2007
 * 删除用户信息
 * XDoclet definition:
 * @struts.action validate="true"
 * @struts.action-forward name="go" path="/Y_CZY_1.jsp"
 */
public class Y_FindU1Action extends Action {
	private static Log log = LogFactory.getLog(Y_FindU1Action.class);
	private Y_IUserManagerService userManagerService;
	public Y_IUserManagerService getUserManagerService() {
		return userManagerService;
	}
	public void setUserManagerService(Y_IUserManagerService userManagerService) {
		this.userManagerService = userManagerService;
	}
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		String userId=request.getParameter("userId");
		int intUserId=Integer.parseInt(userId);
		try{
		userManagerService.deleteUserByID(intUserId);
		}catch(Exception e){
			e.printStackTrace();
			log.info("删除用户失败");
			return mapping.findForward("go");
		}
		log.info("成功删除用户");
		return null;
	}
}