public int insertEmployee(Employee emp) throws UnauthorizedUserException,
             BadConnectionException, DoubleEntryException {
        String username;
        username = generateEmpUsername(emp.getFirstName(), emp.getLastName(), emp.getPhone());
        
        try {
            PreparedStatement pStmnt = con.prepareStatement(qs.insert_employee);
            pStmnt.setString(1, emp.getFirstName());
            pStmnt.setString(2, emp.getLastName());
            pStmnt.setString(3, emp.getAddress());
            pStmnt.setString(4, emp.getCity());
            pStmnt.setString(5, emp.getState());
            pStmnt.setInt(6, emp.getZip());
            pStmnt.setString(7, emp.getPhone());
            pStmnt.setString(8, emp.getEmail());
            pStmnt.setInt(9, emp.getEmpType());
            pStmnt.setInt(10, emp.getFranchiseNumber());
            pStmnt.setString(11, username);
            pStmnt.executeUpdate();
            
            code = createUser(username, username);
            if(emp.getEmpType() == 2 && emp.getEmpType() < 100) {
                code = grantManagerRole(username);
            }else if(emp.getEmpType() == 3 && emp.getEmpType() < 100) {
                code = grantDriverRole(username);
            }    
        }catch(SQLException sqlE) {
            if(sqlE.getErrorCode() == 1142 || code == 1142)
                throw(new UnauthorizedUserException("AccessDenied"));
            else if(sqlE.getErrorCode() == 1062)
                throw(new DoubleEntryException("DoubleEntry"));
            else 
                throw(new BadConnectionException("BadConnection"));
        }
        return 1; 
    }