Really, this should be it, for the passing income.
[capital-apms-progress.git] / forecast / b-prop-fc-type.w
blobabf764970b5f4a39a3929d07b44c66aefe53c6cf
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 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:
14 ------------------------------------------------------------------------*/
16 CREATE WIDGET-POOL.
18 /* *************************** Definitions ************************** */
20 /* _UIB-CODE-BLOCK-END */
21 &ANALYZE-RESUME
24 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
26 /* ******************** Preprocessor Definitions ******************** */
28 &Scoped-define PROCEDURE-TYPE SmartBrowser
30 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
32 /* Name of first Frame and/or Browse and/or first Query */
33 &Scoped-define FRAME-NAME F-Main
34 &Scoped-define BROWSE-NAME br_table
36 /* Internal Tables (found by Frame, Query & Browse Queries) */
37 &Scoped-define INTERNAL-TABLES PropForecastType
39 /* Define KEY-PHRASE in case it is used by any query. */
40 &Scoped-define KEY-PHRASE TRUE
42 /* Definitions for BROWSE br_table */
43 &Scoped-define FIELDS-IN-QUERY-br_table PropForecastType.PropForecastType ~
44 PropForecastType.Description
45 &Scoped-define ENABLED-FIELDS-IN-QUERY-br_table ~
46 PropForecastType.PropForecastType PropForecastType.Description
47 &Scoped-define FIELD-PAIRS-IN-QUERY-br_table~
48 ~{&FP1}PropForecastType ~{&FP2}PropForecastType ~{&FP3}~
49 ~{&FP1}Description ~{&FP2}Description ~{&FP3}
50 &Scoped-define ENABLED-TABLES-IN-QUERY-br_table PropForecastType
51 &Scoped-define FIRST-ENABLED-TABLE-IN-QUERY-br_table PropForecastType
52 &Scoped-define OPEN-QUERY-br_table OPEN QUERY br_table FOR EACH PropForecastType WHERE ~{&KEY-PHRASE} NO-LOCK ~
53 ~{&SORTBY-PHRASE}.
54 &Scoped-define TABLES-IN-QUERY-br_table PropForecastType
55 &Scoped-define FIRST-TABLE-IN-QUERY-br_table PropForecastType
58 /* Definitions for FRAME F-Main */
60 /* Standard List Definitions */
61 &Scoped-Define ENABLED-OBJECTS br_table
63 /* Custom List Definitions */
64 /* List-1,List-2,List-3,List-4,List-5,List-6 */
66 /* _UIB-PREPROCESSOR-BLOCK-END */
67 &ANALYZE-RESUME
70 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" B-table-Win _INLINE
71 /* Actions: ? adm/support/keyedit.w ? ? ? */
72 /* STRUCTURED-DATA
73 <KEY-OBJECT>
74 &BROWSE-NAME
75 </KEY-OBJECT>
76 <FOREIGN-KEYS></FOREIGN-KEYS>
77 <EXECUTING-CODE>
78 **************************
79 * Set attributes related to FOREIGN KEYS
81 RUN set-attribute-list (
82 'Keys-Accepted = ,
83 Keys-Supplied = ':U).
85 /* Tell the ADM to use the OPEN-QUERY-CASES. */
86 &Scoped-define OPEN-QUERY-CASES RUN dispatch ('open-query-cases':U).
87 /**************************
88 </EXECUTING-CODE> */
89 /* _UIB-CODE-BLOCK-END */
90 &ANALYZE-RESUME
92 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Advanced Query Options" B-table-Win _INLINE
93 /* Actions: ? adm/support/advqedit.w ? ? ? */
94 /* STRUCTURED-DATA
95 <KEY-OBJECT>
96 &BROWSE-NAME
97 </KEY-OBJECT>
98 <SORTBY-OPTIONS>
99 </SORTBY-OPTIONS>
100 <SORTBY-RUN-CODE>
101 ************************
102 * Set attributes related to SORTBY-OPTIONS */
103 RUN set-attribute-list (
104 'SortBy-Options = ""':U).
105 /************************
106 </SORTBY-RUN-CODE>
107 <FILTER-ATTRIBUTES>
108 </FILTER-ATTRIBUTES> */
110 /* _UIB-CODE-BLOCK-END */
111 &ANALYZE-RESUME
114 /* *********************** Control Definitions ********************** */
117 /* Definitions of the field level widgets */
118 /* Query definitions */
119 &ANALYZE-SUSPEND
120 DEFINE QUERY br_table FOR
121 PropForecastType SCROLLING.
122 &ANALYZE-RESUME
124 /* Browse definitions */
125 DEFINE BROWSE br_table
126 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br_table B-table-Win _STRUCTURED
127 QUERY br_table NO-LOCK DISPLAY
128 PropForecastType.PropForecastType COLUMN-LABEL "Type"
129 PropForecastType.Description
130 ENABLE
131 PropForecastType.PropForecastType
132 PropForecastType.Description
133 /* _UIB-CODE-BLOCK-END */
134 &ANALYZE-RESUME
135 WITH NO-ASSIGN NO-ROW-MARKERS SEPARATORS SIZE 52.57 BY 9.4
136 BGCOLOR 15 .
139 /* ************************ Frame Definitions *********************** */
141 DEFINE FRAME F-Main
142 br_table AT ROW 1 COL 1
143 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
144 SIDE-LABELS NO-UNDERLINE THREE-D
145 AT COL 1 ROW 1 SCROLLABLE
146 BGCOLOR 8 FGCOLOR 0 .
149 /* *********************** Procedure Settings ************************ */
151 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
152 /* Settings for THIS-PROCEDURE
153 Type: SmartBrowser
154 Allow: Basic,Browse
155 Frames: 1
156 Add Fields to: EXTERNAL-TABLES
157 Other Settings: PERSISTENT-ONLY COMPILE
160 /* This procedure should always be RUN PERSISTENT. Report the error, */
161 /* then cleanup and return. */
162 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
163 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
164 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
165 RETURN.
166 END.
168 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
170 /* ************************* Create Window ************************** */
172 &ANALYZE-SUSPEND _CREATE-WINDOW
173 /* DESIGN Window definition (used by the UIB)
174 CREATE WINDOW B-table-Win ASSIGN
175 HEIGHT = 11
176 WIDTH = 57.14.
177 /* END WINDOW DEFINITION */
179 &ANALYZE-RESUME
182 /* *************** Runtime Attributes and UIB Settings ************** */
184 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
185 /* SETTINGS FOR WINDOW B-table-Win
186 NOT-VISIBLE,,RUN-PERSISTENT */
187 /* SETTINGS FOR FRAME F-Main
188 NOT-VISIBLE Size-to-Fit */
189 /* BROWSE-TAB br_table 1 F-Main */
190 ASSIGN
191 FRAME F-Main:SCROLLABLE = FALSE
192 FRAME F-Main:HIDDEN = TRUE.
194 /* _RUN-TIME-ATTRIBUTES-END */
195 &ANALYZE-RESUME
198 /* Setting information for Queries and Browse Widgets fields */
200 &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br_table
201 /* Query rebuild information for BROWSE br_table
202 _TblList = "TTPL.PropForecastType"
203 _Options = "NO-LOCK KEY-PHRASE SORTBY-PHRASE"
204 _FldNameList[1] > TTPL.PropForecastType.PropForecastType
205 "PropForecastType" "Type" ? "character" ? ? ? ? ? ? yes ?
206 _FldNameList[2] > TTPL.PropForecastType.Description
207 "Description" ? ? "character" ? ? ? ? ? ? yes ?
208 _Query is NOT OPENED
209 */ /* BROWSE br_table */
210 &ANALYZE-RESUME
212 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
213 /* Query rebuild information for FRAME F-Main
214 _Options = "NO-LOCK"
215 _Query is NOT OPENED
216 */ /* FRAME F-Main */
217 &ANALYZE-RESUME
222 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB B-table-Win
223 /* ************************* Included-Libraries *********************** */
225 {src/adm/method/browser.i}
226 {inc/method/m-drlvwr.i}
228 /* _UIB-CODE-BLOCK-END */
229 &ANALYZE-RESUME
234 /* ************************ Control Triggers ************************ */
236 &Scoped-define BROWSE-NAME br_table
237 &Scoped-define SELF-NAME br_table
238 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
239 ON ROW-ENTRY OF br_table IN FRAME F-Main
241 /* This code displays initial values for newly added or copied rows. */
242 {src/adm/template/brsentry.i}
243 END.
245 /* _UIB-CODE-BLOCK-END */
246 &ANALYZE-RESUME
249 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table B-table-Win
250 ON ROW-LEAVE OF br_table IN FRAME F-Main
252 /* Do not disable this code or no updates will take place except
253 by pressing the Save button on an Update SmartPanel. */
254 {src/adm/template/brsleave.i}
255 END.
257 /* _UIB-CODE-BLOCK-END */
258 &ANALYZE-RESUME
261 &UNDEFINE SELF-NAME
263 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win
266 /* *************************** Main Block *************************** */
268 &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
269 RUN dispatch IN THIS-PROCEDURE ('initialize':U).
270 &ENDIF
272 /* _UIB-CODE-BLOCK-END */
273 &ANALYZE-RESUME
276 /* ********************** Internal Procedures *********************** */
278 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-open-query-cases B-table-Win adm/support/_adm-opn.p
279 PROCEDURE adm-open-query-cases :
280 /*------------------------------------------------------------------------------
281 Purpose: Opens different cases of the query based on attributes
282 such as the 'Key-Name', or 'SortBy-Case'
283 Parameters: <none>
284 ------------------------------------------------------------------------------*/
286 /* No Foreign keys are accepted by this SmartObject. */
288 {&OPEN-QUERY-{&BROWSE-NAME}}
290 END PROCEDURE.
292 /* _UIB-CODE-BLOCK-END */
293 &ANALYZE-RESUME
296 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available B-table-Win _ADM-ROW-AVAILABLE
297 PROCEDURE adm-row-available :
298 /*------------------------------------------------------------------------------
299 Purpose: Dispatched to this procedure when the Record-
300 Source has a new row available. This procedure
301 tries to get the new row (or foriegn keys) from
302 the Record-Source and process it.
303 Parameters: <none>
304 ------------------------------------------------------------------------------*/
306 /* Define variables needed by this internal procedure. */
307 {src/adm/template/row-head.i}
309 /* Process the newly available records (i.e. display fields,
310 open queries, and/or pass records on to any RECORD-TARGETS). */
311 {src/adm/template/row-end.i}
313 END PROCEDURE.
315 /* _UIB-CODE-BLOCK-END */
316 &ANALYZE-RESUME
319 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI B-table-Win _DEFAULT-DISABLE
320 PROCEDURE disable_UI :
321 /*------------------------------------------------------------------------------
322 Purpose: DISABLE the User Interface
323 Parameters: <none>
324 Notes: Here we clean-up the user-interface by deleting
325 dynamic widgets we have created and/or hide
326 frames. This procedure is usually called when
327 we are ready to "clean-up" after running.
328 ------------------------------------------------------------------------------*/
329 /* Hide all frames. */
330 HIDE FRAME F-Main.
331 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
332 END PROCEDURE.
334 /* _UIB-CODE-BLOCK-END */
335 &ANALYZE-RESUME
338 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-key B-table-Win adm/support/_key-snd.p
339 PROCEDURE send-key :
340 /*------------------------------------------------------------------------------
341 Purpose: Sends a requested KEY value back to the calling
342 SmartObject.
343 Parameters: <see adm/template/sndkytop.i>
344 ------------------------------------------------------------------------------*/
346 /* There are no foreign keys supplied by this SmartObject. */
348 END PROCEDURE.
350 /* _UIB-CODE-BLOCK-END */
351 &ANALYZE-RESUME
354 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records B-table-Win _ADM-SEND-RECORDS
355 PROCEDURE send-records :
356 /*------------------------------------------------------------------------------
357 Purpose: Send record ROWID's for all tables used by
358 this file.
359 Parameters: see template/snd-head.i
360 ------------------------------------------------------------------------------*/
362 /* Define variables needed by this internal procedure. */
363 {src/adm/template/snd-head.i}
365 /* For each requested table, put it's ROWID in the output list. */
366 {src/adm/template/snd-list.i "PropForecastType"}
368 /* Deal with any unexpected table requests before closing. */
369 {src/adm/template/snd-end.i}
371 END PROCEDURE.
373 /* _UIB-CODE-BLOCK-END */
374 &ANALYZE-RESUME
377 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed B-table-Win
378 PROCEDURE state-changed :
379 /* -----------------------------------------------------------
380 Purpose:
381 Parameters: <none>
382 Notes:
383 -------------------------------------------------------------*/
384 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
385 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
387 CASE p-state:
388 /* Object instance CASEs can go here to replace standard behavior
389 or add new cases. */
390 {src/adm/template/bstates.i}
391 END CASE.
392 END PROCEDURE.
394 /* _UIB-CODE-BLOCK-END */
395 &ANALYZE-RESUME