source: trunk/grails-app/controllers/nl/tno/metagenomics/RunController.groovy @ 2

Last change on this file since 2 was 2, checked in by robert@…, 9 years ago

Initial import of basic functionality

File size: 598 bytes
Line 
1package nl.tno.metagenomics
2
3import java.util.Date;
4
5import org.codehaus.groovy.grails.commons.ConfigurationHolder
6
7class RunController {
8        def fileService
9       
10    def create = { 
11                Assay a = Assay.get( params.id as long );
12
13                // Create run based on given parameters
14                Run run = new Run();
15               
16                run.setPropertiesFromForm( params );
17
18                a.addToRuns( run );
19
20                if( !run.save() ) {
21                        flash.message = "Run could not be saved: " + run.getErrors();
22                } else {
23                        flash.message = "Run " + run.name + " has been added to the system."
24                }
25
26                redirect( controller: "assay", action: "show", id: params.id )
27        }
28}
Note: See TracBrowser for help on using the repository browser.