Ejemplo n.º 1
0
  @Override
  public boolean updateUsers(Users users) throws Exception {

    String sql =
        "update users set userNumber=?,userName=?,loginName=?,enName=?,sex=?,telephone=?,birthday=?,telephoneExt=?,email=?,mobilePhone=?,msn=?,fax=?,msn2=?,skype=?,msn3=?,qq=?,companyId=?,departmentId=?,jobDescription=?,sortNumber=?,address=?,zip=?,remark=?,imagePath=? where id =? ";
    int rs =
        this.update(
            sql,
            users.getUserNumber(),
            users.getUserName(),
            users.getLoginName(),
            users.getEnName(),
            users.getSex(),
            users.getTelephone(),
            users.getBirthday(),
            users.getTelephoneExt(),
            users.getEmail(),
            users.getMobilePhone(),
            users.getMsn(),
            users.getFax(),
            users.getMsn2(),
            users.getSkype(),
            users.getMsn3(),
            users.getQq(),
            users.getCompanyId(),
            users.getDepartmentId(),
            users.getJobDescription(),
            users.getSortNumber(),
            users.getAddress(),
            users.getZip(),
            users.getRemark(),
            users.getImagePath(),
            users.getId());
    return rs > 0;
  }
Ejemplo n.º 2
0
 @Override
 public boolean saveUsers(Users users) throws Exception {
   String sql =
       "insert into users (userNumber,userName,loginName,enName,sex,telephone,birthday,telephoneExt,email,mobilePhone,msn,fax,msn2,skype,msn3,qq,companyId,departmentId,jobDescription,sortNumber,address,zip,remark,imagePath,password) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
   int rs =
       this.update(
           sql,
           users.getUserNumber(),
           users.getUserName(),
           users.getLoginName(),
           users.getEnName(),
           users.getSex(),
           users.getTelephone(),
           users.getBirthday(),
           users.getTelephoneExt(),
           users.getEmail(),
           users.getMobilePhone(),
           users.getMsn(),
           users.getFax(),
           users.getMsn2(),
           users.getSkype(),
           users.getMsn3(),
           users.getQq(),
           users.getCompanyId(),
           users.getDepartmentId(),
           users.getJobDescription(),
           users.getSortNumber(),
           users.getAddress(),
           users.getZip(),
           users.getRemark(),
           users.getImagePath(),
           FengHuangMd5Util.getMD5("111111"));
   return rs > 0;
 }