This is the simple, if paranoid way.
--------------\~~~~--
DfffffffHfffGwF/~~~~WW
D_______________WWWWWW
Key
-- Surface \ , Ramp down /, Ramp up, ~ Water, D Door, f Farm , H Floor hatch
W Wall, w Wall grate, F Fortification, G Floodgate, _ Tunnel
Looking at the diagram, the ramps up, and down are the effects of a channel. Channel only when the rest is built/dug.
Dig out the area for you farm, then dig through 3 spaces, being careful not to breach the wall holding back the water. Make 6 mechanisms, build 2 levers(hopefully in a enclosed area, to wall off later), a floodgate, a hatch, and a grate. Dig out area under the farm area, whose access is only the door, and floorhatch. This area is for drainage for the farm.
Link a lever to the floodgate, then 1 to the hatch. When all of this is done, channel out the spot next to the river.
Set up a temporary meeting area, near the two levers. When several dwarfs are goofing off there, pull the lever to the floodgate.(Warning: for this technique, the water will gush in . So keep an eye on it.Pause if it seems to much). When there is a decent amount, least enough to cover the floor by a depth of 2,PAUSE , pull the lever to the floodgate, to close it. If you goofed up in your timing about how much water is needed, just pull the lever to the floorhatch to drain it.
The fortification, and wall grate should keep out unwanted visitors.
The preceeding 2 posts also are good ideas for a fish trap, for food, leather, bones