Posted to tcl by yee ling at Tue Jul 17 15:16:44 GMT 2007view raw
- set today [clock format [clock sec] -format %d/%m/%Y]
- if {$::tick==1 && [info exists ::mediumvar] && [info exists ::monate] && [info exists ::jahre]} {
- if {$::mediumvar==1} {
- set mediumname dvd
- } elseif {$::mediumvar==2} {
- set mediumname video
- } else {
- set mediumname unknown
- }
- set answer [tk_messageBox -message "Please confirm the following information:
- study id: $::studyno
- name: $::pfname
- surname: $::surname
- reply decision number: $::tick
- form date: $::date
- medium name: $mediumname
- treatment end date: $::monate/$::jahre
- " -icon question -type yesnocancel]
- switch -- $answer {
- yes {
- # insert into participant
- if {[orasql $openhand "insert into participant (study_id, name, surname) values ('$::studyno', '$::pfname', '$::surname')"]} {
- puts "success: study_id, name and surname inserted into participant table"
- } else {
- puts "failed: sid, name and surname into participant table"
- }
- }
- cancel exit
- }
- oralogoff $logh
- exit
- } else {
- tk_messageBox -message "uncaught error - insufficient information or maybe a bug" -icon error
- }