コード例 #1
0
 public static TJxDckPerformance get(String strId) throws CDealException {
   try {
     return (TJxDckPerformance) CHibernateUtil.load(TJxDckPerformance.class, strId);
   } catch (Exception e) {
     throw new CDealException("删除数据(编号" + strId + ")失败," + e.getMessage(), e);
   }
 }
コード例 #2
0
  /**
   * 设置进入修改页面的初始值
   *
   * @param actionForm ActionForm 表单From
   * @param request HttpServletRequest Web请求
   * @param response HttpServletResponse Web结果
   * @throws CDealException 处理异常
   */
  public static void setEditDefault(
      EditForm pWebForm, HttpServletRequest request, HttpServletResponse response)
      throws CDealException {
    try {
      Connection mConn = null;
      PreparedStatement pstmt = null;

      try {
        // 设置进入修改页面的初始值SQL
        String YWLSH = pWebForm.getYWLSH(); // 设置业务流水号
        pWebForm.setYWLSH(YWLSH);

        // 设置异常已查看标志 开始
        TJcXzxkBusiindex busindexpo =
            (TJcXzxkBusiindex) CHibernateUtil.load(TJcXzxkBusiindex.class, YWLSH);
        busindexpo.setYccheck("Y");
        CHibernateUtil.updateObject(busindexpo);
        // 设置异常已查看标志 结束

      } catch (Exception e) {
        throw e;
      } finally {
        if (pstmt != null)
          try {
            pstmt.close();
          } catch (Exception e) {
          }
        ;
        if (mConn != null)
          try {
            mConn.close();
          } catch (Exception e) {
          }
        ;
      }
    } catch (Exception e) {
      throw new CDealException("进入修改" + mModuleName + "时失败。", e);
    }
  }