d-a-tabel-i.w 11 KB

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