If you went to that dealer for a specific code, and all they did was change plugs and wires, without investigating the reason for the code, es they are trying to rip you off...I don't usually like saying that, but facts are facts...
If the dealer won't correct the problem you took it to them for, specifically an engine code, then complain to the better business bureau, and any news paper/radio station/tv station...make it very public