Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EventDataLs = [
- sdate = "02/06/2019",
- stime = "10:00:00",
- description = "Detsko parti",
- spoint = "Eko park",
- fpoint = "Eko park"
- ]
- & PersonEmailLs = [
- "ivan.ivanov@gmail.com",
- "ccc@gmail.com",
- "vhh@gmail.com",
- "777@gmail.com",
- "mmm@gmail.com"
- ]
- & Equipment_dateLS = ["bira", "skara", "pari"]
- & EvenntOid = :$planinar:cp_event06.create (EventDataLs)
- %person event
- & MissingEmailLs = compute list (Email) where
- (
- Email = m:lst.member (PersonEmailLs)
- & if
- PersonOid = t:obj.find ($planinar:cp_person06, [email = Email])
- then
- (
- :$planinar:cl_event_person06.create ([l_event = EvenntOid, l_person = PersonOid])
- & fail
- )
- )
- %Equip event
- & for_all
- Equipment = m:lst.member (Equipment_dateLS)
- do
- (
- if
- t:obj.find ($planinar:cp_equipment06, [name_equip = Equipment], EquipmentOid, [])
- then
- nop
- else
- EquipmentOid = :$planinar:cp_equipment06.create ([name_equip = Equipment])
- & :$planinar:cl_event_equip06.create ([l_event = EvenntOid, l_equipment = EquipmentOid])
- )
- &:trx.save
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement