/**
  * �޸���Ʒ��Ϣ
  *
  * @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;
  }
  /** @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;
  }