Drain flies breed from the organic matter that builds up in the trap of your drain, or sometimes farther down the drain. Drain gel will eat this matter away and therefore the flies will not be able to breed anymore. You must treat the issue at the source. Our drain fly kit comes with drain gel to treat your drains every night for about a week, at least for 2 of the drains. The kit also comes with glue boards to place over your drains so you can identify which drains are the issues and monitor the activity.
There is a video on the page that you can watch that shows exactly what to do.
Here is a link to the kit: http://www.domyownpestcontrol.com/drain-fly-kit-p-1052.html