public String generateUserInsertQuery(Staff staff) { StringBuffer strQuery = new StringBuffer(INSERT_USER_QUERY); strQuery.append(staff.getF_name()); strQuery.append("', '"); strQuery.append(staff.getL_name()); strQuery.append("', '"); strQuery.append(staff.getPassword()); strQuery.append("', '"); strQuery.append(staff.getEmail()); strQuery.append("', '"); strQuery.append(staff.getAddress()); strQuery.append("', '"); strQuery.append(staff.getCity()); strQuery.append("', '"); strQuery.append(staff.getState()); strQuery.append("', '"); strQuery.append(staff.getZipcode()); strQuery.append("', '"); strQuery.append(utility.convertStringToDate(staff.getDob())); strQuery.append("', '"); strQuery.append(staff.getType()); strQuery.append("')"); System.out.println("Insert User query : " + strQuery.toString()); return strQuery.toString(); }
private void Fill(Staff s) { txtFieldID.setText("" + s.getNumber()); txtFieldName.setText(s.getName()); cmbBoxPersonalTypes.setSelectedItem(s.getType()); txtFieldPrimaryAirport.setText(s.getPrimaryAirport()); }