Changes for Catalyst APMS. Added PDF checkboxes to screens the generate remittance...
[capital-apms-progress.git] / vwr / mnt / v-expctc.w
blobe0d10957d30c757431f4811d9d8e07974a93f5ff
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 V-table-Win
8 /*------------------------------------------------------------------------
10 File:
12 Description: from VIEWER.W - Template for SmartViewer Objects
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 &SCOPED-DEFINE REPORT-ID "Contact Export"
40 DEF VAR cty-list AS CHAR NO-UNDO.
41 DEF VAR pty-list AS CHAR NO-UNDO.
43 /* _UIB-CODE-BLOCK-END */
44 &ANALYZE-RESUME
47 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
49 /* ******************** Preprocessor Definitions ******************** */
51 &Scoped-define PROCEDURE-TYPE SmartViewer
53 &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target
55 /* Name of first Frame and/or Browse and/or first Query */
56 &Scoped-define FRAME-NAME F-Main
58 /* External Tables */
59 &Scoped-define EXTERNAL-TABLES RP
60 &Scoped-define FIRST-EXTERNAL-TABLE RP
63 /* Need to scope the external tables to this procedure */
64 DEFINE QUERY external_tables FOR RP.
65 /* Standard List Definitions */
66 &Scoped-Define ENABLED-FIELDS RP.Char1 RP.Char6 RP.Log5 RP.Log4 RP.Char5
67 &Scoped-define FIELD-PAIRS~
68 ~{&FP1}Char5 ~{&FP2}Char5 ~{&FP3}
69 &Scoped-define ENABLED-TABLES RP
70 &Scoped-define FIRST-ENABLED-TABLE RP
71 &Scoped-Define ENABLED-OBJECTS RECT-28 cmb_PostalType-1 cmb_PostalType-2 ~
72 cmb_PostalType-3 btn_browse btn_export btn_cancel
73 &Scoped-Define DISPLAYED-FIELDS RP.Char1 RP.Char6 RP.Log5 RP.Log4 RP.Char5
74 &Scoped-Define DISPLAYED-OBJECTS cmb_PostalType-1 cmb_PostalType-2 ~
75 cmb_PostalType-3
77 /* Custom List Definitions */
78 /* ADM-CREATE-FIELDS,ADM-ASSIGN-FIELDS,List-3,List-4,List-5,List-6 */
80 /* _UIB-PREPROCESSOR-BLOCK-END */
81 &ANALYZE-RESUME
85 /* *********************** Control Definitions ********************** */
88 /* Definitions of the field level widgets */
89 DEFINE BUTTON btn_browse
90 LABEL "&Browse"
91 SIZE 10 BY 1.05
92 FONT 9.
94 DEFINE BUTTON btn_cancel
95 LABEL "&Cancel"
96 SIZE 10 BY 1.05
97 FONT 9.
99 DEFINE BUTTON btn_export
100 LABEL "&Export"
101 SIZE 10 BY 1.05
102 FONT 9.
104 DEFINE VARIABLE cmb_PostalType-1 AS CHARACTER FORMAT "X(256)":U
105 LABEL "First"
106 VIEW-AS COMBO-BOX INNER-LINES 10
107 LIST-ITEMS "Item 1"
108 SIZE 30.29 BY 1 NO-UNDO.
110 DEFINE VARIABLE cmb_PostalType-2 AS CHARACTER FORMAT "X(256)":U
111 LABEL "Second"
112 VIEW-AS COMBO-BOX INNER-LINES 10
113 LIST-ITEMS "Item 1"
114 SIZE 30.29 BY 1 NO-UNDO.
116 DEFINE VARIABLE cmb_PostalType-3 AS CHARACTER FORMAT "X(256)":U
117 LABEL "Third"
118 VIEW-AS COMBO-BOX INNER-LINES 10
119 LIST-ITEMS "Item 1"
120 SIZE 30.29 BY 1 NO-UNDO.
122 DEFINE RECTANGLE RECT-28
123 EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
124 SIZE 76 BY 19.5.
127 /* ************************ Frame Definitions *********************** */
129 DEFINE FRAME F-Main
130 RP.Char1 AT ROW 2.5 COL 3.29 HELP
131 "" NO-LABEL
132 VIEW-AS SELECTION-LIST MULTIPLE SCROLLBAR-VERTICAL
133 SIZE 36 BY 17.5
134 RP.Char6 AT ROW 2.9 COL 45.29 HELP
135 "" NO-LABEL
136 VIEW-AS RADIO-SET VERTICAL
137 RADIO-BUTTONS
138 "Original Style", "Standard":U,
139 "For sending to another system", "Transfer":U,
140 "For loading into Outlook 97", "Outlook97":U
141 SIZE 30 BY 2.4
142 cmb_PostalType-1 AT ROW 9.9 COL 43.86 COLON-ALIGNED
143 cmb_PostalType-2 AT ROW 11.3 COL 43.86 COLON-ALIGNED
144 cmb_PostalType-3 AT ROW 12.7 COL 43.86 COLON-ALIGNED
145 RP.Log5 AT ROW 16.1 COL 45.86
146 LABEL "Split address into separate lines"
147 VIEW-AS TOGGLE-BOX
148 SIZE 25.72 BY 1
149 RP.Log4 AT ROW 17.6 COL 45.86
150 LABEL "Include 'No Mailout' contacts"
151 VIEW-AS TOGGLE-BOX
152 SIZE 24.29 BY .85
153 RP.Char5 AT ROW 21 COL 7.57 COLON-ALIGNED NO-LABEL FORMAT "X(256)"
154 VIEW-AS FILL-IN
155 SIZE 30.86 BY 1
156 btn_browse AT ROW 21 COL 41
157 btn_export AT ROW 21 COL 56.43
158 btn_cancel AT ROW 21 COL 67.29
159 RECT-28 AT ROW 1 COL 1.57
160 "Contact Types" VIEW-AS TEXT
161 SIZE 14.86 BY 1 AT ROW 1.5 COL 3.29
162 FONT 14
163 "Postal Types" VIEW-AS TEXT
164 SIZE 13.72 BY 1 AT ROW 8.5 COL 41.29
165 FONT 14
166 "Export To:" VIEW-AS TEXT
167 SIZE 8 BY 1 AT ROW 21 COL 1.57
168 FONT 10
169 WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
170 SIDE-LABELS NO-UNDERLINE THREE-D
171 AT COL 1 ROW 1 SCROLLABLE
172 FONT 10
173 DEFAULT-BUTTON btn_export.
176 /* *********************** Procedure Settings ************************ */
178 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
179 /* Settings for THIS-PROCEDURE
180 Type: SmartViewer
181 External Tables: TTPL.RP
182 Allow: Basic,DB-Fields
183 Frames: 1
184 Add Fields to: EXTERNAL-TABLES
185 Other Settings: PERSISTENT-ONLY COMPILE
188 /* This procedure should always be RUN PERSISTENT. Report the error, */
189 /* then cleanup and return. */
190 IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
191 MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT."
192 VIEW-AS ALERT-BOX ERROR BUTTONS OK.
193 RETURN.
194 END.
196 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
198 /* ************************* Create Window ************************** */
200 &ANALYZE-SUSPEND _CREATE-WINDOW
201 /* DESIGN Window definition (used by the UIB)
202 CREATE WINDOW V-table-Win ASSIGN
203 HEIGHT = 22.1
204 WIDTH = 81.57.
205 /* END WINDOW DEFINITION */
207 &ANALYZE-RESUME
210 /* *************** Runtime Attributes and UIB Settings ************** */
212 &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
213 /* SETTINGS FOR WINDOW V-table-Win
214 VISIBLE,,RUN-PERSISTENT */
215 /* SETTINGS FOR FRAME F-Main
216 NOT-VISIBLE Size-to-Fit */
217 ASSIGN
218 FRAME F-Main:SCROLLABLE = FALSE
219 FRAME F-Main:HIDDEN = TRUE.
221 /* SETTINGS FOR SELECTION-LIST RP.Char1 IN FRAME F-Main
222 EXP-HELP */
223 /* SETTINGS FOR FILL-IN RP.Char5 IN FRAME F-Main
224 EXP-LABEL EXP-FORMAT */
225 /* SETTINGS FOR RADIO-SET RP.Char6 IN FRAME F-Main
226 EXP-HELP */
227 /* SETTINGS FOR TOGGLE-BOX RP.Log4 IN FRAME F-Main
228 EXP-LABEL */
229 /* SETTINGS FOR TOGGLE-BOX RP.Log5 IN FRAME F-Main
230 EXP-LABEL */
231 /* _RUN-TIME-ATTRIBUTES-END */
232 &ANALYZE-RESUME
235 /* Setting information for Queries and Browse Widgets fields */
237 &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
238 /* Query rebuild information for FRAME F-Main
239 _Options = "NO-LOCK"
240 _Query is NOT OPENED
241 */ /* FRAME F-Main */
242 &ANALYZE-RESUME
247 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB V-table-Win
248 /* ************************* Included-Libraries *********************** */
250 {src/adm/method/viewer.i}
251 {inc/method/m-mntvwr.i}
253 /* _UIB-CODE-BLOCK-END */
254 &ANALYZE-RESUME
259 /* ************************ Control Triggers ************************ */
261 &Scoped-define SELF-NAME btn_browse
262 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_browse V-table-Win
263 ON CHOOSE OF btn_browse IN FRAME F-Main /* Browse */
264 DO:
265 RUN browse-file.
266 END.
268 /* _UIB-CODE-BLOCK-END */
269 &ANALYZE-RESUME
272 &Scoped-define SELF-NAME btn_cancel
273 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_cancel V-table-Win
274 ON CHOOSE OF btn_cancel IN FRAME F-Main /* Cancel */
276 RUN dispatch( 'exit':U ).
277 END.
279 /* _UIB-CODE-BLOCK-END */
280 &ANALYZE-RESUME
283 &Scoped-define SELF-NAME btn_export
284 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL btn_export V-table-Win
285 ON CHOOSE OF btn_export IN FRAME F-Main /* Export */
287 SELF:SENSITIVE = No.
288 RUN export-contacts.
289 SELF:SENSITIVE = Yes.
290 RUN dispatch( 'exit':U ).
291 END.
293 /* _UIB-CODE-BLOCK-END */
294 &ANALYZE-RESUME
297 &Scoped-define SELF-NAME RP.Char6
298 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL RP.Char6 V-table-Win
299 ON VALUE-CHANGED OF RP.Char6 IN FRAME F-Main /* Char6 */
301 RUN export-style-changed.
302 END.
304 /* _UIB-CODE-BLOCK-END */
305 &ANALYZE-RESUME
308 &Scoped-define SELF-NAME cmb_PostalType-1
309 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_PostalType-1 V-table-Win
310 ON U1 OF cmb_PostalType-1 IN FRAME F-Main /* First */
312 {inc/selcmb/scpdt1.i "RP" "Char2"}
313 END.
315 /* _UIB-CODE-BLOCK-END */
316 &ANALYZE-RESUME
319 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_PostalType-1 V-table-Win
320 ON U2 OF cmb_PostalType-1 IN FRAME F-Main /* First */
322 {inc/selcmb/scpdt2.i "RP" "Char2"}
323 END.
325 /* _UIB-CODE-BLOCK-END */
326 &ANALYZE-RESUME
329 &Scoped-define SELF-NAME cmb_PostalType-2
330 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_PostalType-2 V-table-Win
331 ON U1 OF cmb_PostalType-2 IN FRAME F-Main /* Second */
333 {inc/selcmb/scpdt1.i "RP" "Char3"}
334 END.
336 /* _UIB-CODE-BLOCK-END */
337 &ANALYZE-RESUME
340 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_PostalType-2 V-table-Win
341 ON U2 OF cmb_PostalType-2 IN FRAME F-Main /* Second */
343 {inc/selcmb/scpdt2.i "RP" "Char3"}
344 END.
346 /* _UIB-CODE-BLOCK-END */
347 &ANALYZE-RESUME
350 &Scoped-define SELF-NAME cmb_PostalType-3
351 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_PostalType-3 V-table-Win
352 ON U1 OF cmb_PostalType-3 IN FRAME F-Main /* Third */
354 {inc/selcmb/scpdt1.i "RP" "Char4"}
355 END.
357 /* _UIB-CODE-BLOCK-END */
358 &ANALYZE-RESUME
361 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL cmb_PostalType-3 V-table-Win
362 ON U2 OF cmb_PostalType-3 IN FRAME F-Main /* Third */
364 {inc/selcmb/scpdt2.i "RP" "Char4"}
365 END.
367 /* _UIB-CODE-BLOCK-END */
368 &ANALYZE-RESUME
371 &UNDEFINE SELF-NAME
373 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK V-table-Win
376 /* *************************** Main Block *************************** */
378 /* _UIB-CODE-BLOCK-END */
379 &ANALYZE-RESUME
382 /* ********************** Internal Procedures *********************** */
384 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available V-table-Win _ADM-ROW-AVAILABLE
385 PROCEDURE adm-row-available :
386 /*------------------------------------------------------------------------------
387 Purpose: Dispatched to this procedure when the Record-
388 Source has a new row available. This procedure
389 tries to get the new row (or foriegn keys) from
390 the Record-Source and process it.
391 Parameters: <none>
392 ------------------------------------------------------------------------------*/
394 /* Define variables needed by this internal procedure. */
395 {src/adm/template/row-head.i}
397 /* Create a list of all the tables that we need to get. */
398 {src/adm/template/row-list.i "RP"}
400 /* Get the record ROWID's from the RECORD-SOURCE. */
401 {src/adm/template/row-get.i}
403 /* FIND each record specified by the RECORD-SOURCE. */
404 {src/adm/template/row-find.i "RP"}
406 /* Process the newly available records (i.e. display fields,
407 open queries, and/or pass records on to any RECORD-TARGETS). */
408 {src/adm/template/row-end.i}
410 END PROCEDURE.
412 /* _UIB-CODE-BLOCK-END */
413 &ANALYZE-RESUME
416 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE browse-file V-table-Win
417 PROCEDURE browse-file :
418 /*------------------------------------------------------------------------------
419 Purpose:
420 Parameters: <none>
421 Notes:
422 ------------------------------------------------------------------------------*/
424 DEF VAR save-as AS CHAR NO-UNDO.
425 DEF VAR file-chosen AS LOGI NO-UNDO.
427 save-as = INPUT FRAME {&FRAME-NAME} RP.Char5.
428 IF LENGTH( save-as ) > 0 THEN
429 IF LOOKUP( SUBSTR( save-as, LENGTH( save-as ), 1 ), "\,/" ) <> 0 THEN save-as = "".
431 SYSTEM-DIALOG GET-FILE save-as
432 TITLE "Export Contacts to file"
433 FILTERS "Text Files (*.txt *.csv)" "*.txt,*.csv"
434 DEFAULT-EXTENSION ".csv"
435 SAVE-AS
436 RETURN-TO-START-DIR
437 USE-FILENAME
438 UPDATE file-chosen.
440 IF file-chosen THEN RP.Char5:SCREEN-VALUE IN FRAME {&FRAME-NAME} =
441 save-as.
443 END PROCEDURE.
445 /* _UIB-CODE-BLOCK-END */
446 &ANALYZE-RESUME
449 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI V-table-Win _DEFAULT-DISABLE
450 PROCEDURE disable_UI :
451 /*------------------------------------------------------------------------------
452 Purpose: DISABLE the User Interface
453 Parameters: <none>
454 Notes: Here we clean-up the user-interface by deleting
455 dynamic widgets we have created and/or hide
456 frames. This procedure is usually called when
457 we are ready to "clean-up" after running.
458 ------------------------------------------------------------------------------*/
459 /* Hide all frames. */
460 HIDE FRAME F-Main.
461 IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
462 END PROCEDURE.
464 /* _UIB-CODE-BLOCK-END */
465 &ANALYZE-RESUME
468 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE export-contacts V-table-Win
469 PROCEDURE export-contacts :
470 /*------------------------------------------------------------------------------
471 Purpose:
472 Parameters: <none>
473 Notes:
474 ------------------------------------------------------------------------------*/
475 DEF VAR report-options AS CHAR NO-UNDO.
477 IF INPUT FRAME {&FRAME-NAME} RP.Char5 = "" OR
478 INPUT FRAME {&FRAME-NAME} RP.Char5 = "" THEN
480 MESSAGE "You must choose a file to export to!" VIEW-AS ALERT-BOX ERROR
481 TITLE "No file name chosen".
482 RUN browse-file.
483 RETURN.
484 END.
486 RUN dispatch( 'update-record':U ).
487 RUN get-cty-list.
488 RUN get-pty-list.
490 report-options = "ExportFor,CONTACT"
491 + "~nContactTypes," + cty-list
492 + "~nFileName," + RP.Char5
493 + "~nAddressTypes," + pty-list
494 + (IF RP.Log5 THEN "~nSplitAddress" ELSE "")
495 + (IF RP.Log4 THEN "~nIncludeNoMailout" ELSE "")
496 + "~nStyle," + RP.Char6 .
498 RUN notify( 'set-busy, CONTAINER-SOURCE':U ).
499 IF RP.Char6 = "Transfer" THEN
500 RUN process/export/dump-contacts.p ( report-options ).
501 ELSE
502 RUN process/export/contacts.p ( report-options ).
503 RUN notify( 'set-idle, CONTAINER-SOURCE':U ).
505 MESSAGE "Export Complete" VIEW-AS ALERT-BOX INFORMATION TITLE "Done".
507 END PROCEDURE.
509 /* _UIB-CODE-BLOCK-END */
510 &ANALYZE-RESUME
513 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE export-style-changed V-table-Win
514 PROCEDURE export-style-changed :
515 /*------------------------------------------------------------------------------
516 Purpose:
517 ------------------------------------------------------------------------------*/
518 DO WITH FRAME {&FRAME-NAME}:
519 CASE INPUT RP.Char6:
520 WHEN "Transfer" THEN
521 DISABLE cmb_PostalType-1 cmb_PostalType-2 cmb_PostalType-3 RP.Log5 .
522 WHEN "Outlook97" THEN
523 DISABLE cmb_PostalType-1 cmb_PostalType-2 cmb_PostalType-3 RP.Log5 .
524 OTHERWISE
525 ENABLE cmb_PostalType-1 cmb_PostalType-2 cmb_PostalType-3 RP.Log5 .
526 END.
527 END.
528 END PROCEDURE.
530 /* _UIB-CODE-BLOCK-END */
531 &ANALYZE-RESUME
534 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-cty-list V-table-Win
535 PROCEDURE get-cty-list :
536 /*------------------------------------------------------------------------------
537 Purpose:
538 Parameters: <none>
539 Notes:
540 ------------------------------------------------------------------------------*/
542 DEF VAR delim AS CHAR NO-UNDO.
543 DEF VAR sv AS CHAR NO-UNDO.
544 DEF VAR i AS INT NO-UNDO.
546 cty-list = "".
547 delim = RP.Char1:DELIMITER IN FRAME {&FRAME-NAME}.
548 sv = RP.Char1:SCREEN-VALUE.
550 DO i = 1 TO NUM-ENTRIES( sv, delim ):
551 cty-list = cty-list + IF cty-list = "" THEN "" ELSE ",".
552 cty-list = cty-list + TRIM( ENTRY( 1, ENTRY( i, sv, delim ), "-" ) ).
553 END.
555 END PROCEDURE.
557 /* _UIB-CODE-BLOCK-END */
558 &ANALYZE-RESUME
561 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE get-pty-list V-table-Win
562 PROCEDURE get-pty-list :
563 /*------------------------------------------------------------------------------
564 Purpose:
565 Parameters: <none>
566 Notes:
567 ------------------------------------------------------------------------------*/
569 pty-list = "".
570 IF RP.Char2 <> "" THEN pty-list = TRIM( pty-list + "," + RP.Char2, "," ).
571 IF RP.Char3 <> "" THEN pty-list = TRIM( pty-list + "," + RP.Char3, "," ).
572 IF RP.Char4 <> "" THEN pty-list = TRIM( pty-list + "," + RP.Char4, "," ).
574 END PROCEDURE.
576 /* _UIB-CODE-BLOCK-END */
577 &ANALYZE-RESUME
580 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-enable-fields V-table-Win
581 PROCEDURE inst-enable-fields :
582 /*------------------------------------------------------------------------------
583 Purpose:
584 ------------------------------------------------------------------------------*/
585 RUN export-style-changed.
586 END PROCEDURE.
588 /* _UIB-CODE-BLOCK-END */
589 &ANALYZE-RESUME
592 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-initialize V-table-Win
593 PROCEDURE inst-initialize :
594 /*------------------------------------------------------------------------------
595 Purpose:
596 Parameters: <none>
597 Notes:
598 ------------------------------------------------------------------------------*/
600 DEF VAR user-name AS CHAR NO-UNDO.
602 RUN get-username IN sys-mgr( OUTPUT user-name ).
603 RUN update-contact-types.
605 FIND RP WHERE
606 RP.UserName = user-name AND
607 RP.ReportID = {&REPORT-ID} NO-ERROR.
609 IF NOT AVAILABLE RP THEN
610 DO WITH FRAME {&FRAME-NAME}:
612 CREATE RP.
613 ASSIGN
614 RP.ReportID = {&REPORT-ID}
615 RP.UserName = user-name
616 RP.Char2 = "MAIN"
617 RP.Char3 = "POST".
618 END.
620 RUN dispatch( 'row-changed':U ).
621 RUN dispatch( 'enable-fields':U ).
623 END PROCEDURE.
625 /* _UIB-CODE-BLOCK-END */
626 &ANALYZE-RESUME
629 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pre-destroy V-table-Win
630 PROCEDURE pre-destroy :
631 /*------------------------------------------------------------------------------
632 Purpose:
633 Parameters: <none>
634 Notes:
635 ------------------------------------------------------------------------------*/
637 RUN check-modified( "CLEAR" ).
639 END PROCEDURE.
641 /* _UIB-CODE-BLOCK-END */
642 &ANALYZE-RESUME
645 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records V-table-Win _ADM-SEND-RECORDS
646 PROCEDURE send-records :
647 /*------------------------------------------------------------------------------
648 Purpose: Send record ROWID's for all tables used by
649 this file.
650 Parameters: see template/snd-head.i
651 ------------------------------------------------------------------------------*/
653 /* Define variables needed by this internal procedure. */
654 {src/adm/template/snd-head.i}
656 /* For each requested table, put it's ROWID in the output list. */
657 {src/adm/template/snd-list.i "RP"}
659 /* Deal with any unexpected table requests before closing. */
660 {src/adm/template/snd-end.i}
662 END PROCEDURE.
664 /* _UIB-CODE-BLOCK-END */
665 &ANALYZE-RESUME
668 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed V-table-Win
669 PROCEDURE state-changed :
670 /* -----------------------------------------------------------
671 Purpose:
672 Parameters: <none>
673 Notes:
674 -------------------------------------------------------------*/
675 DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
676 DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
678 CASE p-state:
679 /* Object instance CASEs can go here to replace standard behavior
680 or add new cases. */
681 {src/adm/template/vstates.i}
682 END CASE.
683 END PROCEDURE.
685 /* _UIB-CODE-BLOCK-END */
686 &ANALYZE-RESUME
689 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE update-contact-types V-table-Win
690 PROCEDURE update-contact-types :
691 /*------------------------------------------------------------------------------
692 Purpose:
693 Parameters: <none>
694 Notes:
695 ------------------------------------------------------------------------------*/
697 DEF VAR item AS CHAR NO-UNDO.
699 FOR EACH ContactType NO-LOCK:
700 item = STRING( ContactType.ContactType, "X(6)" ) + " - " + ContactType.Description.
701 IF RP.Char1:ADD-LAST( item ) IN FRAME {&FRAME-NAME} THEN.
702 END.
704 END PROCEDURE.
706 /* _UIB-CODE-BLOCK-END */
707 &ANALYZE-RESUME