Ejemplo n.º 1
0
 private void updateTopicTime(int _topicid, String _updatetime) {
   Topic topic = new Topic();
   try {
     topic = bm.loadTopicById(_topicid);
   } catch (ClassNotFoundException e) {
     e.printStackTrace();
   } catch (SQLException e) {
     e.printStackTrace();
   }
   topic.setLastupdate(_updatetime);
   try {
     bm.update(topic);
   } catch (ClassNotFoundException e) {
     e.printStackTrace();
   } catch (SQLException e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 2
0
 public String commentupdate() {
   System.out.println("--------------------commentupdate----------");
   System.out.println("commentid=" + this.binfo.getCommentid());
   System.out.println("Updated comment=" + this.binfo.getCommentcontent());
   this.comment = new Comment();
   this.loadComment(this.binfo.getCommentid());
   this.comment.setContent(this.binfo.getCommentcontent());
   try {
     bm.update(this.comment);
   } catch (ClassNotFoundException e) {
     e.printStackTrace();
   } catch (SQLException e) {
     e.printStackTrace();
   }
   //		this.alltopiclist();
   this.topic = new Topic();
   this.topic.setId(this.comment.getTopicid());
   this.topicdetail();
   return "comment_updated";
 }