// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import dk.vajhoej.isam.local.LocalIsamSource

cisam = new LocalIsamSource("customer.isq", "dk.vajhoej.vms.rms.IndexSequential", false)
oisam = new LocalIsamSource("order.isq", "dk.vajhoej.vms.rms.IndexSequential", false)
c = new CustomerActual()
c.id = 8
c.name = "H company"
c.phone = "8888-8888"
c.status = Customer.ACTUAL
c.address1 = "H road 8"
c.address2 = "H town"
c.contact = "Mr. H"
cisam.create(c)
o = new Order()
o.id = 8
o.customer = 8
o.status = "In progress"
o.nlines = 1
ol = new OrderLine()
ol.item = "X stuff"
ol.quantity = 1
ol.price = 72.00
o.line[0] = ol
for(i in 1..9) o.line[i] = new OrderLine()
oisam.create(o)
cisam.close()
oisam.close()
