Ejemplo n.º 1
0
 public List<AreaProblem> getVOsbyCity(String number) {
   List<AreaProblem> result = new ArrayList<AreaProblem>();
   String sql = "select * from areaproblem where areaid=? ";
   try {
     result = DbHelper.queryMultiBean(new AreaProblem(), sql, number);
     return result;
   } catch (InstantiationException e) {
     e.printStackTrace();
   } catch (IllegalAccessException e) {
     e.printStackTrace();
   } catch (SQLException e) {
     e.printStackTrace();
   }
   return result;
 }
Ejemplo n.º 2
0
 public boolean addAreaProblem(AreaProblem vo) {
   String sql =
       " insert into areaproblem(number,infotype,areaid,envtype,title,shortmessage,detailmessage) values(?,?,?,?,?,?,?)";
   vo.setNumber("" + System.currentTimeMillis());
   try {
     DbHelper.update(
         sql,
         vo.getNumber(),
         vo.getInfotype(),
         vo.getAreaid(),
         vo.getEnvtype(),
         vo.getTitle(),
         vo.getShortmessage(),
         vo.getDetailmessage());
     return true;
   } catch (SQLException e) {
     e.printStackTrace();
     return false;
   }
 }