In theory, 10,000 Democrats or Republicans can switch parties to vote in a primary, then switch back. Nothing new. Perfectly legal. The trick is getting 10,000 people to do that. The general election will decide between the real people from the ballot buyers. 
 
Full disclosure, I have been a registered Republican, Democrat, Independent, even Libertarian.