Advertisement
Guest User

Untitled

a guest
May 16th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1.  
  2. EventDataLs = [
  3. sdate = "02/06/2019",
  4. stime = "10:00:00",
  5. description = "Detsko parti",
  6. spoint = "Eko park",
  7. fpoint = "Eko park"
  8. ]
  9.  
  10. & PersonEmailLs = [
  11. "ivan.ivanov@gmail.com",
  12. "ccc@gmail.com",
  13. "vhh@gmail.com",
  14. "777@gmail.com",
  15. "mmm@gmail.com"
  16. ]
  17. & Equipment_dateLS = ["bira", "skara", "pari"]
  18. & EvenntOid = :$planinar:cp_event06.create (EventDataLs)
  19.  
  20. %person event
  21. & MissingEmailLs = compute list (Email) where
  22. (
  23. Email = m:lst.member (PersonEmailLs)
  24. & if
  25. PersonOid = t:obj.find ($planinar:cp_person06, [email = Email])
  26. then
  27. (
  28. :$planinar:cl_event_person06.create ([l_event = EvenntOid, l_person = PersonOid])
  29. & fail
  30. )
  31. )
  32.  
  33. %Equip event
  34. & for_all
  35. Equipment = m:lst.member (Equipment_dateLS)
  36. do
  37. (
  38. if
  39. t:obj.find ($planinar:cp_equipment06, [name_equip = Equipment], EquipmentOid, [])
  40. then
  41. nop
  42. else
  43. EquipmentOid = :$planinar:cp_equipment06.create ([name_equip = Equipment])
  44. & :$planinar:cl_event_equip06.create ([l_event = EvenntOid, l_equipment = EquipmentOid])
  45. )
  46.  
  47. &:trx.save
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement