Rather than generating a QSF directly, I recommend you generate a Tcl script, which will then create the QSF for you. A Tcl script has a lot of advantages, including that any syntax errors will be more easily discovered in the command line. You could also have a static Tcl script that creates the project and then sources the C# generated assignments.
See
http://www.altera.com/support/software/scripting/sof-qts-scripting.html As for your specific question, the QSF does not have any sections, so assignments can be put anywhere, except from *_FILE assignments which need to be ordered within themselves in the order you want the tool to read them