Changeset 162 for trunk/grails-app/services
- Timestamp:
- Oct 22, 2009, 8:26:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/CreateDataService.groovy
r149 r162 59 59 createDemoPersons() 60 60 createDemoSites() 61 createDemoDepartments() 61 62 // Tasks 62 63 createDemoTaskGroups() /// @todo: Perhaps this should be BaseData? … … 240 241 siteInstance = new Site(name: "Jasper Street Depot") 241 242 saveAndTest(siteInstance) 243 244 siteInstance = new Site(name: "River Press") 245 saveAndTest(siteInstance) 246 } 247 248 def createDemoDepartments() { 249 250 //Department 251 def departmentInstance 252 253 //Department #1 254 departmentInstance = new Department(name: "Print Centre", 255 site: Site.get(1)) 256 saveAndTest(departmentInstance) 257 258 //Department #2 259 departmentInstance = new Department(name: "Pulp Mill 2", 260 site: Site.get(2)) 261 saveAndTest(departmentInstance) 242 262 } 243 263 … … 784 804 //SystemSection #1 785 805 systemSectionInstance = new SystemSection(name: "Press Section", 786 site: Site.get(1)) 806 site: Site.get(1), 807 department: Department.get(1)) 787 808 saveAndTest(systemSectionInstance) 788 809 789 810 //SystemSection #2 790 811 systemSectionInstance = new SystemSection(name: "RO System", 791 site: Site.get(2)) 812 site: Site.get(2), 813 department: Department.get(2)) 792 814 saveAndTest(systemSectionInstance) 793 815 794 816 //SystemSection #3 795 817 systemSectionInstance = new SystemSection(name: "Auxilliray Section", 796 site: Site.get(1)) 818 site: Site.get(1), 819 department: Department.get(1)) 797 820 saveAndTest(systemSectionInstance) 798 821 }
Note: See TracChangeset
for help on using the changeset viewer.