Ignore:
Timestamp:
Feb 23, 2010, 2:07:15 PM (14 years ago)
Author:
gav
Message:

Add contacts to Person, Supplier, Manufacturer and Site.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/CreateDataService.groovy

    r399 r402  
    6161        createBaseManufacturerTypes()
    6262        createBaseAddressTypes()
     63        createBaseContactTypes()
    6364
    6465        // Tasks
     
    527528    }
    528529
     530    def createBaseContactTypes() {
     531
     532        // ContactType
     533        def contactTypeInstance
     534
     535        // ContactType #1
     536        contactTypeInstance = new ContactType(name: "Email",
     537                                                                                description: "Email address.")
     538        saveAndTest(contactTypeInstance)
     539
     540        // ContactType #2
     541        contactTypeInstance = new ContactType(name: "Alternate Email",
     542                                                                                description: "Alternate email address.")
     543        saveAndTest(contactTypeInstance)
     544
     545        // ContactType #3
     546        contactTypeInstance = new ContactType(name: "Mobile",
     547                                                                                description: "Modile phone number.")
     548        saveAndTest(contactTypeInstance)
     549
     550        // ContactType #4
     551        contactTypeInstance = new ContactType(name: "Work Phone",
     552                                                                                description: "Work phone number.")
     553        saveAndTest(contactTypeInstance)
     554
     555        // ContactType #5
     556        contactTypeInstance = new ContactType(name: "Home Phone",
     557                                                                                description: "Home phone number.")
     558        saveAndTest(contactTypeInstance)
     559
     560        // ContactType #6
     561        contactTypeInstance = new ContactType(name: "Work Fax",
     562                                                                                description: "Work fax number.")
     563        saveAndTest(contactTypeInstance)
     564
     565        // ContactType #7
     566        contactTypeInstance = new ContactType(name: "Home Fax",
     567                                                                                description: "Home fax number.")
     568        saveAndTest(contactTypeInstance)
     569
     570        // ContactType #8
     571        contactTypeInstance = new ContactType(name: "Web Site",
     572                                                                                description: "Web site address.")
     573        saveAndTest(contactTypeInstance)
     574
     575        // ContactType #9
     576        contactTypeInstance = new ContactType(name: "Person",
     577                                                                                description: "Contact person.")
     578        saveAndTest(contactTypeInstance)
     579    }
     580
    529581    def createDemoSuppliers() {
    530582
Note: See TracChangeset for help on using the changeset viewer.