Esempio n. 1
0
 public String delete() throws JTException {
   BaseService service = new BaseService();
   BaseDAO dao = new BaseDAO(service.getS());
   Transaction t = service.beginTransaction();
   Object a = dao.findBoById(Shigongtu.class, id);
   dao.deletePo(a);
   service.commitTransaction(t);
   return "thankYou";
 }
 public String setZiliaoku() throws JTException {
   SMSService service = new SMSService();
   BaseDAO dao = new BaseDAO(service.getS());
   if (task != null && !StringUtil.isEmpty(task.getTaskId())) {
     task = (Task) service.findBoById(Task.class, task.getTaskId());
   } else {
     // tixingxuexi = new Tixingxuexi();
     // tixingxuexi.setSendTime(DateUtil.getCurrentDate());
     if (ziliaokuId != null && ziliaokuId.trim().length() > 0) {
       Ziliaoku ziliaoku = (Ziliaoku) dao.findBoById(Ziliaoku.class, ziliaokuId);
       task = new Task();
       task.setContent(ziliaoku.getContent());
       // task.setTitle(ziliaoku.getTitle());
     }
   }
   return listUsers();
 }