Posted to tcl by yee ling at Tue Jul 17 15:16:44 GMT 2007view raw

  1. set today [clock format [clock sec] -format %d/%m/%Y]
  2. if {$::tick==1 && [info exists ::mediumvar] && [info exists ::monate] && [info exists ::jahre]} {
  3. if {$::mediumvar==1} {
  4. set mediumname dvd
  5. } elseif {$::mediumvar==2} {
  6. set mediumname video
  7. } else {
  8. set mediumname unknown
  9. }
  10. set answer [tk_messageBox -message "Please confirm the following information:
  11. study id: $::studyno
  12. name: $::pfname
  13. surname: $::surname
  14. reply decision number: $::tick
  15. form date: $::date
  16. medium name: $mediumname
  17. treatment end date: $::monate/$::jahre
  18. " -icon question -type yesnocancel]
  19. switch -- $answer {
  20. yes {
  21. # insert into participant
  22. if {[orasql $openhand "insert into participant (study_id, name, surname) values ('$::studyno', '$::pfname', '$::surname')"]} {
  23. puts "success: study_id, name and surname inserted into participant table"
  24. } else {
  25. puts "failed: sid, name and surname into participant table"
  26. }
  27. }
  28. cancel exit
  29. }
  30. oralogoff $logh
  31. exit
  32. } else {
  33. tk_messageBox -message "uncaught error - insufficient information or maybe a bug" -icon error
  34. }