コード例 #1
0
  public String save() throws Exception {
    //        System.out.println("********************** carid = " + carid);

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    Date d = new Date();
    String day = sdf.format(d);
    entity.setCheckdate(day);
    entity.setChecker(userSessionService.getCurrentSysUser());
    entity.setStatus(true);
    service.save(entity);
    return RELOAD;
  }
コード例 #2
0
  protected void prepareModel() throws Exception {
    if (entity == null) {
      if (id != null) {
        entity = service.get(id);
      } else {
        entity = new CarUse();
        entity.setStatus(false);
      }
    }

    cars = carDao.findAll();
    System.out.println("cars.size() = " + cars.size());
  }
コード例 #3
0
 public String delete() throws Exception {
   service.delete(id);
   return RELOAD;
 }