Electoral Selection With Parties and Primaries