-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlib_txaceUI.usc
More file actions
335 lines (294 loc) · 9.61 KB
/
Copy pathlib_txaceUI.usc
File metadata and controls
335 lines (294 loc) · 9.61 KB
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
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
148
149
150
151
152
153
154
155
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
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
'Shared User Interface Library for TxACE
%version 0.0.0 8/11/2015
library lib_txaceUI()
public dynamic function GetClientID() is x
c.id is x
$clear(c.id)
$submitopt("off", "NEXT")
$cancelopt("off", "CANCEL")
$form()
$text("{H1}Enter Client ID{/H1}")
$table("t1",,"width='100%'")
$row()
$col("right",,"50%")
$text("ENTER CLIENT ID: ","datatag")
$col()
$textbox(c.id,"DB``02",6,4,"Y")
$editmsg(c.id)
$endtable("t1")
$sendform()
if $endbutton = "SUBMIT" then
GetClientID = c.id
endif
end GetClientID
public dynamic function ConfirmExit() is x
yes_btn is x
no_btn is x
$submitopt("off", "YES")
$cancelopt("off", "NO")
$form("confirm")
$bstyle("buttondown","button")
$text("{H1 align='CENTER'}ARE YOU SURE{/H1}")
$text("{CENTER}If you cancel now, {u}{b}{font color=red}NONE OF THE DATA{/font}{/b}{/u} will be saved!{/CENTER}",,"font-family:times new roman; font-size:14pt; color:black; font-weight:bold;")
$text("{CENTER}Do you wish to cancel and return to Main Menu?{/CENTER}",,"font-family:times new roman; font-size:14pt; color:darkblue; font-weight:bold;")
$br(2)
$tag("<center>")
$submit(yes_btn,"YES")
$ctag(" ")
$submit(no_btn,"NO")
$tag("</center>")
$sendform("confirm")
if $endbutton = "SUBMIT" or yes_btn = "Y" then
ConfirmExit = "Y"
endif
end ConfirmExit
public dynamic function DisplayErrors(errors[],HeaderYN) is null
errors[] is x
index is i
HeaderYN is x
$submitopt("off", "")
$cancelopt("off", "BACK")
$form("errors")
if $uc(HeaderYN) != "N"
ClientPageHeader($regid,"Y")
endif
$text("{H1}Errors Were Found{/H1}")
$br()
$tag("<CENTER>")
index = 0
do while index++ <= $maxarray(errors[])
$br()
$text(errors[index] , "error")
enddo
$tag("</CENTER>")
$sendform("errors")
end DisplayErrors
public dynamic function ClientPageHeader(CID) is null
CID is x
c.fn is x
c.mn is x
c.ln is x
sp is x
sp = " "
if $regid dp and cid !dp
CID = $regid
endif
(void)$dbread(02, CID, c.fn, c.mn, c.ln)
$table("PageHeader",,"width='100%'")
$row()
$col("right",,"33%","1","1")
$text("Consumer ID", "hdrtag")
$ctag(sp)
$ctag(sp)
$ctag(sp)
$ctag(sp)
$text(CID,"hdrdate")
$col(,,"25%","1","1")
$col(,,"42%","1","1")
$text("Consumer Name","hdrtag")
$ctag(sp)
$ctag(sp)
$ctag(sp)
$ctag(sp)
$text(`c.ln + ", " + c.fn`,"hdrdate")
if c.mn dp
$ctag(sp)
$text(`$seg(c.mn,1,1)`,"hdrdate")
$text(".", "hdrdate")
endif
$endtable("PageHeader")
$tag("<hr/>")
end ClientPageHeader
'********************************************************************************************
'THIS FUNCTION WILL PRINT SERVICE DATA ON A BUI FORM IN TABLE FORMAT
'AUTHOR: SCOTT B.
'DATE: 5/17/2004
'********************************************************************************************
public dynamic function report(e_ser, e_ru, e_start, e_dur, e_loc, video) is x
e_ser is b 'EVENT SERVICE CODE
e_ru is b 'EVENT RU
e_start is t 'EVENT START TIME
e_dur is t 'EVENT DURATION
e_loc is x 'EVENT LOCATION
video is x 'VIDEO CONFERENCE VARIABLE
endtime is t 'SERVICE ENDTIME
endtime = e_start + e_dur
$table("t1",,"border='1' cellspacing='0' width='100%'")
$row(,"align='center' bgcolor='#EEEEEE'")
$col()
$text("SAC")
$col()
$text("RU")
$col()
$text("Loc")
$col()
$text("Start")
$col()
$text("Cl Dur")
$col()
$text("Staff Dur")
$col()
$text("Endtime")
$col()
$text("Video")
$row(,"align='center' bgcolor='#EEEEEE'")
$col()
$text(e_ser)
$col()
$text(e_ru)
$col()
$text(e_loc)
$col()
$text(e_start)
$col()
$text(`$format(e_dur, "HH.MM")`)
$col()
$text(`$format(e_dur, "HH.MM")`)
$col()
$text(endtime)
$col()
if video dp
$text(video)
else
$ctag(" ")
endif
$endtable("t1")
end report
dynamic function MsgBox(DialogMessage, Icon, DialogTitle,
Button1, Button2, Button3, Button4, Button5, Button6, Button7, Button8, Button9, Button10) is b
DialogMessage is x
Icon is b
DialogTitle is x
Button1 is x
Button2 is x
Button3 is x
Button4 is x
Button5 is x
Button6 is x
Button7 is x
Button8 is x
Button9 is x
Button10 is x
Buttons[] is x
ClickedButton[] is x
IconURL is x
WorkX is x
TitleFGColor is x
TitleBGColor is x
IconBase is x
IconH is x
IconW is x
IconH = "32"
IconW = "32"
TitleFGColor = "#FFFFFF"
TitleBGColor = "#008000"
IconBase = "/cmhcbui/cmhcbuilocal/our_images/"
if DialogTitle !DP
DialogTitle = $scriptid
endif
if Button1 !DP
Button1 = "Ok"
endif
Select Icon
case 1 IconURL = IconBase + "Information.gif"
case 2 IconURL = IconBase + "Question.gif"
case 3 IconURL = IconBase + "Warning.gif"
case 4 IconURL = IconBase + "Critical.gif"
case 5 IconURL = IconBase + "oatmeal_tumbeasts/tbrun1.png"
IconH = "120"
IconW = "240"
case 6 IconURL = IconBase + "oatmeal_tumbeasts/tbrun2.png"
IconH = "186"
IconW = "256"
case 7 IconURL = IconBase + "oatmeal_tumbeasts/tbsit1.png"
IconH = "262"
IconW = "174"
case 8 IconURL = IconBase + "oatmeal_tumbeasts/tbsit2.png"
IconH = "267"
IconW = "151"
case 9 IconURL = IconBase + "oatmeal_tumbeasts/tbstand1.png"
IconH = "199"
IconW = "247"
case 10 IconURL = IconBase + "oatmeal_tumbeasts/server.png"
IconH = "269"
IconW = "203"
endselect
$submitopt("OFF","")
$cancelopt("OFF","")
$form("MsgBox")
$style()
$bstyle()
$table("T1",," border='0' cellspacing='0' cellpadding='0' id='AutoNumber1' width='100%' height='100%'")
$row()
$col("center","middle",,,,)
$table("T2",," border='1' cellspacing='1' width='75%' id='AutoNumber2'")
$row()
$col("center",,"100%",,,`" bgcolor='" + TitleBGColor + "'"`)
$ctag(`"<font color='" + TitleFGColor + "' size='5'>"`)
$text(DialogTitle)
$ctag("</font>")
$row()
$col(,,"100%",,," bgcolor='#FFFFFF'")
$ctag("<div align='center'>")
$ctag("<center>")
$table("T3",," border='0' style='border-collapse: collapse' bordercolor='#111111' id='AutoNumber4' cellpadding='2'")
$row()
if IconURL DP and IconBase DP
$col("center","middle",,,,)
$ctag(`"<img border='0' src='" +
IconURL + "' width='" +
IconW + "' height='" +
IconH + "'>"`)
endif
$col(,"middle")
$text(DialogMessage)
$endtable("T3")
$table("T4",," border='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' cellpadding='0' id='AutoNumber5'")
$row()
$col(,,,,,)
$submit(ClickedButton[1],Button1)
if Button2 DP
$ctag(" ")
$submit(ClickedButton[2],Button2)
endif
if Button3 DP
$ctag(" ")
$submit(ClickedButton[3],Button3)
endif
if Button4 DP
$ctag(" ")
$submit(ClickedButton[4],Button4)
endif
if Button5 DP
$ctag(" ")
$submit(ClickedButton[5],Button5)
endif
if Button6 dp or button7 dp or button8 dp or button9 dp or button10 dp
$row()
$row()
if Button6 dp
$col(,,,,,)$submit(ClickedButton[6],Button6)
endif
if Button7 DP
$ctag(" ")$submit(ClickedButton[7],Button7)
endif
if Button8 DP
$ctag(" ")$submit(ClickedButton[8],Button8)
endif
if Button9 DP
$ctag(" ")$submit(ClickedButton[9],Button9)
endif
if Button10 DP
$ctag(" ")$submit(ClickedButton[10],Button10)
endif
endif
$endtable("T4")
$ctag("</center>")
$ctag("</div>")
$endtable("T2")
$endtable("T1")
$sendform("MsgBox")
$submitopt("ON","Submit")
$cancelopt("ON","Cancel")
MsgBox = $maxarray(ClickedButton[])
end MsgBox