telephone = login.getTelephone();
birth = login.getDayofbirth();
}
public void updateInformation() {
this.login = new business().getLoginFacade().getUserID(getUsername());
int userID = login.getUserID();
if(fullname.length() < 6)
{
messages.taoTB(FacesMessage.SEVERITY_ERROR, "Full Name must be greater than 6 characters", "error");
}else if(city.length() < 6)
{
messages.taoTB(FacesMessage.SEVERITY_ERROR, "City must be greater than 6 characters", "error");
}else if(address.length()<6)
{
messages.taoTB(FacesMessage.SEVERITY_ERROR, "Address must be greater than 6 characters", "error");
}else if(email.length()<6)
{
messages.taoTB(FacesMessage.SEVERITY_ERROR, "Email must be greater than 6 characters !", "error");
}else{
if(login != null)
{
String mail=email+variableEmail;
login.setFullname(fullname);
login.setDayofbirth(birth);
login.setGender(gender);
login.setCity(city);
login.setAddress(address);
login.setCardnumber(card);
login.setTelephone(telephone);
login.setEmail(mail);
new business().getLoginFacade().edit(login);
messages.taoTB(FacesMessage.SEVERITY_INFO, "Update Successfull !", "Successfull");
}
}
}