d-auswahl-allg.w 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1
  2. &ANALYZE-RESUME
  3. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  4. &Scoped-define FRAME-NAME D-Dialog
  5. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS D-Dialog
  6. /*------------------------------------------------------------------------
  7. File:
  8. Description: from cntnrdlg.w - ADM SmartDialog Template
  9. Input Parameters:
  10. <none>
  11. Output Parameters:
  12. <none>
  13. Author:
  14. Created:
  15. ------------------------------------------------------------------------*/
  16. /* This .W file was created with the Progress UIB. */
  17. /*----------------------------------------------------------------------*/
  18. /* Create an unnamed pool to store all the widgets created
  19. by this procedure. This is a good default which assures
  20. that this procedure's triggers and internal procedures
  21. will execute in this procedure's storage, and that proper
  22. cleanup will occur on deletion of the procedure. */
  23. CREATE WIDGET-POOL.
  24. /* *************************** Definitions ************************** */
  25. /* Parameters Definitions --- */
  26. DEF INPUT-OUTPUT PARAMETER lAlle AS LOG NO-UNDO.
  27. /* Local Variable Definitions --- */
  28. /* ---------- Globale Variablen ---------------------------------- */
  29. { v8/globvar.i" " " " "SHARED" }
  30. { v8/debivar.i " " " " "SHARED" }
  31. { v8/artivar.i " " " " "SHARED" }
  32. { v8/contvar.i " " " " "SHARED" }
  33. /* _UIB-CODE-BLOCK-END */
  34. &ANALYZE-RESUME
  35. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  36. /* ******************** Preprocessor Definitions ******************** */
  37. &Scoped-define PROCEDURE-TYPE SmartDialog
  38. &Scoped-define DB-AWARE no
  39. &Scoped-define ADM-CONTAINER DIALOG-BOX
  40. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  41. &Scoped-define FRAME-NAME D-Dialog
  42. /* Standard List Definitions */
  43. &Scoped-Define ENABLED-OBJECTS CB_Auswahl T_Alle Btn_OK Btn_Cancel
  44. &Scoped-Define DISPLAYED-OBJECTS T_Alle
  45. /* Custom List Definitions */
  46. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  47. &Scoped-define List-6 T_Alle
  48. /* _UIB-PREPROCESSOR-BLOCK-END */
  49. &ANALYZE-RESUME
  50. /* *********************** Control Definitions ********************** */
  51. /* Define a dialog box */
  52. /* Definitions of the field level widgets */
  53. DEFINE BUTTON Btn_Cancel AUTO-END-KEY DEFAULT
  54. LABEL "&Abbrechen"
  55. SIZE 16.8 BY 1
  56. BGCOLOR 8 .
  57. DEFINE BUTTON Btn_OK AUTO-GO DEFAULT
  58. LABEL "OK"
  59. SIZE 16.8 BY 1
  60. BGCOLOR 8 .
  61. DEFINE VARIABLE CB_Auswahl AS CHARACTER FORMAT "X(256)":U
  62. LABEL "Label"
  63. VIEW-AS COMBO-BOX INNER-LINES 5
  64. LIST-ITEMS "Kontoauszug","1. Mahnung","2. Mahnung","3. Mahnung","Betreibung"
  65. DROP-DOWN-LIST
  66. SIZE 56.2 BY 1
  67. BGCOLOR 15 NO-UNDO.
  68. DEFINE VARIABLE T_Alle AS LOGICAL INITIAL yes
  69. LABEL "ganzer Kunde"
  70. VIEW-AS TOGGLE-BOX
  71. SIZE 24.6 BY 1 NO-UNDO.
  72. /* ************************ Frame Definitions *********************** */
  73. DEFINE FRAME D-Dialog
  74. CB_Auswahl AT ROW 2 COL 16 COLON-ALIGNED
  75. T_Alle AT ROW 3 COL 18 WIDGET-ID 2
  76. Btn_OK AT ROW 4.52 COL 18
  77. Btn_Cancel AT ROW 4.52 COL 57
  78. SPACE(6.00) SKIP(1.19)
  79. WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER
  80. SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE
  81. TITLE "Allgemeine Auswahl"
  82. DEFAULT-BUTTON Btn_OK CANCEL-BUTTON Btn_Cancel.
  83. /* *********************** Procedure Settings ************************ */
  84. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  85. /* Settings for THIS-PROCEDURE
  86. Type: SmartDialog
  87. Allow: Basic,Browse,DB-Fields,Query,Smart
  88. Other Settings: COMPILE
  89. */
  90. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  91. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB D-Dialog
  92. /* ************************* Included-Libraries *********************** */
  93. {src/adm/method/containr.i}
  94. /* _UIB-CODE-BLOCK-END */
  95. &ANALYZE-RESUME
  96. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  97. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  98. /* SETTINGS FOR DIALOG-BOX D-Dialog
  99. FRAME-NAME */
  100. ASSIGN
  101. FRAME D-Dialog:SCROLLABLE = FALSE
  102. FRAME D-Dialog:HIDDEN = TRUE.
  103. /* SETTINGS FOR COMBO-BOX CB_Auswahl IN FRAME D-Dialog
  104. NO-DISPLAY */
  105. /* SETTINGS FOR TOGGLE-BOX T_Alle IN FRAME D-Dialog
  106. 6 */
  107. /* _RUN-TIME-ATTRIBUTES-END */
  108. &ANALYZE-RESUME
  109. /* Setting information for Queries and Browse Widgets fields */
  110. &ANALYZE-SUSPEND _QUERY-BLOCK DIALOG-BOX D-Dialog
  111. /* Query rebuild information for DIALOG-BOX D-Dialog
  112. _Options = "SHARE-LOCK"
  113. _Query is NOT OPENED
  114. */ /* DIALOG-BOX D-Dialog */
  115. &ANALYZE-RESUME
  116. /* ************************ Control Triggers ************************ */
  117. &Scoped-define SELF-NAME D-Dialog
  118. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL D-Dialog D-Dialog
  119. ON WINDOW-CLOSE OF FRAME D-Dialog /* Allgemeine Auswahl */
  120. DO:
  121. /* Add Trigger to equate WINDOW-CLOSE to END-ERROR. */
  122. APPLY "END-ERROR":U TO SELF.
  123. END.
  124. /* _UIB-CODE-BLOCK-END */
  125. &ANALYZE-RESUME
  126. &Scoped-define SELF-NAME Btn_OK
  127. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK D-Dialog
  128. ON CHOOSE OF Btn_OK IN FRAME D-Dialog /* OK */
  129. DO:
  130. DO WITH FRAME {&FRAME-NAME}:
  131. ASSIGN {&List-6}.
  132. Linkcd = 0.
  133. Linknr = LOOKUP(CB_Auswahl:SCREEN-VALUE, CB_Auswahl:LIST-ITEMS, ";") - 1.
  134. lAlle = T_Alle.
  135. END.
  136. END.
  137. /* _UIB-CODE-BLOCK-END */
  138. &ANALYZE-RESUME
  139. &UNDEFINE SELF-NAME
  140. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK D-Dialog
  141. /* *************************** Main Block *************************** */
  142. DO WITH FRAME {&FRAME-NAME}:
  143. CB_Auswahl:DELIMITER = ";".
  144. ja = TRUE.
  145. DO WHILE ja:
  146. ja = CB_Auswahl:DELETE(1).
  147. END.
  148. CASE Linkcd:
  149. WHEN 1 THEN DO:
  150. FRAME {&FRAME-NAME}:TITLE = 'Auswahl der Mahnstufe'.
  151. CB_Auswahl:LABEL = "Mahnstufe".
  152. CB_Auswahl:ADD-LAST("Kontoauszug;1. Mahnung").
  153. CB_Auswahl:ADD-LAST("2. Mahnung;3. Mahnung").
  154. CB_Auswahl:ADD-LAST("Betreibung").
  155. END.
  156. END CASE.
  157. Linkcd = 99.
  158. END.
  159. {src/adm/template/dialogmn.i}
  160. /* _UIB-CODE-BLOCK-END */
  161. &ANALYZE-RESUME
  162. /* ********************** Internal Procedures *********************** */
  163. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects D-Dialog _ADM-CREATE-OBJECTS
  164. PROCEDURE adm-create-objects :
  165. /*------------------------------------------------------------------------------
  166. Purpose: Create handles for all SmartObjects used in this procedure.
  167. After SmartObjects are initialized, then SmartLinks are added.
  168. Parameters: <none>
  169. ------------------------------------------------------------------------------*/
  170. END PROCEDURE.
  171. /* _UIB-CODE-BLOCK-END */
  172. &ANALYZE-RESUME
  173. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available D-Dialog _ADM-ROW-AVAILABLE
  174. PROCEDURE adm-row-available :
  175. /*------------------------------------------------------------------------------
  176. Purpose: Dispatched to this procedure when the Record-
  177. Source has a new row available. This procedure
  178. tries to get the new row (or foriegn keys) from
  179. the Record-Source and process it.
  180. Parameters: <none>
  181. ------------------------------------------------------------------------------*/
  182. /* Define variables needed by this internal procedure. */
  183. {src/adm/template/row-head.i}
  184. /* Process the newly available records (i.e. display fields,
  185. open queries, and/or pass records on to any RECORD-TARGETS). */
  186. {src/adm/template/row-end.i}
  187. END PROCEDURE.
  188. /* _UIB-CODE-BLOCK-END */
  189. &ANALYZE-RESUME
  190. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI D-Dialog _DEFAULT-DISABLE
  191. PROCEDURE disable_UI :
  192. /*------------------------------------------------------------------------------
  193. Purpose: DISABLE the User Interface
  194. Parameters: <none>
  195. Notes: Here we clean-up the user-interface by deleting
  196. dynamic widgets we have created and/or hide
  197. frames. This procedure is usually called when
  198. we are ready to "clean-up" after running.
  199. ------------------------------------------------------------------------------*/
  200. /* Hide all frames. */
  201. HIDE FRAME D-Dialog.
  202. END PROCEDURE.
  203. /* _UIB-CODE-BLOCK-END */
  204. &ANALYZE-RESUME
  205. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI D-Dialog _DEFAULT-ENABLE
  206. PROCEDURE enable_UI :
  207. /*------------------------------------------------------------------------------
  208. Purpose: ENABLE the User Interface
  209. Parameters: <none>
  210. Notes: Here we display/view/enable the widgets in the
  211. user-interface. In addition, OPEN all queries
  212. associated with each FRAME and BROWSE.
  213. These statements here are based on the "Other
  214. Settings" section of the widget Property Sheets.
  215. ------------------------------------------------------------------------------*/
  216. DISPLAY T_Alle
  217. WITH FRAME D-Dialog.
  218. ENABLE CB_Auswahl T_Alle Btn_OK Btn_Cancel
  219. WITH FRAME D-Dialog.
  220. VIEW FRAME D-Dialog.
  221. {&OPEN-BROWSERS-IN-QUERY-D-Dialog}
  222. END PROCEDURE.
  223. /* _UIB-CODE-BLOCK-END */
  224. &ANALYZE-RESUME
  225. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-view D-Dialog
  226. PROCEDURE local-view :
  227. /*------------------------------------------------------------------------------
  228. Purpose: Override standard ADM method
  229. Notes:
  230. ------------------------------------------------------------------------------*/
  231. RUN dispatch IN THIS-PROCEDURE ( INPUT 'view':U ) .
  232. CB_Auswahl:SCREEN-VALUE IN FRAME {&FRAME-NAME} = CB_Auswahl:ENTRY(Linknr + 1).
  233. T_Alle:SCREEN-VALUE = STRING(lAlle,"yes/no").
  234. T_Alle = Ja.
  235. END PROCEDURE.
  236. /* _UIB-CODE-BLOCK-END */
  237. &ANALYZE-RESUME
  238. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records D-Dialog _ADM-SEND-RECORDS
  239. PROCEDURE send-records :
  240. /*------------------------------------------------------------------------------
  241. Purpose: Send record ROWID's for all tables used by
  242. this file.
  243. Parameters: see template/snd-head.i
  244. ------------------------------------------------------------------------------*/
  245. /* SEND-RECORDS does nothing because there are no External
  246. Tables specified for this SmartDialog, and there are no
  247. tables specified in any contained Browse, Query, or Frame. */
  248. END PROCEDURE.
  249. /* _UIB-CODE-BLOCK-END */
  250. &ANALYZE-RESUME
  251. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed D-Dialog
  252. PROCEDURE state-changed :
  253. /* -----------------------------------------------------------
  254. Purpose:
  255. Parameters: <none>
  256. Notes:
  257. -------------------------------------------------------------*/
  258. DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
  259. DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
  260. END PROCEDURE.
  261. /* _UIB-CODE-BLOCK-END */
  262. &ANALYZE-RESUME