Allow deleting of unreferenced account groups.
[capital-apms-progress.git] / inc / method / m-mntvwr.i
blob568fae7858c63b6cc93cb90c97089ae7e1199045
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Method-Library
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
7 &SCOPED-DEFINE GAP 4
9 /* _UIB-CODE-BLOCK-END */
10 &ANALYZE-RESUME
13 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
15 /* ******************** Preprocessor Definitions ******************** */
19 /* _UIB-PREPROCESSOR-BLOCK-END */
20 &ANALYZE-RESUME
24 /* *********************** Procedure Settings ************************ */
26 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
27 /* Settings for THIS-PROCEDURE
28 Type: Method-Library
29 Allow:
30 Frames: 0
31 Add Fields to: Neither
32 Other Settings: INCLUDE-ONLY
34 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
36 /* ************************* Create Window ************************** */
38 &ANALYZE-SUSPEND _CREATE-WINDOW
39 /* DESIGN Window definition (used by the UIB)
40 CREATE WINDOW Method-Library ASSIGN
41 HEIGHT = .05
42 WIDTH = 43.43.
43 /* END WINDOW DEFINITION */
45 &ANALYZE-RESUME
49 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Method-Library
50 /* ************************* Included-Libraries *********************** */
52 {inc/method/m-drlvwr.i}
54 /* _UIB-CODE-BLOCK-END */
55 &ANALYZE-RESUME
59 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Method-Library
62 /* *************************** Main Block *************************** */
64 /* _UIB-CODE-BLOCK-END */
65 &ANALYZE-RESUME
68 /* ********************** Internal Procedures *********************** */
70 &IF DEFINED(EXCLUDE-apply-event) = 0 &THEN
72 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE apply-event Method-Library
73 PROCEDURE apply-event :
74 /*------------------------------------------------------------------------------
75 Purpose: Applies an event to all widgets matching the given
76 criteria in the current frame
77 Parameters: <none>
78 Notes:
79 ------------------------------------------------------------------------------*/
80 DEF INPUT PARAMETER event AS CHAR NO-UNDO.
81 DEF INPUT PARAMETER prefix AS CHAR NO-UNDO.
82 DEF INPUT PARAMETER type-list AS CHAR NO-UNDO.
84 DEF VAR enabled AS LOGI NO-UNDO.
85 DEF VAR wh AS HANDLE NO-UNDO.
86 wh = FRAME {&FRAME-NAME}:CURRENT-ITERATION.
87 wh = wh:FIRST-CHILD.
89 DO WHILE VALID-HANDLE( wh ):
91 IF wh:NAME BEGINS prefix AND LOOKUP( wh:TYPE, type-list) > 0 THEN
92 DO:
93 enabled = wh:SENSITIVE.
94 wh:SENSITIVE = Yes.
95 APPLY event TO wh.
96 wh:SENSITIVE = enabled.
97 END.
99 wh = wh:NEXT-SIBLING.
101 END.
103 END PROCEDURE.
105 /* _UIB-CODE-BLOCK-END */
106 &ANALYZE-RESUME
108 &ENDIF
110 &IF DEFINED(EXCLUDE-assign-select-combos) = 0 &THEN
112 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE assign-select-combos Method-Library
113 PROCEDURE assign-select-combos :
114 /*------------------------------------------------------------------------------
115 Purpose: Assign the values of all select combo boxes
116 Parameters: <none>
117 Notes:
118 ------------------------------------------------------------------------------*/
120 RUN apply-event( 'U2':U, 'cmb', 'COMBO-BOX,SELECTION-LIST':U ).
122 END PROCEDURE.
124 /* _UIB-CODE-BLOCK-END */
125 &ANALYZE-RESUME
127 &ENDIF
129 &IF DEFINED(EXCLUDE-assign-select-fill-ins) = 0 &THEN
131 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE assign-select-fill-ins Method-Library
132 PROCEDURE assign-select-fill-ins :
133 /*------------------------------------------------------------------------------
134 Purpose: Assign the values of all select fill-ins
135 Parameters: <none>
136 Notes:
137 ------------------------------------------------------------------------------*/
139 RUN apply-event( 'U3':U, 'fil', 'FILL-IN':U ).
141 END PROCEDURE.
143 /* _UIB-CODE-BLOCK-END */
144 &ANALYZE-RESUME
146 &ENDIF
148 &IF DEFINED(EXCLUDE-display-select-combos) = 0 &THEN
150 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE display-select-combos Method-Library
151 PROCEDURE display-select-combos :
152 /*------------------------------------------------------------------------------
153 Purpose: Intialise and display all select combos
154 Parameters: <none>
155 Notes:
156 ------------------------------------------------------------------------------*/
158 RUN apply-event( 'U1':U, 'cmb', 'COMBO-BOX,SELECTION-LIST':U ).
160 END PROCEDURE.
162 /* _UIB-CODE-BLOCK-END */
163 &ANALYZE-RESUME
165 &ENDIF
167 &IF DEFINED(EXCLUDE-display-select-fill-ins) = 0 &THEN
169 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE display-select-fill-ins Method-Library
170 PROCEDURE display-select-fill-ins :
171 /*------------------------------------------------------------------------------
172 Purpose: Intialise and display all select fill-ins
173 Parameters: <none>
174 Notes:
175 ------------------------------------------------------------------------------*/
177 RUN apply-event( 'U1':U, 'fil', 'FILL-IN':U ).
179 END PROCEDURE.
181 /* _UIB-CODE-BLOCK-END */
182 &ANALYZE-RESUME
184 &ENDIF
186 &IF DEFINED(EXCLUDE-local-add-record) = 0 &THEN
188 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-add-record Method-Library
189 PROCEDURE local-add-record :
190 /*------------------------------------------------------------------------------
191 Purpose: Override standard ADM method
192 Notes:
193 ------------------------------------------------------------------------------*/
195 IF INDEX( THIS-PROCEDURE:INTERNAL-ENTRIES, 'override-add-record') > 0 THEN
197 RUN override-add-record IN THIS-PROCEDURE NO-ERROR.
198 END.
199 ELSE DO:
200 /* Dispatch standard ADM method. */
201 RUN dispatch IN THIS-PROCEDURE ( INPUT 'add-record':U ) .
202 RUN inst-add-record IN THIS-PROCEDURE NO-ERROR.
203 END.
205 END PROCEDURE.
207 /* _UIB-CODE-BLOCK-END */
208 &ANALYZE-RESUME
210 &ENDIF
212 &IF DEFINED(EXCLUDE-local-assign-record) = 0 &THEN
214 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-assign-record Method-Library
215 PROCEDURE local-assign-record :
216 /*------------------------------------------------------------------------------
217 Purpose: Override standard ADM method
218 Notes:
219 ------------------------------------------------------------------------------*/
221 /* Dispatch standard ADM method. */
222 RUN dispatch IN THIS-PROCEDURE ( INPUT 'assign-record':U ) .
223 RUN inst-assign-record IN THIS-PROCEDURE NO-ERROR.
225 /* Code placed here will execute AFTER standard behavior. */
227 END PROCEDURE.
229 /* _UIB-CODE-BLOCK-END */
230 &ANALYZE-RESUME
232 &ENDIF
234 &IF DEFINED(EXCLUDE-local-assign-statement) = 0 &THEN
236 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-assign-statement Method-Library
237 PROCEDURE local-assign-statement :
238 /*------------------------------------------------------------------------------
239 Purpose: Override standard ADM method
240 Notes:
241 ------------------------------------------------------------------------------*/
243 /* Code placed here will execute PRIOR to standard behavior. */
244 RUN pre-assign-statement IN THIS-PROCEDURE NO-ERROR.
245 RUN assign-select-fill-ins.
246 RUN assign-select-combos.
248 /* Dispatch standard ADM method. */
249 RUN dispatch IN THIS-PROCEDURE ( INPUT 'assign-statement':U ) .
250 RUN inst-assign-statement IN THIS-PROCEDURE NO-ERROR.
252 /* Code placed here will execute AFTER standard behavior. */
254 END PROCEDURE.
256 /* _UIB-CODE-BLOCK-END */
257 &ANALYZE-RESUME
259 &ENDIF
261 &IF DEFINED(EXCLUDE-local-delete-record) = 0 &THEN
263 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-delete-record Method-Library
264 PROCEDURE local-delete-record :
265 /*------------------------------------------------------------------------------
266 Purpose: Override standard ADM method
267 Notes:
268 ------------------------------------------------------------------------------*/
270 IF INDEX( THIS-PROCEDURE:INTERNAL-ENTRIES, 'override-delete-record') > 0 THEN
271 RUN override-delete-record IN THIS-PROCEDURE NO-ERROR.
272 ELSE DO:
273 RUN inst-delete-record IN THIS-PROCEDURE NO-ERROR.
274 IF RETURN-VALUE = "FAIL":U THEN RETURN ERROR.
276 /* Dispatch standard ADM method. */
277 RUN dispatch IN THIS-PROCEDURE ( INPUT 'delete-record':U ) .
279 /* Code placed here will execute AFTER standard behavior. */
280 CLEAR FRAME {&FRAME-NAME} ALL NO-PAUSE.
282 RUN post-delete-record IN THIS-PROCEDURE NO-ERROR.
283 END.
285 END PROCEDURE.
287 /* _UIB-CODE-BLOCK-END */
288 &ANALYZE-RESUME
290 &ENDIF
292 &IF DEFINED(EXCLUDE-local-destroy) = 0 &THEN
294 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-destroy Method-Library
295 PROCEDURE local-destroy :
296 /*------------------------------------------------------------------------------
297 Purpose: Override standard ADM method
298 Notes:
299 ------------------------------------------------------------------------------*/
301 /* Code placed here will execute PRIOR to standard behavior. */
302 RUN pre-destroy IN THIS-PROCEDURE NO-ERROR.
304 /* Dispatch standard ADM method. */
305 RUN dispatch IN THIS-PROCEDURE ( INPUT 'destroy':U ) .
306 RUN inst-destroy IN THIS-PROCEDURE NO-ERROR.
307 IF VALID-HANDLE( sys-mgr ) THEN
308 RUN remove-node IN sys-mgr( THIS-PROCEDURE ).
310 /* Code placed here will execute AFTER standard behavior. */
312 END PROCEDURE.
314 /* _UIB-CODE-BLOCK-END */
315 &ANALYZE-RESUME
317 &ENDIF
319 &IF DEFINED(EXCLUDE-local-disable-fields) = 0 &THEN
321 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-disable-fields Method-Library
322 PROCEDURE local-disable-fields :
323 /*------------------------------------------------------------------------------
324 Purpose: Override standard ADM method
325 Notes:
326 ------------------------------------------------------------------------------*/
328 /* Code placed here will execute PRIOR to standard behavior. */
330 /* Dispatch standard ADM method. */
331 RUN dispatch IN THIS-PROCEDURE ( INPUT 'disable-fields':U ) .
332 RUN set-link-attributes IN sys-mgr ( THIS-PROCEDURE, "Viewer", "SENSITIVE = No" ).
333 RUN inst-disable-fields IN THIS-PROCEDURE NO-ERROR.
335 /* Code placed here will execute AFTER standard behavior. */
337 END PROCEDURE.
339 /* _UIB-CODE-BLOCK-END */
340 &ANALYZE-RESUME
342 &ENDIF
344 &IF DEFINED(EXCLUDE-sub2-create-objects) = 0 &THEN
346 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE sub2-create-objects Method-Library
347 PROCEDURE sub2-create-objects :
348 /*------------------------------------------------------------------------------
349 Purpose: Master create objects for all maintain viewers
350 Parameters: <none>
351 Notes:
352 ------------------------------------------------------------------------------*/
354 IF VALID-HANDLE( sys-mgr ) THEN
355 RUN add-node IN sys-mgr ( THIS-PROCEDURE ).
357 END PROCEDURE.
359 /* _UIB-CODE-BLOCK-END */
360 &ANALYZE-RESUME
362 &ENDIF
364 &IF DEFINED(EXCLUDE-sub2-display-fields) = 0 &THEN
366 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE sub2-display-fields Method-Library
367 PROCEDURE sub2-display-fields :
368 /*------------------------------------------------------------------------------
369 Purpose: Master display fields for maintenance viewers
370 Notes:
371 ------------------------------------------------------------------------------*/
373 RUN display-select-fill-ins.
374 RUN display-select-combos.
376 END PROCEDURE.
378 /* _UIB-CODE-BLOCK-END */
379 &ANALYZE-RESUME
381 &ENDIF