d-liefstsuch.w 11 KB

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