public void setMember(IMemberDto member) { this.member = member; txtfieldFName.setText(member.getPrename()); txtfieldLName.setText(member.getLastname()); dateBirthday.setDate(member.getDateOfBirth()); txtfieldPhone.setText(member.getTelephonenumber()); txtfieldMail.setText(member.getEmailAddress()); radioFemale.setSelected(member.getGender()); radioMale.setSelected(!member.getGender()); ICountryDto c = controller.getCountryById(member.getNationality()); String countryName = c + ""; txtfieldNationality.setText(countryName); this.addressPanel1.setAddress(controller.getById(member.getAddress())); }
public IMemberDto getMember() { if (member == null) { member = new MemberDto(); } member.setPrename(txtfieldFName.getText()); member.setLastname(txtfieldLName.getText()); member.setDateOfBirth(dateBirthday.getDate()); member.setTelephonenumber(txtfieldPhone.getText()); member.setEmailAddress(txtfieldMail.getText()); member.setGender(radioFemale.isSelected()); member.setNationality(controller.getCountryByName(txtfieldNationality.getText()).getId()); return member; }