Casting and Costume Management Application
Check-in [6475c56831]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Initial checkin for backstage client and its support routines.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6475c568312b2947887c09eb560577b4bd809fa0
User & Date: gerald 2014-12-12 23:40:00
Context
2014-12-17
07:34
Initial working Backstage application. check-in: 378f4f98a4 user: gerald tags: trunk
2014-12-12
23:40
Initial checkin for backstage client and its support routines. check-in: 6475c56831 user: gerald tags: trunk
2014-12-08
18:25
Add in the client builders. check-in: c55dd1dba7 user: gerald tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to MakeBackstageApp.tcl.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

19

20
21
22
23
24
25
26

package require Tcl

set ofd [open BackStage.tcl w]
set fileList {
    src/PreBackStageMain.tcl
    src/Functions/ClearGui.tcl
    src/Functions/DisplayAuditionEntryGui.tcl
    src/Functions/InitializeSystem.tcl
    src/Functions/isAdult.tcl
    src/Functions/PerformerDetails.tcl
    src/Functions/SetCb.tcl
    src/Functions/SetPerformer.tcl
    src/Functions/ClientRoutines.tcl
    src/Guis/ClientRoutineGuis.tcl

    src/Guis/CreatePerformerDetailGui.tcl

    src/Guis/TkError.tcl
}

