📄 listworkreportaction.java
字号:
// Created by Xslt generator for Eclipse.// XSL : not found (java.io.FileNotFoundException: (系统找不到指定的路径。))// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xslpackage com.cmmi2pms.pmc.report;import com.cmmi2pms.sa.user.Employee;
import com.cmmi2pms.common.Constants;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;/** * ListWorkReportAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 05-20-2004 * * XDoclet definition: * @struts:action validate="true" */public class ListWorkReportAction extends Action { // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods /** * Method execute * @param ActionMapping mapping * @param ActionForm form * @param HttpServletRequest request * @param HttpServletResponse response * @return ActionForward * @throws Exception */ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { WorkReport[] workReportList=null; WorkReportList theWorkReportList=new WorkReportList(); int userRight=1;//1=manager,0=common user if(userRight==1){ theWorkReportList.getAllWorkReport(); workReportList=theWorkReportList.getWorkReports(); } else if(userRight==0){ Employee user = new Employee(); user.setUserID("guest"); if (request.getSession().getAttribute(Constants.USER_KEY)!=null) user = (Employee) request.getSession().getAttribute(Constants.USER_KEY); theWorkReportList.getMyWorkReport(user.getUserID()); workReportList=theWorkReportList.getWorkReports(); } HttpSession session = request.getSession(); session.setAttribute("workReportList",workReportList ); return (mapping.findForward("success")); //throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented."); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -