public void setAccountDAO(AccountDAO accountDAO) {
this.accountDAO = accountDAO;
}
public void saveAccount(AccountForm form) {
AccountDO accountsDO = new AccountDO();
accountsDO.setLoginName(form.getLoginName());
/*
* Have one default password.
*/
accountsDO.setPassword("password");
accountsDO.setName(form.getName());
accountsDO.setAccountType(accountDAO.getAccountTypeDO(form.getAccountType()));
accountsDO.setMobile(form.getMobile());
accountsDO.setAddress(form.getAddress());
accountsDO.setVillage(form.getVillage());
accountsDO.setRegdate(Calendar.getInstance().getTime());
accountDAO.saveAccount(accountsDO);
}