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

📄 getstaffaction.java

📁 培训考试系统代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetSkill" ,"1" ,"-1").getResultSet();

           //把结果集存放到session中
           req.setAttribute("GET-SKILL-RESULTSET",rs1);

           //定向
           return (mapping.findForward("getskill"));
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
           return (mapping.findForward("error"));
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }

  /**
     * 获取考试审查人信息
     */
    private ActionForward getExamChecker(ActionMapping mapping,
           ActionForm form, HttpServletRequest req,
           HttpServletResponse res)
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetExamChecker" ,"1" ,"-1").getResultSet();

           //把结果集存放到session中
           req.setAttribute("GET-EXAMCHECKER-RESULTSET",rs1);

           //定向
           return (mapping.findForward("getexamchecker"));
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
           return (mapping.findForward("error"));
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }


  /**
     * 获取考试审查人信息
     */
    public static String getExamChecker()
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetExamChecker" ,"1" ,"-1").getResultSet();

           String examCheckerStr = "";

           if(rs1 != null)
           {
              for(int i=0;rs1.setRecord(i)&& i<rs1.getMetaData().getRecordCount();i++)
              {
                 examCheckerStr += rs1.getString(0) + ",";
              }
           }
           return examCheckerStr;
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           return "";
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           return "";
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           return "";
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }


   /**
     * 获取考试审批人信息
     */
    private ActionForward getExamApprover(ActionMapping mapping,
           ActionForm form, HttpServletRequest req,
           HttpServletResponse res)
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetExamApprover" ,"1" ,"-1").getResultSet();

           //把结果集存放到session中
           req.setAttribute("GET-EXAMAPPROVER-RESULTSET",rs1);

           //定向
           return (mapping.findForward("getexamapprover"));
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
           return (mapping.findForward("error"));
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }

   /**
     * 获取考试审批人信息
     */
    public static String getExamApprover()
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetExamApprover" ,"1" ,"-1").getResultSet();

           String examApproverStr = "";

           if(rs1 != null)
           {
              for(int i=0;rs1.setRecord(i)&& i<rs1.getMetaData().getRecordCount();i++)
              {
                 examApproverStr += rs1.getString(0) + ",";
              }
           }
           return examApproverStr;
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           return "";
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           return "";
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           return "";
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }

  /**
     * 获取课程审查人信息
     */
    private ActionForward getLessonChecker(ActionMapping mapping,
           ActionForm form, HttpServletRequest req,
           HttpServletResponse res)
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetLessonChecker" ,"1" ,"-1").getResultSet();

           //把结果集存放到session中
           req.setAttribute("GET-LESSONCHECKER-RESULTSET",rs1);

           //定向
           return (mapping.findForward("getlessonchecker"));
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
           return (mapping.findForward("error"));
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }

  /**
     * 获取课程审查人信息
     */
     public static String getLessonChecker()
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetLessonChecker" ,"1" ,"-1").getResultSet();
           String lessonCheckerStr = "";

           if(rs1 != null)
           {
              for(int i=0;rs1.setRecord(i)&& i<rs1.getMetaData().getRecordCount();i++)
              {
                 lessonCheckerStr += rs1.getString(0) + ",";
              }
           }
           return lessonCheckerStr;

       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           return "";
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           return "";
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           return "";
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }

   /**
     * 获取课程审批人信息
     */
    private ActionForward getLessonApprover(ActionMapping mapping,
           ActionForm form, HttpServletRequest req,
           HttpServletResponse res)
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetLessonApprover" ,"1" ,"-1").getResultSet();

           //把结果集存放到session中
           req.setAttribute("GET-LESSONAPPROVER-RESULTSET",rs1);

           //定向
           return (mapping.findForward("getlessonapprover"));
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           req.setAttribute("errorId",ErrorCode.COMMONSERVICE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           req.setAttribute("errorId",ErrorCode.DATABASE_ERROR);
           return (mapping.findForward("error"));
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           req.setAttribute("errorId",ErrorCode.UNKNOW_ERROR);
           return (mapping.findForward("error"));
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }

   /**
     * 获取课程审批人信息
     */
    public static String getLessonApprover()
    {
       //定义连接的实例
       SysDbConn aplcoms = null;
       try
       {
           //得到一个连接的实例
           aplcoms = SysConnPool.getInstance().getAplComs();

           //查询
           aplcoms.preparedQuery("");
           SysResultSet rs1 = aplcoms.csCommonQuery("SQL_Agt_GetLessonApprover" ,"1" ,"-1").getResultSet();

           String lessonApproverStr = "";

           if(rs1 != null)
           {
              for(int i=0;rs1.setRecord(i)&& i<rs1.getMetaData().getRecordCount();i++)
              {
                 lessonApproverStr += rs1.getString(0) + ",";
              }
           }
           return lessonApproverStr;
       }
       catch (SysDbException aple)
       {//捕获CommonService系统异常,定向到出错页面
           //输出异常信息
           aple.printStackTrace();
           return "";
       }
       catch(java.sql.SQLException sqle)
       {//捕获调用aplcoms异常,定向到出错页面
           // 输出异常信息
           sqle.printStackTrace();
           return "";
       }
       catch(Exception e)
       {//捕获未知异常,定向到出错页面
           //输出异常信息
           e.printStackTrace();
           return "";
       }
       finally
       {//关闭连接实例
           if(aplcoms != null)
           {
              aplcoms.close();
           }
       }
    }

}

⌨️ 快捷键说明

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