&ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1 &ANALYZE-RESUME &Scoped-define WINDOW-NAME CURRENT-WINDOW &Scoped-define FRAME-NAME D-Dialog &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS D-Dialog /*------------------------------------------------------------------------ File: Description: from cntnrdlg.w - ADM SmartDialog Template Input Parameters: Output Parameters: Author: Created: ------------------------------------------------------------------------*/ /* This .W file was created with the Progress UIB. */ /*----------------------------------------------------------------------*/ /* Create an unnamed pool to store all the widgets created by this procedure. This is a good default which assures that this procedure's triggers and internal procedures will execute in this procedure's storage, and that proper cleanup will occur on deletion of the procedure. */ CREATE WIDGET-POOL. /* *************************** Definitions ************************** */ /* Parameters Definitions --- */ DEF INPUT-OUTPUT PARAMETER lAlle AS LOG NO-UNDO. /* Local Variable Definitions --- */ /* ---------- Globale Variablen ---------------------------------- */ { v8/globvar.i" " " " "SHARED" } { v8/debivar.i " " " " "SHARED" } { v8/artivar.i " " " " "SHARED" } { v8/contvar.i " " " " "SHARED" } /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK /* ******************** Preprocessor Definitions ******************** */ &Scoped-define PROCEDURE-TYPE SmartDialog &Scoped-define DB-AWARE no &Scoped-define ADM-CONTAINER DIALOG-BOX /* Name of designated FRAME-NAME and/or first browse and/or first query */ &Scoped-define FRAME-NAME D-Dialog /* Standard List Definitions */ &Scoped-Define ENABLED-OBJECTS CB_Auswahl T_Alle Btn_OK Btn_Cancel &Scoped-Define DISPLAYED-OBJECTS T_Alle /* Custom List Definitions */ /* List-1,List-2,List-3,List-4,List-5,List-6 */ &Scoped-define List-6 T_Alle /* _UIB-PREPROCESSOR-BLOCK-END */ &ANALYZE-RESUME /* *********************** Control Definitions ********************** */ /* Define a dialog box */ /* Definitions of the field level widgets */ DEFINE BUTTON Btn_Cancel AUTO-END-KEY DEFAULT LABEL "&Abbrechen" SIZE 16.8 BY 1 BGCOLOR 8 . DEFINE BUTTON Btn_OK AUTO-GO DEFAULT LABEL "OK" SIZE 16.8 BY 1 BGCOLOR 8 . DEFINE VARIABLE CB_Auswahl AS CHARACTER FORMAT "X(256)":U LABEL "Label" VIEW-AS COMBO-BOX INNER-LINES 5 LIST-ITEMS "Kontoauszug","1. Mahnung","2. Mahnung","3. Mahnung","Betreibung" DROP-DOWN-LIST SIZE 56.2 BY 1 BGCOLOR 15 NO-UNDO. DEFINE VARIABLE T_Alle AS LOGICAL INITIAL yes LABEL "ganzer Kunde" VIEW-AS TOGGLE-BOX SIZE 24.6 BY 1 NO-UNDO. /* ************************ Frame Definitions *********************** */ DEFINE FRAME D-Dialog CB_Auswahl AT ROW 2 COL 16 COLON-ALIGNED T_Alle AT ROW 3 COL 18 WIDGET-ID 2 Btn_OK AT ROW 4.52 COL 18 Btn_Cancel AT ROW 4.52 COL 57 SPACE(6.00) SKIP(1.19) WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE TITLE "Allgemeine Auswahl" DEFAULT-BUTTON Btn_OK CANCEL-BUTTON Btn_Cancel. /* *********************** Procedure Settings ************************ */ &ANALYZE-SUSPEND _PROCEDURE-SETTINGS /* Settings for THIS-PROCEDURE Type: SmartDialog Allow: Basic,Browse,DB-Fields,Query,Smart Other Settings: COMPILE */ &ANALYZE-RESUME _END-PROCEDURE-SETTINGS &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB D-Dialog /* ************************* Included-Libraries *********************** */ {src/adm/method/containr.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* *********** Runtime Attributes and AppBuilder Settings *********** */ &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES /* SETTINGS FOR DIALOG-BOX D-Dialog FRAME-NAME */ ASSIGN FRAME D-Dialog:SCROLLABLE = FALSE FRAME D-Dialog:HIDDEN = TRUE. /* SETTINGS FOR COMBO-BOX CB_Auswahl IN FRAME D-Dialog NO-DISPLAY */ /* SETTINGS FOR TOGGLE-BOX T_Alle IN FRAME D-Dialog 6 */ /* _RUN-TIME-ATTRIBUTES-END */ &ANALYZE-RESUME /* Setting information for Queries and Browse Widgets fields */ &ANALYZE-SUSPEND _QUERY-BLOCK DIALOG-BOX D-Dialog /* Query rebuild information for DIALOG-BOX D-Dialog _Options = "SHARE-LOCK" _Query is NOT OPENED */ /* DIALOG-BOX D-Dialog */ &ANALYZE-RESUME /* ************************ Control Triggers ************************ */ &Scoped-define SELF-NAME D-Dialog &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL D-Dialog D-Dialog ON WINDOW-CLOSE OF FRAME D-Dialog /* Allgemeine Auswahl */ DO: /* Add Trigger to equate WINDOW-CLOSE to END-ERROR. */ APPLY "END-ERROR":U TO SELF. END. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &Scoped-define SELF-NAME Btn_OK &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK D-Dialog ON CHOOSE OF Btn_OK IN FRAME D-Dialog /* OK */ DO: DO WITH FRAME {&FRAME-NAME}: ASSIGN {&List-6}. Linkcd = 0. Linknr = LOOKUP(CB_Auswahl:SCREEN-VALUE, CB_Auswahl:LIST-ITEMS, ";") - 1. lAlle = T_Alle. END. END. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &UNDEFINE SELF-NAME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK D-Dialog /* *************************** Main Block *************************** */ DO WITH FRAME {&FRAME-NAME}: CB_Auswahl:DELIMITER = ";". ja = TRUE. DO WHILE ja: ja = CB_Auswahl:DELETE(1). END. CASE Linkcd: WHEN 1 THEN DO: FRAME {&FRAME-NAME}:TITLE = 'Auswahl der Mahnstufe'. CB_Auswahl:LABEL = "Mahnstufe". CB_Auswahl:ADD-LAST("Kontoauszug;1. Mahnung"). CB_Auswahl:ADD-LAST("2. Mahnung;3. Mahnung"). CB_Auswahl:ADD-LAST("Betreibung"). END. END CASE. Linkcd = 99. END. {src/adm/template/dialogmn.i} /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME /* ********************** Internal Procedures *********************** */ &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects D-Dialog _ADM-CREATE-OBJECTS PROCEDURE adm-create-objects : /*------------------------------------------------------------------------------ Purpose: Create handles for all SmartObjects used in this procedure. After SmartObjects are initialized, then SmartLinks are added. Parameters: ------------------------------------------------------------------------------*/ END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available D-Dialog _ADM-ROW-AVAILABLE PROCEDURE adm-row-available : /*------------------------------------------------------------------------------ Purpose: Dispatched to this procedure when the Record- Source has a new row available. This procedure tries to get the new row (or foriegn keys) from the Record-Source and process it. Parameters: ------------------------------------------------------------------------------*/ /* Define variables needed by this internal procedure. */ {src/adm/template/row-head.i} /* Process the newly available records (i.e. display fields, open queries, and/or pass records on to any RECORD-TARGETS). */ {src/adm/template/row-end.i} END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI D-Dialog _DEFAULT-DISABLE PROCEDURE disable_UI : /*------------------------------------------------------------------------------ Purpose: DISABLE the User Interface Parameters: Notes: Here we clean-up the user-interface by deleting dynamic widgets we have created and/or hide frames. This procedure is usually called when we are ready to "clean-up" after running. ------------------------------------------------------------------------------*/ /* Hide all frames. */ HIDE FRAME D-Dialog. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI D-Dialog _DEFAULT-ENABLE PROCEDURE enable_UI : /*------------------------------------------------------------------------------ Purpose: ENABLE the User Interface Parameters: Notes: Here we display/view/enable the widgets in the user-interface. In addition, OPEN all queries associated with each FRAME and BROWSE. These statements here are based on the "Other Settings" section of the widget Property Sheets. ------------------------------------------------------------------------------*/ DISPLAY T_Alle WITH FRAME D-Dialog. ENABLE CB_Auswahl T_Alle Btn_OK Btn_Cancel WITH FRAME D-Dialog. VIEW FRAME D-Dialog. {&OPEN-BROWSERS-IN-QUERY-D-Dialog} END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-view D-Dialog PROCEDURE local-view : /*------------------------------------------------------------------------------ Purpose: Override standard ADM method Notes: ------------------------------------------------------------------------------*/ RUN dispatch IN THIS-PROCEDURE ( INPUT 'view':U ) . CB_Auswahl:SCREEN-VALUE IN FRAME {&FRAME-NAME} = CB_Auswahl:ENTRY(Linknr + 1). T_Alle:SCREEN-VALUE = STRING(lAlle,"yes/no"). T_Alle = Ja. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records D-Dialog _ADM-SEND-RECORDS PROCEDURE send-records : /*------------------------------------------------------------------------------ Purpose: Send record ROWID's for all tables used by this file. Parameters: see template/snd-head.i ------------------------------------------------------------------------------*/ /* SEND-RECORDS does nothing because there are no External Tables specified for this SmartDialog, and there are no tables specified in any contained Browse, Query, or Frame. */ END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed D-Dialog PROCEDURE state-changed : /* ----------------------------------------------------------- Purpose: Parameters: Notes: -------------------------------------------------------------*/ DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO. DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO. END PROCEDURE. /* _UIB-CODE-BLOCK-END */ &ANALYZE-RESUME