Added capital works blank section. Synced calling screen.
[capital-apms-progress.git] / vwr / sel / b-selshd.i
blobe85df63774bf3ae8dc9dd19a2031704a31fb129f
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r2 GUI
2 &ANALYZE-RESUME
3 /* Connected Databases
4 ttpl PROGRESS
5 */
6 &Scoped-define WINDOW-NAME CURRENT-WINDOW
7 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS B-table-Win
8 /*------------------------------------------------------------------------
10 File:
12 Description: from BROWSER.W - Basic SmartBrowser Object Template
14 Input Parameters:
15 <none>
17 Output Parameters:
18 <none>
20 ------------------------------------------------------------------------*/
21 /* This .W file was created with the Progress UIB. */
22 /*----------------------------------------------------------------------*/
24 /* Create an unnamed pool to store all the widgets created
25 by this procedure. This is a good default which assures
26 that this procedure's triggers and internal procedures
27 will execute in this procedure's storage, and that proper
28 cleanup will occur on deletion of the procedure. */
30 CREATE WIDGET-POOL.
32 /* *************************** Definitions ************************** */
34 /* Parameters Definitions --- */
36 /* Local Variable Definitions --- */
38 DEF VAR ShareHolder AS CHAR FORMAT "X(30)" LABEL "Share Holder's Name".
40 /* _UIB-CODE-BLOCK-END */
41 &ANALYZE-RESUME
44 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
46 /* ******************** Preprocessor Definitions ******************** */
48 &Scoped-define PROCEDURE-TYPE SmartBrowser
50 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
52 /* Name of first Frame and/or Browse and/or first Query */
53 &Scoped-define FRAME-NAME F-Main
54 &Scoped-define BROWSE-NAME br_table
56 /* Internal Tables (found by Frame, Query & Browse Queries) */
57 &Scoped-define INTERNAL-TABLES Contact Person
59 /* Definitions for BROWSE br_table */
60 &Scoped-define FIELDS-IN-QUERY-br_table ~
61 Person.FirstName + ' ' + Person.LastName @ ShareHolder
62 &Scoped-define ENABLED-FIELDS-IN-QUERY-br_table
63 &Scoped-define FIELD-PAIRS-IN-QUERY-br_table
64 &Scoped-define ENABLED-TABLES-IN-QUERY-br_table
65 &Scoped-define OPEN-QUERY-br_table OPEN QUERY br_table FOR EACH Contact ~
66 WHERE Contact.ContactType = "SH" NO-LOCK, ~
67 FIRST Person OF Contact OUTER-JOIN NO-LOCK.
68 &Scoped-define FIRST-TABLE-IN-QUERY-br_table Contact
69 &Scoped-define TABLES-IN-QUERY-br_table Contact Person
71 /* Definitions for FRAME F-Main */
73 /* Standard List Definitions */
74 &Scoped-Define ENABLED-OBJECTS br_table
76 /* Custom List Definitions */
77 /* List-1,List-2,List-3,List-4,List-5,List-6 */
79 /* _UIB-PREPROCESSOR-BLOCK-END */
80 &ANALYZE-RESUME
84 /* *********************** Control Definitions ********************** */
87 /* Definitions of the field level widgets */
88 /* Query definitions */
89 &ANALYZE-SUSPEND
90 DEFINE QUERY br_table FOR
91 Contact,
92 Person SCROLLING.
93 &ANALYZE-RESUME
95 /* Browse definitions */
96 DEFINE BROWSE br_table
97 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br_table B-table-Win _STRUCTURED
98 QUERY br_table NO-LOCK DISPLAY
99 Person.FirstName + ' ' + Person.LastName @ ShareHolder
100 /* _UIB-CODE-BLOCK-END */
101 &ANALYZE-RESUME
102 WITH NO-ASSIGN SEPARATORS SIZE 39 BY 15.71
103 BGCOLOR 16 FONT 8.
106 /* ************************ Frame Definitions *********************** */
108 DEFINE FRAME F-Main
109 br_table AT ROW 1 COL 1
110 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
111 SIDE-LABELS NO-UNDERLINE THREE-D
112 AT COL 1 ROW 1 SCROLLABLE
113 BGCOLOR 8 FGCOLOR 0 .
117 /* *********************** Procedure Settings ************************ */
119 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
120 /* Settings for THIS-PROCEDURE
121 Type: SmartBrowser
122 Allow: Basic,Browse
123 Frames: 1
124 Add Fields to: EXTERNAL-TABLES
125 Other Settings: PERSISTENT-ONLY COMPILE
128 /* This procedure should always be RUN PERSISTENT. Report the error, */
129 /* then cleanup and return. */
130 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
131 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
132 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
133 RETURN.
134 END.
136 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
138 /* ************************* Create Window ************************** */
140 &ANALYZE-SUSPEND _CREATE-WINDOW
141 /* DESIGN Window definition (used by the UIB)
142 CREATE WINDOW B-table-Win ASSIGN
143 HEIGHT = 15.76
144 WIDTH = 69.13.
146 &ANALYZE-RESUME
149 /* *************** Runtime Attributes and UIB Settings ************** */
151 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
152 /* SETTINGS FOR WINDOW B-table-Win
153 NOT-VISIBLE,,RUN-PERSISTENT */
154 /* SETTINGS FOR FRAME F-Main
155 NOT-VISIBLE Size-to-Fit */
156 ASSIGN
157 FRAME F-Main:SCROLLABLE = FALSE
158 FRAME F-Main:HIDDEN = TRUE.
160 /* _RUN-TIME-ATTRIBUTES-END */
161 &ANALYZE-RESUME
164 /* Setting information for Queries and Browse Widgets fields */
166 &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br_table
167 /* Query rebuild information for BROWSE br_table
168 _TblList = "TTPL.Contact,TTPL.Person OF TTPL.Contact"
169 _Options = "NO-LOCK"
170 _TblOptList = ", FIRST OUTER"
171 _Where[1] = "Contact.ContactType = ""SH"""
172 _FldNameList[1] > "_<CALC>"
173 "Person.FirstName + ' ' + Person.LastName @ ShareHolder" ? ? ? ? ? ? ? ? ? no ?
174 _Query is NOT OPENED
175 */ /* BROWSE br_table */
176 &ANALYZE-RESUME
178 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
179 /* Query rebuild information for FRAME F-Main
180 _Options = "NO-LOCK"
181 _Query is NOT OPENED
182 */ /* FRAME F-Main */
183 &ANALYZE-RESUME
187 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartBrowserWizard" B-table-Win _INLINE
188 /* Actions: adm/support/_wizard.w ? ? ? adm/support/_wizdel.p */
189 /* SmartBrowser Wizard
190 Destroy on next read */
191 /* _UIB-CODE-BLOCK-END */
192 &ANALYZE-RESUME
195 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB B-table-Win
196 /* ************************* Included-Libraries *********************** */
198 {src/adm/method/browser.i}
199 {inc/method/m-selvwr.i}
201 /* _UIB-CODE-BLOCK-END */
202 &ANALYZE-RESUME
207 /* ************************ Control Triggers ************************ */
209 &Scoped-define BROWSE-NAME br_table
210 &Scoped-define SELF-NAME br_table
211 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
212 ON ROW-ENTRY OF br_table IN FRAME F-Main
214 /* This code displays initial values for newly added or copied rows. */
215 {src/adm/template/brsentry.i}
216 END.
218 /* _UIB-CODE-BLOCK-END */
219 &ANALYZE-RESUME
222 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
223 ON ROW-LEAVE OF br_table IN FRAME F-Main
225 /* Do not disable this code or no updates will take place except
226 by pressing the Save button on an Update SmartPanel. */
227 {src/adm/template/brsleave.i}
228 END.
230 /* _UIB-CODE-BLOCK-END */
231 &ANALYZE-RESUME
234 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
235 ON VALUE-CHANGED OF br_table IN FRAME F-Main
237 /* This ADM trigger code must be preserved in order to notify other
238 objects when the browser's current row changes. */
239 {src/adm/template/brschnge.i}
241 END.
243 /* _UIB-CODE-BLOCK-END */
244 &ANALYZE-RESUME
247 &UNDEFINE SELF-NAME
249 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win
252 /* *************************** Main Block *************************** */
254 &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
255 RUN dispatch IN THIS-PROCEDURE ('initialize':U).
256 &ENDIF
258 /* _UIB-CODE-BLOCK-END */
259 &ANALYZE-RESUME
262 /* ********************** Internal Procedures *********************** */
264 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available B-table-Win _ADM-ROW-AVAILABLE
265 PROCEDURE adm-row-available :
266 /*------------------------------------------------------------------------------
267 Purpose: Dispatched to this procedure when the record-
268 source has a new row available. This procedure
269 tries to get the new row and display it.
270 Parameters: <none>
271 ------------------------------------------------------------------------------*/
273 /* ADM-ROW-AVAILABLE does nothing because there are no External
274 Tables specified for this SmartBrowser.
275 (See 'Procedure Settings' dialog to set External Tables.) */
277 END PROCEDURE.
279 /* _UIB-CODE-BLOCK-END */
280 &ANALYZE-RESUME
283 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI B-table-Win _DEFAULT-DISABLE
284 PROCEDURE disable_UI :
285 /*------------------------------------------------------------------------------
286 Purpose: DISABLE the User Interface
287 Parameters: <none>
288 Notes: Here we clean-up the user-interface by deleting
289 dynamic widgets we have created and/or hide
290 frames. This procedure is usually called when
291 we are ready to "clean-up" after running.
292 ------------------------------------------------------------------------------*/
293 /* Hide all frames. */
294 HIDE FRAME F-Main.
295 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
296 END PROCEDURE.
298 /* _UIB-CODE-BLOCK-END */
299 &ANALYZE-RESUME
302 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records B-table-Win _ADM-SEND-RECORDS
303 PROCEDURE send-records :
304 /*------------------------------------------------------------------------------
305 Purpose: Send record ROWID's for all tables used by
306 this file.
307 Parameters: see template/snd-head.i
308 ------------------------------------------------------------------------------*/
310 /* Define variables needed by this internal procedure. */
311 {src/adm/template/snd-head.i}
313 /* For each requested table, put it's ROWID in the output list. */
314 {src/adm/template/snd-list.i "Contact"}
315 {src/adm/template/snd-list.i "Person"}
317 /* Deal with any unexpected table requests before closing. */
318 {src/adm/template/snd-end.i}
320 END PROCEDURE.
322 /* _UIB-CODE-BLOCK-END */
323 &ANALYZE-RESUME
326 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed B-table-Win
327 PROCEDURE state-changed :
328 /* -----------------------------------------------------------
329 Purpose:
330 Parameters: <none>
331 Notes:
332 -------------------------------------------------------------*/
333 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
334 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
336 CASE p-state:
337 /* Object instance CASEs can go here to replace standard behavior
338 or add new cases. */
339 {src/adm/template/bstates.i}
340 END CASE.
341 END PROCEDURE.
343 /* _UIB-CODE-BLOCK-END */
344 &ANALYZE-RESUME