/**
  * �޸���Ʒ��Ϣ
  *
  * @param members
  */
 public boolean UpdateIsSendMsg(String memberId) {
   boolean b = false;
   try {
     dbHelper = DBFactory.CreateDatabase();
     memberLevelDAO = new MemberLevelDAO(dbHelper, memberLevel);
     b = memberLevelDAO.UpdateIsSendMsg(memberId);
   } catch (Exception e) {
     dbHelper.close();
   } finally {
     dbHelper.close();
   }
   return b;
 }
 public boolean Save(FileUploadLog fileupload) {
   boolean b = false;
   try {
     dbHelper = DBFactory.CreateDatabase();
     dao = new FileUploadLogDAO(dbHelper, fileupload);
     b = dao.Save();
   } catch (Exception e) {
     dbHelper.close();
     e.printStackTrace();
   } finally {
     dbHelper.close();
   }
   return b;
 }
 public List<FileUploadLog> QueryFileMgrByName(String name, int oid) {
   List<FileUploadLog> ilist = new ArrayList<FileUploadLog>();
   try {
     dbHelper = DBFactory.CreateDatabase();
     dao = new FileUploadLogDAO(dbHelper);
     ilist = (List) dao.QueryByName(name, oid);
   } catch (Exception e) {
     e.printStackTrace();
     dbHelper.close();
   } finally {
     dbHelper.close();
   }
   return ilist;
 }
  /**
   * @param memberId
   * @return
   * @throws Exception
   */
  public Smstext GetReturnMsg(String memberId) throws Exception {
    Smstext sms = null;
    try {

      dbHelper = DBFactory.CreateDatabase();
      memberLevelDAO = new MemberLevelDAO(dbHelper, memberLevel);
      sms = memberLevelDAO.GetReturnMsg(memberId);
      dbHelper.close();

    } catch (Exception e) {
      dbHelper.close();
    } finally {
      dbHelper.close();
    }
    return sms;
  }
 public boolean Clear(int filemgrid) {
   boolean b = false;
   try {
     dbHelper = DBFactory.CreateDatabase();
     dao = new FileUploadLogDAO(dbHelper);
     dbHelper.beginTransaction();
     b = dao.Clear(filemgrid);
     dbHelper.commitTransaction();
   } catch (Exception e) {
     e.printStackTrace();
     dbHelper.close();
   } finally {
     dbHelper.close();
   }
   return b;
 }
  /** @return */
  public List<Smstext> queryReduceMmberMsg() {
    List<Smstext> smstextList = null;
    try {

      dbHelper = DBFactory.CreateDatabase();
      memberLevelDAO = new MemberLevelDAO(dbHelper, memberLevel);
      smstextList = (List) memberLevelDAO.QueryReduceMmberMsg();
      dbHelper.close();

    } catch (Exception e) {
      dbHelper.close();
    } finally {
      dbHelper.close();
    }

    return smstextList;
  }
  /** @return */
  public List<MemberLevel> findByWhereSQL() {
    try {

      dbHelper = DBFactory.CreateDatabase();
      memberLevelDAO = new MemberLevelDAO(dbHelper, memberLevel);
      memberLevelDAO.setSqlWhere(getSqlWhere());
      memberLevelDAO.setSqlOrder(getSqlOrder());
      memberLevelList = (List) memberLevelDAO.findByWhereSQL();
      dbHelper.close();

    } catch (Exception e) {
      dbHelper.close();
    } finally {
      dbHelper.close();
    }

    return memberLevelList;
  }
Beispiel #8
0
 /**
  * ��Ա�ţ���ȡ��ֱ���
  *
  * @param code
  * @return
  * @throws Exception
  */
 public float findTimes(String memberid) throws Exception {
   float times = 0;
   Object[] obj = new Object[] {memberid};
   ResultSet rs = dbHelper.execQuery(SQL_SELECT_LEVEL, obj);
   while (rs.next()) {
     times = rs.getFloat("Times");
   }
   return times;
 }
  /** @return */
  public MemberLevel findByMemberId(String memberId) {
    MemberLevel level = null;
    try {

      dbHelper = DBFactory.CreateDatabase();
      memberLevelDAO = new MemberLevelDAO(dbHelper, memberLevel);
      memberLevelDAO.setSqlWhere(" and memberId='" + memberId + "'");
      memberLevelList = (List) memberLevelDAO.findByWhereSQL();
      if (memberLevelList != null && memberLevelList.size() > 0) {
        level = memberLevelList.get(0);
      }
      dbHelper.close();
    } catch (Exception e) {
      dbHelper.close();
    } finally {
      dbHelper.close();
    }
    return level;
  }
Beispiel #10
0
  /**
   * ��ݴ����ȡ����
   *
   * @param code
   * @return
   * @throws Exception
   */
  public boolean Update(Level level) throws Exception {

    Object[] obj =
        new Object[] {
          // level.getLevelName()==null?"":level.getLevelName(),
          level.getTimes() == null ? "" : level.getTimes(),
          level.getMinScore() == null ? "" : level.getMinScore(),
          level.getMaxScore() == null ? "" : level.getMaxScore(),
          level.getOID()
        };
    return dbHelper.execUpdate(SQL_UPDATE_LEVEL, obj);
  }
Beispiel #11
0
 /**
  * ��ݴ����ȡ����
  *
  * @param code
  * @return
  * @throws Exception
  */
 public Collection<Level> findAll() throws Exception {
   ResultSet rs = dbHelper.execQuery(SQL_QUERY_LEVEL);
   Collection<Level> list = dbHelper.getCollection(rs, Level.class);
   return list;
 }