foreach file [glob src/msgcat/*.msg] {
    lappend fileList $file
}








<







>

>







4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

package require Tcl

set ofd [open BackStage.tcl w]
set fileList {
    src/PreBackStageMain.tcl
    src/Functions/ClearGui.tcl

    src/Functions/InitializeSystem.tcl
    src/Functions/isAdult.tcl
    src/Functions/PerformerDetails.tcl
    src/Functions/SetCb.tcl
    src/Functions/SetPerformer.tcl
    src/Functions/ClientRoutines.tcl
    src/Guis/ClientRoutineGuis.tcl
    src/Guis/PerformerTab.tcl
    src/Guis/CreatePerformerDetailGui.tcl
    src/Guis/CreatePerformerCostumePreview.tcl
    src/Guis/TkError.tcl
}

foreach file [glob src/msgcat/*.msg] {
    lappend fileList $file
}

Added src/BackStageMain.tcl.















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

proc SortAuditions {args} {
    return;
}

proc SortPerformers {args} {
    return;
}

proc SortShowInfo {args} {
    return;
}

proc SetTitle {args} {
    variable windows
    variable systemInfo

    if {![string equal $systemInfo(ShowSelection) {}]} {
        set w [winfo toplevel $windows(MainPerformerTab)]
        set showName [lindex [db eval {select ShowDescription from Show where ShowID = $systemInfo(ShowSelection)}] 0]
        wm title $w "Ballet Hysell Back Stage -- $showName"
    }
    return;
}

SetDefaultContext
set systemInfo(Mode) Backstage

InitializeSystem no
db function isAdult isAdult

set MassUpdate(Enabled) 0
set MassUpdate(SelectionList) {}

SaveSystemInfo

BuildPerformerTab . yes
SetTitle
wm deiconify .

Changes to src/Functions/ClientRoutines.tcl.

74
75
76
77
78
79
80




























































81
82
83
84
85
86
87
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
...
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
...
279
280
281
282
283
284
285

































































































            ShowID              TEXT,
            HysellId            TEXT,
            auditionnumber      INTEGER,
            inShow              BOOLEAN,
            changed             BOOLEAN
        )
    }





























































    return
}

###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
................................................................................
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable DisplayConnectionStatusGui
    variable systemInfo

    set DisplayConnectionStatusGui(statusMessage) {}
    set DisplayConnectionStatusGui(status) 0
    DisplayConnectionStatus
    set DisplayConnectionStatusGui(statusMessage) {Locating Server...}
    GetServerAddress
    ::log::log info "Checking for file {$systemInfo(DatabaseFile)}"
    if {![file exists $systemInfo(DatabaseFile)]} {
        sqlite3 db $systemInfo(DatabaseFile)
        CreateClientDb
    } else {
        sqlite3 db $systemInfo(DatabaseFile)
    }
    set DisplayConnectionStatusGui(statusMessage) {Getting initial data from server...}
    PullDatabase
    UndisplayConnectionStatus
    db close
    return
}

###########################################################################
................................................................................
###########################################################################
proc GetServerAddress {} {
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable systemInfo
    variable serverInfo
    variable DisplayConnectionStatusGui

    set DisplayConnectionStatusGui(statusMessage) {Searching for server...}
    update idletasks
    set serverInfo(host) {}
    set serverInfo(port) {}

    set group 224.5.1.21
    set port  7772

................................................................................

    ##
    ## Close the socket
    ##
    close $socket
}









































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







<








<







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
168
169
170
171
172
173
174

175
176
177
178
179
180
181
182

183
184
185
186
187
188
189
...
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
...
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
            ShowID              TEXT,
            HysellId            TEXT,
            auditionnumber      INTEGER,
            inShow              BOOLEAN,
            changed             BOOLEAN
        )
    }

    ##
    ## Create the Costume Assignments table -- but we add a column to flag auditions that
    ## need to go to the server.
    ##
    db eval {
        CREATE TABLE costumeassignments (
            auditionnumber INTEGER,
            characterid    TEXT,
            costume1       TEXT,
            costume2       TEXT,
            costume3       TEXT,
            costume4       TEXT,
            costumenote    TEXT,
            showid         TEXT
        )
    }

    ##
    ## Create the Characters table -- but we add a column to flag auditions that
    ## need to go to the server.
    ##
    db eval {
        CREATE TABLE characters (
            charactercode  TEXT,
            characterdescr TEXT,
            characterclass TEXT,
            showclass      TEXT,
            Act            INTEGER DEFAULT '1',
            Scene          INTEGER DEFAULT '1'
        )
    }

    ##
    ## Define the Costume Preview View
    ##
    db eval {
        create view CostumePreview as
            select ca.HysellId as HysellId,
                   ca.ShowId as ShowId,
                    s.ShowDescription as ShowDescription,
                   ch.characterclass as CharacterClass,
                   ch.charactercode as CharacterCode,
                   ch.characterdescr as CharacterDescription,
                    a.costume1 as Costume1,
                    a.costume2 as Costume2,
                    a.costume3 as Costume3,
                    a.costume4 as Costume4,
                    a.costumenote as CostumeNote
                from costumeassignments a,
                     characters ch,
                     show s,
                     casting ca
                where a.showid = s.ShowID
                  and a.auditionnumber = ca.auditionnumber
                  and a.characterid = ch.charactercode
                  and s.ShowClass = ch.showclass
                  and s.ShowID = ca.ShowId
                order by ca.HysellId,s.ShowDescription,ch.characterclass,ch.characterdescr
    }

    return
}

###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
................................................................................
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable DisplayConnectionStatusGui
    variable systemInfo

    set DisplayConnectionStatusGui(statusMessage) {}
    set DisplayConnectionStatusGui(status) 0
    DisplayConnectionStatus

    GetServerAddress
    ::log::log info "Checking for file {$systemInfo(DatabaseFile)}"
    if {![file exists $systemInfo(DatabaseFile)]} {
        sqlite3 db $systemInfo(DatabaseFile)
        CreateClientDb
    } else {
        sqlite3 db $systemInfo(DatabaseFile)
    }

    PullDatabase
    UndisplayConnectionStatus
    db close
    return
}

###########################################################################
................................................................................
###########################################################################
proc GetServerAddress {} {
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable systemInfo
    variable serverInfo
    variable DisplayConnectionStatusGui

    set DisplayConnectionStatusGui(statusMessage) [::msgcat::mc status,Searching]
    update idletasks
    set serverInfo(host) {}
    set serverInfo(port) {}

    set group 224.5.1.21
    set port  7772

................................................................................

    ##
    ## Close the socket
    ##
    close $socket
}



###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
#                           that you update this header block. Thanks.
#
# Procedure Name : PullDatabase
#
# Description : Request a DB download for the type of client we running.
#
# Arguments : None
#
# Returns : Nothing
#
# Side-Effects : Database Loaded.
#
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc PullDatabase {} {
    variable systemInfo
    variable serverInfo
    variable DisplayConnectionStatusGui

    switch -exact -- $systemInfo(Mode) {
        AuditionEntryOnly {
            set dataType AUDITIONDATA
        }
        Backstage {
            set dataType BACKSTAGEDATA
        }
        default {
            ##
            ## Unsupported mode, so do nothing
            ##
            return
        }
    }

    set DisplayConnectionStatusGui(statusMessage) [::msgcat::mc status,Downloading]
    update idletasks

    ##
    ## Open the socket
    ##
    set socket [socket $serverInfo(host) $serverInfo(port)]
    fconfigure $socket -translation lf -blocking yes

    ##
    ## Send the update
    ##
    set dataPacket [list GET $dataType]
    ::log::log info "\t Sending {$dataPacket}"
    puts $socket $dataPacket
    flush $socket

    ##
    ## Get the database back
    ##
    set response {}
    set status [gets $socket header]
    ::log::log info "\t Received {$response} with status {$header}"
    lassign $header cmd dataLength
    set dataDict [read $socket $dataLenght]

    ##
    ## Close the socket
    ##
    close $socket

    ##
    ## Populate the database
    ##
    set sqlFmt {insert into %1s(%2$s) values (%3$s)}
    foreach table [dict keys $dataDict] {
        db eval "delete from $table"
        set dataList [dict get $dataDict $table]
        set colList [lindex $dataList 0]
        set bindList \$[join $colList {,$}]"
        set sqlCmd [format $sqlFmt $table [join $colList {,}] $bindLis]
        foreach row [lrange $dataList 1 end] {
            lassign $row {*}$colList
            db eval $sqlCmd
        }
    }

    ##
    ## All done
    ##
    return;

}

Changes to src/Functions/InitializeSystem.tcl.

55
56
57
58
59
60
61

62
63
64














65
66
67
68
69
70
71
72
..
85
86
87
88
89
90
91






92
93
94
95
96
97
98
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc InitializeSystem {{restoreContext yes}} {
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable systemInfo


    set savedInfoFound no















    foreach location {./ ~/} {
        if {[set savedInfoFound [LoadSystemInfo $location]]} {
            set systemInfo(path) $location
            break
        }
    }

    if {$restoreContext && (!$savedInfoFound || ![file exists $systemInfo(DatabaseFile)])} {
................................................................................
        if {[string equal $dbfn {}]} {
            destroy .
            return
        }
        set systemInfo(DatabaseFile) $dbfn
        SetDefaultContext
    } elseif {!$restoreContext && !$savedInfoFound}  {






        GetClientName
        GetDatabaseFromServer
    }

    set systemInfo(path) $location
    sqlite3 db $systemInfo(DatabaseFile)








>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







 







>
>
>
>
>
>







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
...
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc InitializeSystem {{restoreContext yes}} {
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable systemInfo
    global env

    set savedInfoFound no

    if {$systemInfo(isAndroid)} {
        set locationList [list]
        lappend locationList \
            $env(EXTERNAL_FILES) \
            $env(EXTERNAL_STORAGE2) \
            $env(EXTERNAL_STORAGE) \
            $env(INTERNAL_STORAGE) \
            $env(HOME) \
            {/sdcard} \
            {/sdcard/home}
    } else {
        set locationList [list ./ $env(HOME)]
    }

    foreach location $locationList {
        if {[set savedInfoFound [LoadSystemInfo $location]]} {
            set systemInfo(path) $location
            break
        }
    }

    if {$restoreContext && (!$savedInfoFound || ![file exists $systemInfo(DatabaseFile)])} {
................................................................................
        if {[string equal $dbfn {}]} {
            destroy .
            return
        }
        set systemInfo(DatabaseFile) $dbfn
        SetDefaultContext
    } elseif {!$restoreContext && !$savedInfoFound}  {
        foreach location $locationList {
            if {[file $location isdirectory]} {
                set systemInfo(DatabaseFile) [file join $location OpenShowManagement.db]
                break
            }
         }
        GetClientName
        GetDatabaseFromServer
    }

    set systemInfo(path) $location
    sqlite3 db $systemInfo(DatabaseFile)

Changes to src/Functions/ServerFunctions.tcl.

182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
...
286
287
288
289
290
291
292
293
294
295
296
297
298

299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318


319
320
321
322
323
324
325

326
327
328

329
330

331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348



349
350
351
352
353
354
355
356
357

358
359
360
361

362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
...
522
523
524
525
526
527
528









                            set UploadedAt = $now
                            where ClientId = $clientId
                    }
                }
                GET     {
                    set clientId [lindex $clientRequest 1]
                    switch -exact -- [lindex $clientRequest 2] {
                        AUDITIONDATA {
                            set reply [ProccesGetAudition $clientId]
                        }
                        BACKSTAGEDATA {
                            set reply [ProccesGetBackstage $clientId]
                        }
                        default {
                            ##
                            ## Not supported at this time, so do nothing
                            ##
                        }                    }

................................................................................


###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
#                           that you update this header block. Thanks.
#
# Procedure Name : ProccesGetAudition
#
# Description : Get the audition data for a client.
#
# Arguments :
#   clientId    - ID of client to get data for

#
# Returns :
#   The reply to the client that consisting of:
#       DATA <dataLenght>
#       <a dictionary of the data>:
#           ShowInfo:   List of: ShowID, ShowDescription, ShowClass
#           Performers: List of performer records
#           Casting:    List of audition records
#
# Side-Effects : None.
#
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc ProccesGetAudition {clientId} {
    variable systemInfo



    set result {}
    set dataDict [dict create]

    ##
    ## Build the data dictionary
    ##

    set showId $systemInfo(ShowSelection)

    ##

    ## First get the system information
    ##

    db eval {
        select ShowID, ShowDescription, ShowClass
            from Show
            where ShowID = $showId
    } dbArr {
        dict set dataDict ShowInfo [list $dbArr(ShowID) $dbArr(ShowDescription) $dbArr(ShowClass)]
    }

    ##
    ## Second get all of the performer data
    ##
    set performerData {}
    set performerCols [list \
        HysellId FirstName LastName BirthDate ParentName ParentLast \
        PhoneNumber MobileNumber EmailAddress ParentName2 ParentLast2 \
        PhoneNumber2 MobileNumber2 EmailAddress2 Address City State \
        ZipCode School DancingSchool Active Report Notes \
    ]



    db eval {
            select  HysellId, FirstName, LastName, BirthDate, ParentName,
                    ParentLast, PhoneNumber, MobileNumber, EmailAddress,
                    ParentName2, ParentLast2, PhoneNumber2, MobileNumber2,
                    EmailAddress2, Address, City, State, ZipCode, School,
                    DancingSchool, Active, Report, Notes
            from Performers
    } dbArr {
        set tmpRecord {}

        foreach col $performerCols {
            lappend tmpRecord $dbArr($col)
        }
        lappend performerData $tmpRecord

    }
    dict set dataDict Performers $performerData

    ##
    ## Lastly get all of the current auditions
    ##
    set castingData {}
    db eval {
        select ShowId, HysellId, auditionnumber
            from Casting
            where ShowId = $showId
    } dbArr {
        lappend castingData [list $dbArr(ShowId) $dbArr(HysellId) $dbArr(auditionnumber)]
    }
    dict set dataDict Casting $castingData

    ##
    ## Build the reply
    ##
    set dataLenght [string length $dataDict]
    append result [format {DATA %d} $dataLenght] "\n" $dataDict

................................................................................
            ShowId, HysellId, auditionnumber
        ) values (
            $ShowId, $HysellId, $auditionnumber
        )
    }
    return;
}
















|
<
<

|







 







|

|



>





|
<
<










|

>
>







>

<
<
>
|
<
>
|
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
>
>
>
|
<
<
<
<
<
<
<
<
>
|
|
|
<
>
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
182
183
184
185
186
187
188
189


190
191
192
193
194
195
196
197
198
...
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303


304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326


327
328

329
330
331




332











333
334
335
336








337
338
339
340

341
342
343
344












345
346
347
348
349
350
351
...
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
                            set UploadedAt = $now
                            where ClientId = $clientId
                    }
                }
                GET     {
                    set clientId [lindex $clientRequest 1]
                    switch -exact -- [lindex $clientRequest 2] {
                        AUDITIONDATA -


                        BACKSTAGEDATA {
                            set reply [ProccesGetRequest $clientId [lindex $clientRequest 2]]
                        }
                        default {
                            ##
                            ## Not supported at this time, so do nothing
                            ##
                        }                    }

................................................................................


###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
#                           that you update this header block. Thanks.
#
# Procedure Name : ProccesGetRequest
#
# Description : Get the backstage data for a client.
#
# Arguments :
#   clientId    - ID of client to get data for
#   clientType  - type of client, must be either AUDITIONDATA or BACKSTAGEDATA
#
# Returns :
#   The reply to the client that consisting of:
#       DATA <dataLenght>
#       <a dictionary of the data>:
#           <tableName>:   <columnList> <row 1> ... <row n>


#
# Side-Effects : None.
#
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc ProccesGetRequest {clientId clientType} {
    variable systemInfo
    variable columnList
    variable tableList

    set result {}
    set dataDict [dict create]

    ##
    ## Build the data dictionary
    ##
    set sqlFmt {select %s from %s %s}
    set showId $systemInfo(ShowSelection)


    foreach table $tableList($clientType) {
        if {{showid} in $columnList($table)} {

            set whereClause {where showid = $showId}
        } else {
            set whereClause {}




        }











        set sqlCmd [format $sqlFmt [join $columnList($table) {,}] $table $whereClause]
        set rowList [list]
        lappend rowList $columnList($table)
        db eval $sqlCmd dbArr {








            set row {}
            foreach col $dbArr(*) {
                lappend row $dbArr($col)
            }

            lappend rowList $row
        }
        dict set dataDict $table $rowList
    }













    ##
    ## Build the reply
    ##
    set dataLenght [string length $dataDict]
    append result [format {DATA %d} $dataLenght] "\n" $dataDict

................................................................................
            ShowId, HysellId, auditionnumber
        ) values (
            $ShowId, $HysellId, $auditionnumber
        )
    }
    return;
}


set columnList(show) {showid showdescription showclass}
set columnList(costumeassignments) {auditionnumber characterid costume1 costume2 costume3 costume4 costumenote showid}
set columnList(casting) {showid hysellid auditionnumber inshow}
set columnList(performers) {hysellid firstname lastname birthdate address city state zipcode parentname phonenumber mobilenumber emailaddress notes active report parentname2 phonenumber2 mobilenumber2 emailaddress2 school schoolgrade dancingschool parentlast parentlast2}
set columnList(characters) {charactercode characterdescr characterclass showclass act scene}
set tableList(AUDITIONDATA) {show casting performers}
set tableList(BACKSTAGEDATA) {show costumeassignments casting performers characters}

Changes to src/Functions/SetPerformer.tcl.

105
106
107
108
109
110
111

112
113
114
115
116
117
118
...
155
156
157
158
159
160
161
162








































































            set windows(performerDetailedArrayName) {}
            set menuWidget $windows(Mainmenu).tools
            $menuWidget entryconfigure {Copy Family Information} -state disabled
        }
    }

    PopulatePerformerDetails PerformerDetails


    after 1 {set SetPerformer 0}

    return;
}


................................................................................
        db eval {
            select * from Performers where HysellId = trim($performer)
        } dbArr {
            array set displayArray [array get dbArr]
        }
    }

}















































































>







 








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
...
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
            set windows(performerDetailedArrayName) {}
            set menuWidget $windows(Mainmenu).tools
            $menuWidget entryconfigure {Copy Family Information} -state disabled
        }
    }

    PopulatePerformerDetails PerformerDetails
    PopulateCostumePreview

    after 1 {set SetPerformer 0}

    return;
}


................................................................................
        db eval {
            select * from Performers where HysellId = trim($performer)
        } dbArr {
            array set displayArray [array get dbArr]
        }
    }

}

###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
#                           that you update this header block. Thanks.
#
# Procedure Name : PopulateCostumePreview
#
# Description : Fill in the costume preview tab array with the selected
#               performer's costume.
#
# Arguments : None
#
# Returns : Nothing
#
# Side-Effects : None
#
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc PopulateCostumePreview {} {
    ::log::log debug "[string repeat { } [info level]][info level 0]"

    variable CostumePreviewColList
    variable windows
    variable systemInfo

    array unset displayArray
    set performer $systemInfo(PerformerSelection)
    set w $windows(CostumePreview)
    $w delete [$w children {}]
    if {[string equal $performer {}]} {
        foreach item $CostumePreviewColList {
            set displayArray($item) {}
        }
    } else {
        set sqlFmt {select %s from CostumePreview where HysellId = trim($performer)}
        set sqlCmd [format $sqlFmt [join $CostumePreviewColList {,}]]
        array set lastKey {
            ShowId {}
            CharacterClass {}
        }
        db eval $sqlCmd dbArr {
            set rowList {}
            foreach item $CostumePreviewColList {
                lappend rowList $dbArr($item)
            }
            set ShowId $dbArr(ShowId)
            set CharacterClass $dbArr(CharacterClass)
            set CharacterCode $dbArr(CharacterCode)
            set CharacterDescription $dbArr(CharacterDescription)
            set key1 Key_$ShowId
            set key2 ${key1}_$CharacterClass
            set key3 ${key2}_$CharacterCode
            if {$lastKey(ShowId) ne $ShowId} {
                $w insert {} end -id $key1 -text $ShowId
                set lastKey(ShowId) $ShowId
                set lastKey(CharacterCode) {}
            }
            if {$lastKey(CharacterClass) ne $CharacterClass} {
                $w insert $key1 end -id $key2 -text $CharacterClass
                set lastKey(CharacterClass) $CharacterClass
            }
            $w insert $key2 end -id $key3 -text $CharacterDescription -values $rowList
        }
    }

}

Added src/Guis/CreatePerformerCostumePreview.tcl.

































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
#                           that you update this header block. Thanks.
#
# Procedure Name : CreatePerformerCostumePreview
#
# Description : Create and grid Performer Costume Preview widgets in a frame.
#
# Arguments :
#       w           - Frame in which to create and grid widgets
#
# Returns : Nothing
#
# Side-Effects : None
#
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc CreatePerformerCostumePreview {w} {
    variable CostumePreviewColList
    variable CostumePreviewDisplayList
    variable windows

    lappend windows(CostumePreview) $w.data
    ttk::treeview $w.data \
        -xscrollcommand [list $w.hsb set] \
        -yscrollcommand [list $w.vsb set] \
        -columns $CostumePreviewColList \
        -displaycolumns $CostumePreviewDisplayList \
        -selectmode browse \
        -show {tree headings}
    ttk::scrollbar $w.vsb \
        -orient vertical \
        -command [list $w.data yview]
    ttk::scrollbar $w.hsb \
        -orient horizontal \
        -command [list $w.data xview]
    $w.data column #0 \
        -width 30 \
        -stretch n \
        -anchor c
    $w.data heading #0 \
        -anchor c \
        -text [::msgcat::mc CostumePreview]
    foreach col $CostumePreviewColList {
        $w.data column $col \
            -stretch y \
            -anchor e \
            -width [expr {4 + [string length [::msgcat::mc $col]]}]
        $w.data heading $col \
            -anchor c \
            -text [::msgcat::mc $col]
    }
    grid configure $w.data $w.vsb -sticky nsew
    grid configure $w.hsb -sticky ew
    grid columnconfigure $w $w.data -weight 1
    grid rowconfigure $w $w.data -weight 1

}

Changes to src/Guis/PerformerTab.tcl.

52
53
54
55
56
57
58
59
60
61
62
63
64



65

66
67
68
69
70
71
72
...
141
142
143
144
145
146
147







148
149
150
151
152
153

154
155
156
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc BuildPerformerTab {notebook} {
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable windows
    variable PerformerDetails
    variable PerformerColList




    set windows(MainPerformerTab) [ttk::panedwindow $notebook.performerTab -orient vertical]

    set w $windows(MainPerformerTab)

    ##
    ## Performer List
    ##
    set l [ttk::frame $w.performers]
    lappend windows(PerformerViews) $l.data
................................................................................
        -onvalue {Y} \
        -offvalue {N}
    grid configure $u.cb_$item -row 1 -column [incr col] -sticky e
    grid columnconfigure $u $u.ent_ShowDescription -weight 1

    trace add variable PerformerDetails(HysellId) write AdjustPerformerDetailsButtons
    trace add variable PerformerDetails(InShow) write SaveInShowStatus








    ##
    ## Manage the subwindows
    ##
    $w add $l
    $w add $d


    return;
}







|





>
>
>
|
>







 







>
>
>
>
>
>
>






>



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc BuildPerformerTab {notebook {isStandalone no}} {
    ::log::log debug "[string repeat { } [info level]][info level 0]"
    variable windows
    variable PerformerDetails
    variable PerformerColList

    if {$isStandalone} {
        set windows(MainPerformerTab) $notebook
    } else {
        set windows(MainPerformerTab) [ttk::panedwindow $notebook.performerTab -orient vertical]
    }
    set w $windows(MainPerformerTab)

    ##
    ## Performer List
    ##
    set l [ttk::frame $w.performers]
    lappend windows(PerformerViews) $l.data
................................................................................
        -onvalue {Y} \
        -offvalue {N}
    grid configure $u.cb_$item -row 1 -column [incr col] -sticky e
    grid columnconfigure $u $u.ent_ShowDescription -weight 1

    trace add variable PerformerDetails(HysellId) write AdjustPerformerDetailsButtons
    trace add variable PerformerDetails(InShow) write SaveInShowStatus

    ##
    ## Create the custom preview
    ##
    set p [ttk::frame $w.preview]
    CreatePerformerCostumePreview $p


    ##
    ## Manage the subwindows
    ##
    $w add $l
    $w add $d
    $w add $p

    return;
}

Changes to src/Main.tcl.

45
46
47
48
49
50
51



52
53
54
55
56
57
58
59



60
61
62
63
64
65
66
package require struct::set

if {[catch {package require udp}]} {
    set udpPresent yes
} else {
    set udpPresent no
}




set baseDir [file dirname [info script]]

set CopyFamilyInfo(fieldList) {EmailAddress Address City State ZipCode ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2}
set PerformerColList {HysellId FirstName LastName BirthDate EmailAddress Address City State ZipCode School DancingSchool ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2 Active Report Notes fnsort lnsort}
set CostumeColList {ShowId charctercode auditionnumber FirstName LastName Costume1 Costume2 Costume3 Costume4 Notes}
set ReportColDisplayList {ReportName Description ReportType InitalFile PrependShowId Title}
set ReportColList {ReportName ReportType ReportSql UserDefined ReportColumns Restrictions InitalFile PrependShowId Title Description}



set SetPerformer 0
set SetPerformerFirstTime 1

array set AuditionEntryGui {
    EnterAuditionNumber Y
    ExistingDancer Y
    InShow N







>
>
>








>
>
>







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package require struct::set

if {[catch {package require udp}]} {
    set udpPresent yes
} else {
    set udpPresent no
}

set systemInfo(udpPresent) $udpPresent
set systemInfo(isAndroid) no

set baseDir [file dirname [info script]]

set CopyFamilyInfo(fieldList) {EmailAddress Address City State ZipCode ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2}
set PerformerColList {HysellId FirstName LastName BirthDate EmailAddress Address City State ZipCode School DancingSchool ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2 Active Report Notes fnsort lnsort}
set CostumeColList {ShowId charctercode auditionnumber FirstName LastName Costume1 Costume2 Costume3 Costume4 Notes}
set ReportColDisplayList {ReportName Description ReportType InitalFile PrependShowId Title}
set ReportColList {ReportName ReportType ReportSql UserDefined ReportColumns Restrictions InitalFile PrependShowId Title Description}
set CostumePreviewColList {HysellId ShowId ShowDescription CharacterClass CharacterCode CharacterDescription Costume1 Costume2 Costume3 Costume4 CostumeNote}
set CostumePreviewDisplayList {ShowDescription CharacterDescription Costume1 Costume2 Costume3 Costume4 CostumeNote}

set SetPerformer 0
set SetPerformerFirstTime 1

array set AuditionEntryGui {
    EnterAuditionNumber Y
    ExistingDancer Y
    InShow N

Changes to src/PreAuditionMain.tcl.

38
39
40
41
42
43
44

45












46
47
48
49
50


51
52
53
54
55
56
57
package require sqlite3
package require tdbc 1.0
package require tdbc::sqlite3
package require msgcat
package require log
package require struct
package require struct::set

package require udp













#::log::lvSuppress debug 0
#::log::lvSuppress info 0
wm withdraw .
set baseDir [file dirname [info script]]



set CopyFamilyInfo(fieldList) {EmailAddress Address City State ZipCode ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2}
set PerformerColList {HysellId FirstName LastName BirthDate EmailAddress Address City State ZipCode School DancingSchool ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2 Active Report Notes fnsort lnsort}
set SetPerformer 0
set SetPerformerFirstTime 1

array set AuditionEntryGui {







>
|
>
>
>
>
>
>
>
>
>
>
>
>





>
>







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package require sqlite3
package require tdbc 1.0
package require tdbc::sqlite3
package require msgcat
package require log
package require struct
package require struct::set

if {[catch {package require udp}]} {
    set udpPresent yes
} else {
    set udpPresent no
}

set systemInfo(udpPresent) $udpPresent

if {[llength [info commands borg]]} {
    set systemInfo(isAndroid) yes
} else {
    set systemInfo(isAndroid) no
}

#::log::lvSuppress debug 0
#::log::lvSuppress info 0
wm withdraw .
set baseDir [file dirname [info script]]



set CopyFamilyInfo(fieldList) {EmailAddress Address City State ZipCode ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2}
set PerformerColList {HysellId FirstName LastName BirthDate EmailAddress Address City State ZipCode School DancingSchool ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2 Active Report Notes fnsort lnsort}
set SetPerformer 0
set SetPerformerFirstTime 1

array set AuditionEntryGui {

Added src/PreBackStageMain.tcl.



















































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
###############################################################################
##                                                                           ##
##  Copyright (c) 2012 Gerald W. Lester                                      ##
##  All rights reserved.                                                     ##
##                                                                           ##
##  Redistribution and use in source and binary forms, with or without       ##
##  modification, are permitted provided that the following conditions       ##
##  are met:                                                                 ##
##                                                                           ##
##    * Redistributions of source code must retain the above copyright       ##
##      notice, this list of conditions and the following disclaimer.        ##
##    * Redistributions in binary form must reproduce the above              ##
##      copyright notice, this list of conditions and the following          ##
##      disclaimer in the documentation and/or other materials provided      ##
##      with the distribution.                                               ##
##    * Neither the name of the Visiprise Software, Inc nor the names        ##
##      of its contributors may be used to endorse or promote products       ##
##      derived from this software without specific prior written            ##
##      permission.                                                          ##
##                                                                           ##
##  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      ##
##  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        ##
##  LIMITED  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS       ##
##  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE           ##
##  COPYRIGHT OWNER OR  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,     ##
##  INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,    ##
##  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;        ##
##  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER         ##
##  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT       ##
##  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR  OTHERWISE) ARISING IN       ##
##  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF  ADVISED OF THE         ##
##  POSSIBILITY OF SUCH DAMAGE.                                              ##
##                                                                           ##
###############################################################################

package require Tcl 8.6
package require Tk 8.6
package require sqlite3
package require tdbc 1.0
package require tdbc::sqlite3
package require msgcat
package require log
package require struct
package require struct::set

if {[catch {package require udp}]} {
    set udpPresent yes
} else {
    set udpPresent no
}

set systemInfo(udpPresent) $udpPresent

if {[llength [info commands borg]]} {
    set systemInfo(isAndroid) yes
} else {
    set systemInfo(isAndroid) no
}

#::log::lvSuppress debug 0
#::log::lvSuppress info 0
wm withdraw .
set baseDir [file dirname [info script]]

set CopyFamilyInfo(fieldList) {EmailAddress Address City State ZipCode ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2}
set PerformerColList {HysellId FirstName LastName BirthDate EmailAddress Address City State ZipCode School DancingSchool ParentName ParentLast PhoneNumber MobileNumber  ParentName2 ParentLast2 PhoneNumber2 MobileNumber2 Active Report Notes fnsort lnsort}
set CostumePreviewColList {HysellId ShowId ShowDescription CharacterClass CharacterCode CharacterDescription Costume1 Costume2 Costume3 Costume4 CostumeNote}
set CostumePreviewDisplayList {ShowDescription CharacterDescription Costume1 Costume2 Costume3 Costume4 CostumeNote}

set SetPerformer 0
set SetPerformerFirstTime 1

set systemInfo(DatabaseFile) ~/Backstage.db
set systemInfo(iniFile) Backstage.ini
set systemInfo(Mode) Backstage

##
## Add default bindings
##
bind TEntry <Command-a> { %W selection range 0 end; %W icursor end }
bind Entry <Command-a> { %W selection range 0 end; %W icursor end }

##
## Replace standard Treeview behavior of unmodified button 1
##
bind Treeview <Command-Button-1> [bind Treeview <Control-Button-1>]
proc ttk::treeview::Press {w x y} {
    focus $w
    switch -- [$w identify region $x $y] {
	nothing { }
	heading { heading.press $w $x $y }
	separator { resize.press $w $x $y }
	tree {
	    set item [$w identify item $x $y]
	    SelectOp $w $item choose
	    switch -glob -- [$w identify element $x $y] {
		*indicator -
		*disclosure { Toggle $w $item }
	    }
	}
        cell {
            ttk::treeview::Select $w $x $y toggle
        }
    }
}

Changes to src/Upgrades/CurrentVersion.tcl.

38
39
40
41
42
43
44
45
46
47
48
##
## This is used to deal with database and initalization file upgrades.
##
## NOTE -- in a release all of the version numbers may or may not change,
#          only the Code version number has to change with every release.
##
array set CurrentVersion {
    InitFile    0.6.0
    Database    0.6.0
    Code        0.6.0
}







|
|
|

38
39
40
41
42
43
44
45
46
47
48
##
## This is used to deal with database and initalization file upgrades.
##
## NOTE -- in a release all of the version numbers may or may not change,
#          only the Code version number has to change with every release.
##
array set CurrentVersion {
    InitFile    0.7.0
    Database    0.7.0
    Code        0.7.0
}

Added src/Upgrades/Database/From_0.6.0_To_0.7.0.tcl.





























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
###############################################################################
##                                                                           ##
##  Copyright (c) 2012 Gerald W. Lester                                      ##
##  All rights reserved.                                                     ##
##                                                                           ##
##  Redistribution and use in source and binary forms, with or without       ##
##  modification, are permitted provided that the following conditions       ##
##  are met:                                                                 ##
##                                                                           ##
##    * Redistributions of source code must retain the above copyright       ##
##      notice, this list of conditions and the following disclaimer.        ##
##    * Redistributions in binary form must reproduce the above              ##
##      copyright notice, this list of conditions and the following          ##
##      disclaimer in the documentation and/or other materials provided      ##
##      with the distribution.                                               ##
##    * Neither the name of the Visiprise Software, Inc nor the names        ##
##      of its contributors may be used to endorse or promote products       ##
##      derived from this software without specific prior written            ##
##      permission.                                                          ##
##                                                                           ##
##  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      ##
##  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        ##
##  LIMITED  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS       ##
##  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE           ##
##  COPYRIGHT OWNER OR  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,     ##
##  INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,    ##
##  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;        ##
##  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER         ##
##  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT       ##
##  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR  OTHERWISE) ARISING IN       ##
##  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF  ADVISED OF THE         ##
##  POSSIBILITY OF SUCH DAMAGE.                                              ##
##                                                                           ##
###############################################################################

set ::ApplyUpgrades::UpgradeScripts(Database,0.6.0) ::ApplyUpgrades::Database::From_0.6.0_To_0.7.0

namespace eval  ::ApplyUpgrades::Database:: {}

###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
#                           that you update this header block. Thanks.
#
# Procedure Name : ::ApplyUpgrades::Database::From_0.5.0_To_0.6.0
#
# Description : Upgrade the database from 0.5.0 to 0.6.0. This entails the following:
#                   Creating the Clients and ClientHysellMap table.
#
# Arguments : None
#
# Returns : Upgraded version number
#
# Side-Effects : None
#
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc ::ApplyUpgrades::Database::From_0.6.0_To_0.7.0 {} {
    ##
    ## Define the Costume Preview View
    ##
    db eval {
        create view CostumePreview as
            select ca.HysellId as HysellId,
                   ca.ShowId as ShowId,
                    s.ShowDescription as ShowDescription,
                   ch.characterclass as CharacterClass,
                   ch.charactercode as CharacterCode,
                   ch.characterdescr as CharacterDescription,
                    a.costume1 as Costume1,
                    a.costume2 as Costume2,
                    a.costume3 as Costume3,
                    a.costume4 as Costume4,
                    a.costumenote as CostumeNote
                from costumeassignments a,
                     characters ch,
                     show s,
                     casting ca
                where a.showid = s.ShowID
                  and a.auditionnumber = ca.auditionnumber
                  and a.characterid = ch.charactercode
                  and s.ShowClass = ch.showclass
                  and s.ShowID = ca.ShowId
                order by ca.HysellId,s.ShowDescription,ch.characterclass,ch.characterdescr
    }


    return {0.7.0}
}

Added src/Upgrades/InitFile/From_0.6.0_To_0.7.0.tcl.





































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
###############################################################################
##                                                                           ##
##  Copyright (c) 2012 Gerald W. Lester                                      ##
##  All rights reserved.                                                     ##
##                                                                           ##
##  Redistribution and use in source and binary forms, with or without       ##
##  modification, are permitted provided that the following conditions       ##
##  are met:                                                                 ##
##                                                                           ##
##    * Redistributions of source code must retain the above copyright       ##
##      notice, this list of conditions and the following disclaimer.        ##
##    * Redistributions in binary form must reproduce the above              ##
##      copyright notice, this list of conditions and the following          ##
##      disclaimer in the documentation and/or other materials provided      ##
##      with the distribution.                                               ##
##    * Neither the name of the Visiprise Software, Inc nor the names        ##
##      of its contributors may be used to endorse or promote products       ##
##      derived from this software without specific prior written            ##
##      permission.                                                          ##
##                                                                           ##
##  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS      ##
##  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT        ##
##  LIMITED  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS       ##
##  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE           ##
##  COPYRIGHT OWNER OR  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,     ##
##  INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,    ##
##  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;        ##
##  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER         ##
##  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT       ##
##  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR  OTHERWISE) ARISING IN       ##
##  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF  ADVISED OF THE         ##
##  POSSIBILITY OF SUCH DAMAGE.                                              ##
##                                                                           ##
###############################################################################

set ::ApplyUpgrades::UpgradeScripts(InitFile,0.6.0) ::ApplyUpgrades::InitFile::From_0.6.0_To_0.7.0

###########################################################################
#
# Procedure Header - as this procedure is modified, please be sure
#                           that you update this header block. Thanks.
#
# Procedure Name : InitFile::From_0.5.0_To_0.6.0
#
# Description : Add additional entry to the initialization file for version number.
#
# Arguments : None.
#
# Returns : Upgraded version number
#
# Side-Effects : None
#
# Exception Conditions : None
#
# Pre-requisite Conditions : None
#
# Original Author : Gerald W. Lester
#
###########################################################################
proc ::ApplyUpgrades::InitFile::From_0.6.0_To_0.7.0 {} {
    global systemInfo

    set systemInfo(InitFile) {0.7.0}

    return {0.7.0}
}

Changes to src/msgcat/en.msg.

33
34
35
36
37
38
39




40
41
42
43
44
45
46
...
103
104
105
106
107
108
109

110
111
112
113
114
115
116
...
117
118
119
120
121
122
123

124
125
126
127
128
129
130
##                                                                           ##
###############################################################################

::msgcat::mcmset en {
    tm,Title,Show {Show Table Maintenance}
    tm,Title,characters {Character Classes Table Maintenance}
    tm,Title,Performers {Performers Table Maintenance}




    addSelected {<}
    addAll {<<}
    removeSelected {>}
    removeAll {>>}
    New     {New}
    Delete  {Delete}
    Save    {Save}
................................................................................
    EnterAuditionNumber {Enter Audition Number}
    ExistingDancer {Auditioned Before}
    Costume1 {Costume #1}
    Costume2 {Costume #2}
    Costume3 {Costume #3}
    Costume4 {Costume #4}
    CostumeNotes {Notes}

    Age {Age}
    Act {Act}
    Scene {Scene}
    isAdult {Adult?}
    ReportName {Report Name}
    ReportType {Report Type}
    ReportSql {Report SQL}
................................................................................
    UserDefined {User Defined Report?}
    ReportColumns {Report Columns}
    Restrictions {Restrictions List}
    InitalFile {Initial File Name}
    PrependShowId {Prepend Show Id?}
    Title {File Save Dialog Title}
    Description {Description}

    Report.Cast {
        Comment {This report only cares about people in the show, thus optional controls are ignored (i.e. not included in the where claue).}
        SaveFile.InitalFile {HysellCastList}
        SaveFile.PrependShowId {true}
        SaveFile.Title {Specify Cast List Export File}
        SqlCmd {
            select HysellId, FirstName, LastName, BirthDate, ParentName, PhoneNumber, MobileNumber, EmailAddress, Address, City, State, ZipCode







>
>
>
>







 







>







 







>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
...
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
##                                                                           ##
###############################################################################

::msgcat::mcmset en {
    tm,Title,Show {Show Table Maintenance}
    tm,Title,characters {Character Classes Table Maintenance}
    tm,Title,Performers {Performers Table Maintenance}
    status,Searching {Searching for server...}
    status,Registering {Registering Client...}
    status,Downloading {Getting initial data from server...}
    status,Uploading {Uploading Database...}
    addSelected {<}
    addAll {<<}
    removeSelected {>}
    removeAll {>>}
    New     {New}
    Delete  {Delete}
    Save    {Save}
................................................................................
    EnterAuditionNumber {Enter Audition Number}
    ExistingDancer {Auditioned Before}
    Costume1 {Costume #1}
    Costume2 {Costume #2}
    Costume3 {Costume #3}
    Costume4 {Costume #4}
    CostumeNotes {Notes}
    CharacterDescription {Character Description}
    Age {Age}
    Act {Act}
    Scene {Scene}
    isAdult {Adult?}
    ReportName {Report Name}
    ReportType {Report Type}
    ReportSql {Report SQL}
................................................................................
    UserDefined {User Defined Report?}
    ReportColumns {Report Columns}
    Restrictions {Restrictions List}
    InitalFile {Initial File Name}
    PrependShowId {Prepend Show Id?}
    Title {File Save Dialog Title}
    Description {Description}
    CostumePreview {Past Shows}
    Report.Cast {
        Comment {This report only cares about people in the show, thus optional controls are ignored (i.e. not included in the where claue).}
        SaveFile.InitalFile {HysellCastList}
        SaveFile.PrependShowId {true}
        SaveFile.Title {Specify Cast List Export File}
        SqlCmd {
            select HysellId, FirstName, LastName, BirthDate, ParentName, PhoneNumber, MobileNumber, EmailAddress, Address, City, State, ZipCode