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

📄 cardsortaction.java

📁 实现办公自动化系统
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.oa.struts.perOffice.action;

import java.io.IOException;

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

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.oa.struts.perOffice.modle.CardSortDAO;
import com.oa.struts.perOffice.modle.ItemDAO;
import com.oa.struts.vo.LoginInfo;

/** 
 * MyEclipse Struts
 * Creation date: 11-13-2008
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 */
public class CardSortAction extends Action {
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 * @throws IOException 
	 * @throws ServletException 
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		HttpSession session=request.getSession();
		LoginInfo loginInfo=(LoginInfo)session.getAttribute("LoginInfo");
		String action=request.getParameter("action");
		if(action==null) action="";
		String str="";
		if(action.equals("del"))
		{
			String idStr=request.getParameter("id");
			if(idStr==null) idStr="0";
			int id=Integer.parseInt(idStr);

			CardSortDAO csd=new CardSortDAO();
			boolean result=csd.deleteCardfile(id);	
			if(result)
			{
				request.getRequestDispatcher("/personalOffice/cardSort.jsp").forward(request, response);
			}
			String resultStr=csd.displayAllCardFile(loginInfo.getUserId());
			request.setAttribute("result",resultStr);		
		}
		return null;

	}
	}

⌨️ 快捷键说明

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