/*
* Insert a person
*/
private int insertEmployeeSampleRecord(Connection conn, String salutation, String firstName, String lastName, String gender, int depID) {
// Insert an Employee
DBRecord rec = new DBRecord();
rec.create(db.T_EMPLOYEES);
rec.setValue(db.T_EMPLOYEES.C_SALUTATION, salutation);
rec.setValue(db.T_EMPLOYEES.C_FIRSTNAME, firstName);
rec.setValue(db.T_EMPLOYEES.C_LASTNAME, lastName);
rec.setValue(db.T_EMPLOYEES.C_GENDER, gender);
rec.setValue(db.T_EMPLOYEES.C_DEPARTMENT_ID, depID);
if (!rec.update(conn)) {
log.error(rec.getErrorMessage());
return 0;
}
// Return Employee ID
return rec.getInt(db.T_EMPLOYEES.C_EMPLOYEE_ID);
}