| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484 |
- &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
- &ANALYZE-RESUME
- &Scoped-define WINDOW-NAME CURRENT-WINDOW
- &Scoped-define FRAME-NAME dMahntexte
- {adecomm/appserv.i}
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dMahntexte
- /*------------------------------------------------------------------------
- File:
- Description: from cntnrdlg.w - ADM2 SmartDialog Template
- Input Parameters:
- <none>
- Output Parameters:
- <none>
- Author:
- Created:
- ------------------------------------------------------------------------*/
- /* This .W file was created with the Progress AppBuilder. */
- /*----------------------------------------------------------------------*/
- /* 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 --- */
- /* Local Variable Definitions --- */
- DEF VAR cCodeC AS CHAR NO-UNDO.
- DEF VAR iCodeI AS INT NO-UNDO.
- DEF VAR cRecArt AS CHAR INIT 'MATEXT' NO-UNDO.
- DEF VAR iSprcd AS INT NO-UNDO.
- DEF VAR ix AS INT NO-UNDO.
- { incl/dlgdefinition.i }
- { src/adm2/widgetprto.i }
- /* _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
- &Scoped-define ADM-SUPPORTED-LINKS Data-Target,Data-Source,Page-Target,Update-Source,Update-Target
- /* Name of designated FRAME-NAME and/or first browse and/or first query */
- &Scoped-define FRAME-NAME dMahntexte
- /* Standard List Definitions */
- &Scoped-Define ENABLED-OBJECTS E_Text RECT-2 R_Stufe R_Art CB_Sprache ~
- Btn_OK Btn_Cancel
- &Scoped-Define DISPLAYED-OBJECTS E_Text R_Stufe R_Art CB_Sprache
- /* Custom List Definitions */
- /* List-1,List-2,List-3,List-4,List-5,List-6 */
- &Scoped-define List-6 R_Stufe R_Art
- /* _UIB-PREPROCESSOR-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartDialogCues" dMahntexte _INLINE
- /* Actions: adecomm/_so-cue.w ? adecomm/_so-cued.p ? adecomm/_so-cuew.p */
- /* SmartDialog,ab,49267
- Destroy on next read */
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- /* *********************** Control Definitions ********************** */
- /* Define a dialog box */
- /* Definitions of the field level widgets */
- DEFINE BUTTON Btn_Cancel AUTO-END-KEY
- LABEL "abbrechen"
- SIZE 15 BY 1.
- DEFINE BUTTON Btn_OK AUTO-GO
- LABEL "OK"
- SIZE 15 BY 1.
- DEFINE VARIABLE CB_Sprache AS CHARACTER FORMAT "X(256)":U
- LABEL "Sprache"
- VIEW-AS COMBO-BOX INNER-LINES 5
- LIST-ITEM-PAIRS "Item 1","Item 1"
- DROP-DOWN-LIST
- SIZE 42 BY 1 NO-UNDO.
- DEFINE VARIABLE E_Text AS CHARACTER
- VIEW-AS EDITOR NO-WORD-WRAP SCROLLBAR-HORIZONTAL SCROLLBAR-VERTICAL
- SIZE 162 BY 14.29
- BGCOLOR 15 FONT 3 NO-UNDO.
- DEFINE VARIABLE R_Art AS INTEGER INITIAL 1
- VIEW-AS RADIO-SET VERTICAL
- RADIO-BUTTONS
- "Kopftext", 1,
- "Fusstext", 2,
- "Allgemein", 3
- SIZE 18 BY 2.38 NO-UNDO.
- DEFINE VARIABLE R_Stufe AS INTEGER INITIAL 1
- VIEW-AS RADIO-SET VERTICAL
- RADIO-BUTTONS
- "Kontoauszug", 1,
- "1. Mahnung", 2,
- "2. Mahnung", 3,
- "3. Mahnung", 4,
- "Betreibung", 5
- SIZE 18 BY 3.81 NO-UNDO.
- DEFINE RECTANGLE RECT-2
- EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
- SIZE 166 BY 20.
- /* ************************ Frame Definitions *********************** */
- DEFINE FRAME dMahntexte
- E_Text AT ROW 6.24 COL 5 NO-LABEL WIDGET-ID 16
- R_Stufe AT ROW 1.95 COL 7 NO-LABEL WIDGET-ID 4
- R_Art AT ROW 1.95 COL 31 NO-LABEL WIDGET-ID 10
- CB_Sprache AT ROW 1.95 COL 61 COLON-ALIGNED WIDGET-ID 14
- Btn_OK AT ROW 22.05 COL 61
- Btn_Cancel AT ROW 22.05 COL 82.2
- RECT-2 AT ROW 1.48 COL 3 WIDGET-ID 2
- SPACE(1.99) SKIP(2.65)
- WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER
- SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE
- TITLE "Mahntexte"
- CANCEL-BUTTON Btn_Cancel WIDGET-ID 100.
- /* *********************** Procedure Settings ************************ */
- &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
- /* Settings for THIS-PROCEDURE
- Type: SmartDialog
- Allow: Basic,Browse,DB-Fields,Query,Smart
- Container Links: Data-Target,Data-Source,Page-Target,Update-Source,Update-Target
- Design Page: 1
- Other Settings: COMPILE APPSERVER
- */
- &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dMahntexte
- /* ************************* Included-Libraries *********************** */
- {src/adm2/containr.i}
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- /* *********** Runtime Attributes and AppBuilder Settings *********** */
- &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
- /* SETTINGS FOR DIALOG-BOX dMahntexte
- FRAME-NAME Custom */
- ASSIGN
- FRAME dMahntexte:SCROLLABLE = FALSE
- FRAME dMahntexte:HIDDEN = TRUE.
- /* SETTINGS FOR RADIO-SET R_Art IN FRAME dMahntexte
- 6 */
- /* SETTINGS FOR RADIO-SET R_Stufe IN FRAME dMahntexte
- 6 */
- /* _RUN-TIME-ATTRIBUTES-END */
- &ANALYZE-RESUME
- /* Setting information for Queries and Browse Widgets fields */
- &ANALYZE-SUSPEND _QUERY-BLOCK DIALOG-BOX dMahntexte
- /* Query rebuild information for DIALOG-BOX dMahntexte
- _Options = "SHARE-LOCK"
- _Query is NOT OPENED
- */ /* DIALOG-BOX dMahntexte */
- &ANALYZE-RESUME
-
- /* ************************ Control Triggers ************************ */
- &Scoped-define SELF-NAME dMahntexte
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL dMahntexte dMahntexte
- ON END-ERROR OF FRAME dMahntexte /* Mahntexte */
- DO:
- RUN ENDE.
- RETURN NO-APPLY.
- END.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL dMahntexte dMahntexte
- ON WINDOW-CLOSE OF FRAME dMahntexte /* Mahntexte */
- DO:
- RUN ENDE.
- RETURN NO-APPLY.
- END.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &Scoped-define SELF-NAME Btn_Cancel
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Cancel dMahntexte
- ON CHOOSE OF Btn_Cancel IN FRAME dMahntexte /* abbrechen */
- DO:
- RUN ENDE.
- RETURN NO-APPLY.
- END.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &Scoped-define SELF-NAME Btn_OK
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK dMahntexte
- ON CHOOSE OF Btn_OK IN FRAME dMahntexte /* OK */
- DO:
- DO WITH FRAME {&FRAME-NAME}:
- ASSIGN {&List-6}.
- iSprcd = INTEGER(CB_SPrache:SCREEN-VALUE) NO-ERROR.
- E_Text = E_Text:SCREEN-VALUE.
- cCodeC = STRING(R_Stufe,'99') + STRING(R_Art,'99').
-
- FOR EACH Tabel
- WHERE Tabel.Firma = Firma
- AND Tabel.RecArt = cRecArt
- AND Tabel.CodeC = cCodeC
- AND Tabel.Sprcd = iSprcd:
- DELETE Tabel.
- END.
- DO ix = 1 TO NUM-ENTRIES(E_Text, CHR(10)):
- CREATE Tabel.
- ASSIGN Tabel.Firma = Firma
- Tabel.RecArt = cRecArt
- Tabel.CodeI = ix
- Tabel.CodeC = cCodeC
- Tabel.Sprcd = iSprcd
- Tabel.BezL = ENTRY(ix, E_Text, CHR(10)).
- END.
- E_Text:BGCOLOR = 15.
- END.
- APPLY 'ENTRY' TO E_Text.
- RETURN NO-APPLY.
- END.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &Scoped-define SELF-NAME CB_Sprache
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL CB_Sprache dMahntexte
- ON VALUE-CHANGED OF CB_Sprache IN FRAME dMahntexte /* Sprache */
- DO:
- RUN ANZEIGE.
- APPLY 'ENTRY' TO E_Text.
- END.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &Scoped-define SELF-NAME R_Art
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL R_Art dMahntexte
- ON VALUE-CHANGED OF R_Art IN FRAME dMahntexte
- DO:
- RUN ANZEIGE.
- APPLY 'ENTRY' TO E_Text.
- END.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &Scoped-define SELF-NAME R_Stufe
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL R_Stufe dMahntexte
- ON VALUE-CHANGED OF R_Stufe IN FRAME dMahntexte
- DO:
- RUN ANZEIGE.
- APPLY 'ENTRY' TO E_Text.
- END.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &UNDEFINE SELF-NAME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dMahntexte
- /* *************************** Main Block *************************** */
- { incl/dlgmainblock.i }
- {src/adm2/dialogmn.i}
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- /* ********************** Internal Procedures *********************** */
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects dMahntexte _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: <none>
- ------------------------------------------------------------------------------*/
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ANZEIGE dMahntexte
- PROCEDURE ANZEIGE :
- /*------------------------------------------------------------------------------
- Purpose:
- Parameters: <none>
- Notes:
- ------------------------------------------------------------------------------*/
- DO WITH FRAME {&FRAME-NAME}:
- ASSIGN {&List-6}.
- iSprcd = INTEGER(CB_Sprache:SCREEN-VALUE) NO-ERROR.
-
- E_Text = ''.
- ix = 0.
- cCodeC = STRING(R_Stufe,'99') + STRING(R_Art,'99').
- FOR EACH Tabel NO-LOCK
- WHERE Tabel.Firma = Firma
- AND Tabel.RecArt = cRecArt
- AND Tabel.CodeC = cCodeC
- AND Tabel.Sprcd = iSprcd:
- E_Text = E_Text
- + (IF E_Text = '' THEN '' ELSE CHR(10))
- + Tabel.BezL.
- ix = ix + 1.
- END.
- IF ix > 0 THEN DO:
- DISPLAY E_Text.
- E_Text:BGCOLOR = 15.
- END.
- ELSE DO:
- ASSIGN E_Text.
- E_Text:BGCOLOR = 8.
- END.
-
- END.
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dMahntexte _DEFAULT-DISABLE
- PROCEDURE disable_UI :
- /*------------------------------------------------------------------------------
- Purpose: DISABLE the User Interface
- Parameters: <none>
- 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 dMahntexte.
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enableObject dMahntexte
- PROCEDURE enableObject :
- /*------------------------------------------------------------------------------
- Purpose: Super Override
- Parameters:
- Notes:
- ------------------------------------------------------------------------------*/
- DO WITH FRAME {&FRAME-NAME}:
- RUN COMBO_SPRACHE ( CB_Sprache:HANDLE ).
- END.
-
- { incl/dlgenableobject.i }
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI dMahntexte _DEFAULT-ENABLE
- PROCEDURE enable_UI :
- /*------------------------------------------------------------------------------
- Purpose: ENABLE the User Interface
- Parameters: <none>
- 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 E_Text R_Stufe R_Art CB_Sprache
- WITH FRAME dMahntexte.
- ENABLE E_Text RECT-2 R_Stufe R_Art CB_Sprache Btn_OK Btn_Cancel
- WITH FRAME dMahntexte.
- VIEW FRAME dMahntexte.
- {&OPEN-BROWSERS-IN-QUERY-dMahntexte}
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENDE dMahntexte
- PROCEDURE ENDE :
- /*------------------------------------------------------------------------------
- Purpose:
- Parameters: <none>
- Notes:
- ------------------------------------------------------------------------------*/
- IF btnOK THEN DO:
- END.
- { incl/dlgende.i }
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
- &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dMahntexte
- PROCEDURE initializeObject :
- /*------------------------------------------------------------------------------
- Purpose: Super Override
- Parameters:
- Notes:
- ------------------------------------------------------------------------------*/
- /* Code placed here will execute PRIOR to standard behavior. */
- RUN SUPER.
- DO WITH FRAME {&FRAME-NAME}:
- RUN ANZEIGE.
- END.
- END PROCEDURE.
- /* _UIB-CODE-BLOCK-END */
- &ANALYZE-RESUME
|