It has been done, I wish that I could remember his name but the silly bugger only got elected.
Generally said to be Michael Hestletine, who was in the Guards for about five minutes as a result (I think, in fact, he lost his first attempt at being elected, but having been discharged, wasn't asked back).
A stark contrast with Fitzroy Maclean, for instance, who sought election to parliament so that he no longer held a reserved occupation (in the Foreign Office) and could join up.