示例#1
0
 public void saveUser(int id) {
   TbUserApplication userapplication = new TbUserApplication();
   TbUser user = new TbUser();
   userapplication = userdao.queryUserApplication(id);
   user.setId(userapplication.getId());
   user.setName(userapplication.getName());
   user.setPassword(userapplication.getPassword());
   user.setGender(userapplication.getGender());
   user.setTbDepartment(userapplication.getTbDepartment());
   user.setPhone(userapplication.getPhone());
   user.setEmail(userapplication.getEmail());
   user.setWorkingState(true);
   user.setIconName("gongfu.jpg");
   userdao.saveUser(user);
 }
示例#2
0
 public void saveUser(
     String name, String password, String gender, String department, String email, long tel) {
   tbuserapplication = new TbUserApplication();
   tbuserapplication.setName(name);
   tbuserapplication.setPassword(password);
   if (gender.equals("ÄÐ")) {
     tbuserapplication.setGender(true);
   } else {
     tbuserapplication.setGender(false);
   }
   tbuserapplication.setEmail(email);
   tbuserapplication.setPhone(tel);
   tbuserapplication.setTbDepartment((TbDepartment) userdao.loadTbDepartment(department).get(0));
   userdao.addUser(tbuserapplication);
 }