Advertisement
Guest User

Untitled

a guest
May 16th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. Event_ls = [
  2. sdate = "24/05/2019",
  3. stime = "09:00:00",
  4. discription = "Razhodka",
  5. spoint = "Varna",
  6. epoint = "Arbanasi"
  7. ]
  8. & PersonEmails = ["ivan.ivanov@gmail.com", "rosen@abv.bg", "iva.gerasimova@gmail.com", "mihail.vanov@gmail.com"]
  9. & EquipmentLs = ["voda", "hrana", "telefon"]
  10. & Event_oid = :$mnt8:cp_event8.create (Event_ls)
  11. & MissingEmails = compute list (Email) where
  12. (
  13. Email = m:lst.member (PersonEmails)
  14. & if
  15. PeresonOid = t:obj.find ($mnt8:cp_prsn8, [email = Email])
  16. then
  17. (
  18. :$mnt8:cl_event_prsn8.create ([l_event = Event_oid, l_prsn = PeresonOid])
  19. & fail
  20. )
  21. )
  22. & for_all
  23. Equipment = m:lst.member (EquipmentLs)
  24. do
  25. (
  26. if
  27. t:obj.find ($mnt8:cp_equipment8, [name = Equipment, EquipmentOidDB], [])
  28. then
  29. EquipmentOid = EquipmentOidDB
  30. else
  31. EquipmentOid = :$mnt8:cp_equipment8.create ([name = Equipment])
  32. & :$mnt8:cl_event_equipment8.create ([l_event = Event_oid, l_equipment = EquipmentOid])
  33. )
  34. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement