No. First the transfer switch, then you connect/start the generator. There are several reasons for this, but the legal one is you don't want to fry anyone who might be working on the line. Second reason is, if you start/connect the generator first, you will be trying to power your whole street/neighborhood/town until you pull the switch.
Not the manual transfer switches I've used. They're Line->Off->Generator.
The military one I used you had to flip the main breaker off, move a sliding metal lockout plate to allow you to throw the breaker for the generator.
You want to start the generator BEFORE you hook it up, let it stabilize.
What we did for our NCC/server farm (using a big milspec diesel generator, mind you):
Start the generator. Get it stabilized(took some fiddling, the poor thing was a bit worn out)
Flip EVERY breaker off. Power was already out or going to go out. All equipment is on their UPSes.
Move the lockout plate, flip the generator supply breaker on.
Using a priority list, flip on each breaker, one by one, stabilizing the generator again each time. Did I mention that the generator's automatic control equipment was a bit broke?
Once everything was on generator, detail a couple airmen to run out every 15 minutes or so to rebalance the generator. (Load didn't vary much at that point, so it didn't vary much).
Rebalancing the generator: Work 3 knobs to keep the generator producing power at 240V@60Hz.
A generator with good frequency regulation is imperative. If the generator output frequency drifts much off 60Hz, say below 57 or above 63, a decent UPS will reject it and not switch back to line mode. If your UPS is not sensitive to frequency variation, you don't have a good one.
A good UPS does more than watch for voltage abnormalities.
Hah! If you have a *REALLY* good UPS, it'll fix that problem for you.
For computer supplies, especially modern switchmode ones, as long as the frequency is between 48 and 63 or so, you're good to go. In which case having an oversensitive UPS is actually a bad thing.